Last active
August 29, 2015 14:12
-
-
Save Depicus/1cb884a98f387c0c640c to your computer and use it in GitHub Desktop.
If you run a lot of VMs and you look at the login and wonder what the ip address is to ssh in. Because sometimes the VM console is .... fun :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#add the ip address to the pre login screen by editing rc.local | |
/sbin/ifconfig | grep "inet addr" | grep -v "127.0.0.1" | awk '{ print $2 }' | awk -F: '{ print "ip address " $2 }' > /$}' > /etc/issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sudo nano /etc/rc.local