Executed a command in the terminal just to find out that you don't have the required permissions. Maybe you have to execute the same command with a
sudo before it.
Executing the following command
without root permissions gives the following message
rm: remove write-protected regular file ‘/etc/udev/rules.d/51-android.rules’?
Now a common solution is to simply execute the same command with a
sudo before it
sudo rm /etc/udev/rules.d/51-android.rules
but this requires a little effort, pressing the up arrow key, using the home key to reach the start of the command and then typing
Well there is another smart way to do it. Simply type
and the previous command is executed using sudo.
This also works with other commands. Like you could simply watch the output of the previous command by typing
watch -n 0.1 !!
This can save a lot of your time as you shall see.