Tuesday 16 April 2013

VMware ESXi 4.1: Change Bash Prompt To Display Hostname

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:


export PS1="`grep ${HOSTNAME} /etc/hosts | awk '{print $2}' |cut -d. -f1`> "

No comments:

Post a Comment