Another way to re-run the previous command

After running a command in the terminal, you can re-call it by simply hitting the up arrow button. Another way to recall the previous command you can use is to type the double exclamation marks (“!!”). In other words, when you run the double exclamation marks in the terminal, the previous command will be executed. This tip can be quite handy when you want to re-run the previous command as root. For example, instead of re-typing the whole previous command with ‘sudo’ or ‘beesu’ before it, you can just type:

 sudo !!  


 beesu !!  

You can look at the example image below to see how this works:


About pacesettergraam

A good and realistic person

Posted on September 12, 2012, in linux and tagged , , . Bookmark the permalink. Leave a comment.

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

%d bloggers like this: