Skip to content

Instantly share code, notes, and snippets.

@TheGU
Created August 4, 2017 10:24
Show Gist options
  • Save TheGU/c0089873561f195569c29333f3760ff8 to your computer and use it in GitHub Desktop.
Save TheGU/c0089873561f195569c29333f3760ff8 to your computer and use it in GitHub Desktop.
Show Ip on login screen after Ubuntu boot / auto set in rc.local to show new ip every boot up
sed -i "/^exit 0/ilsb_release -d | awk '{ print \$2 \" \" \$3 \" \" \$4 \" \\\\\\\n \\\\\\\l\" }' > /etc/issue " /etc/rc.local
sed -i "/^exit 0/i/sbin/ifconfig | grep \"inet addr\" | grep -v \"127.0.0.1\" | awk '{ print \$2 }' >> /etc/issue " /etc/rc.local
sed -i "/^exit 0/i\\\n" /etc/rc.local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment