Now that we have the hacking lab setup. Let’s move onto something a much more interesting, the linux command line. If you have never touched a linux machine before, that’s fine. This post is primarily going to focus on commands that are absolutely vital to navigating a terminal.

Let’s start…

PWD (Print Working Directory)

The PWD command stands for “Print Working Directory”, and that’s exactly what it does. It will give us the directory path to the folder we are currently working in. Simple enough eh?.

LS (List Segments)

The ls command simply lists the contents of the directory. It comes with many switches and parameters which can be useful. Let’s go through a few.

If you type ‘ls’ with no additional arguments, you will get quick easily digestible details.

ls comes with many handy switches, one of the main ones is the ‘-l’ option. Which will give you more information, such as the size, modified data and time, permissions and owner of the file.

You are almost bound to come across a time when you are trying to a find a file which is hidden, that’s when you are going to need the handy ‘-a’ arugment. This will list hidden files.

Have a look at the man page, there are many useful arguments that can be passed to the ‘ls’ command. I won’t list them all here.


CD (Change Directory)

Now it wouldn’t be a terminal without the cd command, as with Windows and Mac’s. The cd command makes a feature in the linux terminal, it also the same thing…

The command simply takes you to the specified directory. I’ve created a new folder, ‘folder1’ so we can navigate to it.

Obviously you can specify a longer path and it will navigate to that also.

There are some extremely useful shortcuts that come packaged with linux, the tilde (~) and the (..) arguments. They work with other commands, not just CD. So what does the tilde (~) actually do? Well it takes the user to their home directory.

So what about (..) that takes us back a level, so if we are currently sitting comfortably in ‘~/LinuxCommands/folder1’, it will take us back to the previous folder. ‘~/LinuxCommands/’.

Pretty neat right? I think so.


The easiest command in the world. Clear the terminal, I won’t say much else on this one.



Just like that, it’s gone.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.