
Linux is a powerful operating system widely used in servers, cybersecurity, and development environments. If you want to become confident in Linux, learning essential commands is the fastest way to improve your skills. In this guide, you will learn 30 Linux commands you must know, along with simple examples and explanations.
1. Navigation Commands
1. pwd – Show current directory
pwd
2. ls – List files
ls -l
3. cd – Change directory
cd /home/user
4. clear – Clear terminal screen
clear
5. history – Show command history
history
2. File Management
6. mkdir – Create directory
mkdir test
7. rmdir – Remove empty directory
rmdir test
8. touch – Create file
touch file.txt
9. cp – Copy file
cp file.txt copy.txt
10. mv – Move or rename file
mv file.txt newfile.txt
11. rm – Delete file
rm file.txt
12. rm -r – Delete directory
rm -r folder
13. ln – Create link
ln -s file.txt link.txt
3. File Viewing
14. cat – Display file content
cat file.txt
15. less – View large files
less file.txt
16. head – Show first lines
head file.txt
17. tail – Show last lines
tail -f file.txt
4. Searching
18. find – Search files
find . -name "file.txt"
19. grep – Search text
grep "hello" file.txt
20. which – Find command location
which python
21. locate – Fast file search
locate file.txt
5. Permissions
22. chmod – Change permissions
chmod 755 script.sh
23. chown – Change ownership
sudo chown user:user file.txt
6. Process Management
24. ps – Show processes
ps aux
25. top – Real-time system monitor
top
26. kill – Stop process
kill 1234
7. Network & Remote
27. ping – Test connection
ping google.com
28. curl – Fetch data
curl https://example.com
29. wget – Download files
wget https://example.com/file.zip
30. ssh – Remote login
ssh user@192.168.0.1
8. Compression
Bonus: tar – Archive files
tar -cvf archive.tar folder
Conclusion
These 30 Linux commands form the foundation of working in a Linux environment. Whether you are managing servers, learning cybersecurity, or building your own projects, mastering these commands will significantly improve your efficiency.
The best way to learn is by practicing. Try each command in your terminal, experiment with different options, and understand how they behave. Over time, these commands will become second nature, and you will be able to navigate Linux systems like a professional.
If you continue learning beyond these basics, you can explore shell scripting, automation, and advanced system management, taking your Linux skills to the next level.