Linux Useful Shortcut Keys & Commands

Complete list of Linux keyboard shortcuts and terminal commands (Ubuntu/Debian/CentOS)

Basic Terminal Shortcuts
ShortcutAction
Ctrl + CStop/Kill current process
Ctrl + ZSuspend current process
Ctrl + DExit terminal / EOF
Ctrl + LClear screen (same as 'clear')
Ctrl + AMove cursor to beginning of line
Ctrl + EMove cursor to end of line
Ctrl + UCut text from cursor to beginning
Ctrl + KCut text from cursor to end
Ctrl + WCut word before cursor
Ctrl + YPaste cut text
Ctrl + RSearch command history
Ctrl + PPrevious command (Up arrow)
Ctrl + NNext command (Down arrow)
Ctrl + Shift + CCopy
Ctrl + Shift + VPaste
TabAuto-complete commands/filenames
Up/Down ArrowNavigate command history
Desktop Environment Shortcuts (GNOME/Ubuntu)
ShortcutAction
Super (Win) KeyOpen Activities/Applications Menu
Super + AShow Applications
Super + DShow Desktop (Minimize all)
Super + LLock Screen
Super + EOpen File Manager
Super + TOpen Terminal
Alt + TabSwitch between applications
Alt + ` (Backtick)Switch windows of same app
Alt + F2Run command dialog
Alt + F4Close current window
Print ScreenTake screenshot
Alt + Print ScreenScreenshot active window
Ctrl + Alt + TOpen Terminal
Ctrl + Alt + DelLog out / Shutdown
Ctrl + Alt + ArrowSwitch workspaces
Nano Text Editor Shortcuts
ShortcutAction
Ctrl + OSave file
Ctrl + XExit Nano
Ctrl + FMove forward one character
Ctrl + BMove back one character
Ctrl + SpaceMove forward one word
Alt + SpaceMove back one word
Ctrl + AGo to beginning of line
Ctrl + EGo to end of line
Ctrl + WSearch
Ctrl + \Search and replace
Ctrl + KCut line
Ctrl + UPaste line
Ctrl + /Undo
Basic Linux Commands
CommandDescriptionExample
lsList files/directoriesls -la
cdChange directorycd /home/user
pwdPrint current directorypwd
mkdirCreate directorymkdir newfolder
rmdirRemove empty directoryrmdir oldfolder
rmRemove files/directoriesrm file.txt
cpCopy filescp file.txt backup/
mvMove or rename filesmv old.txt new.txt
catDisplay file contentcat file.txt
nanoOpen text editornano file.txt
vimOpen Vim editorvim file.txt
sudoRun as superusersudo apt update
chmodChange file permissionschmod 755 script.sh
grepSearch text in filesgrep "text" file.txt
manShow manual of commandman ls
clearClear terminal screenclear
exitClose terminalexit
Package Manager Commands (APT - Debian/Ubuntu)
CommandDescription
sudo apt updateUpdate package list
sudo apt upgradeUpgrade 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 autoremoveRemove unused packages
System Information Commands
CommandDescription
uname -aShow system and kernel info
whoamiShow current username
whoShow logged-in users
df -hShow disk space usage
free -hShow RAM usage
topShow running processes
ps auxList all processes
kill [PID]Stop a process
Network Commands
CommandDescription
ifconfigShow network interfaces
ping [address]Test network connection
curl [url]Download/upload data from URL
wget [url]Download file from URL
ssh user@hostSSH to remote server