To change the bash prompt of an ESXi host to display the hostname
SSH to the host
change directory to /etc
vi profile and append the following two lines:
HOSTNAME=`hostname`
export PS1="`grep ${HOSTNAME} /etc/hosts | awk '{print $2}' |cut -d. -f1`> "
No comments:
Post a Comment