100 Essential Linux Commands Every Beginner Should Know
A quick-reference cheat sheet of 100 essential Linux commands every beginner should know, organized by category with syntax, examples, and practical use cases for system administration and cybersecurity.
Why Master Linux Commands?
When you sit down at a terminal for the first time, the blinking cursor can feel intimidating. But every cybersecurity professional, system administrator, and DevOps engineer started in exactly the same place. The terminal is where real work happens on Linux — from configuring firewalls and managing services to analyzing logs and running security scans. Unlike a graphical desktop, the command line lets you chain tools together, automate repetitive tasks, and access every part of the operating system with a few keystrokes.
Below is a categorized reference of 100 commands you will encounter constantly while working with Linux, whether you are hardening a server, troubleshooting a network issue, or learning ethical hacking on Kali. Each entry includes the syntax, a concrete example, and a short note on when you would actually reach for it.
Table of Contents
File System Navigation
These commands help you move around the Linux filesystem.
ls -la for detailed listing with hidden files.cd .. goes up one level, cd ~ goes to home.tree -L 2 shows two levels deep.find / -name "*.log" 2>/dev/null finds all log files.basename /etc/passwd returns "passwd".dirname /etc/passwd returns "/etc".File Operations
Creating, copying, moving, and deleting files are everyday tasks.
cp -r dir1 dir2 copies directories recursively.mv old.txt new.txt renames a file.rm -rf dir removes directories recursively (use with caution).mkdir -p path/to/dir creates parent directories.touch file.txt creates an empty file.cat file.txt shows the entire file.head -n 20 file.txt shows first 20 lines.tail -f /var/log/syslog follows log output.wc -l file.txt counts lines in a file.ln -s /path/to/file linkname creates a symlink.Text Processing
Linux excels at text manipulation. These commands are essential for log analysis and data processing.
grep -r "error" /var/log/ searches recursively.awk '{print $1}' file prints first column.cut -d: -f1 /etc/passwd extracts usernames.sort -u file sorts and removes duplicates.echo "hello" | tr 'h' 'H' outputs "Hello".find . -name "*.tmp" | xargs rm.Permission Management
Linux permissions control who can read, write, and execute files.
chmod 755 file sets rwxr-xr-x.chown user:group file.su - username switches to another user.Process Management
Control and monitor running processes.
ps aux shows all running processes.kill -9 PID forces termination.killall firefox.pgrep -l nginx.Network Commands
Essential for network analysis and security testing.
ip addr show displays interfaces.ping -c 4 google.com.netstat -tuln shows listening ports.curl -I https://example.com fetches headers.arp -a shows ARP cache.System Information
Get details about your system hardware and software.
uname -a shows all details.free -h shows human-readable format.df -h shows human-readable sizes.du -sh /var shows total size.Disk and Storage
Manage disks, partitions, and file systems.
sudo fdisk -l lists all partitions.sudo mount /dev/sdb1 /mnt.dd if=/dev/zero of=disk.img bs=1M count=100.sudo mkfs.ext4 /dev/sdb1.Package Management
Install, update, and remove software packages.
sudo apt install nmap.apt search chromium.dpkg -l lists installed packages.snap install vlc.User Management
Create and manage user accounts.
sudo useradd -m newuser.sudo usermod -aG sudo newuser.Compression and Archives
Work with compressed files and archives.
tar -czf archive.tar.gz directory creates compressed archive.zip -r archive.zip directory.Tips for Mastering Linux Commands
man command to read it.| chains commands together for powerful workflows.For a complete reference of Linux commands with interactive examples, visit our Linux Commands Reference page.
Frequently Asked Questions
Continue Learning
Linux Commands Explained: Essential Commands with Examples for Beginners
Understand Linux command syntax, options and arguments through practical examples for navigation, files, permissions, processes, networking and text.
Linux · BeginnerCommand Line Essentials: Mastering the Terminal for Security Work
Essential command line skills for cybersecurity professionals including navigation, text processing, scripting, and automation.
Linux · IntermediateLinux Terminal Guide: Advanced Shell Skills for Professionals
Advanced Linux terminal techniques including shell customization, multiplexing, productivity tools, and scripting best practices.
Linux · BeginnerBash Scripting Basics: Automate Tasks Like a Pro
Learn Bash scripting from scratch covering variables, conditionals, loops, functions, error handling, and practical automation scripts for cybersecurity.
Related Security Tools
Nmap
Learn how to use Nmap, the free open-source network scanner: run your first port scan, discover live hosts, detect services and operating systems, and check for vulnerabilities with NSE scripts — a beginner tutorial for Kali Linux.
Sniffing & SpoofingNetcat
Learn how to use Netcat (nc) in Kali Linux to open a TCP or UDP connection, check a port, and see what a service sends back. Follow the examples to send your first message, inspect HTTP and SMTP responses, and transfer a test file without exposing sensitive data.
Sniffing & SpoofingWireshark
Wireshark tutorial for beginners: capture packets, read the three panes, filter traffic and follow TCP streams — a hands-on guide to the world's foremost network protocol analyzer.
ExploitationMetasploit Framework
Learn how to use Metasploit Framework: install it on Kali Linux, launch msfconsole, search for exploit modules, set RHOSTS and LHOST, and run your first authorized lab exploit. This beginner tutorial covers msfconsole commands, Meterpreter sessions, msfvenom payloads, and post-exploitation — with practical examples for authorized penetration testing.