Close this search box.
Close this search box.

Part 1: Linux Essentials for Beginners

Many beginners in ethical hacking start their learning journey in environments like Windows or Mac, leading to a limited exposure to Linux. This lack of familiarity with Linux can be a significant barrier in developing the necessary skills to become a proficient white hat hacker. Linux is the preferred platform for hacking due to several important reasons. Hence, mastering the basics of Linux is a critical step for anyone aspiring to grow into a professional ethical hacker. This article series is designed to teach the fundamental Linux skills that are essential for every aspiring white hat hacker.

In this guide, I’ll be introducing you to the basics of working with Kali Linux, a widely-used distribution in the hacking community. While I’ll use Kali 2023.4 for my examples, the concepts discussed are generally applicable across most Linux distributions.

Getting Started with the Terminal

The first step in using Linux effectively is to become familiar with the terminal. In Kali Linux, you can access the terminal by locating its icon at the top of the screen.

When you click on the terminal icon or press Ctrl+Alt+T, a terminal window like the one shown below will open.

The terminal in Linux typically opens up a shell – an environment where you can execute commands and write scripts. There are several types of shells in Linux, but the most common is the BASH (Bourne Again Shell), which is the default in Kali and other popular Linux distributions.

Navigating the Linux File System

Linux’s file system is structured differently from that of Windows. In Linux, the filesystem isn’t limited by physical drives. Instead, it starts at the root, denoted by ‘/’, which represents the top of the file hierarchy rather than a physical drive.

As a beginner, some important sub-directories under the root to be familiar with include:

/root: The home directory of the root user, who has comprehensive system privileges.
/etc: This directory typically contains system configuration files.
/home: The home directory for regular users.
/mnt: Where external file systems are mounted to the system.
/bin: Contains binary executables, akin to Windows executables.
/lib: Houses libraries, which are akin to Windows DLLs, and are shared across various programs.

We will delve deeper into these key directories in future tutorials, but for now, understanding their basic functions is a good starting point.

Basic Linux Commands

pwd: To find out your current directory in the Linux file structure, use the ‘pwd’ (present working directory) command.

whoami: This command tells you which user you’re logged in as, which is crucial for maintaining security.

cd: The ‘cd’ (change directory) command is used for navigating through the file system.

ls: To list the contents of a directory, use ‘ls’. Adding ‘-l’ provides more detailed information, and ‘-a’ includes hidden files in the listing.

help: Most commands have a help file, which can be accessed by typing the command followed by ‘–help’.

man: For a comprehensive guide on a command or application, use the ‘man’ command to access its manual page. For example, enter ‘man nmap’ to view the manual for nmap:

This introduction to Linux basics is aimed at equipping you with the foundational skills necessary for ethical hacking. Stay tuned for more in-depth tutorials, and feel free to ask questions if anything is unclear.

Leave a Reply

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