Skip to content

Instantly share code, notes, and snippets.

@Depicus
Last active August 29, 2015 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Depicus/1cb884a98f387c0c640c to your computer and use it in GitHub Desktop.
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 :)
#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
@Depicus
Copy link
Author

Depicus commented Dec 25, 2014

sudo nano /etc/rc.local

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment