Essential Linux file navigation commands for new users
The following are the most important commands for navigating the Linux filesystem:
pwd – Print Working Directory
Displays the absolute path of your current location in the file system.
pwd
Example Output: /home/rahul
📁 ls – List
Lists the contents of a directory.
-
ls : Basic list
-
ls -l : Detailed view (permissions, owner, size, etc.)
-
ls -a : Shows hidden files
- ls -lrta : Helpful when you want to quickly identify the most recently changed or created files, as they will appear at the end of the list.
-
Combine flags : ls -la

📂 cd – Change Directory
Used to move between directories.
-
cd directory_name – Go into a subdirectory
-
cd /absolute/path/ – Move using full path
-
cd .. – Move up one level
-
cd ~ or cd – Go to home directory
-
cd - : Return to previous directory

mkdir – Make Directory
Creates a new directory.
mkdir my_folder
🗑️ rmdir – Remove Directory
Deletes an empty directory.
rmdir old_folder
📄 cp – Copy
Copies files or directories.
-
Copy a file : cp file.txt /target/path/ or cp folder/file.txt /target/path/
-
Copy a directory recursively : cp -r folder/ /target/path/
mv – Move / Rename
Moves or renames files and directories.
-
Move a file : mv file.txt /target/ or mv target/file.txt /target/
-
Rename : mv folder1/oldname.txt folder2/newname.txt
rm – Remove
Deletes files or directories.
-
Remove file: rm file.txt
-
Remove directory recursively: rm -r folder/ (Use with caution)
touch – Create Empty File
Creates a new, empty file.
touch newfile.txt
🔎 find – Search for Files and Directories
Searches using various filters like name, size, or modified time.
basic syntax : find [path] [options] [expression]
grep – Search Inside Files
Searches for text patterns in files.
basic syntax for the grep command in Linux and Unix is : grep [options] pattern [file...]
📘 man – Manual Pages
Displays documentation for commands.
man ls
Learn what each command does and how to use its flags effectively.
This collection of commands is foundational for Linux users for DevOps tasks.