Terminal Basics


Below you will find a collection of tutorials on the basics of using the terminal.

Before You Start

These tutorials assume no prior knowledge of the subject.



Why should I use the terminal?

Learn why you should use the terminal.


Learn how to set up your terminal for macOS and Windows.

Understanding the prompt

Learn about the different parts of the prompt.

Basic commands

Change directories

cd folder-name/

Move up a directory

cd ..

Move into your user directory

cd ~

Show files and folders in a directory


Create a file

touch file-name

Create a folder

mkdir folder-name

View file contents

cat my-file
less my-file


Reuse previous commands

To reuse previous commands, press the up arrow key.

Complete the name of a directory or file

To complete the name of a directory or file in your terminal, type one or more characters, then press Tab.

Learn more about a command

man command-name

Move through text using these keyboard shortcuts

Learn how to move through text in your terminal using keyboard shortcuts.

Advanced commands

Move file or folder

mv my-file my-folder
mv first-folder second-folder

Rename file or folder

mv current-name new-name

Copy file or folder

cp file-name folder1
cp -R folder1 folder2

Delete file

Warning: You can’t undo this action!

rm file-name

Delete folder

rmdir folder-name

Notice any errors? Have other questions or suggestions? Send your comments and questions to contact@simpledev.io.