[HOWTO] Enable ‘sudo’ in Fedora 15

Here is how you can enable ‘sudo’ in Fedora so that you don’t have to login as root everytime you need to run a command as root. Open up terminal and type in the following:

su #enter root password followed by this one
yum install nano
nano /etc/sudoers

Now, scroll down and you should see something like:

root    ALL=(ALL)	ALL

Just below that line, add this:


For eg, my username is “khattam”, so I added the line:

khattam    ALL=(ALL)	ALL

If you are not sure what your username is, open up a new terminal window and type in ‘whoami’.
Save by pressing Ctrl+O followed by Enter. Exit nano by pressing Ctrl+X. Exit from root by typing in “exit”.

Now, you will be able to use sudo.

[HOWTO] Enable Ubuntu-like “sudo” in Debian Squeeze

In Ubuntu, when you need to run a command as root, you just have to run the command with a preceding “sudo” i.e.

sudo command-to-run

. However, in Debian (and many other Linux) it is may not be set as such by default. To set it as default and to allow the normal user to execute the command as root, just follow the following instructions:

Install Sudo
To install sudo, just run the following commands:

apt-get install sudo gksu

Add yourself to Sudoers list
First to open /etc/sudoers as root in terminal, run the follwing commands:


Now, scroll to the bottom of the file and add the following line:

username ALL=(ALL) ALL

where “username” is the username you use to login to your computer.
Press Ctrl+O followed by ENTER to save /etc/sudoers and you are done.

Hope this helps.