Linux Shortcuts for Keyboard

Linux has many keyboard shortcuts. Knowing them makes using Linux much easier.

Bash Shell Keyboard Shortcuts For Linux Users :

The default shell on most Linux operating systems is called Bash. There are a couple of important hotkeys that you should get familiar with if you plan to spend a lot of time at the command line. These shortcuts will save you a ton of time if you learn them.

Some Most Common and useful Linux shortcuts:

Tabulator Shortcut - one of the most important keys:

Tabulator is used to complete commands and filenames. The button is found on the left side of the keyboard
If your current working folder (check with pwd) contains the folder Documents (check with ls) and you want to change into it (with cd) you can type:

cd Doc<tab>

This will complete the folder name and leave you with the command

cd Documents

If there are more than one folder beginning with Doc pressing tab will complete the first folder, sorted alphabetic. You can get all alternatives beginning with Doc by pressing tab a second time.

Tabulator Shortcut for Linux Commands :

Tabulator work the same way with commands, but commands are not completed by the first tabulator press if there are more than one alternative. By typing gnome<tab><tab> you will get a list of all commands beginning with gnome.
Complete list of Tricks for Press TAB twice.

Here "2T" means Press TAB twice :

  • 2T : All available commands(common)
  • (string) 2T : All available commands starting with (string)
  • /2T : Entire directory structure including Hidden one
  • 2T : Only Sub directory inside including Hidden one
  • *2T : Only Sub Dirs inside without Hidden one
  • ~2T : All Present Users on system from "/etc/passwd"
  • $2T : All Sys variables
  • @2T : Entries from "/etc/hosts"
  • =2T : Output like ls or dir

Linux Shortcuts for Shell Commands :

Most Common Shortcuts:

  • Ctrl + D : exit a terminal, same as typing `exit`
  • Ctrl + L : clears the screen, same as `clear`
  • Ctrl + C : breaks/cancels an ongoing operation
  • Ctrl + Z : pauses (stops) an ongoing operation. Type `fg` (foreground) to resume it or `bg` (background) to continue the process in the background
  • Ctrl + Alt + Del : shuts down computer

Other bash Shell shortcuts:

Bash Shell shortcuts for Moving backward Forward :

  • Ctrl + A : Go to the beginning of the line you are currently typing on
  • Ctrl + E : Go to the end of the line you are currently typing on
  • Ctrl + U : Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
  • Ctrl + W : Delete the word before the cursor.
  • Ctrl + K : Clear the line after the cursor.
  • Ctrl + T : Swap the last two characters before the cursor.
  • Esc + T : Swap the last two words before the cursor.
  • Alt + F : Move cursor forward one word on the current line.
  • Alt + B : Move cursor backward one word on the current line.

History related bash shell shortcuts:

  • Ctrl + R : Let’s you search through previously used commands.
  • Alt + < : Move to the first line in the history.
  • Alt + > : Move to the last line in the history.

Other bash shell shortcuts:

  • Ctrl + H : Same as backspace.
  • Tab : Auto:complete files and folder names.
  • Ctrl + Y : to paste it (as in delete and copy) all text in front of the cursor.
  • Alt + ? : Show current completion list.
  • Alt + * : Insert all possible completions.
  • Alt + / : Attempt to complete filename.
  • Alt + c : Capitalize the word.
  • Alt + l : Make word lowercase.
  • Alt + r : Recall command.

Note : Some of these commands may not work if you are accessing bash through a telnet ,ssh session, or depending on how you have your keys mapped.

Linux GUI - KDE Shortcuts:

Most common Linux Shortcuts for KDE :

  • Ctrl + Esc : KDE System Guard process table.
  • Alt + F1 : K-Menu popup.
  • Alt + F2 : Run command.
  • Alt + F3 : Application control.
  • Alt + F4 : Terminated active application.
  • Alt + F5 : Quick application switcher.
  • Alt + Tab : Switch between active applications.
  • Ctrl + Alt + Shift + PageDN : direct shutdown.
  • Ctrl + Alt + Shift + PageUP : direct reboot.

Linux Shortcuts for Virtual terminals:

Most common Linux Shortcuts for Virtual terminals :

  • Ctrl + Alt + F1 : Switch to the first virtual terminal. In Linux, you can have several virtual terminals at the same time. The default is 6.
  • Ctrl + Alt + Fn : Switch to the nth virtual terminal. Because the number of virtual terminals is 6 by default, n = 1...6.
  • tty : Typing the tty command tells you what virtual terminal you're currently working in.
  • Ctrl + Alt + F7 : Switch to the GUI. If you have X Window System running, it runs in the seventh virtual terminal by default. If X isn't running, this terminal is empty.

Miscellaneous Linux Shortcuts :

Most common miscellaneous Linux Shortcuts :

  • ALT+Ctrl+(F1-F7): To switch between different terminals..or if GUI is installed then to switch between GUI and text mode.

GUI specific:

  • Ctrl+Q : Mostly to quit from and application(like gimp, konqueror ).

Switch Desktop:

  • Desktop 1 : Ctrl +F1
  • Desktop 2 : Ctrl +F2
  • Desktop 3 : Ctrl +F3
  • Desktop 4 : Ctrl +F4

Scroll Lock :

  • Press Scroll Lock : locks terminal input/output - allows to read console contents when output is going too fast. To unlock, press Scroll Lock once again.

Suggest more Linux shortcuts to .