TERMINAL : SOME SHORTCUTS

TABS

CTRL + SHIFT + T New tab
CTRL + SHIFT + W Close active tab
CTRL + PAGE UPPrevious tab
CTRL + PAGE DOWNNext tab

AUTOCOMPLETE

TABComplete the line if a choice is possible
CTRL + IIDEM
TAB + TABProposes a list of possible correspondence

COMMAND LINE HISTORY

historyHistorical of commands in reverse order
!nExecute the command with the number of command "n"
!!Execute the last command
!blaExecute the command starting with "bla"

HISTORY AND EXECUTION OF ORDERS

CTRL + MValidate the order, [ENTER]
UP ARROWNavigate in historic, -1 line (command line more and more ancient)
CTRL + PP for previous
DOWN ARROWNavigate in historic, +1 line (command line more and more recent)
CTRL + NN for next

Search a command in the history :

CTRL + RSearch in the historic
ALT + Rif, in command prompt, you have modified a line recalled of historic, this shortcut puts back in state (as it is in the hstoric

When you search in history with CTRL+r and that multiple occurences are found, press CTRL+r repeatedly to switch between them. The search is from the most recent to the oldest.

When writing a command, you can insert the first word of the previous command executeda. for that :

ALT + .   ← Recall the first word of the previous command

MANIPULATE THE CURSOR

CTRL + AGo to the beginning of the line
CTRL + EGo to the end of the line
ALT + BMoves back, word by word
ALT + FMoves forward, word by word
CTRL + BMoves back, character by character
CTRL + FMoves forward, character by character
CTRL + XXAlternate between the actual cursor position and the start of the command

MANIPULATE THE TEXT

It is possible to delete a character before or after the cursor with the shortcuts :

These functions are also available for delete the words and the lines :

CTRL + DDelete the current character and, if the line is blank, close the terminal
CTRL + HDelete the character which is before the cursor
ALT + DDelete the word at right of cursor, or the rest of word from cursor and towards right CTRL + WDelete yhe word at left of cursor, or the rest of word towards left
CTRL + KDelete from cursor until the end of command
CTRL + UDelete from cursor until start of command

Note that words or lines deleted with previous commands will be in the Bash clipboard. This clipboard is different that the one in the desktop, with which he doesn't communicate !

When you fill the clipboard, he does not forget what he contains. Everything is kept in memory and you can choose what you want to paste.

The shortcuts of clipboard of Bash are :

CTRL + YPaste the last element into the clipboard, deleted by CTRL+U, CTRL+W ou CTRL+K
ALT + YAfter using CTRL+Y, invert the text pasted with what was previously in the clipboard

Bash also allows you to swap two letters or two words :

CTRL + TInvert the letter under cursor with the one that precedes it
ALT + TSame, with 2 words

Finally, it is possible to transform the case of a word :

ALT + UConvert a word in uppercase, from the cursor
ALT + LConvert a word in lowercase, from the cursor
ALT + CCapitalize a word (the first letter of word in uppercase)

COPY/PASTE

CTRL + SHIFT + CCopy
Select the textCopy
CTRL + SHIFT + VPaste
click with the mouse wheelPaste

CANCEL

There are 2 shortcuts to cancel :

CTRL + /Undo the last action (equivalent to CTRL+Z)
CTRL + GLeave a search into historic

MANAGE THE PROCESSES

When a process is started in the foreground from Bash, the following shortcuts are available :

CTRL + CFinish the process. Do not worry, he will not suffer ;)
CTRL + ZPause the process. Can be revived in the foreground or background with the commands "fg" or "bg". The command "jobs" list the processes in pause.

CLEAN AND MANAGE THE DISPLAY

It is possible to manipulate what Bash shows on the screen with these three shortcuts :

CTRL + LCleans the screen to show only a command prompt blank
CTRL + SStop the display ; very useful when a very verbose program runs
CTRL + QResumes the display stopped with CTRL+S

END OF FILE

There is a shortcut to send the EOF (End Of File) character: CTRL + D
If you send this character on a command line, this is equivalent to the exit command.