password free sudo

On occasion when installing a fresh linux, on whatever device I like to have my user be able to use “sudo” without having to use a password.
I always forget the simple thing to do, and because more and more people are using my “GPIO Tool for Raspberry Pi” android app which requires “sudo” with no password to install i thought it best to add some notes.

The permissions for “sudo” is in a file “/etc/sudoers” you can not edit this file directly. You need to use the “visudo” command:

>sudo visudo

(you will likely have to enter your password).
This will bring up the default editor with the contents of the file.

Then enter in at the end of the file the following.


Where “username” is your username.
Then save the file and exit the editor.
You will now be able to use “sudo” without a password.