쉘 명령이 작동하지 않습니다: REDHAT

쉘 명령이 작동하지 않습니다: REDHAT

시작 스크립트에 일부 서비스를 추가한 후 재부팅한 후 다음 메시지를 받았습니다.

24 package(s) needed for security, out of 52 available
Run "sudo yum update" to apply all updates.
-bash: id: command not found
-bash: id: command not found
-bash: id: command not found
-bash: tty: command not found
-bash: mktemp: command not found
-bash: $TMP: ambiguous redirect
-bash: rm: command not found

netstat그런 다음 , ps, 등과 같은 대부분의 기본 명령을 실행하려고 하면 다음과 같은 오류 메시지가 나타납니다 grep.ll

-bash: ls: command not found

하지만 같은 일부 명령은 cp작동 chkconfig합니다. 내 /bin/bash 파일이 있는지 확인했습니다. 이유는 무엇입니까?

하지만 그 전에는 다음과 같이 변경했습니다.

echo "JAVA_HOME=/usr/java/jdk1.6.0_45" >> /etc/profile.d/custpath.sh
echo "export JAVA_HOME" >> /etc/profile.d/custpath.sh
echo 'PATH=$PATH:$JAVA_HOME/bin' >> /etc/profile.d/custpath.sh
echo "export PATH" >> /etc/profile.d/custpath.sh

/etc/environment 파일을 다음으로 변경했습니다.

export JAVA_HOME=/usr/java/jdk1.6.0_45
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=$CLASSPATH:/usr/java/jdk1.6.0_45/jre/lib

관련 정보