Find the answer to your Linux question:
Results 1 to 5 of 5
So I'm almost embarrassed to ask something so simple, but I cant find any info for the life of me. Whenever I open up my terminal, I get bash-3.1$ instead ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie rudie_rage's Avatar
    Join Date
    Jun 2007
    Location
    Canada
    Posts
    133

    simple terminal configuration


    So I'm almost embarrassed to ask something so simple, but I cant find any info for the life of me.

    Whenever I open up my terminal, I get bash-3.1$ instead of user@machine[dir]$

    I know the fix is one or two lines in a .X_____ file in my home directory, but if I dont remember the name of that file, its kinda hard to google lol.

    Also, I'm using mrxvt, which is different from other terminals I have in that it has its own .mrxvtrc file instead of just having its configuration in above unknown file.

    Would that possibly be the place i'm looking for to change my prompt?

  2. #2
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,393
    To fix the prompt, try
    Code:
    #cp /etc/skel/.bash* /home/someuser/.
    #chown someuser:somegroup  /home/someuser/.bash*

  3. #3
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    For Bash, the $PS1 global variable controls the prompt. You can set this in your ~/.bashrc.

    For instance:
    Code:
    alex@danu ~ $ echo $PS1
    \[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\]
    This sets colors, shows my username (\u) at hostname (\h), changes colors again, and shows my current working directory.

    The documentation for this is probably in the man page. I know I had to figure out the variable myself some time back, and I found a resource somewhere.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie rudie_rage's Avatar
    Join Date
    Jun 2007
    Location
    Canada
    Posts
    133
    thanks. .bashrc is really the keyword I needed to know to get started
    Living the digital dream....
    Disclaimer: I may be wrong since I was once before.
    Breathe out so I can breathe you in ~~Everlong

  6. #5
    Just Joined! dominator22's Avatar
    Join Date
    Jun 2007
    Posts
    9
    For good examples of configuration files (including .bashrc) visit dotfiles.com and dotfiles.org

Posting Permissions

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