Executive Summary
Linux powers 100% of the world’s top 500 supercomputers, 86% of servers, 94% of cloud instances, 96% of containers, and over 3 billion Android devices. The command line is the primary interface for server administration, DevOps, cloud engineering, cybersecurity, and software development. Proficiency with Linux commands is among the most valuable technical skills in 2026.
This guide provides a complete reference of 200+ Linux commands organized into 15 categories: file management, text processing, permissions, processes, networking, system administration, systemd, packages, archives, shell scripting, disk management, security, containers, Git, and help/utilities. Each command includes its syntax, a description, a practical example, and its category.
Beyond the command reference, this report covers file permissions in depth (including SUID, SGID, sticky bit, and ACLs), compares 8 Linux shells, surveys 8 major distributions, traces the history of Linux from Unix in 1969 to the kernel 6.12 LTS in 2026, and includes embedded tools for chmod calculation and cron expression generation.
200+
Commands documented
86%
Server market share
100%
TOP500 supercomputers
15
Command categories
- Linux dominates every computing segment except the desktop, where it holds 4.8% market share. In servers (86%), cloud (94%), containers (96%), supercomputers (100%), and IoT/embedded (82%), Linux is the dominant operating system.
- File management and Git commands are used most frequently: 85% and 78% of developers use them daily, respectively. Text processing (72%) and shell scripting (65%) round out the top tier of daily usage.
- systemd is now the universal init system on modern Linux. Understanding systemctl, journalctl, and timer units has replaced knowledge of SysVinit scripts for service management.
- Container commands (Docker, kubectl) are used daily by 45% of developers, reflecting the shift to containerized deployment. Knowledge of Linux namespaces and cgroups underpins container troubleshooting.
Part 1: Linux History
Linux began in 1991 when Linus Torvalds, a 21-year-old Finnish computer science student, announced a free operating system kernel as a hobby project. But the story of Linux starts with Unix, created at Bell Labs in 1969 by Ken Thompson and Dennis Ritchie. Unix introduced the foundational concepts that Linux inherited: the filesystem hierarchy, the shell, pipes, small single-purpose tools, and the philosophy of “everything is a file.”
The GNU Project (1983) by Richard Stallman created the essential userspace tools: bash, gcc, glibc, coreutils (ls, cat, cp, mv, rm). When combined with the Linux kernel, these tools formed a complete free operating system. The resulting system is technically GNU/Linux, though it is commonly called simply “Linux.”
Key milestones in Linux adoption include: the release of major distributions (Debian and Slackware in 1993, Red Hat in 1994, Ubuntu in 2004), the adoption of Linux by enterprises (IBM invested $1 billion in Linux in 2000), the creation of Android (2008, Linux kernel-based), the rise of containers (Docker in 2013, using Linux namespaces and cgroups), and WSL bringing Linux to Windows (2016/2019).
In 2026, the Linux kernel is at version 6.12 LTS with over 30 million lines of code, contributed by thousands of developers from hundreds of companies. The kernel supports Rust as a second implementation language (alongside C), includes advanced eBPF for programmable networking and observability, and continues to improve performance through io_uring for asynchronous I/O.
Linux History Timeline
27 rows
| Year | Event | Era |
|---|---|---|
| 1969 | Unix created at Bell Labs by Ken Thompson and Dennis Ritchie | Unix |
| 1971 | First Edition Unix manual (ed, cat, ls, grep) | Unix |
| 1973 | Unix rewritten in C, enabling portability | Unix |
| 1978 | BSD Unix released by UC Berkeley | Unix |
| 1983 | GNU Project announced by Richard Stallman | GNU |
| 1987 | Minix released by Andrew Tanenbaum | Predecessors |
| 1989 | Bash shell released (Bourne-Again Shell) | Shells |
| 1991 | Linus Torvalds announces Linux kernel 0.01 | Linux |
| 1992 | Linux relicensed under GPL v2 | Linux |
| 1993 | Debian and Slackware distributions released | Distros |
| 1994 | Linux kernel 1.0 released | Linux |
| 1996 | Linux 2.0 with SMP support | Linux |
| 1998 | KDE 1.0 and GNOME 1.0 desktop environments | Desktop |
| 2003 | Fedora Core 1 and RHEL 3 released | Distros |
| 2004 | Ubuntu 4.10 (Warty Warthog) released | Distros |
| 2008 | Android 1.0 released (Linux kernel-based) | Mobile |
| 2010 | systemd introduced as init replacement | Init |
| 2011 | Linux kernel 3.0 released | Linux |
| 2013 | Docker 1.0 uses Linux containers (namespaces, cgroups) | Containers |
| 2015 | Linux kernel 4.0 with live patching | Linux |
| 2016 | WSL 1 (Windows Subsystem for Linux) released | WSL |
| 2019 | WSL 2 with full Linux kernel on Windows | WSL |
| 2020 | Linux kernel 5.8 largest release (17,000+ files changed) | Linux |
| 2022 | Linux kernel 6.0 with Rust language support | Linux |
| 2024 | Linux kernel 6.8 with io_uring improvements | Linux |
| 2025 | Linux runs on 100% of TOP500 supercomputers, 85%+ of servers | Adoption |
| 2026 | Linux kernel 6.12 LTS with improved eBPF and scheduling | Linux |
Linux Adoption by Segment (2018-2026)
Source: OnlineTools4Free Research
Part 2: File Management
File management is the most fundamental category of Linux commands and the one used most frequently by every type of Linux user. The commands ls, cd, cp, mv, rm, mkdir, and find form the core of daily file operations. Understanding these commands, along with the Linux filesystem hierarchy, is the foundation of all Linux proficiency.
The Filesystem Hierarchy Standard (FHS)
Linux uses a single-root filesystem starting at /. There are no drive letters (C:\, D:\) as in Windows. Everything is mounted under / including removable drives, network shares, and virtual filesystems. Key directories: /bin and /usr/bin (executables), /etc (system configuration), /home (user home directories), /var (logs, mail, spool data), /tmp (temporary files, cleared on reboot), /dev (device files), /proc and /sys (virtual kernel filesystems), /opt (optional third-party software), and /mnt (mount point for temporary mounts).
Essential File Commands
ls -la lists all files (including hidden) with detailed information: permissions, link count, owner, group, size, and modification date. cp -r copies directories recursively. mv moves files or renames them (same command). rm -rf recursively removes directories and their contents without confirmation — use with extreme caution. find is the most powerful file search tool: find / -name "*.log" -mtime -7 -size +1M finds log files modified in the last 7 days that are larger than 1 MB.
ln creates links. Hard links (ln target link) are additional directory entries pointing to the same inode. Symbolic links (ln -s target link) are files containing the path to the target. Symlinks can cross filesystem boundaries and link to directories; hard links cannot. du -sh shows the total size of a directory. df -h shows filesystem-level disk usage.
Key Finding
The find command is the most powerful file search tool in Linux, supporting search by name, type, size, modification time, permissions, owner, and arbitrary commands on results.
Common patterns: find . -name '*.py' -exec grep -l 'import' {} \\; (find Python files containing 'import'), find /var/log -mtime +30 -delete (delete logs older than 30 days).
File Management Commands
22 rows
| Command | Syntax | Description | Example |
|---|---|---|---|
| ls | ls [options] [path] | List directory contents | ls -la /home |
| cd | cd [directory] | Change current directory | cd /var/log |
| pwd | pwd | Print current working directory | pwd |
| mkdir | mkdir [options] directory | Create directories | mkdir -p project/src/lib |
| rmdir | rmdir directory | Remove empty directories | rmdir old_folder |
| rm | rm [options] file | Remove files or directories | rm -rf /tmp/cache |
| cp | cp [options] source dest | Copy files and directories | cp -r src/ backup/ |
| mv | mv source dest | Move or rename files | mv old.txt new.txt |
| touch | touch file | Create empty file or update timestamp | touch newfile.txt |
| ln | ln [options] target link | Create hard or symbolic links | ln -s /usr/bin/python3 /usr/bin/python |
| find | find [path] [expression] | Search for files in directory hierarchy | find / -name "*.log" -mtime -7 |
| locate | locate [options] pattern | Find files by name using database | locate nginx.conf |
| stat | stat file | Display file status and metadata | stat /etc/passwd |
| file | file filename | Determine file type | file image.png |
| tree | tree [options] [directory] | Display directory tree structure | tree -L 2 /home |
| du | du [options] [path] | Estimate file and directory space usage | du -sh /var/log/* |
| df | df [options] | Report filesystem disk space usage | df -h |
| basename | basename path [suffix] | Strip directory and suffix from filename | basename /home/user/file.txt .txt |
| dirname | dirname path | Strip last component from path | dirname /home/user/file.txt |
| realpath | realpath path | Print resolved absolute path | realpath ./relative/path |
Page 1 of 2
Part 3: Text Processing
The Unix philosophy of “everything is text” makes text processing commands central to Linux. Configuration files, logs, data, and command output are all text, processed through pipelines of small tools. The trio of grep (search), sed (transform), and awk (analyze) can handle virtually any text processing task.
grep: Pattern Search
grep searches for patterns in text. grep -rn "error" /var/log/ recursively searches all log files for “error” with line numbers. grep -E (or egrep) enables extended regex (alternation, quantifiers without escaping). grep -v inverts the match (exclude lines). grep -c counts matches. grep -l lists only filenames. grep -i is case-insensitive. Modern alternatives: ripgrep (rg) is 2-5x faster than grep and respects .gitignore.
sed: Stream Editing
sed performs text transformations on streams or files. The most common operation is substitution: sed 's/old/new/g' file replaces all occurrences of “old” with “new”. sed -i edits files in-place. sed -n '10,20p' file prints lines 10-20. sed '/pattern/d' file deletes lines matching the pattern. sed can use any delimiter: sed 's|/usr/local|/opt|g' avoids escaping slashes.
awk: Data Extraction
awk is a pattern-scanning language ideal for columnar data. awk '{print $1, $3}' file prints the first and third fields (space-delimited by default). awk -F',' sets the field separator to comma for CSV data. awk '$3 > 100 {sum += $3} END {print sum}' sums values in column 3 where the value exceeds 100. awk is a complete programming language with variables, loops, functions, and associative arrays.
Text Processing Commands
27 rows
| Command | Syntax | Description | Example |
|---|---|---|---|
| cat | cat [options] file | Concatenate and display file contents | cat file1.txt file2.txt |
| less | less file | View file contents with pagination | less /var/log/syslog |
| more | more file | View file contents page by page | more largefile.txt |
| head | head [options] file | Display first lines of a file | head -n 20 file.txt |
| tail | tail [options] file | Display last lines of a file | tail -f /var/log/syslog |
| grep | grep [options] pattern [file] | Search text using patterns (regex) | grep -rn "error" /var/log/ |
| egrep | egrep pattern file | Extended grep (same as grep -E) | egrep "warn|error|crit" syslog |
| fgrep | fgrep string file | Fixed string grep (same as grep -F) | fgrep "exact match" file.txt |
| sed | sed [options] command [file] | Stream editor for text transformation | sed -i 's/old/new/g' file.txt |
| awk | awk 'pattern {action}' file | Pattern scanning and processing language | awk '{print $1, $3}' data.csv |
| cut | cut [options] file | Extract columns from text | cut -d',' -f1,3 data.csv |
| sort | sort [options] file | Sort lines of text | sort -t, -k2 -n data.csv |
| uniq | uniq [options] [input] | Remove duplicate adjacent lines | sort file.txt | uniq -c |
| wc | wc [options] file | Count lines, words, and characters | wc -l *.py |
| tr | tr set1 set2 | Translate or delete characters | echo 'hello' | tr 'a-z' 'A-Z' |
Page 1 of 2
Part 4: Permissions & Ownership
Linux file permissions are the first line of defense in system security. Every file and directory has an owner (user), a group, and three sets of permissions (read, write, execute) for the owner, the group, and everyone else. Misconfigured permissions are among the most common causes of security vulnerabilities and application failures.
Understanding Permission Notation
Permissions are displayed by ls -l as a 10-character string: -rwxr-xr-x. The first character is the file type (- regular, d directory, l symlink). Then three groups of three characters: owner (rwx), group (r-x), others (r-x). r=read (4), w=write (2), x=execute (1). So rwxr-xr-x = 755 in octal. chmod changes permissions, chown changes ownership.
For directories, the permissions have different meanings: read (r) allows listing contents (ls), write (w) allows creating/deleting files, and execute (x) allows entering the directory (cd). You need execute permission on a directory to access any files within it, even if you have read permission on the files themselves.
Special Permission Bits
Three special bits extend the basic permission model. SUID (Set User ID, 4xxx): when set on an executable, the process runs with the permissions of the file owner, not the user who launched it. /usr/bin/passwd uses SUID to allow regular users to modify /etc/shadow (owned by root). SGID (Set Group ID, 2xxx): on a file, executes with the file’s group. On a directory, new files inherit the directory’s group instead of the creator’s primary group. Sticky bit (1xxx): on a directory, only the file owner (or root) can delete files, even if others have write permission. /tmp uses the sticky bit (1777).
File Permission Reference
12 rows
| Numeric | Symbolic | Meaning | Use Case | Risk |
|---|---|---|---|---|
| 777 | rwxrwxrwx | Full access for everyone | Never use on production. Only for /tmp sometimes. | Critical |
| 755 | rwxr-xr-x | Owner full, others read+execute | Directories, executable scripts, /usr/bin/ | Low |
| 750 | rwxr-x--- | Owner full, group read+execute | Application directories shared with group | Low |
| 700 | rwx------ | Owner full access only | Private directories, ~/.ssh/ | None |
| 644 | rw-r--r-- | Owner read+write, others read | Regular files, config files, HTML | Low |
| 640 | rw-r----- | Owner read+write, group read | Shared config files (e.g., /etc/shadow group) | Low |
| 600 | rw------- | Owner read+write only | SSH private keys, secrets, ~/.ssh/id_rsa | None |
| 400 | r-------- | Owner read only | Certificates, AWS .pem key files | None |
| 444 | r--r--r-- | Read only for everyone | Published public files, /etc/resolv.conf (immutable) | Low |
| 4755 | rwsr-xr-x | SUID bit set (execute as owner) | /usr/bin/passwd, /usr/bin/sudo | High |
| 2755 | rwxr-sr-x | SGID bit set (execute as group) | Shared directories: new files inherit group | Medium |
| 1777 | rwxrwxrwt | Sticky bit (only owner can delete) | /tmp, /var/tmp — prevents deletion by others | Low |
Permission Commands
8 rows
| Command | Syntax | Description | Example |
|---|---|---|---|
| chmod | chmod [options] mode file | Change file permissions | chmod 755 script.sh |
| chown | chown [options] owner[:group] file | Change file owner and group | chown -R www-data:www-data /var/www |
| chgrp | chgrp group file | Change file group ownership | chgrp developers project/ |
| umask | umask [mask] | Set default file creation permissions | umask 022 |
| getfacl | getfacl file | Get file access control lists | getfacl /srv/shared |
| setfacl | setfacl [options] acl file | Set file access control lists | setfacl -m u:john:rwx /srv/shared |
| chattr | chattr [options] file | Change file attributes (immutable, append-only) | chattr +i /etc/resolv.conf |
| lsattr | lsattr [options] file | List file attributes | lsattr /etc/resolv.conf |
Part 5: Processes & Jobs
Every running program in Linux is a process with a unique Process ID (PID). Understanding process management is essential for troubleshooting performance issues, managing services, and administering systems. Key concepts: foreground processes (interactive, attached to terminal), background processes (running behind the terminal), daemons (services with no terminal), and zombie processes (finished but not yet cleaned up).
Viewing and Managing Processes
ps aux lists all processes with detailed information: user, PID, CPU%, memory%, command. top provides a real-time, updating view. htop (an enhanced top) adds a visual interface with color, mouse support, and tree view. To find a process: pgrep -la nginx finds all nginx processes. To kill: kill PID sends SIGTERM (graceful shutdown). kill -9 PID sends SIGKILL (forced, immediate). killall nginx kills all processes named nginx.
Background jobs: append & to run a command in the background: ./long_task.sh &. Ctrl+Z suspends the current foreground job. bg resumes it in the background. fg brings it back to the foreground. jobs lists all active jobs. nohup prevents a background job from being killed when the terminal closes.
Key Finding
lsof -i :PORT reveals which process is listening on a network port, one of the most common troubleshooting operations for web servers and database connections.
Example: lsof -i :3000 shows the process using port 3000. Combined with ss -tulpn for a complete view of all listening sockets.
Process Management Commands
19 rows
| Command | Syntax | Description | Example |
|---|---|---|---|
| ps | ps [options] | Report process status | ps aux --sort=-%mem | head |
| top | top | Dynamic real-time process viewer | top -o %CPU |
| htop | htop | Interactive process viewer (enhanced top) | htop --tree |
| kill | kill [signal] PID | Send signal to a process | kill -9 1234 |
| killall | killall [options] name | Kill processes by name | killall nginx |
| pkill | pkill [options] pattern | Kill processes matching a pattern | pkill -f "python script.py" |
| pgrep | pgrep [options] pattern | Find process IDs by name/pattern | pgrep -la nginx |
| bg | bg [job_id] | Resume a suspended job in background | bg %1 |
| fg | fg [job_id] | Bring background job to foreground | fg %1 |
| jobs | jobs [options] | List active jobs in current shell | jobs -l |
| nohup | nohup command & | Run command immune to hangup signals | nohup ./server.sh & |
| nice | nice [options] command | Run command with modified scheduling priority | nice -n 10 make -j8 |
| renice | renice priority PID | Alter priority of running process | renice -n 5 -p 1234 |
| wait | wait [PID] | Wait for background process to finish | wait $! |
| watch | watch [options] command | Execute command periodically and display output | watch -n 2 "df -h" |
| timeout | timeout duration command | Run command with a time limit | timeout 30s curl https://example.com |
| xargs | command | xargs [options] cmd | Build and execute commands from stdin | find . -name '*.tmp' | xargs rm |
| lsof | lsof [options] | List open files and the processes using them | lsof -i :80 |
Page 1 of 2
Part 6: Networking
Linux is the operating system of the internet. The majority of web servers, DNS servers, mail servers, firewalls, and routers run Linux. Networking commands span connectivity testing (ping, traceroute, mtr), data transfer (curl, wget, rsync, scp), DNS (dig, nslookup), socket inspection (ss, netstat, lsof), packet capture (tcpdump, Wireshark), and firewall management (iptables, nftables, ufw).
Essential Networking Commands
curl is the Swiss Army knife of HTTP: curl -X POST -H "Content-Type: application/json" -d '{"key":"value"}' https://api.example.com sends a POST request with JSON. ssh user@server opens a secure remote shell. scp copies files over SSH. rsync is the gold standard for file synchronization: rsync -avz --progress /data/ user@server:/backup/ copies with compression, preserving permissions, and showing progress.
For diagnostics: ss -tulpn shows all listening TCP/UDP ports with process names (replaces netstat). ip addr shows all network interfaces and addresses (replaces ifconfig). dig +short example.com A resolves a domain to its IP address. traceroute/mtr traces the network path to a host. tcpdump -i eth0 port 80 captures HTTP traffic on an interface.
Networking Commands
26 rows
| Command | Syntax | Description | Example |
|---|---|---|---|
| ping | ping [options] host | Send ICMP echo request to host | ping -c 4 google.com |
| curl | curl [options] URL | Transfer data from or to a server | curl -X POST -d "key=val" https://api.example.com |
| wget | wget [options] URL | Download files from the web | wget -r -l 2 https://example.com |
| ssh | ssh [options] user@host | Secure shell remote login | ssh -i key.pem [email protected] |
| scp | scp source user@host:dest | Secure copy files over SSH | scp file.tar.gz user@server:/tmp/ |
| rsync | rsync [options] source dest | Fast, versatile remote file copy | rsync -avz --progress /data/ user@server:/backup/ |
| sftp | sftp user@host | Secure FTP (file transfer over SSH) | sftp [email protected] |
| netstat | netstat [options] | Network statistics and connections | netstat -tulpn |
| ss | ss [options] | Socket statistics (modern netstat) | ss -tulpn |
| ip | ip [object] [command] | Show/manipulate routing, devices, tunnels | ip addr show |
| ifconfig | ifconfig [interface] | Configure network interfaces (legacy) | ifconfig eth0 |
| nslookup | nslookup domain | Query DNS nameservers | nslookup example.com 8.8.8.8 |
| dig | dig [options] domain | DNS lookup utility (detailed) | dig +short example.com A |
| host | host domain | DNS lookup utility (simple) | host example.com |
| traceroute | traceroute host | Trace packet route to host | traceroute google.com |
Page 1 of 2
Part 7: System Administration
System administration covers user management, service management, hardware monitoring, disk operations, logging, and system configuration. systemd is now the universal init system and service manager, providing a unified interface for starting, stopping, enabling, and monitoring services.
User and Group Management
useradd -m -s /bin/bash john creates a new user with a home directory and bash shell. usermod -aG docker john adds john to the docker group (the -a flag appends rather than replacing groups). passwd john changes the password. id john shows UID, GID, and group memberships. /etc/passwd stores user accounts, /etc/shadow stores encrypted passwords, and /etc/group stores group definitions.
systemd Service Management
systemctl is the primary command for managing systemd. systemctl start/stop/restart nginx controls service state. systemctl enable/disable nginx controls boot behavior. systemctl status nginx shows current state, PID, memory, and recent log output. journalctl -u nginx --since today shows today’s logs for nginx. systemctl list-units --type=service --state=running lists all running services.
Distributions Compared
Choosing a distribution depends on the use case. Ubuntu and Debian dominate servers and cloud. RHEL and Rocky Linux are enterprise standards with long support cycles. Alpine Linux (5 MB base) is the default for Docker containers. Arch Linux provides bleeding-edge packages for advanced users. Fedora serves as RHEL’s upstream, getting new features first.
Linux Distribution Comparison
8 rows
| Distribution | Base | Package Manager | Release Cycle | Target Use | Share (%) |
|---|---|---|---|---|---|
| Ubuntu | Debian | apt/dpkg | Every 6 months (LTS every 2 years) | Desktop, Server, Cloud | 33 |
| Debian | Independent | apt/dpkg | Every ~2 years | Server, Desktop | 16 |
| Fedora | Independent | dnf/rpm | Every 6 months | Desktop, Workstation | 8 |
| RHEL | Fedora | dnf/rpm | ~3 year cycle, 10-year support | Enterprise Server | 12 |
| Arch Linux | Independent | pacman | Rolling | Advanced Desktop | 5 |
| Alpine Linux | Independent | apk | Every 6 months | Containers, Embedded | 8 |
| openSUSE | Independent | zypper/rpm | Leap (fixed) / Tumbleweed (rolling) | Desktop, Server | 4 |
| Rocky Linux | RHEL | dnf/rpm | Follows RHEL | Enterprise Server | 6 |
Linux Distribution Market Share (2026)
Source: OnlineTools4Free Research
Part 8: Shell Scripting & Shells
Shell scripting automates repetitive tasks, deployments, backups, and system configuration. A shell script is a text file starting with #!/bin/bash (or another interpreter) that contains a sequence of commands. Scripts leverage variables, conditionals (if/else), loops (for, while), functions, exit codes, and signal handling.
Bash Best Practices
Start every script with set -euo pipefail: -e exits on any command failure, -u treats undefined variables as errors, -o pipefail makes pipes fail if any command in the pipeline fails. Use shellcheck (static analysis tool) to catch common errors. Quote all variable expansions: "$variable" instead of $variable. Use [[ ]] instead of [ ] for conditionals (better syntax, no word splitting). Use functions to organize code and reduce repetition.
Shell Comparison
bash is the default on most Linux distributions and the standard for scripting. zsh (default on macOS since Catalina) adds better tab completion, globbing, themes (Oh My Zsh), and spelling correction. fish provides autosuggestions and syntax highlighting out of the box without configuration, but uses non-POSIX syntax. dash is the fastest POSIX-compliant shell (4x faster than bash), used as /bin/sh on Debian/Ubuntu for boot scripts.
Shell Comparison
8 rows
| Shell | Full Name | Year | Default On | Scripting | Interactive | Speed |
|---|---|---|---|---|---|---|
| bash | Bourne-Again Shell | 1989 | Most Linux distros, macOS (pre-Catalina) | High | Medium | Medium |
| zsh | Z Shell | 1990 | macOS (Catalina+), Kali Linux | High | Very High | Medium |
| fish | Friendly Interactive Shell | 2005 | None (opt-in) | Medium | Very High | Medium |
| dash | Debian Almquist Shell | 1997 | Debian/Ubuntu (as /bin/sh) | Low | Minimal | Very Fast |
| sh | Bourne Shell / POSIX sh | 1977 | Legacy Unix | Low | Minimal | Fast |
| ksh | KornShell | 1983 | AIX, some Solaris | High | Medium | Fast |
| nushell | Nushell | 2019 | None (opt-in) | High | Very High | Fast |
| PowerShell | PowerShell Core | 2016 | Windows (also on Linux) | Very High | High | Medium |
Linux Command Category Usage (% of developers using daily)
Source: OnlineTools4Free Research
Part 9: Complete 200+ Command Reference
The table below contains all 200+ Linux commands documented in this guide. Use the search box to find commands by name, description, or category. Sort by any column. Download the full dataset as CSV for offline reference.
Categories: File Management, Text Processing, Permissions, Processes, Networking, System Admin, Systemd, Packages, Archives, Shell, Disk, Security, Containers, Git, and Help/Utilities.
200+ Linux Commands Reference
224 rows
| Command | Syntax | Description | Category | Example |
|---|---|---|---|---|
| ls | ls [options] [path] | List directory contents | File Management | ls -la /home |
| cd | cd [directory] | Change current directory | File Management | cd /var/log |
| pwd | pwd | Print current working directory | File Management | pwd |
| mkdir | mkdir [options] directory | Create directories | File Management | mkdir -p project/src/lib |
| rmdir | rmdir directory | Remove empty directories | File Management | rmdir old_folder |
| rm | rm [options] file | Remove files or directories | File Management | rm -rf /tmp/cache |
| cp | cp [options] source dest | Copy files and directories | File Management | cp -r src/ backup/ |
| mv | mv source dest | Move or rename files | File Management | mv old.txt new.txt |
| touch | touch file | Create empty file or update timestamp | File Management | touch newfile.txt |
| ln | ln [options] target link | Create hard or symbolic links | File Management | ln -s /usr/bin/python3 /usr/bin/python |
| find | find [path] [expression] | Search for files in directory hierarchy | File Management | find / -name "*.log" -mtime -7 |
| locate | locate [options] pattern | Find files by name using database | File Management | locate nginx.conf |
| stat | stat file | Display file status and metadata | File Management | stat /etc/passwd |
| file | file filename | Determine file type | File Management | file image.png |
| tree | tree [options] [directory] | Display directory tree structure | File Management | tree -L 2 /home |
| du | du [options] [path] | Estimate file and directory space usage | File Management | du -sh /var/log/* |
| df | df [options] | Report filesystem disk space usage | File Management | df -h |
| basename | basename path [suffix] | Strip directory and suffix from filename | File Management | basename /home/user/file.txt .txt |
| dirname | dirname path | Strip last component from path | File Management | dirname /home/user/file.txt |
| realpath | realpath path | Print resolved absolute path | File Management | realpath ./relative/path |
| rename | rename expression files | Batch rename files using patterns | File Management | rename 's/.txt/.md/' *.txt |
| shred | shred [options] file | Securely delete files by overwriting | File Management | shred -vfz -n 5 secret.txt |
| cat | cat [options] file | Concatenate and display file contents | Text Processing | cat file1.txt file2.txt |
| less | less file | View file contents with pagination | Text Processing | less /var/log/syslog |
| more | more file | View file contents page by page | Text Processing | more largefile.txt |
Page 1 of 9
Glossary: 40+ Linux Terms Defined
This glossary defines every essential Linux term used in this guide. Terms are organized by category and sorted alphabetically. Each definition provides practical context for working system administrators and developers.
Filesystem
Kernel
Networking
Permissions
Processes
Security
Shell
System
Frequently Asked Questions (15 Questions)
The most common questions about Linux commands, administration, and system management. Each answer provides practical, actionable guidance.
What is the difference between a shell and a terminal?
A terminal (terminal emulator) is the graphical application that provides a window for text input and output (GNOME Terminal, iTerm2, Windows Terminal). A shell is the program running inside the terminal that interprets your commands (bash, zsh, fish). The terminal handles display and keyboard input; the shell handles parsing, variable expansion, piping, and command execution. You can run different shells in the same terminal.
How do file permissions work in Linux?
Every file has three permission sets: owner (u), group (g), and others (o). Each set has three permissions: read (r=4), write (w=2), execute (x=1). chmod 755 file means owner=rwx (7), group=r-x (5), others=r-x (5). For directories, execute means the ability to enter (cd into) the directory. Special bits: SUID (4xxx, execute as file owner), SGID (2xxx, inherit group), Sticky (1xxx, only owner can delete files in directory).
What is the difference between sudo and su?
sudo ("substitute user do") executes a single command as another user (default: root). It authenticates with YOUR password and is controlled by /etc/sudoers. su ("substitute user") switches your entire session to another user, requiring THAT user's password. Best practice: use sudo for individual commands (audit trail, granular control, no shared root password) rather than su to root.
How do I find files in Linux?
find is the most powerful: find /path -name "*.log" -mtime -7 -size +1M (find .log files modified in last 7 days, larger than 1MB). locate is faster (uses a database, updated by updatedb) but may not reflect recent changes: locate nginx.conf. fd is a modern alternative to find with simpler syntax: fd "*.log" /var/. For searching file contents, use grep -rn "pattern" /path/.
What is stdin, stdout, and stderr?
Every process has three standard file descriptors: stdin (0, standard input — keyboard by default), stdout (1, standard output — terminal by default), stderr (2, standard error — terminal by default). Redirection: > sends stdout to a file, 2> sends stderr, &> sends both, | pipes stdout to another command's stdin. Example: command > out.log 2> err.log sends output and errors to separate files.
How do I manage services with systemd?
systemctl is the primary tool. Start: systemctl start nginx. Stop: systemctl stop nginx. Restart: systemctl restart nginx. Status: systemctl status nginx. Enable at boot: systemctl enable nginx. Disable: systemctl disable nginx. View logs: journalctl -u nginx --since today. List running services: systemctl list-units --type=service --state=running. Reload config after editing unit files: systemctl daemon-reload.
What is the difference between apt and apt-get?
apt is the modern, user-friendly interface (introduced in Debian 8 / Ubuntu 16.04) that combines the most common commands from apt-get, apt-cache, and others with a progress bar and colored output. apt-get is the older, more scriptable tool that is better for use in shell scripts (stable output format, no interactive prompts). For interactive use, prefer apt. For scripts, prefer apt-get.
How do I check disk space and usage?
df -h shows filesystem-level disk space (how much is used/free on each mounted partition). du -sh /path shows how much space a specific directory uses. du -sh /* shows per-directory usage at the root level. ncdu is an interactive alternative to du with a curses interface for browsing disk usage. To find large files: find / -type f -size +100M -exec ls -lh {} \;.
How do I create a cron job?
Edit your crontab with crontab -e. The format is: minute hour day month weekday command. Examples: */5 * * * * /path/script.sh (every 5 minutes), 0 2 * * * /path/backup.sh (daily at 2 AM), 0 0 * * 0 /path/weekly.sh (weekly on Sunday midnight). View your jobs: crontab -l. System-wide cron: /etc/crontab and /etc/cron.d/. Logs: journalctl -u cron or /var/log/syslog.
How do I compress and extract archives?
tar (archive) + gzip/bzip2/xz (compress). Create: tar -czvf archive.tar.gz /path/ (-c create, -z gzip, -v verbose, -f filename). Extract: tar -xzvf archive.tar.gz. For bzip2: tar -cjvf archive.tar.bz2. For xz: tar -cJvf archive.tar.xz. ZIP: zip -r archive.zip /path/ and unzip archive.zip. zstd: zstd -T0 file (multi-threaded, fastest modern compressor).
How do I monitor system performance?
top/htop for real-time process monitoring (CPU, memory per process). free -h for memory usage. vmstat 2 for CPU/memory/IO statistics every 2 seconds. iostat -x 2 for disk I/O. sar (sysstat package) for historical data. For network: iftop for bandwidth per connection, nethogs for bandwidth per process. For comprehensive monitoring: Prometheus + Grafana, or Netdata for a single-server dashboard.
What is the difference between hard links and symbolic links?
A hard link (ln target link) creates another directory entry pointing to the same inode (same data blocks). Deleting the original does not affect the hard link. Hard links cannot cross filesystem boundaries or link to directories. A symbolic link (ln -s target link) creates a file containing the path to the target. Symlinks can cross filesystems and link to directories, but break if the target is moved or deleted.
How do I set up SSH key-based authentication?
Generate a key pair: ssh-keygen -t ed25519 -C "[email protected]" (creates ~/.ssh/id_ed25519 and id_ed25519.pub). Copy public key to server: ssh-copy-id user@server. Now you can SSH without a password. For security: set key permissions to 600 (chmod 600 ~/.ssh/id_ed25519), disable password authentication in /etc/ssh/sshd_config (PasswordAuthentication no), and use ssh-agent for passphrase caching.
What is Docker and how does it relate to Linux?
Docker is a container runtime that uses Linux kernel features (namespaces for isolation, cgroups for resource limits, overlay filesystems) to run applications in isolated environments called containers. Each container shares the host kernel but has its own filesystem, processes, and network. Docker images are layered filesystem snapshots. docker run starts a container, docker build creates images from a Dockerfile.
How do I debug a process or network issue?
Process debugging: strace -p PID traces system calls. ltrace traces library calls. gdb attaches to a running process for debugging. lsof -p PID shows open files and sockets. Network debugging: tcpdump -i eth0 port 80 captures packets. ss -tulpn shows listening ports. curl -v tests HTTP connections. dig/nslookup tests DNS. mtr combines traceroute and ping for path analysis. journalctl -u service shows service logs.
Try It Yourself
Use the embedded tools below to calculate chmod permissions and build cron expressions interactively.
Chmod Calculator
Calculate numeric and symbolic chmod values by toggling read, write, and execute permissions for owner, group, and others.
Try it yourself
Chmod Calculator
Cron Expression Generator
Build cron expressions visually by selecting minute, hour, day, month, and weekday values. See a human-readable description and next execution times.
Try it yourself
Cron Expression Generator
Raw Data Downloads
All datasets used in this report are available for download. Use the command reference as a personal cheat sheet or integrate it into documentation.
Citations & Sources
Related Articles & Tools
Regex Complete Guide 2026
100+ patterns, engine comparisons, ReDoS prevention
Read reportChmod Calculator
Calculate file permissions visually
Open toolCron Expression Generator
Build cron schedules with a visual editor
Open toolDeveloper Productivity Tools 2026
50+ tools compared with satisfaction scores
Read report