The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SSH Bash Issue

Discussion in 'General Discussion' started by Shark Stone, Feb 21, 2010.

  1. Shark Stone

    Shark Stone Member

    Joined:
    Feb 20, 2010
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I have the following issue when I login to ssh:

    -Bash 3.2-$

    I was told by my host to run

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

    This works but everytime I exit and relogin to my ssh it resets to bash why?
     
  2. Eric

    Eric Administrator
    Staff Member

    Joined:
    Nov 25, 2007
    Messages:
    746
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    Howdy,

    You need a .bashrc file with this information in it. Once you add the file it will set your shell the way you like it each time.

    I like a little color in my shell give this one a try:

    PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '

    its from the gentoo hit list. :)

    Remember that the file has to start with a . :)
     
  3. Shark Stone

    Shark Stone Member

    Joined:
    Feb 20, 2010
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Eric,

    Were does the .bashrc file go? how do I make it so all new accounts and current accounts have this file?
     
  4. Eric

    Eric Administrator
    Staff Member

    Joined:
    Nov 25, 2007
    Messages:
    746
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    It should go in the users's home folder. I think you can add it to the skeleton folder to add it, otherwise you could create it using a post create account hook.
     
  5. Shark Stone

    Shark Stone Member

    Joined:
    Feb 20, 2010
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    is the skeleton folder that you are talking about the following Eric?

    cpanel3-skel

    Does it go in the public_html dir?
     
  6. TheHeartSmasher

    TheHeartSmasher Active Member

    Joined:
    Jul 14, 2006
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    You would need to place it in the user's home directory

    /home/yourusername/.bashrc

    Example:
    /home/joetheadmin/.bashrc
     
  7. Shark Stone

    Shark Stone Member

    Joined:
    Feb 20, 2010
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    did not work
     
Loading...

Share This Page