这是一台只有一个用户的家用电脑。
已使用以下命令:
如何反转命令并恢复默认设置?
已使用以下命令:
chown root:root /usr/bin/apt-get
chmod 4775 /usr/bin/apt-get
如何反转命令并恢复默认设置?
chown root:root /usr/bin/apt-get
chmod 4775 /usr/bin/apt-get
sudo chmod 755 /usr/bin/apt-get
$ stat -c '%a %A %U %G' /usr/bin/apt-get
755 -rwxr-xr-x root root
4
,在可读形式中,所有者的x
被替换为s
。4755 -rwsr-xr-x
$ stat -c '%a %A %U %G' /usr/bin/sudo
4755 -rwsr-xr-x root root
sudo
,该规则在/etc/sudoers
中进行配置。如果该文件损坏或不存在,或者sudo
的权限设置不正确,sudo
将会出现错误。
apt-get autoremove --force-yes ubuntu-minimal
命令非常方便。太棒了! - David Foersterapt
上比如grep
、ls
等更加危险,因为软件包可能包含安装触发器,即在apt
的dpkg
子进程的不同阶段运行的任意外部脚本。 - cat