Skip to content
Home » AIX » How AIX PS1 Set Command Prompt

How AIX PS1 Set Command Prompt

AIX PS1

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
/u01/app/oracle/product/19.0.0/db_1/network/admin

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 *