Bash Shortcuts

Linux OS Topics
Post Reply
User avatar
Nuwan4U
Posts: 1
Joined: Mon Jul 18, 2011 3:54 pm

Bash Shortcuts

Post by Nuwan4U » Mon Jul 18, 2011 4:01 pm

Ctrl-a -> go to the start of command line
Ctrl-e -> go to the end of command line
Ctrl-p -> previous command in history
Ctrl-n -> next command in history
Ctrl-f -> next character in command line
Ctrl-b -> previous character in command line
Ctrl-r -> reverse search in history file
Ctrl-d -> delete current character
Ctrl-k -> delete from the prompt to the end of command line
Ctrl-_ -> undo (yes, but limited)
Meta-< -> go to beginning of history file
Meta-> -> go to end of history file
Meta-f -> go to next word in command line
Meta-b -> go to previous word in command line
Meta-d -> delete next word in command line (from the actual position of the prompt)
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: Bash Shortcuts

Post by Neo » Mon Jul 18, 2011 4:29 pm

Useful post. REP+
User avatar
SemiconductorCat
Major
Major
Posts: 455
Joined: Mon Aug 22, 2011 8:42 pm
Location: currently in hyperspace

Re: Bash Shortcuts

Post by SemiconductorCat » Fri Oct 07, 2011 1:56 pm

bash supports two modes ,the above commands are works fine in the emacs mode.

#set -o emacs

bash have several configuration files. And nothing is hard coded, you can configure them as you need.
Post Reply

Return to “Linux”