Terminal Basics

Log in or sign up for a free membership to view code/command previews.
To view the full tutorial, log in or sign up for a free trial on our Sign Up page.

Summary

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.

Tutorials

Introduction

Why should I use the terminal?

Learn why you should use the terminal.

Setup

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

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

ls

Create a folder

mkdir folder-name

View file contents

cat my-file
less my-file

Tips

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.