Terminal navigation

CommandWhat it does
lsList what's in the current directory.
pwdPrints the "present working directory," or the path to where you are in the filesystem
cd ~Go to your home directory
cd somewhereGo to somewhere
cd ..Go to the parent directory
open file.txtOpens file.txt with its default program
cat file.txtPrints out the contents of file.txt
python fun.pyRuns the Python program fun.py
mv old.txt new.txtRenames a file from old.txt to new.txt. Also works for directories.
mv file.txt dirMoves a file to directory dir.
cp old.txt new.txtCopy a file from old.txt to new.txt.
mkdir bagCreates a new directory called bag
rm file.txtremoves (deletes) the file file.txt
rm -d dirremoves (deletes) the directory dir
rm -r dirrecursively removes (deletes) the directory dir and all subdirectories and files within that directory. Be careful, this is a powerful tool!

Terms