Clear Current Command in Bash

If you’re on the Bash command-line and you want to clear the current command, try the following: CTRL+U to clear to the left up-to the cursor, and CTRL+K to klear to the right after the cursor (misspelling intended). More of these Bash tricks are listed in the following article:

Compare this to the Microsoft Windows command-line shell where you press ESC to clear the current command. I actually prefer the Windows ESC to the Bash control sequences for clearing the current command – something Microsoft actually made easy on the command-line.

About notesbytom

Keeping technology notes on to free up my mind to solve new problems rather than figuring out the same ones repeatedly :-).
This entry was posted in Linux and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s