LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-04-2009, 04:13 PM   #1
ajaygoeslinux
LQ Newbie
 
Registered: Apr 2009
Posts: 8

Rep: Reputation: 0
Question 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
 
Old 05-04-2009, 05:25 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Hi, and welcome to LQ!

There could be several underlying issues.
  • Some apps simply didn't get installed ...
  • for some reason bash isn't evaluating some of the normal startup-files
  • permissions/ownerships on relevant files are screwy

What do you get when you do
Code:
echo $PATH
?



Cheers,
Tink
 
Old 05-04-2009, 09:21 PM   #3
ajaygoeslinux
LQ Newbie
 
Registered: Apr 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Tinkster View Post
Hi, and welcome to LQ!

There could be several underlying issues.
  • Some apps simply didn't get installed ...
  • for some reason bash isn't evaluating some of the normal startup-files
  • permissions/ownerships on relevant files are screwy

What do you get when you do
Code:
echo $PATH
?



Cheers,
Tink
Thank you for your willingness to help. I'd like to get this resolved.

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
 
Old 05-04-2009, 10:41 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
What does
Code:
rpm -qa | grep vi
show you?

And
Code:
rpm -ql bash
?


Cheers,
Tink
 
Old 05-04-2009, 10:51 PM   #5
Libu
Member
 
Registered: Oct 2003
Location: Chennai
Distribution: Slackware 12.1
Posts: 165

Rep: Reputation: 36
Are you able to find the executables under /usr/bin ?
Quote:
ls /usr/bin/ | grep -e vim -e locate
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
"clear" and "reset" bash commands broken AviJacobson Linux - General 6 07-03-2006 06:28 AM
"clear" and "reset" bash commands broken AviJacobson Linux - Software 1 06-29-2006 02:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration