A terminal without commands is like an empty text editor. This lesson gives you the eight commands that cover 80% of what you do on a daily basis.
Know where you are and what is there
Before doing anything, two reflexes:
pwd (print working directory) prints the current folder. Use it whenever you wonder "where am I right now?".
ls lists the files in the current folder. With -l you get details (permissions, size, date). With -a you also see hidden files (those starting with .). Both together: -la.
Create and delete
mkdir creates a folder. touch creates an empty file (or updates its timestamp if the file already exists).
rm deletes a file. To delete a folder and all its contents, add -r (recursive).
Copy and move
cp copies a file. To copy an entire folder, add -r.
mv moves a file from one place to another. It also serves as a rename: if the destination is in the same folder, it is a rename.
Read and display
cat prints the contents of a file in the terminal. Handy for small text files.
echo prints text. With >> it appends that text to the end of a file (you will cover redirections in detail in the next lesson).
Get help
man <command> opens the full manual. --help gives a quick summary. Quit man with the q key.
