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 inconvenient to enter your password every time. By default in 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.

Also Read:  Li-Ri Fun Arcade Game

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

Replace “manikandan” with your username.

After that press ctrl+x.

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.

Watch Video:

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



Leave a Reply