The 20 Linux Commands You’ll Use Every Day

Updated: June 19, 2025

🧰 1. ls – List Directory Contents

ls -al

Shows files in the current directory with details like permissions, ownership, and size.


📂 2. cd – Change Directory

cd /var/log

Moves you into a different directory. cd .. takes you up one level.


📄 3. cat – Concatenate & View File Contents

cat /etc/passwd

Displays the contents of a file in the terminal.


📖 4. less – View File with Paging

less /var/log/syslog

Ideal for reading long files. Use q to quit, / to search.


✍️ 5. nano / vim – Edit Text Files

nano ~/.bashrc

Edit config files or scripts right from the terminal. Choose your favorite!


🚀 6. mkdir – Make New Directory

mkdir myfolder

Creates a new directory in your current location.


🗑️ 7. rm – Remove Files or Directories

rm -rf oldlogs/

Deletes files or folders. ⚠️ Be careful with -rf — no confirmation.


🔄 8. cp – Copy Files

cp file.txt backup/file.txt

Copies files and folders.


🚚 9. mv – Move or Rename Files

mv report.txt archive/report_2025.txt

Moves or renames files.


🔍 10. find – Search for Files

find /etc -name "*.conf"

Searches directories by name, size, time, and more.


🔎 11. grep – Search Inside Files

grep 'Listen' /etc/apache2/ports.conf

Powerful pattern matcher. Combine with ps, dmesg, or logs.


📦 12. apt / yum – Package Manager (Debian / Red Hat)

sudo apt update && sudo apt upgrade

Installs, removes, and updates software packages.


🔧 13. systemctl – Manage Services (Systemd)

sudo systemctl restart nginx

Start, stop, restart, or check the status of system services.


👀 14. ps aux – View Running Processes

ps aux | grep ssh

Lists active processes, useful for debugging or monitoring.


📊 15. top / htop – Monitor System Resources

top

Real-time CPU, memory, and process monitoring. htop offers a better UI.


📡 16. ping – Test Network Connection

ping google.com

Basic connectivity test for diagnosing network issues.


🌐 17. curl / wget – Download from the Web

curl -O https://example.com/file.txt

Great for fetching files or making HTTP requests.


🔐 18. chmod – Change Permissions

chmod +x script.sh

Modifies file access rights. Use chmod 755, chmod 644, etc.


🧑‍💻 19. chown – Change File Ownership

sudo chown user:group myfile.txt

Adjusts ownership of files—critical in multi-user systems.


🧹 20. df -h / du -sh – Disk Space Usage

df -h
du -sh *

Monitor how much disk space is free or used by folders.


⚡ Bonus Tip: Combine Commands with | and &&

ps aux | grep nginx
mkdir backups && cp *.conf backups/

Chains and pipes make the command line even more powerful.


🧠 Final Thoughts

Mastering these 20 commands will give you confidence and efficiency in almost any Linux environment—desktop, server, or embedded. Practice daily, use man [command] for detailed help, and explore aliases to save even more time.


Comments

One response to “The 20 Linux Commands You’ll Use Every Day”

Leave a Reply