100% found this document useful (7 votes)
944 views1 page

Bash Help Sheet

This document provides shortcuts and key bindings for the bash shell to help with navigation, editing commands, and completing commands. It lists escape, tab, control, and alt key bindings that allow moving the cursor, deleting and yanking text, searching history, and completing filenames or commands. Wildcards are also described that can be used to match characters in filenames for commands like ls and mv.

Uploaded by

jamesyu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (7 votes)
944 views1 page

Bash Help Sheet

This document provides shortcuts and key bindings for the bash shell to help with navigation, editing commands, and completing commands. It lists escape, tab, control, and alt key bindings that allow moving the cursor, deleting and yanking text, searching history, and completing filenames or commands. Wildcards are also described that can be used to match characters in filenames for commands like ls and mv.

Uploaded by

jamesyu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

some usefull shortcust for the bash shell bash help sheet - shortcuts version of 10th Jan.

2007

You  have  to  use  ESC  (escape  key)  to  get  into  the  vi  command  mode.  You  will  need  to  press  RETURN  Key  for  executing  a  command 
starting with the ponctuation character « : » or « / » or « ? ». Use CTRL+c for cancel a command. Use « . » for repeat your last 
command and « :!cmd » for execute a shell command (where cmd is the command to execute).

Wildcards Control keys bound (CTRL+key) Alt keys bound (ALT+key)

* match all characters ctrl+a move your cursor to the beginning of  alt+< move to the first line of history


the line
? match a single character alt+> move to the last line of history
ctrl+e move your cursor to the end of the 
[] match a range of value line alt+? show current completion list
ctrl+k delete any characters from your  alt+* insert all possible completion
{} match a list of value cursor to the end of the line
alt+/ attempt to complete filename
ctrl+u delete any characters from your 
e.g. : cursor to the beginning of the line alt+. yank last argument to previous 
$ ls pic[1­3].{jpg,gif} will list pic1.jpg  command
ctrl+w delete previous word
pic2.gif and pic3.jpg but not pic1.png alt+b move backward
$ mv {short,very_long}.txt will move  ctrl+t transpose two previous characters
short.txt to very_long.txt alt+c capitalize the word
ctrl+y yank/recover the last deletion
alt+d delete word
ctrl+d delete one character at the cursor 
Escape keys bound (ESC+key) position alt+f move forward
ctrl+h delete one character before the  alt+l make word lowercase
esc+d delete from the cursor position 
cursor
to the end of the word alt+n search the history forwards
ctrl+f move forward non­incremental
esc+f move forward a word
ctrl+b move backward alt+p search the history backwards
esc+b move backward a word
non­incremental
ctrl+r find character sequence in history 
esc+t transpose two adjacent words
(completion mode) alt+r recall command
ctrl+g escape from completion mode alt+t move word around
Tabs keys bound (TT=TAB twice) ctrl+v Literal next (LNEXT) alt+u make word uppercase
TT list all available commands alt + delete backwards from cursor
(string) TT list all available commands  backspace
starting with (string)

/TT list available dir (including 
hidden ones, use /*TT else)

~TT list all system users
$  exec  bash for  reloading your  current  bash (in  fact,  replace  current  bash process  by a  new one, 
$TT list all system variables
and so reload your .bashrc)
@TT list hosts NB : LNEXT interpret the next character as a string. eg : for symbolize a CR+LF you must do the key 
=TT act as ls or dir combination ctrl+v+return, that will print ^M

Shell-Tips.com bash help sheet - shortcuts Author : Nicolas Brousse

You might also like