Find the answer to your Linux question:
Results 1 to 3 of 3
The Linux OS is CentOS 5.2. Now, when logging in the OS using "root", the prompt is "-bash-3.2# ". How can I set back "[root@unidata ~]# "? Thank you!...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! timiao's Avatar
    Join Date
    Jul 2009
    Location
    22030
    Posts
    17

    Unhappy How to reset back "[root@unidata ~]# "?


    The Linux OS is CentOS 5.2. Now, when logging in the OS using "root", the prompt is "-bash-3.2# ". How can I set back "[root@unidata ~]# "? Thank you!

  2. #2
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Code:
    su -
    nano /root/.bash_profile
    Find and comment out any existing lines for PS1.

    Add this
    Code:
    export PS1='\[\e[1;31m\][\u@\h \W]\$\[\e[0m\] '
    Tip: Prompt magic

  3. #3
    Just Joined! timiao's Avatar
    Join Date
    Jul 2009
    Location
    22030
    Posts
    17
    Quote Originally Posted by reed9 View Post
    Code:
    su -
    nano /root/.bash_profile
    Find and comment out any existing lines for PS1.

    Add this
    Code:
    export PS1='\[\e[1;31m\][\u@\h \W]\$\[\e[0m\] '
    Tip: Prompt magic
    Thank you very much, reed9. This is a very excellent solution!

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •