ubuntu修复找不到sudo命令

1.首先,您需要安装该sudo命令。你可以使用 apt 包管理器来做到这一点。您需要以有权安装软件包的用户身份运行此命令,例如root

apt-get install sudo  

2.下一步是为您自己的用户授予 sudo 权限:

usermod -aG sudo daibeisi

3.您还必须将您的用户添加到 sudo 组。/etc/sudoer使用您喜欢的编辑器打开文件,检查“sudo”组是否已经拥有您系统上的所有权限。搜索这样的一行:

# Full access for members of the sudo group
# %表示后面的标识符代表的是组名,而不是用户名。
%sudo ALL=(ALL:ALL) ALL # User privilege specification root ALL=(ALL:ALL) ALL

4.现在应该能够使用sudo。

原文链接:https://futurestud.io/tutorials/ubuntu-debian-fix-sudo-command-not-found

posted @ 2022-03-29 10:55  呆贝斯  阅读(2702)  评论(0编辑  收藏  举报