What is sudo !!
You can see in the below picture, if you tried to execute a particular command and that needs root permission, you can use sudo !! and it will run the previous command as root without you typing the full command again
In the above example, i was trying to create hello.txt file in a directory which requires root permissions, so the touch command failed , then I ran sudo !! which executed the previous command with sudo: sudo touch hello.txt
Comments
Post a Comment