# Linux Shortcuts + Terminal Commands (Quick Reference) > **Note:** The Windows logo key (between **CTRL** and **ALT** on most PC keyboards) is commonly called the **Super** key on Linux. :contentReference[oaicite:0]{index=0} --- ## General Linux Shortcuts (Common Across Apps) | Shortcut | What it does | |---|---| | **Ctrl + C** | Copy highlighted text/image/object to clipboard *(or cancel a running terminal command — see Bash section)* | | **Ctrl + V** | Paste from clipboard | | **Ctrl + X** | Cut highlighted text/object | | **Ctrl + S** | Save the current file | | **Ctrl + N** | New file | | **Ctrl + Z** | Undo *(or suspend a terminal job — see Bash section)* | | **Ctrl + Q** | Quit the active application | | **Ctrl + Alt + F1** … **F6** | Switch to a virtual console (TTY) | | **Ctrl + Alt + F7** | Switch back to the first graphical terminal | --- ## GNOME Keyboard Shortcuts | Shortcut | What it does | |---|---| | **Super** | Activities Overview | | **Alt + Tab** | Cycle running apps | | **Alt + Shift + Tab** | Cycle running apps (reverse) | | **Alt + `** *(grave)* | Cycle windows of the same app | | **Alt + F1** | Applications menu | | **Alt + F2** | Floating command prompt | | **PrtSc** | Screenshot (entire screen) | | **Alt + PrtSc** | Screenshot (focused window) | | **Ctrl + Alt + Arrow keys** | Switch workspaces | | **Ctrl + Alt + D** | Show desktop (minimize all) | --- ## KDE Keyboard Shortcuts | Shortcut | What it does | |---|---| | **Super** | Application Launcher | | **Alt + Space** | Command interface | | **Ctrl + Esc** | System Activity utility | | **Super + Alt + Arrow keys** | Switch between windows | | **Ctrl + F1** … **F4** | Switch virtual desktops | | **Super + Tab** | Cycle running apps | | **Super + Shift + Tab** | Cycle running apps (reverse) | | **Ctrl + Alt + L** | Lock session | | **Ctrl + Alt + Shift + Del** | Log out instantly *(no confirmation)* | | **Ctrl + Alt + Shift + Page Up** | Reboot instantly *(no confirmation)* | --- ## Xfce Keyboard Shortcuts | Shortcut | What it does | |---|---| | **Super + P** | Display settings | | **Alt + F2** | Command prompt | | **Ctrl + Alt + Arrow keys** | Move between virtual desktops | | **Alt + Tab** | Cycle apps | | **Alt + Shift + Tab** | Cycle apps (reverse) | | **Alt + F4** | Close focused window | | **Alt + F10** | Maximize focused window | | **Ctrl + Alt + D** | Show desktop | | **Ctrl + Alt + Del** | Lock session | | **Ctrl + Esc** | Context menu | --- ## LXDE Keyboard Shortcuts | Shortcut | What it does | |---|---| | **Ctrl + Alt + T** | Launch Terminal | | **Shift + Alt + Arrow keys** | Move window between desktops | | **Ctrl + Alt + Arrow keys** | Move between desktops | | **Alt + Tab** | Cycle apps | | **Alt + Shift + Tab** | Cycle apps (reverse) | | **Alt + F4** | Close focused window | | **Alt + Esc** | Hide focused window | | **Super + D** | Show desktop | | **Super + E** | File browser | | **F11** | Fullscreen toggle | --- ## Cinnamon Shortcuts (Linux Mint) | Shortcut | What it does | |---|---| | **Ctrl + Alt + Down** | Show running apps on current workspace | | **Ctrl + Alt + Up** | Show running apps across workspaces | | **Alt + Tab** | Cycle apps | | **Shift + Alt + Tab** | Cycle apps (reverse) | | **Alt + F2** | Command prompt | | **Alt + F4** | Close focused window | | **Super + L** | Cinnamon debugger | | **Super + D** | Show desktop | | **Ctrl + Super + Arrow keys** | Span window to a border | | **Shift + Ctrl + Alt + Left/Right** | Move window to left/right workspace | --- ## Ubuntu Desktop Shortcuts (Common Defaults) | Shortcut | What it does | |---|---| | **Super** | Activities | | **Alt + F2** | Command prompt | | **Alt + Tab** | Cycle apps | | **Super + Arrow keys** | Snap window to edge | | **PrtSc** | Screenshot (entire screen) | | **Alt + PrtSc** | Screenshot (focused window) | | **Shift + PrtSc** | Screenshot (selection area) | | **Ctrl + Alt + T** | Launch Terminal | | **Super + L** | Lock screen | | **Super + D** | Show desktop | --- ## Firefox Shortcuts (Quick Web) | Shortcut | What it does | |---|---| | **Backspace** | Back | | **F5** or **Ctrl + R** | Reload | | **Ctrl + P** | Print | | **Ctrl + S** | Save page | | **Ctrl + F** | Find on page | | **Ctrl + K** | Focus search bar | | **Ctrl + W** | Close tab | | **Ctrl + N** | New window/tab | | **Ctrl + Shift + P** | New private window | | **Ctrl + Shift + Q** | Quit Firefox | --- # Bash / Terminal Keyboard Shortcuts ## Core Terminal Controls | Shortcut | What it does | |---|---| | **Ctrl + C** | Kill current process (send interrupt) | | **Ctrl + D** | Close terminal / send EOF | | **Ctrl + Z** | Suspend job (use `fg` to resume) | | **Ctrl + S** | Pause output to screen (XOFF) | | **Ctrl + Q** | Resume output to screen (XON) | | **Tab** | Autocomplete file/folder/command | ### Resume a suspended job ```bash fg # or bring a specific job back: fg %1 ````md # Linux Shortcuts + Terminal Commands (Quick Reference) > **Note:** The Windows logo key (between **CTRL** and **ALT** on most PC keyboards) is commonly called the **Super** key on Linux. :contentReference[oaicite:0]{index=0} --- ## General Linux Shortcuts (Common Across Apps) | Shortcut | What it does | |---|---| | **Ctrl + C** | Copy highlighted text/image/object to clipboard *(or cancel a running terminal command — see Bash section)* | | **Ctrl + V** | Paste from clipboard | | **Ctrl + X** | Cut highlighted text/object | | **Ctrl + S** | Save the current file | | **Ctrl + N** | New file | | **Ctrl + Z** | Undo *(or suspend a terminal job — see Bash section)* | | **Ctrl + Q** | Quit the active application | | **Ctrl + Alt + F1** … **F6** | Switch to a virtual console (TTY) | | **Ctrl + Alt + F7** | Switch back to the first graphical terminal | --- ## GNOME Keyboard Shortcuts | Shortcut | What it does | |---|---| | **Super** | Activities Overview | | **Alt + Tab** | Cycle running apps | | **Alt + Shift + Tab** | Cycle running apps (reverse) | | **Alt + `** *(grave)* | Cycle windows of the same app | | **Alt + F1** | Applications menu | | **Alt + F2** | Floating command prompt | | **PrtSc** | Screenshot (entire screen) | | **Alt + PrtSc** | Screenshot (focused window) | | **Ctrl + Alt + Arrow keys** | Switch workspaces | | **Ctrl + Alt + D** | Show desktop (minimize all) | --- ## KDE Keyboard Shortcuts | Shortcut | What it does | |---|---| | **Super** | Application Launcher | | **Alt + Space** | Command interface | | **Ctrl + Esc** | System Activity utility | | **Super + Alt + Arrow keys** | Switch between windows | | **Ctrl + F1** … **F4** | Switch virtual desktops | | **Super + Tab** | Cycle running apps | | **Super + Shift + Tab** | Cycle running apps (reverse) | | **Ctrl + Alt + L** | Lock session | | **Ctrl + Alt + Shift + Del** | Log out instantly *(no confirmation)* | | **Ctrl + Alt + Shift + Page Up** | Reboot instantly *(no confirmation)* | --- ## Xfce Keyboard Shortcuts | Shortcut | What it does | |---|---| | **Super + P** | Display settings | | **Alt + F2** | Command prompt | | **Ctrl + Alt + Arrow keys** | Move between virtual desktops | | **Alt + Tab** | Cycle apps | | **Alt + Shift + Tab** | Cycle apps (reverse) | | **Alt + F4** | Close focused window | | **Alt + F10** | Maximize focused window | | **Ctrl + Alt + D** | Show desktop | | **Ctrl + Alt + Del** | Lock session | | **Ctrl + Esc** | Context menu | --- ## LXDE Keyboard Shortcuts | Shortcut | What it does | |---|---| | **Ctrl + Alt + T** | Launch Terminal | | **Shift + Alt + Arrow keys** | Move window between desktops | | **Ctrl + Alt + Arrow keys** | Move between desktops | | **Alt + Tab** | Cycle apps | | **Alt + Shift + Tab** | Cycle apps (reverse) | | **Alt + F4** | Close focused window | | **Alt + Esc** | Hide focused window | | **Super + D** | Show desktop | | **Super + E** | File browser | | **F11** | Fullscreen toggle | --- ## Cinnamon Shortcuts (Linux Mint) | Shortcut | What it does | |---|---| | **Ctrl + Alt + Down** | Show running apps on current workspace | | **Ctrl + Alt + Up** | Show running apps across workspaces | | **Alt + Tab** | Cycle apps | | **Shift + Alt + Tab** | Cycle apps (reverse) | | **Alt + F2** | Command prompt | | **Alt + F4** | Close focused window | | **Super + L** | Cinnamon debugger | | **Super + D** | Show desktop | | **Ctrl + Super + Arrow keys** | Span window to a border | | **Shift + Ctrl + Alt + Left/Right** | Move window to left/right workspace | --- ## Ubuntu Desktop Shortcuts (Common Defaults) | Shortcut | What it does | |---|---| | **Super** | Activities | | **Alt + F2** | Command prompt | | **Alt + Tab** | Cycle apps | | **Super + Arrow keys** | Snap window to edge | | **PrtSc** | Screenshot (entire screen) | | **Alt + PrtSc** | Screenshot (focused window) | | **Shift + PrtSc** | Screenshot (selection area) | | **Ctrl + Alt + T** | Launch Terminal | | **Super + L** | Lock screen | | **Super + D** | Show desktop | --- ## Firefox Shortcuts (Quick Web) | Shortcut | What it does | |---|---| | **Backspace** | Back | | **F5** or **Ctrl + R** | Reload | | **Ctrl + P** | Print | | **Ctrl + S** | Save page | | **Ctrl + F** | Find on page | | **Ctrl + K** | Focus search bar | | **Ctrl + W** | Close tab | | **Ctrl + N** | New window/tab | | **Ctrl + Shift + P** | New private window | | **Ctrl + Shift + Q** | Quit Firefox | --- # Bash / Terminal Keyboard Shortcuts ## Core Terminal Controls | Shortcut | What it does | |---|---| | **Ctrl + C** | Kill current process (send interrupt) | | **Ctrl + D** | Close terminal / send EOF | | **Ctrl + Z** | Suspend job (use `fg` to resume) | | **Ctrl + S** | Pause output to screen (XOFF) | | **Ctrl + Q** | Resume output to screen (XON) | | **Tab** | Autocomplete file/folder/command | ### Resume a suspended job ```bash fg # or bring a specific job back: fg %1 ```` --- ## Command History (Faster Than Spamming Up Arrow) | Shortcut / Token | What it does | | --------------------- | --------------------------------------------------- | | **Ctrl + P** or **↑** | Previous command | | **Ctrl + N** or **↓** | Next command | | **Ctrl + R** | Reverse-search history | | **Ctrl + O** | Run the command you found (during history search) | | **Ctrl + G** | Exit history-search mode | | `!!` | Repeat previous command | | `!:n` | Repeat argument `n` from previous command | | `!:n:m` | Repeat range of arguments `n..m` | | `!:n:$` | Repeat arguments `n..end` | | `!*` | Repeat all arguments from previous command | | **Alt + .** | Insert last argument from previous command | | `^abc^def` | Re-run previous command, replacing `abc` with `def` | --- ## Move Cursor (Editing on the Command Line) | Shortcut | What it does | | --------------------------- | -------------------------------- | | **Ctrl + A** or **Home** | Start of line | | **Ctrl + E** or **End** | End of line | | **Ctrl + B** or **←** | Back one character | | **Ctrl + F** or **→** | Forward one character | | **Ctrl + ←** or **Alt + B** | Back one word | | **Ctrl + →** or **Alt + F** | Forward one word | | **Ctrl + X, Ctrl + X** | Toggle between start/end of line | | **Ctrl + M** | Enter (same as Return) | | **Ctrl + L** | Clear screen | --- ## Deleting Text | Shortcut | What it does | | ----------------------------- | ------------------------- | | **Ctrl + D** or **Delete** | Delete char under cursor | | **Ctrl + H** or **Backspace** | Delete char before cursor | | **Alt + D** | Delete word after cursor | | **Ctrl + W** | Cut word before cursor | --- ## Fix Typos (Fast Edits) | Shortcut | What it does | | ------------------------- | ---------------------------------- | | **Alt + T** or **Esc, T** | Swap current word with previous | | **Ctrl + T** | Swap last two characters | | **Ctrl + _** | Undo last keypress | | **Ctrl + U** | Clear from cursor to start of line | | **Alt + R** | Revert line | --- ## Capitalization | Shortcut | What it does | | ----------- | ------------------------------------ | | **Alt + C** | Capitalize current character | | **Alt + U** | Uppercase current word (from cursor) | | **Alt + L** | Lowercase current word (from cursor) | --- ## Cut & Paste (Bash “Kill Ring”) | Shortcut | What it does | | ------------ | -------------------------------- | | **Ctrl + K** | Cut from cursor to end of line | | **Ctrl + U** | Cut from cursor to start of line | | **Ctrl + Y** | Paste (yank) | --- ## Copy/Paste (System Clipboard) > In many Linux terminal emulators, copy/paste is often **Ctrl + Shift + C** and **Ctrl + Shift + V** (instead of Ctrl+C / Ctrl+V which are used for process control). ([How-To Geek][1]) Common patterns you may see: * **Ctrl + Alt + C** — Copy highlighted text * **Ctrl + Alt + V** or **Middle Click** — Paste --- # Environment Variables (Commands You Can Demo on Your SSH Web Page) ## What are environment variables? Environment variables are key/value settings used by the shell and programs (examples: `PATH`, `HOME`, `SHELL`). They’re inherited by child processes. ([How-To Geek][2]) --- ## Show environment variables (display) ### Show everything ```bash printenv # or env ``` ### Show a single variable ```bash printenv HOME printenv SHELL echo "$HOME" echo "$PATH" ``` ### Filter with grep ```bash printenv | grep PATH env | grep PS1 ``` --- ## Create variables (local vs exported) ### Local (current shell only) ```bash MY_OS="Ubuntu" echo "$MY_OS" ``` ### Exported (inherited by child processes) ```bash export APP_HOME="/srv/app" echo "$APP_HOME" # child process inherits exported vars: bash -c 'echo "APP_HOME=$APP_HOME"' ``` --- ## Temporarily set a variable for ONE command ```bash env DEBUG=1 ./my-script.sh # or (shell syntax): DEBUG=1 ./my-script.sh ``` The `env` command can run a program with a modified environment (and if no command is given, it prints the environment). ([Linuxize][3]) --- ## Unset (remove) a variable ```bash unset APP_HOME ``` --- ## Make variables persistent (survive new sessions / reboot) Typical places: * `~/.bashrc` (interactive shells) * `~/.bash_profile` (login shells / common for SSH logins) * `/etc/environment` (system-wide, all users) The exact file depends on distro + shell, but these are the common ones. ([How-To Geek][2]) --- # Mini Command List (Nice “Try it” Section) ## Files & navigation ```bash pwd ls -la cd /etc mkdir -p demo/folder touch demo/file.txt cp demo/file.txt demo/file-copy.txt mv demo/file-copy.txt demo/file-moved.txt rm demo/file-moved.txt rmdir demo/folder ``` ## Search text and files ```bash grep -R "export" ~/.bashrc 2>/dev/null find ~ -maxdepth 2 -type f -name "*.sh" ``` ## Networking quick checks ```bash ip a ss -tulpen ping -c 4 1.1.1.1 ``` --- # Credits / Sources Keyboard shortcuts list (Linux desktop environments): * Linux Hint — “100 Keyboard Shortcuts to Use Linux Like a Pro” ([Linux Hint][4]) Environment variables (concepts, export, inheritance, persistence examples): * How-To Geek — “How to Set Environment Variables in Bash on Linux” ([How-To Geek][2]) * Linuxize — “How to Set and List Environment Variables in Linux” ([Linuxize][3]) * Ask Ubuntu — “How do I set environment variables?” (mentions `/etc/environment`) ([Ask Ubuntu][5]) Terminal copy/paste notes (Ctrl+Shift+C/V behavior): * How-To Geek — “How to Copy and Paste Text at Linux’s Bash Shell” ([How-To Geek][1]) ``` ::contentReference[oaicite:10]{index=10} ``` [1]: https://www.howtogeek.com/440558/how-to-copy-and-paste-text-at-linuxs-bash-shell/?utm_source=chatgpt.com "How to Copy and Paste Text at Linux's Bash Shell" [2]: https://www.howtogeek.com/668503/how-to-set-environment-variables-in-bash-on-linux/?utm_source=chatgpt.com "How to Set Environment Variables in Bash on Linux" [3]: https://linuxize.com/post/how-to-set-and-list-environment-variables-in-linux/?utm_source=chatgpt.com "How to Set and List Environment Variables in Linux" [4]: https://linuxhint.com/100_keyboard_shortcuts_linux/?utm_source=chatgpt.com "100 Keyboard Shortcuts to Use Linux Like a Pro" [5]: https://askubuntu.com/questions/730/how-do-i-set-environment-variables?utm_source=chatgpt.com "How do I set environment variables?"