Essential Commands for Navigating a Unix/Linux
System
In this guide, you will learn essential commands for navigating and manipulating files in a
Unix/Linux system. These commands are fundamental for working in the terminal and form
the backbone of daily tasks in any Unix-based operating system like Ubuntu.
Key Commands and Concepts
1. pwd - Print Working Directory
Displays the current directory you are in.
Example:
$ pwd
2. ls - List Files and Directories
Lists all the files and directories in the current working directory.
Example:
$ ls
3. cd - Change Directory
Navigate to another directory.
Example:
$ cd /path/to/directory
4. touch - Create an Empty File
Creates an empty file.
Example:
$ touch filename
, 5. mkdir - Create a Directory
Creates a new directory in the current location.
Example:
$ mkdir directory_name
6. cp - Copy Files or Directories
Copies files or directories.
Example:
$ cp source_file destination_file
7. mv - Move or Rename Files/Directories
Moves or renames files and directories.
Example:
$ mv source_file destination_file
8. rm - Remove Files
Deletes files.
Example:
$ rm filename
9. rmdir - Remove Empty Directories
Deletes an empty directory.
Example:
$ rmdir directory_name
Practical Tasks
Create a File