A crash course on the Unix command line

Description Command Example
list contents ls $ ls -l
make directory mkdir <dirname> $ mkdir workspace
change directory cd <dirname> $ cd workspace/
cd one directory up $ cd ..
cd to home directory $ cd ~ or just $ cd
cd to path incl. home dir $ cd ~/workspace/
move file (rename) mv <source> <target> $ mv README.rdoc README.md
copy file cp <source> <target> $ cp README.rdoc README.md
remove file rm <file> $ rm README.rdoc
remove empty directory rmdir <directory> $ rmdir workspace/
remove nonempty directory rm -rf <directory> $ rm -rf tmp/
concatenate & display file contents cat <file> $ cat ~/.ssh/id_rsa.pub