Linux Basics for Hackers: A Comprehensive Guide to Enhance Your Ethical Hacking Journey

So you wanna be an Ethical Hacker? And you’ve probably heard that you need to learn Linux to become an Ethical Hacker. So we decided to prepare the 10 best Linux tips for hackers.

These tips will help you become more familiar with Linux and make the best out of it in your journey. We tried to focus on sections that are crucial for Ethical Hackers. These tips will save you time and ensure a smooth experience while learning this open-source OS.

Linux Basics For Hackers Main Image

So without further ado, let’s jump right into it.

10 Linux Basic Tips for Hackers

1) Selecting the Best Linux Distribution for Ethical Hacking

You can indeed get started with any Linux distros for learning purposes. But some distros are made just for Ethical Hackers. These distros come with all the necessary tools pre-installed. On top of that, you really get a hacker feeling.

Some of the most popular distros made for hacking are:

  • Kali Linux
  • Parrot OS,
  • BackBox,
  • BlackArch
  • ArchStrike
  • CAINE

But, Kali Linux and Parrot OS are currently dominating the scene.

Starting with the right distribution means you don’t need to spend extra time installing tools or creating a hacking environment. You can learn both Linux and hacking at the same time, hitting two birds with one stone.

For beginners, we recommend you use a Virtual Machine to install your chosen Linux distro. But if you’re low on resources then dual boot should also do the job.

2) Choosing the Right Hardware for Linux

If you still haven’t decided on what device to use for Linux and Ethical Hacking, now’s a good time to consider these points. Linux is quite lightweight and can run on many old devices. But for the best experience, you should get a minimally viable device.

You will need to run many resource-hungry tools, browsers with a lot of tabs, and Virtual Machine software. So old devices will only give you sluggish performance. There will be lags, hangs, and more annoying scenarios. So you should carefully choose your device.

Some laptops we recommend for running Linux are Apple Macbooks, Acer Aspire 5, Lenovo Ideapad i3, Lenovo ThinkPad E15 Gen 4, and Asus Rog Strix Scar 15, among others.

This site is a good one for keeping yourself up to date with Linux hardware.

3) Essential Linux Books for Security Professionals

The internet has vast resources. But Security Books are still your best friends. A common mistake by beginner hackers is to ignore reading books or ignore any kind of reading. You’ll need to read a lot ahead—Book, documentation, code, writeups. So get prepared from the beginning.

Some may argue that books are outdated sources of learning. And that’s not always true. Even if some information becomes outdated, the core value of reading a book and referencing it when needed stays the same.

If you want a Linux book for hackers, we recommend Linux Basics for Hackers by OccupyTheWeb. It’s a practical book that will quickly get you up to speed. Two other books we’d like to mention are Advanced Security Testing with Kali Linux by Daniel W Dieterle and Kali Linux Penetration Testing Bible by Gus Khawaja.

4) Navigating Linux Like a Pro: Command Line Mastery

Linux is all about the Command Line. Sure, nowadays, they also have many attractive GUI editions. But the Command Line is what makes Linux, Linux! At first, you may get intimidated by all sorts of Linux commands. But trust us, once you get used to it, you’ll never want to come back.

Linux CLI

After installing any Linux distro, you should start playing with the terminal. Learn basic directory navigation commands such as pwd, cd, mkdir, ls, tree.

Then learn how to manage files with commands like cat, less, grep, touch, mv, rm, rmdir, cp, and others.

Once you get the hang of it, start learning about package management. Linux uses package managers such as apt, snap, pacman, yum, etc to install, update, and remove software. So this is crucial knowledge.

There’s so much to cover about the command line that it needs its own article. We recommend you follow this cheat sheet.

Read Also: Apt-get command not found in Linux- How to Fix it?

5) Manipulating Text and Code on Linux

If you used Microsoft Word on Windows, then we’re afraid, it’s not there on Linux. But that doesn’t mean Linux doesn’t have great text editors. For starters, Vim, NeoVim, Nano, and Emacs are great tools. But there are also many full-fledged IDEs like Visual Studio Code. So you shouldn’t feel left alone.

Tools like Vim have many text editing shortcuts that you wouldn’t find in other editors which make it a go-to editor for many hackers. Having the privilege to write code in text editors, compile and make them from scratch, and run them in the command line makes Linux very programmer-friendly.

Some languages, like Python which is widely used by hackers, are pre-installed in Linux. Installing languages is pretty easy. It only needs a command or two. If you’re targeting to become an Ethical hacker, we recommend you learn C/C++/Rust, JavaScript, Go, PHP too. But it really comes down to which path you want to take in cybersecurity.

6) Mastering Bash Scripting for Linux Security

As a hacker, you will read and write lots of scripts. Scripts are a list of commands executed by another program. To write scripts, you will need to learn a scripting language. Since we’re on Linux, Bash(Bourne Again Shell) is primarily used for making scripts, other than Python.

Scripting allows you to automate a lot of work that you would do by hand otherwise. Scripts are written in text files and converted to executable files. Then you can run the scripts as any other program.

Have a look at this bash script for example:

#!/bin/bash

# This script will display a list of files in the current directory.

# Display a list of files in the current directory
echo "List of files in the current directory:"
ls

You will need to add #!/bin/bash at the start to make it a bash script. The two lines after that are comments that won’t be executed. The latter two lines are commands that will be executed.

7) Demystifying the Linux File System

If you’re coming from Windows, know that the Linux file system is way different and even feels more complicated. By knowing the Linux file system hierarchy, you’ll be better equipped to navigate and manage the files and directories on your Linux system, ultimately making you a more effective hacker.

Folders are known as directories here. The root directory is denoted by a forward slash (/) and is the top-level directory in the file system hierarchy. All other directories and files are organized under the root directory.

Useful Linux Commands To Know

Some important system directories are /bin, /etc, /var, and /usr. Each of these directories contains important system files and directories that are critical to the operation of the Linux system.

Each directory in the file system hierarchy serves a specific purpose. For example, the /bin directory contains essential binary files and commands, while the /home directory contains user home directories.

8) Elevating Privileges on Linux Systems

So now we’re gradually entering the hacking world. You might’ve heard about Linux Privilege Escalation. But what does it actually mean?

In Linux, different users have different levels of privilege, meaning, not everyone can just do anything on the system. Root users have the highest privilege.

So imagine a hacker trying to access a Linux system but doesn’t have permission to do many things. Then he somehow gets root access. What now? He has full authority over that system. Basically, he elevated his privilege on that Linux system(became a root user from a regular user).

The Cyber Mentor has an excellent video on Linux Privilege Escalation that should get you started.

9) Networking Basics for Ethical Hackers on Linux

Networking is an inseparable part of Ethical Hacking. If you want to do network penetration testing, you first need to learn how computer networks for. Without basic networking knowledge, you’ll get stuck at the very beginning of your journey.

Start learning about the OSI Model, MAC Addresses, IP Addresses, Packets & Ports, TCP/IP, CIDR, Subnetting, how to protect networks, how to monitor networks, how to troubleshoot networks, and so much more. Of course, if you want to go for a Networking certificate such as the CompTIA Network+, then you will need to study even more.

While you’re on Linux, introduce yourself to common networking commands used by Ethical Hackers. These include ifconfig, ping, iwconfig, netstat, arp, route, ss, whois, hostname, host, curl, wget, etc.

10) Tools of the Trade: Mastering Ethical Hacking Tools on Linux

A bad hacker blames his tools. So skill is always number one. But that doesn’t mean tools aren’t important. Ethical Hackers are always using various kinds of tools for reconnaissance, enumeration, and automation.

Tools make your life easier by saving you time and effort. For that, you will need to learn how to use the necessary tools to make the best out of them. However, as we said earlier, top hackers don’t just rely on others’ tools. They have their own methodology and make their own tools per usage.

Some common tools you will meet are Burp Suite, NMAP, Wireshark, Metasploit, aircrack-ng, Netcat, John the Ripper, sqlmap, Autopsy, and so on. Each tool is specialized for different tasks. Learn them, master them, but don’t become a script kiddie!

Final Thoughts on Linux Basics for Hackers

This guide shares 10 important points for new Linux enthusiasts who want to become Ethical Hackers. These aren’t the only things you need to know. But having covered these, you’ll have an excellent foundation for the future.

If you have any questions, feel free to let us know in the comments.

If any of the above solutions did not fix the Windows PC issues, we recommend downloading the below PC repair tool to identify and solve any PC Issues.

Dinesh is the founder of Sysprobs and written more than 400 articles. Enthusiast in Microsoft and cloud technologies with more than 15 years of IT experience.

Leave a Comment