You are not logged in.

#1 2010-12-22 14:59:58

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

Upgraded Now Shows Bash-4.1

At some point I did an upgrade on my server and must have not been actively watching the screen and moved on because now my environment path is wrong and shows:

-bash-4.1#

Rather than what it normally did when I sudo su - my user account. My user path still looks normal however, just my root path is all jacked up. I scanned the forums and did really know how to search for this so I'm guessing it's been discussed but I'm not sure how to label this even.

Thanks for any info!


./

Offline

#2 2010-12-22 15:59:24

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Upgraded Now Shows Bash-4.1

Do you still have

PS1='[\u@\h \W]\$ '

in your /root/.bashrc?
Post the file you use to configure the prompt (usually /root/.bashrc).

Last edited by karol (2010-12-22 16:01:51)

Offline

#3 2010-12-22 17:16:29

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

Re: Upgraded Now Shows Bash-4.1

I don't have a '/root/.bashrc' at all but then I checked another Arch machine that is fully patched and working fine and it too doesn't have that file but the prompt for root looks normal. I don't understand.

[root@tuna ~]# ls -la
total 20
drwxr-x---  2 root root 4096 Dec 13 08:38 .
drwxr-xr-x 23 root root 4096 Dec 21 09:00 ..
-rw-------  1 root root 6773 Dec 22 12:10 .bash_history
-rw-------  1 root root 3966 Dec 13 08:38 .viminfo

I rebooted just to be safe and still my mail server was jacked up but my Arch workstation PC was fine. Neither had that file you mentioned.


./

Offline

#4 2010-12-22 17:20:47

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Upgraded Now Shows Bash-4.1

Maybe just create that file. On my system it looks like this

[root@black ~]# cat .bashrc

# Check for an interactive session
[ -z "$PS1" ] && return

PS1='[\u@\h \W]\$ '

Where do you put all the bash customizations? /etc/bash.bashrc.local?

Offline

#5 2010-12-22 17:51:29

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

Re: Upgraded Now Shows Bash-4.1

karol wrote:

Where do you put all the bash customizations? /etc/bash.bashrc.local?

I don't put them anywhere. This is a very vanilla Arch Linux install. Where ever Arch defaults to is where it's at. I did what you suggested and it still looks messed up after a reboot:

[carlos@mail ~]$ sudo su -
Password: 
-bash-4.1# cat /root/.bash
-bash-4.1# cat /root/.bashrc 
# Check for an interactive session
[ -z "$PS1" ] && return

Last edited by Carlwill (2010-12-22 17:51:50)


./

Offline

#6 2010-12-22 18:00:03

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Upgraded Now Shows Bash-4.1

So you do have /root/.bashrc but for some reason you don't have the line that defines the prompt. Just add

PS1='[\u@\h \W]\$ '

to your /root/.bashrc, save and source it.

Last edited by karol (2010-12-22 18:01:00)

Offline

#7 2010-12-22 18:09:08

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,642

Re: Upgraded Now Shows Bash-4.1

Make sure you merge /etc/profile.pacnew wink

Offline

Board footer

Powered by FluxBB