Posts Tagged ‘shortcuts’

Conprehensive linuX terminal shortcuts

Improve Your interaction with the terminal by these: Command line shortcuts::

Ctrl+A – move to the start of the line (alternate HOME).
Ctrl+E – move to the end of the line( alternate END).

Ctrl+U – delete/cut from the cursor to the beginning of the line.
Ctrl+K – delete/cut from the cursor to the end of the line.
Ctrl+W – delete/cut from the cursor to the start of the word, space delimited (removes the last word in the command line, place cursor after the word).
Ctrl+Y – paste the cut from CTRL+U , CTRL+W, CTRL+K.

Ctrl+B – Moves the cursor backward one character (alternate: BACKWARD arrow).
Ctrl+F – moves one character forward (alternate: FORWARD arrow).
Ctrl+H – erases one character (alternate: BACKSPACE)

Ctrl+L – clears the terminal screen (alternate: clear).

Ctrl+G – sound the BELL

Ctrl+R – reverse search among your previous commands (use backspace to search again and ESC to quit action).

Ctrl+P – previous command (alternate: UP arrow).
Ctrl+N – next command (alternate: DOWN arrow).

Ctrl+Dlogout of current session (alternate: exit).
Ctrl+Cprocess interruption, halts the current command(safe quit).
Ctrl+Zstops the current command, resume with fg in the foreground or bg in the background (useful to stop the process and complete the work in the terminal and press fg).

^abc^xyz – replace first occurrence of ‘abc’ with ‘xyz’ in last command and execute it.
!! – repeat the last command.
!$ – substitute last argument of the command last used.(not last occurence of same)
~ – users HOME directory.
– previous working directory (usage:: #cd -).

CTRL+I/TABauto-completion based on the typed sequences (double click on TAB) for commands and Environment variables too

The following shortcuts will only work in terminal window, while all the previous will work in X window system also.

Shift+ pageUP – scroll terminal output UP.
Shift+ pageDOWN – scroll terminal output DOWN.

hopefully this will help YOU… Atleast It did ease my wrist pain ;-

Further reference::

  1. Rute’s command-line editing keys.
  2. Keyboard shortcuts for Xwindows and basic command line
  3. Learning the SHELL
Advertisements