1.$su 切换到root用户 2.#visudo 编辑修改/etc/sudoers配置文件 3.在“root ALL=(ALL) ALL”这一行下面,再加入一行: username(你的用户名) ALL=(ALL) ALL 4.shift+:wq 保存退出