Rhel 中的每个命令 returns 错误
Every command returns error in Rhel
我正在使用 SSH 连接远程服务器。我做了一些安装,想测试它们是否在重启后启动。我用 sudo reboot 重启了机器。 SSH 会话已断开。我重新连接了。登录后,我输入的每个命令,无论是否有效returns都在输出之后。
-bash: id: command not found
-bash: id: command not found
-bash: id: command not found
-bash: tty: command not found
-bash: uname: command not found
-bash: whoami: command not found
-bash: sed: command not found
-bash: logger: command not found
如何摆脱这种情况?
谢谢。
你的 path
已经搞砸了,你必须重新添加你的路径所需的任何东西。
这可以通过发出以下命令来完成
export PATH="$PATH:[directory to append to path]"
如果找不到命令,此路径可能会让您走上正确的道路
export PATH="$PATH:/bin"
然而,这不会在重新启动后保留 $PATH
值,在这种情况下,需要编辑包含路径设置的系统文件。
我正在使用 SSH 连接远程服务器。我做了一些安装,想测试它们是否在重启后启动。我用 sudo reboot 重启了机器。 SSH 会话已断开。我重新连接了。登录后,我输入的每个命令,无论是否有效returns都在输出之后。
-bash: id: command not found
-bash: id: command not found
-bash: id: command not found
-bash: tty: command not found
-bash: uname: command not found
-bash: whoami: command not found
-bash: sed: command not found
-bash: logger: command not found
如何摆脱这种情况?
谢谢。
你的 path
已经搞砸了,你必须重新添加你的路径所需的任何东西。
这可以通过发出以下命令来完成
export PATH="$PATH:[directory to append to path]"
如果找不到命令,此路径可能会让您走上正确的道路
export PATH="$PATH:/bin"
然而,这不会在重新启动后保留 $PATH
值,在这种情况下,需要编辑包含路径设置的系统文件。