All Linux Commands: From Basics to Advanced

Updated: July 20, 2025, 09:28 PM IST

🔥Here’s a step-by-step, categorized list of Linux commands divided into Basics, Medium Level, and Advanced Level. This will help you systematically learn and master Linux commands.

🟢 BASICS (For beginners)

👉 These are essential commands every Linux user must know:

1️⃣ pwd – Show the current working directory.
2️⃣ ls – List files and directories.
ls -l (long listing) | ls -a (show hidden files)

3️⃣ cd – Change directory.
cd /path/to/dir | cd .. (up one level)

4️⃣ mkdir – Make new directory.

5️⃣ rmdir – Remove empty directory.

6️⃣ touch – Create empty files.

7️⃣ cat – View file content.

8️⃣ cp – Copy files or directories.
cp file1 file2

9️⃣ mv – Move or rename files.

🔟 rm – Remove files.
rm -r dir (remove directory recursively)

1️⃣1️⃣ echo – Display a line of text.

1️⃣2️⃣ man – Show manual/help for commands.

1️⃣3️⃣ clear – Clear terminal screen.

1️⃣4️⃣ exit – Exit terminal session.

1️⃣5️⃣ whoami – Show current user.


🟡 MEDIUM LEVEL (For regular users / power users)

👉 These commands let you manage files, processes, permissions, and systems better:

1️⃣ chmod – Change file permissions.

2️⃣ chown – Change file owner.

3️⃣ find – Search for files.
find / -name filename

4️⃣ grep – Search text inside files.
grep "text" file

5️⃣ tar – Archive files (create/extract .tar files).
tar -cvf archive.tar files | tar -xvf archive.tar

6️⃣ zip/unzip – Compress and extract zip files.

7️⃣ df – Show disk space usage.

8️⃣ du – Show file/folder size.

9️⃣ ps – Show running processes.
ps aux

🔟 top / htop – Show live processes and resource usage.

1️⃣1️⃣ kill – Kill a process by PID.

1️⃣2️⃣ nano / vim – Edit text files in terminal.

1️⃣3️⃣ wget – Download files from the web.

1️⃣4️⃣ scp – Secure copy between machines.

1️⃣5️⃣ ssh – Remote login to another machine securely.

1️⃣6️⃣ history – Show command history.

1️⃣7️⃣ alias – Create shortcuts for commands.

Additional Medium Commands to Know:

1️⃣8️⃣ cut – Extract sections (columns) from each line of a file.
1️⃣9️⃣ sort – Sort lines of text files.
2️⃣0️⃣ uniq – Filter repeated lines (often combined with sort).
2️⃣1️⃣ diff – Compare two files line by line.
2️⃣2️⃣ tee – Redirect output to multiple destinations (file and terminal).
2️⃣3️⃣ basename / dirname – Extract filename or directory path from a full path.
2️⃣4️⃣ uptime – Show system uptime and load averages.
2️⃣5️⃣ free – Show memory usage.
2️⃣6️⃣ uname – Show system information (kernel, architecture).
2️⃣7️⃣ ip – Modern network interface configuration (replacement for ifconfig).
2️⃣8️⃣ nc / netcat – Network utility for reading/writing TCP or UDP connections.


🔴 ADVANCED LEVEL (For administrators / experts)

👉 These are used for scripting, networking, performance tuning, etc.:

1️⃣ cron / crontab – Schedule tasks.

2️⃣ systemctl / service – Manage services and daemons.

3️⃣ journalctl – View logs on systems with systemd.

4️⃣ iptables / ufw – Configure firewall rules.

5️⃣ rsync – Advanced file sync and copy tool.

6️⃣ sed – Stream editor for text transformation.

7️⃣ awk – Pattern scanning and processing language.

8️⃣ xargs – Build and execute command lines from input.

9️⃣ curl – Transfer data from/to server (like wget, but more flexible).

🔟 lsof – List open files (useful for debugging).

1️⃣1️⃣ strace – Trace system calls and signals (for debugging).

1️⃣2️⃣ mount / umount – Attach/detach file systems.

1️⃣3️⃣ docker / podman – Manage containers (if installed).

1️⃣4️⃣ vim scripting – Automate text editing.

1️⃣5️⃣ bash scripting – Automate tasks with scripts.

1️⃣6️⃣ env / export – Manage environment variables.

Additional Advanced Commands to Know:

1️⃣7️⃣ tcpdump – Capture and analyze network packets (network troubleshooting).
1️⃣8️⃣ nmcli – Command line tool to manage NetworkManager connections.
1️⃣9️⃣ perf – Performance analysis tool for profiling.
2️⃣0️⃣ iproute2 suite (ip, ss) – Advanced network management and socket statistics.
2️⃣1️⃣ chroot – Change root directory for sandboxing or recovery.
2️⃣2️⃣ ldd – Show dynamic libraries used by an executable.
2️⃣3️⃣ ltrace – Trace library calls made by a program (similar to strace but for libs).
2️⃣4️⃣ tcpwrappers – TCP services access control (legacy but sometimes used).
2️⃣5️⃣ bpftrace / eBPF tools – Advanced tracing and observability tools.


💡 Pro Tip:

Combine commands with pipes | and redirects > >>
Examples:

  • ls -l | grep "filename" → Search within ls output.
  • echo "hello" > file.txt → Write to a file (overwrite).
  • echo "again" >> file.txt → Append to file.

Use man <command> or command --help for full details.