Changed the PATH, now I'm getting "command not found" for everything
Amazon Linux Server, connected with SSH:
I tried to change the PATH for the apache user by making some changes in /etc/environment (PATH=$PATH:/opt/openoffice4/program
) and /etc/sysconfig/httpd (export PATH = ${PATH:$PATH:}/opt/openoffice4/program
).
Then I rebooted.
Now, I can not do anything, even ls -l
leads to -bash: ls: command not found
What can I do to regain control?
What can I do to regain control?
Run /bin/vi
and revert the changes you made to /etc/environment
and /etc/sysconfig/httpd
.
You can set your PATH
without an editor. Just type this in the shell:
export PATH=/usr/local/bin:/usr/bin:/bin:$HOME/bin