LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-07-2017, 10:45 AM   #1
Bashed
Member
 
Registered: Jul 2015
Posts: 109

Rep: Reputation: Disabled
bash issue


I think a made a minor mistake a few days ago and deleted some .bash file(s). So, when I log into SSH now it shows this instead of root@

Code:
-bash-4.1#
On a good server I see this:

Code:
lrwxrwxrwx.   1 root root    7 Jul  7  2016 bin -> usr/bin
On the server showing -bash- prompt I see this:

Code:
dr-xr-xr-x.   3 root root 4.0K Jul 19 05:02 bin
Curious, how would I fix that? They're all Centos 7 boxes.
 
Old 08-07-2017, 11:06 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,501

Rep: Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314
Quote:
On a good server I see this:
hm. Would be nice to explain which command did you execute to see this?
Quote:
On the server showing -bash- prompt I see this:
And this.
You may check the file ~/.bashrc, but I'm afraid we cannot restore it for you. From the other hand you can check man bash to see what files are processed during login.
 
Old 08-07-2017, 11:06 AM   #3
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.7.1908
Posts: 4,267

Rep: Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495
Quote:
Originally Posted by Bashed View Post
I think a made a minor mistake a few days ago and deleted some .bash file(s). So, when I log into SSH now it shows this instead of root@

Code:
-bash-4.1#
On a good server I see this:

Code:
lrwxrwxrwx.   1 root root    7 Jul  7  2016 bin -> usr/bin
On the server showing -bash- prompt I see this:

Code:
dr-xr-xr-x.   3 root root 4.0K Jul 19 05:02 bin
Curious, how would I fix that? They're all Centos 7 boxes.
What commands are you executing, and from which directory?
Are these the .bash* files in /root ?
Compare the .bash* files on the good server with any left on the other server and/or recreate them on the other server.
[From backup? ]
 
Old 08-07-2017, 11:18 AM   #4
Bashed
Member
 
Registered: Jul 2015
Posts: 109

Original Poster
Rep: Reputation: Disabled
Fixed. Was missing .bashrc and .bash_profile.
 
  


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
Bash issue please help! zcarlile Linux - Newbie 5 12-20-2013 10:37 PM
Bash script issue tibix00 Programming 22 07-21-2011 01:23 PM
[SOLVED] Bash scripting issue tubaboy Linux - Newbie 5 11-15-2010 08:41 AM
bash scripting issue thesav Programming 7 06-20-2009 03:38 AM
Installation issue with 5.2 and bash sullivjp AIX 2 07-18-2006 10:44 AM

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

All times are GMT -5. The time now is 10:37 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration