Linux is the operating system of the Cloud. 90% of the world's servers run on Linux. Whether you are a Developer, DevOps Engineer, or SRE, you cannot survive without the terminal.
We have compiled the Ultimate 100+ Command List used by professionals daily, explained in very simple English.
| Command | Use Case |
| ls | List files in the current folder. |
| ls -la | List all files (including hidden ones) with details. |
| cd foldername | Go inside a folder (Change Directory). |
| cd .. | Go back one step. |
| cd ~ | Go to your home folder. |
| pwd | Show me "Where am I?" (Print Working Directory). |
| mkdir newfolder | Create a new folder. |
| mkdir -p a/b/c | Create nested folders (folder inside a folder). |
| rmdir folder | Delete an empty folder. |
| rm -r folder | Delete a folder and everything inside it. |
| touch file.txt | Create an empty file. |
| cp file1 file2 | Copy file1 to file2. |
| cp -r folder1 folder2 | Copy an entire folder. |
| mv file1 newloc | Move a file (or Rename it). |
| rm file.txt | Delete a file. |
| cat file.txt | Show file content on screen. |
| less file.txt | Read a large file page by page. |
| head file.txt | Show only the first 10 lines. |
| tail file.txt | Show only the last 10 lines. |
| tail -f log.txt | Watch a file grow in real-time (Great for logs). |
| Command | Use Case |
| chmod 777 file | Give Read/Write/Execute permission to everyone. |
| chmod +x script.sh | Make a file executable (so you can run it). |
| chown user:group file | Change the owner of a file. |
| useradd newuser | Create a new user account. |
| passwd newuser | Set a password for the user. |
| userdel newuser | Delete a user account. |
| groupadd devops | Create a new group. |
| usermod -aG group user | Add a user to a group. |
| whoami | Show which user I am logged in as. |
| id | Show my user ID and group IDs. |
| sudo command | Run a command as Administrator (Root). |
| su - user | Switch to another user account. |
| last | Show who logged in recently. |
| Command | Use Case |
| top | Task manager (Show CPU/RAM usage live). |
| htop | A colorful, easier-to-read version of top. |
| df -h | Check disk space (Is hard drive full?). |
| du -sh folder | Check the size of a specific folder. |
| free -m | Check how much RAM is free. |
| uname -a | Show OS and Kernel version. |
| hostname | Show the name of this computer. |
| lscpu | Show CPU details (Cores, Speed). |
| lsblk | List all storage devices attached. |
| uptime | How long has the server been running? |
| date | Show current date and time. |
| cal | Show a calendar. |
| who | See who else is logged in right now. |
| Command | Use Case |
| ping google.com | Check if internet is working. |
| ifconfig | Show my IP address (Old way). |
| ip addr | Show my IP address (Modern way). |
| curl url | Get data from a website in the terminal. |
| wget url | Download a file from the internet. |
| netstat -tulpn | Show which ports are open and listening. |
| ss -tulpn | Faster version of netstat. |
| nslookup domain | Check the IP address of a domain. |
| dig domain | Detailed DNS lookup. |
| ssh user@ip | Log into a remote server securely. |
| scp file user@ip:/path | Copy a file to a remote server securely. |
| telnet ip port | Test if a specific port is open on a server. |
| traceroute google.com | Trace the path packets take to reach a site. |
| Command | Use Case |
| grep "text" file | Find a word inside a file. |
| grep -r "text" . | Find a word inside ALL files in a folder. |
| find / -name file | Find where a file is located on the drive. |
| locate file | Quickly find a file (using a database). |
| sort file.txt | Sort the lines of a file alphabetically. |
| uniq file.txt | Remove duplicate lines (needs sorted file). |
| wc file.txt | Count lines, words, and characters in a file. |
| diff file1 file2 | Show differences between two files. |
| sed 's/old/new/g' file | Replace word 'old' with 'new' in a file. |
| awk '{print $1}' file | Print only the first column of text. |
| head -n 5 file | Show first 5 lines. |
| Command | Use Case |
| ps | List your current processes. |
| ps aux | List EVERY process running on the system. |
| kill 1234 | Kill process with PID 1234. |
| killall nginx | Kill all processes named "nginx". |
| systemctl start nginx | Start a service (e.g., Web Server). |
| systemctl stop nginx | Stop a service. |
| systemctl restart nginx | Restart a service. |
| systemctl status nginx | Check if a service is running or failed. |
| systemctl enable nginx | Make service start automatically on reboot. |
| bg | Send a process to the background. |
| fg | Bring a background process to the foreground. |
| Command | Use Case |
| tar -cvf data.tar folder | Create a tar archive (Combine files). |
| tar -xvf data.tar | Extract a tar archive. |
| tar -czvf data.tar.gz | Create a compressed archive (Zip it). |
| tar -xzvf data.tar.gz | Extract a compressed archive. |
| zip data.zip folder | Create a standard .zip file. |
| unzip data.zip | Extract a .zip file. |
| gzip file | Compress a single file. |
| gunzip file.gz | Decompress a .gz file. |
| Command | Use Case |
| history | Show last commands used. |
| !100 | Run command number 100 from history again. |
| clear | Clean the terminal screen (Shortcut: Ctrl+L). |
| exit | Log out or close terminal. |
| man ls | Show the manual (help) for "ls". |
| echo "Hello" | Print "Hello" to the screen. |
| alias cls='clear' | Create a custom shortcut command. |
| reboot | Restart the computer. |
| shutdown now | Turn off the computer immediately. |