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 [root@hostname ~]# thing

Discussion in 'General Discussion' started by SNN, Mar 12, 2008.

  1. SNN

    SNN Well-Known Member

    Joined:
    Oct 5, 2007
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    When I logged into SSH today, instead of the normal [root@hostname ~]#, it shows: bash-3.1#
    I tried logging in as one of my clients and got: [devin2@hostname ~]$, so I know it's only the root account.

    Has anyone had this bug or error before? I'd like to have the location I'm at or the directory name so I can know what I'm editing just in-case (have multiple websites, one vBulletin, and one custom with similar files.)
     
  2. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    16
    Have you deleted your root folder, or some files in your root folder lately?

    I had the same problem by removing /root/ and deleting the bash profile settings. (Hey, I didn't mean to okay?!)

    Ensure that you have the file .tcshrc and you have something like
    Code:
    set prompt='[%n@%m %c]# '
    
    In that file.

    Cheers,
     
  3. SNN

    SNN Well-Known Member

    Joined:
    Oct 5, 2007
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Ah thanks!
    Yes, I have done that recently...I was removing a whole bunch of files (over 600) >.<
    EDIT: Nevermind...that didn't work?
    EDIT2: Okay...I copied files from my client to my root directory and it's back now. Thanks for the suggestion though :)
     
    #3 SNN, Mar 12, 2008
    Last edited: Mar 12, 2008
  4. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    16
    It's all good. I made the mistake when I was first on Linux to try to copy something to the root folder, using ~ instead of /root/ and bullocks it up.

    Lost my directory/file colors too.
     
  5. troxalias

    troxalias Well-Known Member

    Joined:
    Nov 21, 2001
    Messages:
    96
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Athens - Greece
    Everything that has to do with you bash shell environment is handled at login be the file .bashrc in your home directory. On most Linux distribution this file should first of all source the file /etc/bashrc that is the system wide bash environment profile.
     
  6. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    16
    But in that file you should have;
    Something similar to the below - other wise after you delete the root folder is doesn't look for your global settings anymore.
    Code:
    # .bashrc
    
    # Source global definitions
    if [ -f /etc/bashrc ]; then
            . /etc/bashrc
    fi
    
     
Loading...

Share This Page