Tuesday, 1 November 2011

Two Really Useful Shortcuts While Using Linux Terminal

In this post, I am going to share two really useful shortcuts while using linux terminal. When you get to use these two shortcuts, you will always be using them for ease while operating under terminal.

Both of these shortcuts are used for ease while erasing the erroneous words or commands in terminal. Rather than pressing backspace all the time, you would love to see some shortcuts to achieve the same. And here are two commands that you will usually be using.

The first one is Ctrl + w which will erase the current word you are typing. For example, you typed cat abcdef and you want to remove abcdef, then you can use Ctrl + w. So this shortcut would erase whole word at the last of command you are typing.

The other one is Ctrl + u which will erase whole line of command you are currently typing. For instance, you typed ls -lia /home/user/Downloads and you think "Oh that's not the command I want to execute right now", then you can safely use the shortcut Ctrl + u.

I hope you find these shortcuts useful while using linux terminal.