Tips & Tricks


Double exclamation ie ‘!!’ represents the last run command on the shell. Here is an example:
$ uname -a
Linux himanshu-Inspiron-1525 3.2.0-36-generic-pae #57-Ubuntu SMP Tue Jan 8 22:01:06 UTC 2013 i686 i686 i386 GNU/Linux

$ !!
uname -a
Linux himanshu-Inspiron-1525 3.2.0-36-generic-pae #57-Ubuntu SMP Tue Jan 8 22:01:06 UTC 2013 i686 i686 i386 GNU/Linux

Also, it so happens many times that you run a command and you get an error that the command requires root privileges. Then you press the ‘up arrow’ key + home key + write ‘sudo’ . Well all this can be avoided using !!.

Go Back to Menu