Linux commands

Directory commands
Command Command description
mkdir directoryName make a directory
rmdir directoryName remove (delete) a directory - only works if there are no files in the directory
cd directoryName change directory
cd change to your main directory /home/students/username/
cd .. change to directory one level above current directory
pwd "print working directory" - display name of current directory you are in
ls list files in current directory

Editing commands
vi fileName edit text file called fileName (creates file first if it does not exist)
cat fileName print all text in specified file to the screen

File manipulation commands
cp oldName newName copy file
mv oldName newName move file
rm fileName remove (delete) file - be careful! don't use rm unless you are sure you want to delete a file!

Programming
g++ program.cpp -o program.out compile C++ code into executable machine code
./program.out run executable machine code

Extra commands
exit end linux session
passwd change your account password
Ctrl C (press Ctrl and C together) End program (good for breaking out of infinite loops)