Linux 中 command not found 解决办法

时间:2024-10-12 17:10:30

1、从图形界面启动 Linux 终端。

Linux 中 command not found 解决办法

2、在命令行输入 su,回车。然后输入 root 用户密码(注意,屏幕上不显示),回车,登入 root 用户。

Linux 中 command not found 解决办法

3、在命令行输入 gedit /etc/profile,回车。这样就打开了一个文本编辑器对 profile 文件进行编辑。

Linux 中 command not found 解决办法

4、在文件的最末一行,添加 PATH=$PATH:/sbin,然后保存并关闭文件。注意,务必记得保存文件。

Linux 中 command not found 解决办法

5、在命令行继续输入 source /etc/profile ,回车,使刚才更改后的配醅呓择锗置文件生效。注意,etc 前面的 / 不能少。

Linux 中 command not found 解决办法

6、现在,一切大功告成。马上试着执行 shutdown -h now 关机命令,是不是没有错误提示了?

Linux 中 command not found 解决办法
© 手抄报圈