Thursday, September 30, 2010

How to get System IP using shell in various systems.

Sometime we want to retrive some IP address information about the system in a shell script.
This is how it can be done.

Linux:

  ifconfig  | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'

FreeBSD/OpenBSD:

  ifconfig  | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}'

Solaris:

  ifconfig -a | grep inet | grep -v '127.0.0.1' | awk '{ print $2}'




Proxmox installation display out of range

Reference:  https://forum.proxmox.com/threads/proxmox-ve-screen-out-of-range.131297/