Welcome back, aspiring cyberwarriors!
A significant number of aspiring hackers find themselves lacking familiarity with the Linux operating system, having typically developed their foundational computing skills in a Windows or Mac environment. This lack of experience can serve as a considerable barrier to mastering the vital competencies required to transition into the world of professional white hat hacking. While there are various hacking tools available for different platforms, Linux stands out as the preferred environment among many cybersecurity professionals due to its robustness, flexibility, and the vast array of open-source tools it offers.

To embark on a journey toward becoming a skilled hacker, it is important to reach a solid understanding of Linux fundamentals.
Therefore, this series of articles is designed to equip aspiring hackers with the essential Linux knowledge necessary to enhance their skills and pave the way for a successful career in ethical hacking.
In this tutorial, I will guide you through the basics of getting started with Kali Linux. Although my examples will be based on Kali 25.2, the principles apply to almost every Linux distribution. Let’s get rolling!
Step #1: Open a Terminal
To start using Kali Linux, the first step is to open a terminal. You can find the terminal icon at the top of the screen and double-click it, or you can simply press Control + Alt + T.

Clicking on the terminal or pressing Ctrl+Alt+T will open a terminal window like the one below.

This terminal is set to open a shell by default. A shell is a command-line environment that allows us to execute commands on the underlying operating system and write scripts (more on scripts later). There are many different shell environments in Linux, with the most popular being the BASH shell, or Bourne Again Shell. For a long time, this was the default shell in Kali and many other Linux distributions; however, Kali Linux now uses the Z shell as its default.
Step #2: File System
Unlike the Windows file system, Linux systems are not restricted by physical drives. The Linux file system has its root directory represented by a single forward slash (/). This root does not correspond to a physical drive; rather, it signifies the top of the logical file structure.

In the image of the Linux file system above, you can see that the top level is represented by the / symbol, known as the root of the file system. It’s important not to confuse this with the “root” user; they are two distinct concepts. Here, “root” refers to the base of the file structure.
As a beginner, the most important subdirectories under / that you should be aware of are:
/root: This is the home directory of the all-powerful root user.
/etc: This directory typically contains configuration files for the system.
/home: This is the home directory for regular users.
/mnt: This is the location where other file systems are attached or mounted to the main file system.
/bin: This directory holds binary files or executable programs.
/lib: This is where libraries are stored—these are shared programs, similar to DLLs in Windows.
We will revisit these key directories in a later tutorial, but for now, it’s sufficient for you to have a general understanding of the Linux file system.
Step #3: pwd
When working in Linux, it’s often important to know your current directory. The command “print working directory,” commonly abbreviated as pwd, displays your location within the directory structure. This information is crucial when navigating through directories. Let’s type pwdto find out where we are.
kali> pwd

Linux returned the path /home/kali, indicating that we are currently in the home directory of the regular user “kali.” If we were in a different directory, it would display the name of that directory instead, as we will see in the examples that follow.
Step #4: whoami
By default, modern Kali Linux does not allow logging in as the root user from the graphical login menu for security reasons. During the installation process, Kali creates a regular user account. If you need to run a specific tool with root privileges, you can do so using the sudo command, which eliminates the need to log in as root. This approach enhances security, as anyone who gains access to your system while logged in as a regular user will only have regular user privileges, rather than root privileges, as was common before the introduction of the sudo command.
If you ever forget which user you are logged in as, you can simply type whoami to find out.
kali> whoami

If I had been logged in as another user, such as root, the system would have returned that name.
Step #5: cd
Navigating the file system in the terminal is an essential skill in Linux. Like the command line in Windows, you can change directories using the cd command, which stands for “change directory.” To change directories, simply type cd followed by the name of the directory you want to access. For example:
kali> cd Downloads

We are currently in the /home/kali/Downloads directory, as indicated by the prompt, and we confirmed this by typing pwd.
To move up one level in the file structure, we can use the cd command followed by two dots: ..
kali> cd ..

If we want to move up two levels, we can type cd followed by the double dot and a forward slash (../) followed by a second double dot, such as:
kali> cd ../..

If we want to move up to the home directory of our user, we can simply type:
kali> cd ~

If we want to move up to the root level in the file structure, we can simply type:
kali> cd /

Where / represents the top or the root of the file structure.
Step #6: ls
When we want to see the contents of a directory, we can use the ls command or the list command.
kali> ls

In the screenshot above, both files and directories are displayed when using the ls command. If we want more detailed information about the files and directories, such as permissions, owner, size, and modification date, we can use the -l option with the ls command:
kali> ls -l

Some files in Linux are hidden and won’t appear with a standard ls or ls -l command. However, using the lowercase a option (-a) will display these hidden files:
kali> ls -la

Step #7: help
Almost every command in Linux comes with a help file that provides a brief overview to help you understand the command, utility, or application. For example, if I wanted assistance using the popular reconnaissance tool, nmap, I could simply type the command followed by –help. It’s important to note that double dashes (–) precede word options like help, whereas single dashes (-) are used before single-letter options. You can refer to the help screen for nmap for more examples:
kali> nmap –help

In some cases, you can use either the -h or ? to get the help file. For instance:
kali> wifite -h

Please be aware that I used a single dash before the hin the command.
Step #8: man
Along with the help switch available for most commands and applications, you can find more information about a specific application or command by accessing its manual page. Almost every Linux distribution includes a manual for all utilities, commands, and applications. To view the manual, simply type man followed by the command, utility, or application name, like this:
kali> man cewl

This command opens the manual for Cewl, providing more detailed information than the standard help screen. You can scroll through the manual by pressing the Enter key or by using the Page Down (PGDN) or Page Up (PGUP) keys. To exit the manual, simply type q.
Summary
Linux is an essential operating system for hackers, and mastering it is essential for a successful career in cybersecurity.
In this article, we explored basic Linux commands that help you navigate the system, check the current directory and user, and access the help screen and manual for specific hacking tools. We also provided a brief overview of the Linux file system. Don’t worry if you don’t fully understand this topic; we will cover it in more detail in the future.
This is your first lesson in the basics of Linux, aspiring hackers! For more information on using Linux for hacking, check out the book “Linux Basics for Hackers” on Amazon or visit our training center.
Source: HackersArise
Source Link: https://hackers-arise.com/linux-basics-for-hackers-part-1-getting-started/