linux debain 宝塔 找不到命令reboot和shutdown

180it 2023-02-08 AM 972℃ 0条

debain linux 找不到命令reboot和shutdown
问题
1.png

解决方案

whereis reboot  # 找到reboot的文件路径
whereis shutdown # 找到shutdown的文件路径

2.png
添加到环境变量里面,nano /etc/profile,添加下面两行

export PATH=$PATH:/usr/sbin/reboot
export PATH=$PATH:/usr/sbin/shutdown

3.png

生效profile命令 ,source /etc/profile

好了,已经可以使用shutdown和reboot命令了。

转载来源:https://blog.csdn.net/m0_50679156/article/details/124788371

支付宝打赏支付宝打赏 微信打赏微信打赏

如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!

标签: none

linux debain 宝塔 找不到命令reboot和shutdown