1. Introduction
When the current user isn't root, some operations are denied for lack of permissions and need sudo to complete. But sudo asks for a password every time; the steps in this article let you use sudo without entering a password.
2. Steps
- Edit the sudoers file
Add the following line to the /etc/sudoers file
#编辑/etc/sudoers文件
vi /etc/sudoers
#添加以下语句至文件最后一行
Username ALL=(ALL) NOPASSWD:ALL
Save and exit, and sudo will no longer ask for a password.