龙芯教育派找不到命令reboot和shutdown
问题
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-SaSOkoXi-1652620675671)(解决shutdown和reboot的问题.assets/image-20220515210150607.png)]](https://i-blog.csdnimg.cn/blog_migrate/9197c5fb7385323318acc093fe21a0b6.png)
解决方案
whereis reboot # 找到reboot的文件路径
whereis shutdown # 找到shutdown的文件路径
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-3P8bfvZj-1652620675673)(解决shutdown和reboot的问题.assets/image-20220515210445384.png)]](https://i-blog.csdnimg.cn/blog_migrate/4db640a2ad986d244f506f73e8e02512.png)
添加到环境变量里面,nano /etc/profile
,添加下面两行
export PATH=$PATH:/usr/sbin/reboot
export PATH=$PATH:/usr/sbin/shutdown
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-AqKriZgU-1652620675673)(解决shutdown和reboot的问题.assets/image-20220515210857172.png)]](https://i-blog.csdnimg.cn/blog_migrate/bded05201f1413d23bbe874c6b56cf43.png)
生效profile命令 ,source /etc/profile
好了,已经可以使用shutdown
和reboot
命令了。
参考:
- "bash:shutdown:command not found"或"bash:reboot:command not found"的解决方法