nat*_*ath 3 linux root administration debian
我刚刚从测试存储库安装了一个新的 Debian 系统:
Operating System: Debian GNU/Linux bookworm/sid
Kernel: Linux 5.15.0-2-amd64
Architecture: x86-64
Run Code Online (Sandbox Code Playgroud)
由于某种原因,当我登录时,因为root我没有某些命令(例如shutdown或reboot可用)。
我该如何解决?是不是少了一个包?
这两个命令是SysV时代的命令;它们仅在现代系统上“模拟”:
shutdown只是一个符号链接systemctl,它“知道”当它被调用时, asshutdown应该触发与 相同的操作systemctl poweroff。reboot/也一样systemctl reboot。
因此,要么简单地替换shutdown为systemctl poweroff、 和reboot,systemctl reboot要么只添加别名 ( alias shutdown=systemctl poweroff)。
我的记忆是,您可以选择安装该systemd-sysv软件包,除了包含这些符号链接之外,它没有什么用处。