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: Logo

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

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.