开发者

Prompt not displaying Hostname for AIX's KSH

开发者 https://www.devze.com 2023-01-19 03:52 出处:网络
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 -

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` 
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号