Logo
Linux Essentials

Linux Commands Every Cybersecurity Beginner Should Know

Linux Commands Every Cybersecurity Beginner Should Know

Short answer: The Linux commands a cybersecurity beginner uses most fall into six groups: navigation (pwd, cd, ls), reading files (cat, grep, find), permissions (chmod, chown), processes (ps), networking (ip, ss), and running as another user (sudo). Learn these first and read their manual pages with man, and you can operate confidently in almost any security tool or target system.

TL;DR: Master a small core of Linux commands grouped by job — navigate, read files, manage permissions, inspect processes, and probe the network — and you have the vocabulary every security tool assumes you already speak.

Key Takeaways - Master a small core set before reserving memory for niche tools; these commands appear in nearly every workflow. - cd and pwd are shell builtins, while ls, cat, chmod, and most others are separate programs documented in their own manual pages. - The modern ip and ss commands have replaced the older ifconfig and netstat on current distributions. - When a command confuses you, run man <command>; the manual page is the authoritative reference.

Why the command line matters in security

Why the command line matters in security

Most security tooling runs on Linux, and most of the systems you will study, defend, or test are Linux too. The graphical interface hides what is actually happening; the terminal does not. Learn the command line and you gain precise, scriptable control over files, processes, permissions, and network state, which is exactly what both attackers and defenders need.

The commands below are documented in the GNU Coreutils manual and the Linux man-pages project. Those two references are the authoritative source whenever a flag or behavior is unclear.

The core commands, grouped by job

The core commands, grouped by job
Core Linux commands grouped into six functional categories Six labeled groups: Navigation (pwd, cd, ls); Read files (cat, grep, find); Permissions (chmod, chown); Processes (ps); Networking (ip, ss); Privilege (sudo). A manual command, man, sits across all groups. Six jobs, a handful of commands each Navigation pwd · cd · ls Read files cat · grep · find Permissions chmod · chown Processes ps Networking ip · ss Privilege sudo Reference man <command> — the manual page for any command above
Figure 1. Group commands by the job they do, and the list stops feeling random.
Command Group What it does
pwd Navigation Prints the current working directory (shell builtin)
cd Navigation Changes the working directory (shell builtin)
ls Navigation Lists directory contents
cat Read files Concatenates and prints file contents
grep Read files Prints lines matching a pattern
find Read files Searches a directory tree for files matching expressions
chmod Permissions Changes a file's permission (mode) bits
chown Permissions Changes a file's owner and group
ps Processes Reports a snapshot of current processes
ip Networking Shows and configures interfaces, addresses, and routes
ss Networking Investigates sockets and listening ports
sudo Privilege Runs a command as another user, usually root
man Reference Opens the manual page for any command

pwd tells you the current directory, cd moves you between directories, and ls shows what is inside one. Add ls -la to reveal hidden files and permissions, which matters constantly in security work because configuration and credential files are often hidden.

Reading and searching files

cat prints a file to the screen. grep is the one you will reach for most: it filters lines that match a pattern, so you can pull a single setting out of a huge config or hunt for a keyword across logs. find locates files by name, size, modification time, or permission across an entire directory tree.

grep -r "password" /etc/        # search recursively for a keyword
find / -name "*.conf" 2>/dev/null   # locate files by name, hiding errors

Permissions: who can do what

chmod changes a file's permission bits and chown changes its owner. Misconfigured permissions are a classic finding in security assessments, so understanding these two is foundational. The companion guide on Linux file permissions explained for security professionals goes deep on the model behind them.

Processes and networking

ps shows running processes, which helps you spot anything suspicious. For the network, modern distributions use ip (addresses, interfaces, routes) and ss (open sockets and listening ports). These replaced the older ifconfig and netstat, as the deeper Linux networking fundamentals for ethical hackers explains.

ps aux              # snapshot of every running process
ss -tulpn           # listening TCP/UDP ports and their programs
ip addr             # interfaces and their IP addresses

Elevating privilege safely

sudo runs a single command as root under a policy an administrator controls. Use it deliberately, not reflexively; running everything as root is a habit that causes accidents and masks permission problems you should be learning to see.

How to actually learn these

How to actually learn these
  • Live in the terminal. Install a Linux virtual machine and use the command line for everyday tasks.
  • Read the manual. When a flag confuses you, run man <command>. It is the authoritative reference.
  • Practice on systems you own. Only ever run commands on machines you own or are authorized to use. The guide to ethical hacking labs for beginners lists legal places to practice.
  • Follow a structured path. Once the core commands feel routine, use the Linux learning roadmap for penetration testing to sequence your next steps toward permissions, networking, and scripting.

Frequently asked questions

What are the most important Linux commands for cybersecurity beginners?

Start with navigation (pwd, cd, ls), file reading and searching (cat, grep, find), permissions (chmod, chown), processes (ps), networking (ip, ss), and sudo. Use man to look up any command's options.

Do I need to memorize every Linux command?

No. Learn a small core set you use daily, understand how to combine them, and rely on man <command> for the rest. Reading and searching documentation is itself a core skill.

Are cd and pwd the same kind of command as ls?

Not exactly. cd and pwd are shell builtins provided by the shell itself, while ls, cat, and most others are separate programs. For everyday use the distinction rarely matters, but it explains why cd has no standalone manual page in the way ls does.

Why use ip and ss instead of ifconfig and netstat?

The ip and ss commands come from the modern iproute2 package and have superseded the legacy ifconfig and netstat. On current distributions the older tools may not even be installed by default.


ThreatBlock's Linux Essentials course turns these commands into muscle memory with hands-on labs built for security beginners.

About the author: Samaksh is Lead Instructor at ThreatBlock and holds the OSCP, CRTP, CRTO, and CEH certifications, with hands-on experience in penetration testing and red teaming. Read more on the author page · Editorial policy.

← Back to all articles
{{ toast }}