DEV Community

Khalif AL Mahmud
Khalif AL Mahmud

Posted on

Linux, Networking, Scripting, and AI: What Every Beginner Pentester Should Know

When I started digging deeper into cybersecurity, I quickly realized that almost everything in this field circles back to one operating system: Linux. Whether you're running a vulnerability scan, writing a quick automation script, or asking an AI tool to explain a weird output, Linux is the environment where it all happens.

I wanted to write down what I've learned so far in a way that's actually useful for someone just getting started — no fluff, just the stuff that matters.

Why Linux Dominates Cybersecurity

Linux is open-source, free, and highly customizable. Unlike Windows or macOS, it gives you full control over the system — down to the smallest configuration file. That level of control is exactly why almost every serious security tool is built for Linux first.

And within the Linux world, there's one distribution that stands out for security work: Kali Linux.

What Makes Kali Linux Special

Kali is a Linux distribution built specifically for penetration testing, maintained by Offensive Security. It comes preloaded with hundreds of tools covering:

  • Network scanning
  • Vulnerability assessment
  • Password testing
  • Digital forensics
  • Web application testing
  • Wireless security testing

Basically, if you're doing ethical hacking, Kali saves you the trouble of hunting down and installing every tool yourself.

Getting Comfortable With the Linux Filesystem

One of the first mental shifts coming from Windows is realizing there's no "C: drive." Everything starts from a single root directory: /.

A few directories you'll bump into constantly:

  • /home — where regular users keep their personal files
  • /etc — system and application configuration files
  • /var — logs, caches, and other data that changes often
  • /root — the home directory of the root (admin) user

Once that structure clicks, navigating any Linux system starts to feel natural.

The Commands You'll Actually Use Every Day

You don't need to memorize hundreds of commands to get productive. A small core set covers most of your daily work:

pwd                     # show current directory
ls                      # list files and folders
cd folder_name          # change directory
mkdir new_folder        # create a directory
touch file.txt          # create an empty file
cp source destination   # copy files
mv source destination   # move or rename files
rm file.txt             # delete a file
cat file.txt            # print file content
Enter fullscreen mode Exit fullscreen mode

These feel small individually, but combined they let you move around, inspect, and manipulate a system faster than any GUI ever could.

Permissions: Read, Write, Execute

Linux controls access through three roles — owner, group, and others — and three permission types:

  • Read (4) — view or open a file
  • Write (2) — modify a file
  • Execute (1) — run it as a program or script

You change permissions with chmod, and most professionals prefer the numeric shorthand over the +x / +w style because it's faster and sets everything in one shot:

chmod 755 script.sh
Enter fullscreen mode Exit fullscreen mode

That single command says: full control for the owner, read-and-execute for everyone else. Clean and quick.

Installing Software: apt and dpkg

Two commands handle almost all your software needs on Kali:

sudo apt update
sudo apt install nmap
Enter fullscreen mode Exit fullscreen mode

apt pulls packages (and their dependencies) straight from repositories. When you already have a .deb file downloaded locally, dpkg installs it directly:

sudo dpkg -i package.deb
Enter fullscreen mode Exit fullscreen mode

PATH and Environment Variables

Ever wonder how Linux knows where to find a program when you just type its name? That's the PATH variable at work — it's a list of directories the shell automatically searches.

echo $PATH
Enter fullscreen mode Exit fullscreen mode

Environment variables in general are how the system and applications share small but important pieces of information, like usernames or language settings, without hardcoding them anywhere.

Networking Basics You Can't Skip

A few networking concepts show up constantly in security work:

  • IP address — the unique identifier of a device on a network
  • DNS — translates domain names like google.com into IP addresses
  • Gateway — the device (usually your router) that connects your local network to the internet

And the commands to actually see this in action:

ip a            # view IP address, interfaces, MAC address
ip route        # view gateway and routing info
ping google.com # test connectivity
traceroute facebook.com  # trace the path packets take
Enter fullscreen mode Exit fullscreen mode

ping tells you if a host is reachable. traceroute shows you the hops your traffic takes to get there — genuinely useful when you're debugging connectivity or mapping out a network.

Scripting: Where Automation Begins

Once you're comfortable with commands, the next natural step is stringing them together. That's where Bash scripting comes in:

#!/bin/bash
echo "Hello From Khalif"
Enter fullscreen mode Exit fullscreen mode

Save it, make it executable, and run it — congratulations, you've automated your first task.

Beyond Bash, Python is the real workhorse in cybersecurity. It's used for building network scanners, analyzing logs, automating repetitive tasks, and even developing full security tools. If you're serious about this field, learning Python isn't optional — it's foundational.

Where AI Fits Into All of This

This is the part that genuinely excites me. AI tools are starting to show up as real assistants in the pentesting workflow — not replacements for skill, but accelerators for it.

Tools like PentestGPT can help with:

  • Understanding vulnerabilities
  • Explaining confusing tool output
  • Suggesting the next step in an assessment
  • Writing commands and scripts
  • Drafting reports

AI is also increasingly used for threat detection, malware analysis, log analysis, intrusion detection, and phishing detection — anywhere there's a large volume of data that needs fast pattern-matching.

The Catch

AI isn't magic, and it definitely isn't infallible. It can:

  • Suggest incorrect commands
  • Miss context a human would catch instantly
  • Expose sensitive data if used carelessly
  • Lack the judgment and intuition a real analyst brings

That's why the right mental model is: AI is an assistant, not a replacement. It speeds up the boring parts and helps you learn faster, but the judgment calls — and the ethics — stay with the human.

Using AI Responsibly

A few ground rules I try to keep in mind:

  • Respect privacy, always
  • Never run unauthorized tests or attacks
  • Double-check AI-generated output before trusting it
  • Stay within legal and ethical boundaries
  • Treat AI as a co-pilot, not the pilot

Final Thoughts

None of this is groundbreaking on its own — Linux fundamentals, basic networking, a bit of scripting, and an intro to AI tools. But together, they form the backbone of how modern security work actually gets done. If you're starting out in cybersecurity, getting genuinely comfortable with these basics will take you further than jumping straight into flashy tools.

Top comments (0)