Skip to content

Terminal / Command Line Interface (CLI)

1. Getting started 🧰

Install a modern terminal emulator

Suggestions with recommendations in bold font:

Start here

Web

For macOS:

For Windows:

Cheat sheets

2. Terminal - Fundamental commands

A list of terminal command names with short descriptions.

Navigation:

pwd             # presents working directory
cd [DIRECTORY]  # changes the present working directory
ls              # lists contents of a directory
ls -a           # lists contents including hidden files (starting with ".")
ls -l           # lists contents and additional information

Copying and Moving:

cp [SOURCE] [TARGET]  # copying files
mv [SOURCE] [TARGET]  # moving files or directories (and renaming them)
rm [FILE]             # removing a file
mkdir [DIRECTORY]     # making a new directory
rmdir [DIRECTORY]     # removing an empty directory

Viewing text files:

cat [FILENAME]   # view contents of a text file
less [FILENAME]  # view contents of a large text file

Editing text files:

nano [FILE]   # open a file in a simple editor
vim [FILE]    # open a file in the Vim editor for coding
              # Note: exit Vim by typing ":q" <Enter>
emacs [FILE]  # open a file in the Emacs editor

Other:

man [COMMAND_NAME]  # show a user's guide for a terminal command
                    # (for navigation use Vim commands)
clear               # clears the terminal screen