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
ls
shows files and folders in your current directoryls -l
gives more detail (permissions, size, timestamps)ls -a
includes 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
cd
to 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/
rm
deletes filesrm -r
deletes 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.txt
Copy 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.txt
Move 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
cd
andpwd
[ ] Create/delete files and folders
[ ] Copy, move, and rename items
[ ] Use
ls -la
like 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
/htop
Understanding 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
Subscribe to my newsletter
Read articles from Abdulrahman Ahmad directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Abdulrahman Ahmad
Abdulrahman Ahmad
🚀 Code. Automate. Innovate. Hi, I’m Abdulrahman, a passionate DevOps Engineer and Software Developer on a mission to bridge the gap between code and production. With a love for automation, cloud-native solutions, and cutting-edge tech, I turn complex problems into seamless, scalable systems. 💡 What I Do: Build robust CI/CD pipelines that deliver software at the speed of thought. Architect cloud infrastructure that scales with a single command. Transform manual processes into automated workflows that just work. Break down silos and foster collaboration between teams. 🔧 Tech Stack I ❤️: Containers (Docker), Orchestration (Kubernetes), Infrastructure as Code (Terraform), CI/CD (Jenkins, GitLab), Cloud (AWS/GCP/Azure), and scripting like it’s my superpower. 📝 Why This Blog? This is where I share my journey, lessons learned, and the latest trends in DevOps and software engineering. Whether you're a seasoned pro or just starting out, join me as we explore the tools, tricks, and best practices that make the tech world tick. 🌟 Let’s Build the Future, One Pipeline at a Time. Connect with me, share your thoughts, and let’s automate the world together!