PDA

View Full Version : changing terminal prompt


lmellen
February 17th, 2006, 09:12 PM
:-k Does anybody know how to change the value of the variable "h" in:

" PS1='${debian_chroot:+($debian_chroot)}\u@\h\w\$ ' "

This is the code for the terminal prompt in .bashrc.
It's no big deal but if I can shorten my prompt I'd like to.
I'd also simply like to know how.

export PS1= only changes the prompt for one session.
Thanks -- larry

lmellen
February 18th, 2006, 07:14 PM
Never mind, all that is necessary is to change:
" PS1='${debian_chroot:+($debian_chroot)}\u@\h\w\$ ' "
to
PS1= "anything you want"
Change it in .bashrc
Thanks cwaldbieser!!!! --Larry

pt78
February 19th, 2006, 05:12 AM
:-k Does anybody know how to change the value of the variable "h" in:

" PS1='${debian_chroot:+($debian_chroot)}\u@\h\w\$ ' "

This is the code for the terminal prompt in .bashrc.
It's no big deal but if I can shorten my prompt I'd like to.
I'd also simply like to know how.

export PS1= only changes the prompt for one session.
Thanks -- larry
Here is huge howto: http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/
And here bunch of examples: http://www.dreaming.org/~giles/bashprompt/prompts/