Phase 1: Mastering Files & Directories in Linux (Even If You're Starting From Scratch)

Level: Beginner
Estimated Time: ~20–25 minutes
Tools Used: Linux Terminal / CLI
Outcome: You'll master the absolute basics of navigating and manipulating files in any Linux environment
If you're starting your Linux or DevOps journey, there’s one thing you can’t skip:
The command line.
It's where the real power of Linux lies, and knowing just a few commands can 10x your confidence and control.
This article kicks off a hands-on learning series to help you become comfortable in the terminal, starting with Phase 1: File and Directory Mastery.
Why start here?
✅ Because Linux is all about working with files, directories, and scripts
✅ Because 90% of DevOps workflows require terminal navigation
✅ And because understanding file movement, structure, and creation is step zero in being productive on Linux
🧭 What We'll Learn
By the end of this article, you’ll know how to:
Navigate through your file system
Create, move, rename, and delete files/folders
Build muscle memory for essential CLI workflows
✅ Checkpoint 1: Open Your Terminal
Whether you're on Ubuntu, WSL, or a cloud VM — make sure your terminal is open.
Let’s start exploring.
📁 1. ls –> List Files and Folders
ls
ls -l
ls -a
lsshows files and folders in your current directoryls -lgives more detail (permissions, size, timestamps)ls -aincludes hidden files (those starting with a dot)
💡 Want to combine them? Try
ls -la
🚀 2. cd –> Change Directory
cd Documents/
cd ..
cd ~
cd foldername/goes into a foldercd ..moves up one levelcd ~jumps to your home directory
⌨️ Practice using
cdto jump around your folders. This is your core movement tool.
🧭 3. pwd –> Print Working Directory
pwd
This shows you where you are in the filesystem.
🧠 Use it when you feel lost. Think of it like checking your GPS location.
🛠️ 4. mkdir –> Make New Folder
mkdir my_project
Creates a new directory (folder) in your current location.
❌ 5. rm –> Remove Files or Folders
rm filename.txt
rm -r my_folder/
rmdeletes filesrm -rdeletes folders (and everything inside)
🚨 Be careful. There’s no undo.
📦 6. cp –> Copy Files or Folders
cp a.txt b.txt
cp -r src/ backup/
Copy a single file:
cp old.txt new.txtCopy a folder:
cp -r my_folder/ backup/
🔁 7. mv –> Move or Rename
mv a.txt notes.txt
mv notes.txt ~/Documents/
Rename a file:
mv old.txt new.txtMove a file to another location
🧪 8. touch –> Create New File
touch notes.md
Instantly creates an empty file. Useful for quickly making .txt, .sh, .md, or config files.
📁 Example: Build a Practice Directory
Let’s build a sandbox to play in:
mkdir cli-practice
cd cli-practice
touch intro.txt
mkdir drafts
cp intro.txt drafts/intro-copy.txt
ls -la
✅ Now try deleting intro-copy.txt and renaming intro.txt to welcome.txt.
This hands-on structure locks the commands into memory 🔐
🧠 Final Checkpoints
Make sure you can:
[ ] Navigate using
cdandpwd[ ] Create/delete files and folders
[ ] Copy, move, and rename items
[ ] Use
ls -lalike a pro
If you're confident in those, you're ready for Phase 2: System Insight Tools 🧠⚙️
📦 What’s Coming Next?
In Phase 2, we’ll explore:
Disk and memory usage
Process monitoring with
top/htopUnderstanding users, groups, and system resources
This is where you'll start seeing Linux as a system you control, not just a file explorer.
🙌 Final Words
You just completed the most important foundation in Linux: knowing where you are and how to interact with your system confidently.
🎉 You can now:
Build folders
Create or delete files
Move through the terminal like a local
Keep this skill sharp. You’ll use it daily.
Author: Abdulrahman A. Muhamad 🔗 My Portfolio • GitHub • LinkedIn






