Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keyboard shortcut to jump to the end of the command history in ubuntu terminal

I searched the web for this already, with no success. The question is: is there any keyboard shortcut to jump right to the end of the command line history?

I ask because I often use the reverse-i-search Ctrl + R feature to quickly find a previous command in the history, but then I may change my mind and type the command from scratch without overwriting any previous command (so clearing the line with Ctrl + ACtrl + K is not an option). Thus I want to jump back to the empty command line (past the end of the command history).

Right now I can only achieve this by scrolling the history using the down arrow key until I hit the end of the history, but it can be painful since I sometimes have to pass through plenty of entries before reaching the end.

like image 292
arkazoid Avatar asked Dec 05 '14 09:12

arkazoid


1 Answers

Ctrl + C and UP arrow key.
Ctrl + C -> exits the current browsing of history with Up/Down Key.
Up arrow key -> To get the latest command.

like image 136
thepace Avatar answered Oct 31 '22 08:10

thepace