A side goal of this class is for students to become more comfortable with using the terminal. With practice, you will find that you are faster at navigating folders, creating files/folders, compiling/running programs, using tools stuch as git, etc. using the terminal than you are using a GUI. Familiarity with a terminal is especially useful in system administration and web development.
Summary of common terminal commands
Here is a summary table of the most common terminal commands for this course:
|dir||Lists the current directory contents (only available in Windows)|
|ls||Lists the current directory contents (not available in Windows command prompt)|
|cd dirName||Changes the current directory in the terminal to be
|mkdir dirName||Makes a new, empty directory called
|ni fileName||Creates a new, empty file called
|touch fileName||Creates a new, empty file called fileName. We can do
|cd ..||Updates the current directory in the terminal to be its parent directory. For example, if the current directory is
|del fileName||Deletes the file called
|rm fileName||Deletes the file called
Other terminal tips
When you are typing a directory name or file name in the terminal, you can type a few letters and hit Tab – the terminal will attempt to autocomplete the rest of the name.
To recall a command you recently typed in the terminal, you can use the up or down arrows. This saves you from typing the same commands over and over.