Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
* Shell prompt of root
@ 1999-04-21  4:00 Chan Kin Man
  1999-04-22  4:00 ` Hans Peter Kain
  0 siblings, 1 reply; 2+ messages in thread
From: Chan Kin Man @ 1999-04-21  4:00 UTC (permalink / raw)


Dears,

How can I change the prompt of bourne shell (root user) from 
'#' to 'hostname#' ?

Thanks.

MAN
~~~



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Shell prompt of root
  1999-04-21  4:00 Shell prompt of root Chan Kin Man
@ 1999-04-22  4:00 ` Hans Peter Kain
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Peter Kain @ 1999-04-22  4:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 707 bytes --]

To change the shell prompt of root user in a bourne shell simply add the
following  two entries in the $HOME/.profile - File of your root user:

PS1="`hostname`#"
export PS1

Thats all.

PS1 is an predefined shell variable that defines the primary system prompt.
You can also define a secondary system prompt (=PS2) which is used if a
command extends over more than one line.

It is very important to use the character ` not � or ' because all whats
between two � is interpreted as a command.

Regards

Hans Peter.


Chan Kin Man schrieb in Nachricht <7fk2bo$egd@ustsu10.ust.hk>...
>Dears,
>
>How can I change the prompt of bourne shell (root user) from
>'#' to 'hostname#' ?
>
>Thanks.
>
>MAN
>~~~





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-04-22  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-04-21  4:00 Shell prompt of root Chan Kin Man
1999-04-22  4:00 ` Hans Peter Kain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox