Posted: . At: 3:47 PM. This was 2 years ago. Post ID: 6370
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.

Useful bash shell shortcut keys to navigate the command line.

Useful bash shell shortcut keys to navigate the command line

^a, ^e – Move the cursor.

The ^-a shortcut will move the cursor to the beginning of the line.
The ^-e shortcut will bring the cursor to the end of the line.

^d – End of file or EOF. This tells a console application that you are done entering text.

^i – Clear the terminal buffer. This means that in a terminal, there will be no history to scroll back through. This does not seem to work in the MATE terminal though.

^z, – Suspend and resume output. This will tell a program to quit printing output to your terminal device. If you type fg, the program will return to the foreground.

^l – Clear the screen. This will clear the screen and leave a blank slate for more commands.

^c – Stop a command. This shortcut will stop the current command in the terminal from running and return you to the prompt.

Alt-B. This sends the cursor back one word.
Alt-F. This sends the cursor forward one word.

^-b. This moves the cursor backwards one character.
^-f. This moves the cursor forwards one character.

^-_. This undoes the last keypress. This is very useful if you keep fumbling keys like me.

^-w. Cut the word before the cursor and move it to the clipboard.
^+k: Cut the part of the line after the cursor, adding it to the clipboard.
^+u: Cut the part of the line before the cursor, adding it to the clipboard.
^+y: Paste the last thing you cut from the clipboard. The y here stands for “yank”.

A laptop in quite poor condition.
A laptop in quite poor condition.

With these useful shortcuts; you can easily navigate the bash shell prompt and make even more use of your Linux terminal.

1 thought on “Useful bash shell shortcut keys to navigate the command line.”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.