Linux Useful Shortcut Keys & Commands
Complete list of Linux keyboard shortcuts and terminal commands (Ubuntu/Debian/CentOS)
Basic Terminal Shortcuts
| Shortcut | Action |
|---|---|
| Ctrl + C | Stop/Kill current process |
| Ctrl + Z | Suspend current process |
| Ctrl + D | Exit terminal / EOF |
| Ctrl + L | Clear screen (same as 'clear') |
| Ctrl + A | Move cursor to beginning of line |
| Ctrl + E | Move cursor to end of line |
| Ctrl + U | Cut text from cursor to beginning |
| Ctrl + K | Cut text from cursor to end |
| Ctrl + W | Cut word before cursor |
| Ctrl + Y | Paste cut text |
| Ctrl + R | Search command history |
| Ctrl + P | Previous command (Up arrow) |
| Ctrl + N | Next command (Down arrow) |
| Ctrl + Shift + C | Copy |
| Ctrl + Shift + V | Paste |
| Tab | Auto-complete commands/filenames |
| Up/Down Arrow | Navigate command history |
Desktop Environment Shortcuts (GNOME/Ubuntu)
| Shortcut | Action |
|---|---|
| Super (Win) Key | Open Activities/Applications Menu |
| Super + A | Show Applications |
| Super + D | Show Desktop (Minimize all) |
| Super + L | Lock Screen |
| Super + E | Open File Manager |
| Super + T | Open Terminal |
| Alt + Tab | Switch between applications |
| Alt + ` (Backtick) | Switch windows of same app |
| Alt + F2 | Run command dialog |
| Alt + F4 | Close current window |
| Print Screen | Take screenshot |
| Alt + Print Screen | Screenshot active window |
| Ctrl + Alt + T | Open Terminal |
| Ctrl + Alt + Del | Log out / Shutdown |
| Ctrl + Alt + Arrow | Switch workspaces |
Nano Text Editor Shortcuts
| Shortcut | Action |
|---|---|
| Ctrl + O | Save file |
| Ctrl + X | Exit Nano |
| Ctrl + F | Move forward one character |
| Ctrl + B | Move back one character |
| Ctrl + Space | Move forward one word |
| Alt + Space | Move back one word |
| Ctrl + A | Go to beginning of line |
| Ctrl + E | Go to end of line |
| Ctrl + W | Search |
| Ctrl + \ | Search and replace |
| Ctrl + K | Cut line |
| Ctrl + U | Paste line |
| Ctrl + / | Undo |
Basic Linux Commands
| Command | Description | Example |
|---|---|---|
| ls | List files/directories | ls -la |
| cd | Change directory | cd /home/user |
| pwd | Print current directory | pwd |
| mkdir | Create directory | mkdir newfolder |
| rmdir | Remove empty directory | rmdir oldfolder |
| rm | Remove files/directories | rm file.txt |
| cp | Copy files | cp file.txt backup/ |
| mv | Move or rename files | mv old.txt new.txt |
| cat | Display file content | cat file.txt |
| nano | Open text editor | nano file.txt |
| vim | Open Vim editor | vim file.txt |
| sudo | Run as superuser | sudo apt update |
| chmod | Change file permissions | chmod 755 script.sh |
| grep | Search text in files | grep "text" file.txt |
| man | Show manual of command | man ls |
| clear | Clear terminal screen | clear |
| exit | Close terminal | exit |
Package Manager Commands (APT - Debian/Ubuntu)
| Command | Description |
|---|---|
| sudo apt update | Update package list |
| sudo apt upgrade | Upgrade all packages |
| sudo apt install [package] | Install a package |
| sudo apt remove [package] | Remove a package |
| sudo apt search [keyword] | Search for packages |
| sudo apt autoremove | Remove unused packages |
System Information Commands
| Command | Description |
|---|---|
| uname -a | Show system and kernel info |
| whoami | Show current username |
| who | Show logged-in users |
| df -h | Show disk space usage |
| free -h | Show RAM usage |
| top | Show running processes |
| ps aux | List all processes |
| kill [PID] | Stop a process |
Network Commands
| Command | Description |
|---|---|
| ifconfig | Show network interfaces |
| ping [address] | Test network connection |
| curl [url] | Download/upload data from URL |
| wget [url] | Download file from URL |
| ssh user@host | SSH to remote server |