输入正常命令比如 ls cd vim 都显示:没有,找不到 Command not found
以及下面的命令
The command could not be located because xxxx is not included in the PATH environment variable.
大概率都是因为你自己修改了/etc/profile中的内容,但是修改内容不正确,导致文件读取不到正常的环境变量
那么就跳转到原来修改的地方去重新修改,但是此时只能使用绝对路径找到文件位置修改(vim /etc/profile的)
/usr/bin/sudo /usr/bin/vim /etc/profile
修改之后,保存重启设备(sudo reboot)
/usr/bin/sudo /sbin/reboot