How to Run Sudo Command without a Password on Ubuntu Linux

In your linux system the sudo command allows users to run programs that require root privileges as the root user.Some times if you spend a lot of time on the command line and you will use the sudo command on a frequent basis, then it feels like in default to sudeors file, this authentication is turned.To turn off the password requirement you need to the /etc/sudoers file.In this article we will see how to run the sudo commands with password on Ubuntu.

Open your terminal command line tool (ctrl+alt+t). Here manikandan is my Ubuntu machine username.You can change it with your username in this below commands.

Run this command in terminal.It will open the sudeors file.

sudo visudo

Then add below command in that file.

manikandan ALL=(ALL) NOPASSWD: ALL

How to Run Sudo Command without a Password on Ubuntu Linux

Replace “manikandan” with your username.

After that press ctrl+x.

How to Run Sudo Command without a Password on Ubuntu Linux

It will ask to confirm, just type y and press enter to save and exit.Now restart your terminal and run any sudo command.Now you don’t need to type the password.

If you liked this article, please subscribe to our YouTube Channel. You can also stay connected with us on Twitter and Facebook.

Suggested Read:  How to install Discord app on Ubuntu
It’s a sequel.
.

Sidebar