The basics

First, let’s talk about the basics. These commands will help you traverse any disk in the linux terminal environment.

Command Function

pwd

Print working directory.

ls

List files.

cd

Change directory.

cat

Print file to the command window [1]

man

Tutorial for given linux keyword.

history

Shows your command history.

cp

Copy file.

mv

Move file (can also be used to rename something)

mkdir

Make directory (folder).

rm

Remove file.

rm -r

Remove file/folder recursively (i.e. remove folder and all its contents. Basically a more powerful version of rmdir.)

rm -rf

Remove file/folder recursively (Basically a more powerful version of rm -r)

ps

List all active processes (you can use grep here)

Use extreme caution when using rm -rf. This function removes EVERYTHING in the directory and does NOT even give you a warning.

How to reference files

Expression Function

./

Current working directory.

../

Parent directory.

../../

Parent of parent directory.

*

Wild card. (For example if you wanted to do something to README.md and README2.md you could say README*.md. Just like searching a database.)


1. The |more keyword lets you view the file bit by bit, and |grep keyword highlights every place keyword shows up.