When I first started learning DevOps, the Linux terminal felt intimidating. I didn’t know where to begin or what commands to trust. But after some trial and error, a few simple commands became my everyday tools — and they made all the difference.
Here are the Linux basics that helped me survive and thrive:
- ls — List files Use this to see what's in the current folder. It's like opening a folder in your file explorer.
ls
Tip:
ls -l shows details (like size and date).
ls -a reveals hidden files.
- cd — Change directory Move around your file system easily. Think of it like “entering” a folder.
cd foldername
Useful shortcuts:
cd .. goes back one level
cd / takes you to the root directory
cd ~ brings you to your home folder
- pwd — Show where you are This command tells you your exact location in the file system.
pwd
It’s very useful when you're deep in folders and need to double-check your path.
- touch and mkdir — Create files and folders Quick ways to build your environment.
touch filename.txt # creates a file
mkdir myfolder # creates a new directory
These are great for practice or creating test setups.
- sudo — Run with admin power (carefully!) Some commands need special privileges. sudo gives you those powers (like an admin mode).
sudo command
Example:
sudo apt update
⚠️ Be careful with sudo. It can change important system files.
Bonus: Combine them like a pro
You can chain commands to get more done in one line. For example:
sudo mkdir /opt/myfolder && cd /opt/myfolder
This creates a folder with superuser access and instantly moves you into it.
Top comments (0)