I heard that its not ok to run stuff always with sudo, because its same like running stuff as administrator on other os. Is it possible to revert it and un-sudo it so it dont have root access?
Asked
Active
Viewed 137 times
1 Answers
2
There is no need to revert anything.
If you run a command prepending sudo, you'll run the command with root privileges.
If you run a command without sudo, you'll run the command with your user privileges.
Example:
$ sudo ls -a /root [sudo] password for mook: . .. .bash_history .bashrc .cache .local .profile .synaptic ~$ ls -a /root ls: cannot open directory '/root': Permission denied
In this example I use the command ls -a /root, first with sudo, then without sudo. As you can see, in the second command I don't have root-access and get a permission denied, even if I have used the same command with sudo before.