How to Enable Passwordless sudo on Fedora

When you run the sudo command on the Terminal for the first time, it will ask you to enter your login password. If you don’t want sudo to ask for your login password ever again, you will need to configure sudo to be passwordless.

Opening the sudo Configuration File

On Fedora Linux, the sudo configuration file is in the path /etc/sudoers.

To open the sudo configuration file, run the following command:

$ sudo nano /etc/sudoers

Configuring Passwordless sudo

To configure passwordless sudo, scroll down and find the marked lines in the /etc/sudoers file and comment line 1 and uncomment line 2.

NOTE: Adding # at the front of the line comments a line (disables the configuration), and removing # from the front of the line uncomments the line (enables the configuration).

Once passwordless sudo is configured, save the file by pressing <Ctrl> + X followed by Y and <Enter>.

The sudo command will not ask for password ever again.

Post Tags: