Skip to content
Home » How AIX PS1 Set Command Prompt

How AIX PS1 Set Command Prompt

  • AIX


By default, there's little information in prompt for a new user in KSH. If you're used to Linux BASH prompt, then we should change it into more informative:

$ vi ~/.profile
typeset +x PS1="[$USER@$(hostname -s) "'${PWD##*/}'"]\$ "

To make it take effect immediately, we can do this:

$ . ~/.profile
[oracle@boston admin]$ pwd

The command prompt shows 3 things:

  1. Username
  2. Hostname
  3. Directory

That's better.

Leave a Reply

Your email address will not be published. Required fields are marked *