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 |
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 |
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! |
g++ program.cpp -o program.out | compile C++ code into executable machine code |
./program.out | run executable machine code |
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) |