Master the fundamental Linux commands that every DevOps engineer and system administrator needs to know
Save
Complete lesson & earn 250 PX
Learn navigation, file manipulation, and system commands that form the backbone of administration
EXERCISE
1Learn the three essential commands that help you never get lost in the Linux file system maze.
Save
EXERCISE
2Discover the powerful commands that let you create, copy, move, and organize your digital workspace.
Save
EXERCISE
3Learn the commands that reveal everything about your system - from CPU specs to memory usage.
Save
EXERCISE
4Discover where Linux stores its commands and why some need special permissions to run.
Save
Imagine you're exploring a massive digital city with millions of folders and files. How do you know where you are? How do you see what's around you? How do you move to where you need to go?
Meet your navigation trinity:
pwd (Print Working Directory)
/home/nana/projects/websitels (List)
ls -a reveals hidden files (the secret stuff starting with dots)ls -R shows everything recursively (like X-ray vision through folders)cd (Change Directory)
cd projects - move into projects foldercd .. - go back one level (like hitting the back button)cd ~ - instant transport to your home basecd / - jump to the very top of the systemPro Tip: These three commands are like breathing for users - you'll use them constantly!
Time to become an architect of your digital world! Instead of right-clicking and dragging, you'll use these power tools:
Creating Things:
mkdir my-project → Creates a new folder called 'my-project'touch readme.txt → Creates an empty file called 'readme.txt'Moving and Renaming:
mv old-name.txt new-name.txt → Renames a filemv file.txt /home/user/documents/ → Moves file to documents folderCopying Like a Boss:
cp file.txt backup-file.txt → Creates a copycp -r entire-folder backup-folder → Copies whole folders with everything insideCleaning Up:
rm unwanted-file.txt → Deletes a file (be careful!)rm -r old-project/ → Deletes folder and everything insideReading Files:
cat my-file.txt → Shows what's inside a text fileThe Magic: These commands work on hundreds of files at once. Try doing that with mouse clicks!
Reality Check: One cp -r command can backup your entire project instantly. That's the power of CLI!
Your system is like a high-tech machine with tons of hidden information. Here's how to become a system detective:
System Identity Commands:
uname -a → Full system report (kernel, architecture, hostname)cat /etc/os-release → What Linux distribution you're runningHardware Investigation:
cat /proc/cpuinfo → CPU specifications and detailscat /proc/meminfo → RAM and memory informationProductivity Boosters:
history → See all your previous commands (your digital footprints)clear → Clean slate - clears the messy terminalsu - admin → Switch to different user (like changing hats)Ninja Shortcuts:
Why This Matters: When crash at 3 AM, these commands help you quickly diagnose what's wrong. No GUI needed - just pure diagnostic power at your fingertips!
Fun Fact: Your command history is saved in a hidden file called .bash_history - your terminal remembers everything!
Ever wondered where commands like ls, cd, and mkdir actually exist? They're not magic - they're binary files living in specific neighborhoods of your system!
Command Neighborhoods:
/bin → Essential commands everyone can use (ls, cd, cat)/sbin → System commands (need admin powers)/usr/bin → More user commands (historical storage solution)/usr/local/bin → Custom installed programs/opt → Third-party application commandsThe Permission Story: Some commands are like public parks (anyone can use them), others are like restricted areas (admin-only).
Regular User Commands: ls, cd, mkdir, cp
Super User Commands: adduser, network configurations, system modifications
The Magic Word: sudo
When you need admin powers: sudo adduser newperson
sudo = "Super User DO"Real-World Scenario:
Trying to add a new user without sudo? ❌ Permission denied!
Using sudo adduser john? ✅ Welcome John!
The Bottom Line: Linux commands are just programs stored in specific folders. Understanding this helps you troubleshoot when things don't work!