Tuesday, March 17, 2009

Putty show server ipaddress

Add the below to vi ~/.bashrc

add IP=`ifconfig eth0|grep inet\ addr|cut -d " " -s -f 12|cut -d : -s -f 2`
export PS1='${debian_chroot:+($debian_chroot)}\u@$IP:\w\$ '

No comments:

Post a Comment