Linux Terminal Shortcuts

Writing long commands every time becomes tedious and time consuming too. Here I am going to list down some shortcuts which will help you to save time while using Linux terminal.

Ctrl+left & Ctrl+right

Hitting Ctrl and the left or right arrow keys jumps between arguments in your command. So, if you had a typo in the middle of the command, you could jump to it quickly with Ctrl and a few taps of the left arrow key.

Tab

This shortcut key is often used. When using bash you need to just type few characters and then pressing tab will auto complete command or file/directory name.

Ctrl + U or Ctrl + C
This shortcut will clear command written on shell.

Ctrl + R
This command also most often used. When you hit Ctrl plus R it will open up history, as you type character it will display all previous command matches with character you typed.

If you want to go through all command one by one which matches with the character you entered then press Ctrl + Shift + R.

Alt + BackSpace

This shortcut will remove the word from its current position.

!
This shortcut also used to repeat previous command. Instead of pressing Ctrl + R, you can type ! then characters to repeat from history.

You can see in below image. If I want to run "pkill skype", I have written "!pk" and the hit enter. This will run "pkill skype" command.



No comments:

Post a Comment