A List of Useful Shell Commands for Linux Beginners

Here you will find essential commands to start mastering the shell.

theUnknown
The Startup

--

How To Find Out What Directory You’re Currently In?

You will need to use Print Working Directory command, which is:

pwd

How To Navigate to Any Directory?

You will need to use Change Directory command, which is:

cd directoryname

You will have to provide either the absolute or relative path to the directory.

It can get pretty tiring navigating with absolute or relative paths all the time, so there are also some shortcuts to this:

  • . (the directory you’re currently in)
  • ..(parent directory, eg cd..).
  • ~ (home directory, eg /home/user)
  • - (takes you to the previous directory you were just at)

How To List The Contents of a Directory?

You will need to use List Directories command:

ls

This does not include hidden files, which start with . , so, in order to list ALL:

--

--

theUnknown
The Startup

Everything is unknown until it’s known. Self-learner.