Sudo With No Password
If you’re the only user on your system, you don’t need to be prompted every time you run the sudo command.
Add yourself to the sudoers file.
<pre lang="bash"># create a new file
sudo visudo -f /etc/sudoers.d/users
Add this line.
<pre lang="bash"># add your username
username ALL=(ALL) NOPASSWD:ALL
Exit and try again.
<pre lang="bash"># exit out and login again
exit
# try to sudo again
sudo -i
# there's no password prompt for sudo this time