Enabling sudo
-
2. Editing sudoers File
Now Edit the sudoers File
Simply with:sudo visudo
Or if Command Not Found:
sudo /usr/sbin/visudo
Or else Easier for the Setup use directly the nano Editor!
On Debian based invoke it with:su -c "nano /etc/sudoers"
And in other cases using:
sudo su -c "nano /etc/sudoers"
Last, on GNU/Linux Distros for visudo there are two Default Shell Editors:
- nano
- vi
Now you can recognize the vi Editor from the several “~~~~~” characters marked on window…
And so in this Case to Start Editing then Hit ‘i‘.Finally, to Enable sudo Command for your User
Scroll down and Below the line containing:root ALL=(ALL:ALL) ALL
Append:
[myUser] ALL=(ALL:ALL) ALL
Just subtitute [myUser] to your real User’s Name.
In case, to look up your Username drop another Terminal Window and play:whoami
Last Save Changes & Exit:
On nano Just Ctrl+x and Confirm
Where for vi First, Hit Esc and then ‘:wq‘ ;)
Congrats! you should now finally Dispose of a Barely New Nice sudo User :)
Linux Best Software:
Best Software to Install on Linux.
Contents