$su - $visudo 加上your_user_name ALL=(ALL) ALL →i →your_user_name ALL=(ALL) ALL →ESC →: →wq exit命令,退出root。