![]() |
Getting bash to login as root and recognize commands like "vi" and "locate"
The subject line pretty much says it all. I reinstalled my CentOS 5.2 OS today, updated yum and bash and started trying to locate and edit files. Each time I run "locate [name]" or "vi [file]", I get "command not found".
Also, no matter what I do, log off, reboot, whatever, I get only "-bash-3.2#" on which to execute commands rather than "[root@hostname~]" and I can't seem to set the hostname because bash won't recognize the commands or allow me to edit files! I did FIND that the server recognizes the hostname but, even after rebooting and logging back onto my SSH, I still only get "-bash-3.2#", I couldn't fix the problem. Please help so I can move on with my life. Thanks. April |
Hi, and welcome to LQ!
There could be several underlying issues.
What do you get when you do Code:
echo $PATHCheers, Tink |
Quote:
The output from echo $PATH: /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin Let me know what you think. I can "vi" anything so I can't read any files. April |
What does
Code:
rpm -qa | grep viAnd Code:
rpm -ql bashCheers, Tink |
Are you able to find the executables under /usr/bin ?
Quote:
|
| All times are GMT -5. The time now is 11:13 AM. |