Keyboard Shortcuts For Linux Bash Terminal

preview_player
Показать описание
Going through some popular and more obscure Keyboard Shortcuts for Linux Bash Terminal.

Ctrl+C – Kill current process
Ctrl+D – Close Terminal
Ctrl+Z – Suspend. Use “fg process” to return
Ctrl+S – Suspend output to screen
Ctrl+Q – Resume output to screen
Tab – Completion for file/folder names

Command History
Ctrl+P or Up Arrow - Previous Command
Ctrl+N or Down Arrow - Next Command
Ctrl+R - Recall command matching search
Ctrl+O - Run the command you found with Ctrl+R
Ctrl+G - Leave history searching mode without running a command
!! - Repeat previous command
!:n – Repeat specific argument from previous command
!:n:m – Repeat range of arguments from previous command
!:n:$ - Repeat range of arguments from n to end from previous command
!* - Repeat All arguments from previous command
Alt + . - Show Last argument from previous command
^abc­^­def - Run previous command, replacing abc with def

Move Cursor
Ctrl+A or Home – Beginning of the Line
Ctrl+E or End – End of the Line
Ctrl+B or Left Arrow – Back one Character
Ctrl+F or Right Arrow – Forward one Character
Ctrl+Left Arrow or Alt+B – Back one Word
Ctrl+Right Arrow or Alt+F – Forward one Word
Ctrl+XX – Toggle between Beginning and End of Line
Ctrl+M - Enter

Deleting Text
Ctrl+L – Clear Screen
Ctrl+D or Delete – Delete character under the cursor
Ctrl+H or Backspace – Delete character before the cursor
Alt+D – Delete the Word after the cursor

Fix Typos
Alt+T or Esc+T - Swap current word with previous word
Ctrl+T Swap the last two characters before the cursor with each other
Ctrl+_ (Ctrl+Shift+-) - Undo your last key press
Ctrl+U – Clear all text from Cursor to Beginning of Line
Alt+R – Revert line

Capitalisation
Alt+C – Capitalise current Character
Alt+U – Capitalise current Word from cursor
Alt+L – Lowercase current Word from cursor

Cut and Paste from Bash Clipboard
Ctrl+W - Cut the Word before the cursor
Ctrl+K - all text from Cursor to End of Line
Ctrl+U - Cut all text from Cursor to Beginning of Line
Ctrl+Y – Paste

Cut and Paste from System Clipboard
Ctrl+Alt+C – Copy highlighted text
Ctrl+Alt+V or Middle Click – Paste

Like my channel? Please help support it:

Follow me on Social Media
Рекомендации по теме
Комментарии
Автор

Somehow alt+ delete worked for me, and it's really useful, thank u for this video!

chai
Автор

You can also enable vi bindings by adding the line below to .bashrc:
set -o vi
Hit <Escape> to enter vi command mode. And get back into insert mode by typing 'i'

petewest
Автор

Just what I needed, nice to have a reminder BTW - type history in a terminal to see a list of your used commands.

USBTux
Автор

Would it be possible to share that spreadsheet? It would be a much easier to navigate and read format. Thanks!

S-axle
Автор

I see no point in relearning text manipulation if you already know Vim, so I use shells with Vi modes like Zsh and Fish. I still find shortcuts for copying and pasting, home (ctlr + a) and end (ctrl + e) and clear everything before the cursor (ctrl + u) useful. To delete a command I have just mistyped, I can press ctrl + e, ctrl + u and start again ... or just switch do Vi mode and press esc key followed by 'cc'.

mikST
Автор

@quidsup at 0:25 you typed fp but it auto corrected to fg, how did you do that?

friskfrysefrossetfrugt
Автор

Hi, if ctrl+r key mapped to some other then how to remap ctrl+r key to do search-history

ashokkumarthamalapakula
Автор

Some incredibly silly people obviously want a rm -rf /* shortcut
also 1st :D

therealvbw
Автор

2:08 🙄
man -k "unfunny lowkey sexism"

nibblrrr