PDA

View Full Version : Changing prompt



n3150nao
03-17-2004, 05:15 PM
Hi people!

Well, I have a little problem. Not a problem, but something that is irritating me! :)
When on KDE, after Knoppix boot, I open a konsole. OK.
But the prompt is "knoppix@knoppix" (or something like that. I donīt remember, sorry).

The question: which file I have to change to display something that I want on the prompt, instead that?
(sure, I will remaster Knoppix after)

Thank you very much
Nelson

knulle
03-18-2004, 09:40 AM
Hi !

the default logon-shell should be bash. The shell var defining the promt is PS1 (there are some other PS2 and PS3, don't know when they will be used instead).
The default value for PS1 is "\\u@\\h:\\w\\\$ "
It should be possible to change this for the root's login within the bash profile for the root-user (export PS1="..." in file /root/home/.bashrc or globally in /etc/profile.

Also see "man bash"

cheers

Knut

n3150nao
03-18-2004, 02:12 PM
Hi Knut!

Thnak you very much for you help!
Searching a little more, I found that on Knoppix, it's necessary to change the files /etc/bashrc and /etc/profile.

Nelson