How to change unix prompt?

C-shell (csh)
Example: set prompt=”[%n@%m %c] \! %”
oracle@localhost ~] 39 %
In this above example sets prompt to display username, hostname, current working directory and history number.
%n – username, %m – hostname, %c – pwd, \! – history number

K-shell (ksh)
Example: $ export PS1=’$USER [$PWD] $ ‘
oracle [/home] $
In the above example, sets prompt to display username and current working directory.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s