Saturday, February 2, 2019

Display lP address of machine on the banner without login

Add following lines to /etc/rc.local:

# initial setup, cp /etc/issue /etc/issue.orig
cp /etc/issue.orig /etc/issue
ip addr|grep inet |grep -i enp|awk {'print $NF, $2'}|awk -F'/' {'print $1'} >> /etc/issue
echo "" >> /etc/issue


No comments:

Post a Comment