how to set the bash prompt


Results 1 to 7 of 7

Thread: how to set the bash prompt

  1. #1
    Join Date
    Dec 2002
    Location
    London
    Posts
    162

    Bash???

    Hey there...

    Every time I open a shell now (does not matter which one xterm konsole, gnome) instead of getting user@localhost user: I get bash-2.05b$
    . When I SU I get my root@localhost root:. Why and how do u fix this?

    It really sux cause I cant cd.. have to cd / =(

    (Mandrake 9.1 if it helps)

  2. #2
    Join Date
    Nov 2000
    Location
    Kongsberg, Norway
    Posts
    3,573
    Code:
    export PS1=[\u@\h \W]\$
    Cheers

    [edit] It should all be set up in your /etc/bashrc file.
    Last edited by Choozo; 07-04-2003 at 06:00 PM.
    Linux User #181509

    * It can hardly be a coincidence that no language on this planet
    has ever come up with the phrase "as pretty as an airport" *
    -- Douglas Adams --

  3. #3
    Join Date
    Feb 2003
    Location
    USA
    Posts
    458
    Put that in your .bashrc file (in your home directory) to make the changes every time you get a prompt.
    . : My Blog : : System specs (scroll down) : : Screenshots : .

    "The world is like a giant puzzle; it's always easiest to fit where you belong."

  4. #4
    Join Date
    Dec 2002
    Location
    London
    Posts
    162

    Smile =)

    Cheers for the prompt reply...

    I was actually missing bashrc and bash_profile in my home directory.. weird ehh??? just cp em from root and chmod them.

    works fine now...

    Ta!

  5. #5
    Join Date
    Jun 2003
    Location
    Sweden
    Posts
    5
    Then you probably forgot -m when you added your user

  6. #6
    Join Date
    Oct 2000
    Location
    Calgary, Alberta, Canada
    Posts
    8,130
    Digit0,

    i edited you Subject for this thread to make it easier for peopel to search on.

  7. #7
    Join Date
    Dec 1999
    Location
    Toronto
    Posts
    39,320
    As the Technical forum description and JL Community Help Posting Guidelines suggest, try the JL Help Files before you post a question.

    http://justlinux.com/nhf/Shells/Conf...ash_Shell.html
    SEARCH FIRST... ASK SECOND Read the JL 'Community Help Posting Guidelines' before posting in the forums.

    Precompiled Redhat NTFS Modules

    Linuxplanet Tutorials

    If Linux doesn't have the solution, you have the wrong problem. ... Please do not send me a PM asking for help...

    Please read the search suggestion thread in JL Ideas

Posting Permissions

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