25 Basic Linux Commands

Linux is a command-line-driven operating system. To be a developer or cloud engineer, you need to be comfortable with the Terminal. Here are the 25 most essential commands to get you started.

2. File & Directory Operations

CommandDescription
mkdirMake Directory (Create a new folder)
touchCreate a new empty file
cpCopy files or directories
mvMove or Rename files/directories
rmRemove/Delete a file
rm -rRemove a directory and its contents
catDisplay file content on screen
nano / viTerminal-based text editors
grepSearch for a specific string in a file
headShow the first 10 lines of a file
tailShow the last 10 lines of a file

3. System & Network Info

CommandDescription
sudoExecute command with root privileges
topDisplay active system processes
df -hShow disk space usage
free -mShow memory (RAM) usage
uname -aDisplay system information
historyShow list of previously used commands
ip addrShow IP address and network interfaces

4. Permissions & Ownership

CommandDescription
chmodChange file permissions (e.g., 777)
chownChange file owner or group

Knowledge Check

1. Which command shows you the path of the current directory?
A) ls | B) pwd | C) cd

2. How do you create a new folder named "Projects"?
A) touch Projects | B) mkdir Projects | C) mv Projects

3. Which command is used to delete a non-empty directory?
A) rm | B) cat | C) rm -r