Basic Linux Commands
DevOps engineer sharing daily learnings on Linux, Docker, Kubernetes, CI/CD, and Cloud.
Linux is controlled mainly through the command line.
Knowing basic Linux commands helps you:
Navigate the file system
Manage files and directories
Inspect system information
Work efficiently on servers
This guide covers the most commonly used Linux commands in the beginning.
Basic Commands used in day-to-day activities
Navigation Commands
pwdβ Print Working DirectorypwdShows your current location in the file system.
lsβ List Files and Directoriesls ls -l ls -acdβ Change Directorycd /etc cd .. cd ~File & Directory Management
mkdirβ Create Directorymkdir logstouchβ Create Empty Filetouch file.txtcpβ Copy Filescp file.txt backup.txtmvβ Move / Rename Filesmv file.txt newfile.txtrmβ Remove Filesrm file.txt rm -r folderViewing File Content
catcat file.txthead/tailhead file.txt tail -f app.logFile Search & Filters
grepgrep "error" app.logfindfind /var/log -name "*.log"System Information Commands
df -h # Disk usage du -sh * # Directory size free -m # Memory usage uptime # System running time whoami # Current userNetworking Basics
ping google.com curl https://example.com wget https://example.com/file.zip
Common Beginner Mistakes β οΈ
Using
rm -rf /blindlyForgetting file paths
Running commands as root unnecessarily
Ignoring command options (
-h,--help)
π Conclusion
Mastering basic Linux commands is the foundation of Linux, DevOps, and Cloud work.
These commands are used daily on servers and production systems.