June 13, 2026
Linux File System Navigation: A Beginner’s Guide
In the previous article, we built our cybersecurity lab.
0xJBsec
3 min read
We installed:
- VirtualBox
- Kali Linux
- WinRAR
- 7-Zip
At this point, your lab is ready.
You open Kali Linux for the first time.
A terminal window appears.
A blinking cursor waits for your command.
And then the most common beginner question appears:
"Now what?"
Most students immediately start searching for hacking tools.
But experienced cybersecurity professionals know something important.
Before learning tools, you must learn the operating system.
And the first thing every Linux user learns is how to navigate the file system.
Think of today's article as learning how to walk before learning how to run.
Imagine You're Exploring a New City
Suppose you land in a city you've never visited before.
You have no idea:
- Where you are
- Where your house is
- Where important buildings are located
The first thing you would do is check your current location.
Linux works exactly the same way.
Before moving anywhere, you should know where you currently are.
Finding Your Current Location with pwd
Open a terminal and type:
pwdpwdExample output:
/home/kali/home/kalipwd stands for:
Print Working DirectoryPrint Working DirectoryThink of it as:
"Show me my current location."
Just like Google Maps shows where you are standing, pwd shows where you are inside the Linux file system.
You will use this command constantly.
Moving Around with cd
Now that you know your location, let's start exploring.
Suppose you're inside:
/home/kali/home/kaliand want to enter the Desktop folder.
Use:
cd Desktopcd DesktopNow verify:
pwdpwdOutput:
/home/kali/Desktop/home/kali/DesktopYou've successfully moved into another directory.
Going Back with cd ..
Imagine entering a room and wanting to step back into the hallway.
Linux provides:
cd ..cd ..Example:
Current location:
/home/kali/Desktop/home/kali/DesktopRun:
cd ..cd ..Result:
/home/kali/home/kaliYou moved back one level.
Think of cd .. as:
"Go to the parent directory."
Going Back Multiple Levels
What if you're deep inside folders?
Example:
/home/kali/Desktop/Projects/Linux/home/kali/Desktop/Projects/LinuxGoing back one folder at a time would be slow.
Instead:
cd ../../cd ../../This means:
Go back two levelsGo back two levelsResult:
/home/kali/Desktop/home/kali/DesktopThis is extremely useful when navigating large directory structures.
Looking Around with ls
Imagine entering a room and wanting to know what's inside.
Use:
lslsExample:
Desktop
Documents
Downloads
PicturesDesktop
Documents
Downloads
Picturesls stands for:
ListListIt displays files and folders in your current directory.
Think of it as:
"Show me what's here."
Seeing Hidden Files with ls -la
Linux contains hidden files.
These files usually begin with:
..Example:
.bashrc
.profile
.config.bashrc
.profile
.configTo see everything:
ls -lals -laExample output:
drwxr-xr-x Desktop
drwxr-xr-x Downloads
-rw-r--r-- .bashrc
-rw-r--r-- .profiledrwxr-xr-x Desktop
drwxr-xr-x Downloads
-rw-r--r-- .bashrc
-rw-r--r-- .profileThis command shows:
- Hidden files
- File permissions
- Ownership
- File sizes
Cybersecurity professionals use this command daily.
Viewing Another Directory
You don't always need to move into a folder to see its contents.
Example:
ls Desktopls Desktopor
ls /home/kali/Desktopls /home/kali/DesktopLinux will display the contents of that folder.
Think of it as:
Looking through a window without entering the room.
Creating Folders with mkdir
Suppose you're starting a new project.
You need a place to store files.
Create a directory:
mkdir Projectsmkdir ProjectsVerify:
lslsOutput:
ProjectsProjectsmkdir stands for:
Make DirectoryMake DirectoryThink of it as building a new room inside your house.
Removing Empty Folders with rmdir
What if you no longer need the folder?
If it's empty:
rmdir Projectsrmdir ProjectsThe folder disappears.
Think of rmdir as:
Demolishing an empty room.
Important:
The directory must be empty.
Otherwise Linux refuses to remove it.
Removing Files with rm
Suppose you have:
notes.txtnotes.txtand want to delete it.
Use:
rm notes.txtrm notes.txtThe file is removed immediately.
There is no recycle bin.
There is no trash folder.
Once deleted, it's gone.
This is why cybersecurity professionals always double-check before using rm.
Finding Files with locate
Imagine a city containing thousands of buildings.
You know a file exists somewhere.
But you don't know where.
Use:
locate notes.txtlocate notes.txtExample output:
/home/kali/Documents/notes.txt/home/kali/Documents/notes.txtLinux instantly tells you where the file is located.
This is much faster than manually searching.
What If locate Doesn't Work?
Many beginners encounter:
locate: command not foundlocate: command not foundor
No results foundNo results foundThe database may need updating.
Run:
sudo updatedbsudo updatedbThen try:
locate notes.txtlocate notes.txtagain.
Think of updatedb as updating a city's directory before searching for addresses.
Changing Your Password with passwd
Passwords are important in Linux.
To change your password:
passwdpasswdLinux will ask:
Current Password
New Password
Retype New PasswordCurrent Password
New Password
Retype New PasswordOnce completed, your password is updated.
This is one of the first security practices every Linux user should know.
Getting Help with man
Now imagine learning hundreds of Linux commands.
Do you need to memorize everything?
Absolutely not.
Linux includes built-in documentation.
Example:
man lsman lsLinux displays:
- Description
- Options
- Examples
- Usage Information
You can do the same for almost any command:
man cd
man passwd
man mkdirman cd
man passwd
man mkdirThink of man as:
The official instruction manual for Linux commands.
Experienced Linux administrators use it constantly.
A Small Practical Challenge
Let's put everything together.
Create a folder:
mkdir CyberLabmkdir CyberLabMove into it:
cd CyberLabcd CyberLabCheck your location:
pwdpwdView contents:
ls -lals -laMove back:
cd ..cd ..Delete the folder:
rmdir CyberLabrmdir CyberLabCongratulations.
You have just performed the most common file system operations used in Linux.
Why Cybersecurity Professionals Must Master These Commands
Almost every cybersecurity task involves files.
Examples:
- Log Analysis
- Malware Samples
- Wordlists
- Scripts
- Reports
- Evidence Collection
Before using advanced tools like:
- Nmap
- Wireshark
- Burp Suite
- Metasploit
you must know how to move around Linux efficiently.
The terminal is where cybersecurity professionals spend most of their time.
And navigation commands are the foundation of everything that comes next.