[Part 2 ]Kali Linux Basics: Exploring Kali Linux in term of application and command

Koay Yong Cett
10 min readApr 25, 2020

This topic continue back from the [Part 1] Kali Linux. In this lesson, we are going to have a look around the Kali Linux OS. Then, we will just see what Kali Linux has to offer us in term of the tools, design and etc. Now, let’s dive right in to explore the Kali Linux OS.

This is our desktop here inside of Kali Linux in VMWare Playstation Player. There are couple things exists at your desktop and you don’t have to worry about it. So, we talk about navigating in Kali Linux and there’s is couple places that we can look. First on top of the desktop, we can navigate through the panel and find couple things like the home file(white folder), terminal, Kazam (record a video and take screenshot of your screen) and other applications in Kali Linux.

We can simply add the applications and tools to the panel or desktop by just simply right click on it.

Here, we have our folders/files. We can click on it and navigate around and this feels like any other machine. We have all the folders such as Desktop, Documents, Downloads, Music, Pictures, Public, Templates and Videos. Whether you’re a Windows user or Mac user, this feel very common so this is the graphical user interface (GUI) way of interacting with the folders/files. As we move on in this lesson, we are going to be using the terminal most of the time.

This is the terminal for the Kali Linux and it is something very similar to command line (cmd) in Windows OS. From here, we can actually navigate to all the folders in the machine and modify the files. Any actions that can be done in the graphic point of view, we can also do it in this command line point of view as well. Hence, as we learn, we are going to get a little less reliable on the graphical interface and more on terminal. However, you can still perform a lot of things from the graphical user interface side if you still need the interaction with machine and don’t want to be completely keyboard oriented.

In this section, we will discuss briefly about some of the common tools in Kali Linux Os.

Here, we have a Mousepad which is previously referred as leafpad in older version of Kali Linux. It is similar to the notepad where you can take some quick note and save it. This is pretty familiar for all of us.

Here, we have firefox which is used to be called iceweasel and that is one of the web browsers in the Kali Linux OS.

Burp Suite is a very popular tool for web application penetration testing. We are not going to discuss about this tools at the moment. If you ever have the chances to get into basic pentesting, then you probably will have to use burp suite at a regular basis.

Metaploit is penetration testing framework that makes hacking simple. It’s an essential tool for many attackers and defenders. It can be taught in deep lessons all by themselves and we just have to know that how robust this tool is.

CherryTree is a hierarchical note taking application. This allows the user to keep their note when performing their tasks.

When we come up to the application at the top, everything is grouped according to the their purpose. All this tool is very useful, take some time and went through the tools and make some research on it. Try figure out how to use it. Kali Linux is distribution that full of useful tools and it’s perfect for pentesting. If you are a type of person that don’t want extra stuff in your OS, then maybe you can try move forward to custom build OS.

Navigating File System with the terminal

From this section, we are going to focus on the terminal and try to avoid the use of graphical side of things and just get your hands dirty in the terminal. This will make you feel comfortable using it after playing around with the basics stuffs and commands. If you never use Linux before, I really hope that this well be helpful to you. Some of the commands are going to be the same commands regardless of whether it is on Kali Linux machine or other distribution of Linux. Hence, you probably can use all this commands in other Linux distribution as well. The commands is definitely the meat of this lesson.

Commands that we will learn in this section/ part:

  1. pwd (print working directory)
  2. cd (change directory)
  3. ls (listing the files), finding hidden folders with ls
  4. mkdir (make directory), rmdir (remove directory)
  5. cp(copy), rm(remove), mv(move), locate files
  6. updatedb
  7. passwd (password)
  8. man

By the end of this section, you should be pretty comfortable with all these commands. It may seem kind of daunting but all these commands is related to each other in some way.

Let’s dive in to the command lines:

Now, in our first lesson of navigating the file system. If you are a Windows OS user, then you are used to navigating the file system probably through folders with a GUI. We can still do this in Kali Linux but we will spend our majority of time in the terminal. Thus, we really need to know how to get around with the terminal.

First thing that we probably can do is asking where are we at. We can type the command pwd in the terminal which stands for present working directory. Now, we know that we are in the home/kali directory but how do we get out of this directory?

We can use a command called cd and that stands for change directory. So if we want to change directory backwards, we just type in cd and two dots in the terminal. Now, we are in the home directory.

In addition, how do we know whether if we can get backwards from here? We can just keep trying with the command: cd .. to figure it out. Then, we find out that the / is our base folder and think that this is the “lowest” that we can go. Now, think about how do you go forwards again and we don’t know what is in our directories right? So, we sitting in this slash(/) folder and how do we look around?

There is a command called ls that will lists everything that’s in the current folder. So, when we type in ls, the terminal will displayed the color-coordinated of folders in the slash folder that we currently in. The color coordination is depends on few reasons just like whether a folder is read/write or any other permission settings related to a certain color.

We know that we just came out of home and now we can go back into home by typing the command line cd home/ (actually we can hit tab to autocomplete when you just type in cd h as there is only one folder that start with h)

When I hit the tab with the following command, it will displayed two folders that are starting with m.

If we want to access the etc folder that is in the slash folder, we can’t type in cd etc as the etc folder is not in the current area/directory. Instead, we put a forward slash(/) in front of etc and now we are in the etc folder.

This show that the command line in the terminal is case sensitive.

Another trick when you want to navigate to Music in the /home/kali/Music directory, you can try to type in command ~/Music which is shown in the figure above.

We can use a command called mkdir stands for make directory to make our own folder. Now, the Cett folder exist and there should be nothing in it.

Now, we can get rid of the Cett folder by typing in the command rmdir Cett/ and hit enter and it’s gone.

Next, we can use command ls — la to find the hidden file here. Note that there are more file is found compared to the ls command that we entered in previous figure mentioned before.

We are able to change directory into the hidden file (.cache file) and there are some information in it. When you saw it originally with the ls command, you didn’t see that much of folder. Thus, be aware that just because it looks like something not there doesn’t mean it’s not there. It might be hidden similar to Windows OS where you have hidden files and folders.

Now, i am going to create a text file to be used as a example.

We can copy the test.txt file to the Downloads folder with cp command combine with the destination. Note that the original file still exist.

We can remove the test.txt file with the command rm and run ls with the destination folder to check whether the test.txt is removed. Now, there is no file exist in Downloads folder.

We can physically move the test.txt file to Downloads with command mv and the file is disappeared in the home/kali directory. Now, the file is moved to the Downloads folder.

We can use the command locate to find all the related name files and folders.

Sometimes, the command locate might not work right away and you might need to update the database with command sudo updatedb. It updates everything for us and we can use locate again to find the files and folders we want again. Thus, it has to build the database of the information that it’s finding in order to locate what you are searching for. Therefore, make sure that you use updatedb frequently.

Another important thing that you want to do with your new account is change the default password. This is because that we are using a default password which is kali and that’s not very secure. Thus, we can change a password for our user with command passwd and enter both the current and new password.

Lastly, I want to show all of you something called man pages which is your instructions for any command that you are running. Most of the commands come with a man page. So let’s look at ls, we can just simply type in man ls and hit enter. The man pages for ls is shown in the figure above. This will provide us all the information about ls which is the list directory contents and what options that we can use with ls. You can just scroll through the man pages and see what it has to offer.

Sometimes when you are stuck on some commands line, you can try to look in the man pages or just type in the command ls --help that provide you something pretty close to man pages. Now, it came to an end for this lesson and topic. In next lesson, we are going to move on to users and privileges how to add users, change some pseudos, modifications to our file permissions ,etc. Thank you all for reading.

To be continued… more to be discussed in next topic.

--

--

Koay Yong Cett

A Bachelor CS student with major in Network Security (UniSZa). Every stories I shared is based on my personal opinion. Thanks you. Having my Internship now.