搜索文档
sudo visudo
或者
sudo vim /etc/sudoers
找到
# Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL
加个 NOPASSWD: 就好了;
# Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) NOPASSWD: ALL