Author Topic: command line Q  (Read 457 times)

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
command line Q
« on: 15 February 2003, 02:16 »
in slackware how do i change it so that it says "mor@xen:/dir$" instead of the "bash-2.05a$" that comes up when i open a term.?
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

5amYan

  • Member
  • **
  • Posts: 27
  • Kudos: 0
    • http://www.intersiege.com
command line Q
« Reply #1 on: 17 February 2003, 11:30 »
I think in ~/.bashrc
#man bash
and look at the PS1 PS2 PS3 (Prompt String)entries
5amYan
4.6692016090
-- Last line of the author's current message. --

Calum

  • Global Moderator
  • Member
  • ***
  • Posts: 7,812
  • Kudos: 1000
    • Calum Carlyle's music
command line Q
« Reply #2 on: 17 February 2003, 19:00 »
yep, i get that bash2.05 thing too, because i deleted my .bashprofile or .bashrc or whatever (in a fit of rage). when i su to root, it gives me my current directory and all that crap before the # prompt, because root still has a .bashrc file.
visit these websites and make yourself happy forever:
It's my music! | My music on MySpace | Integrational Polytheism

untz

  • Newbie
  • *
  • Posts: 12
  • Kudos: 0
command line Q
« Reply #3 on: 18 February 2003, 04:57 »
cd into your home directory.

vi .bashrc

add the following

# set prompt: ``username@hostname:/directory $ ''
PS1="[\u@\h:\w] "
case `id -u` in
      0) PS1="${PS1}# ";;
      *) PS1="${PS1}$ ";;
esac

save it, exit your shell, and then next time you open it should work.