由于操作失误,在profile中写入了错误的配置信息,导致系统命令不可用。
执行时提示:

Command 'vi' is available in '/usr/bin/vi'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
vi: command not found

解决办法

/usr/bin/sudo vi profile
export PATH=$PATH:/sbin:/usr/bin:/usr/sbin

(完)