Similar to question 1171663, AIX appears to not have the $HOSTNAME option available. $hname and $hostname are also non-existent. Other than doing the following within .profile -
export HOSTNAME=`hostname`
Is there an official manner where AIX users should 开发者_高级运维be capable of getting the proper results when using:
PS1="${HOSTNAME}:\${PWD##*/} \$ "
Haven't tried it, but for the hostname - can't you mix your first example with your second?
PS1="`hostname`:\${PWD##*/} \$ "
Not sure about PWD bit though?
Try this:
export HOSTNAME=`uname -n`
精彩评论