Viewing your IP Address
A few IP related commands (RedHat 7.1/Fedora)
Posted 14.08.2004 | Updated 23.05.2006 | Contributed by Andy Mallett


Using a DHCP Server for your Linux box and need to know how to renew and release IP Addresses? You need to be familiar with the concept of DHCP and a background in how MS Windows does it will also be helpful.

Here are the commands under MS-DOS and Windows:

ipconfig - shows the IP, Subnet Mask and default Gateway
ipconfig /all - shows more information like MAC Address, DNS, etc.
ipconfig /renew - renews IP information on a machine set for DHCP
ipconfig /release - releases IP information on a machine set for DHCP


Here are the original Linux equivalents:

ifconfig - shows all IP information, note IP is referred to as inet address
pump - renews IP information on a machine set for DHCP
pump -k - ends pump daemon and return IP Address to DHCP Server
pump -s - shows IP information


Under Red Hat Linux 8 and 9, some of these commands have changed:

ifconfig - shows all IP information, note IP is referred to as inet address
dhclient - renews IP information on a machine set for DHCP
dhclient -r - releases IP information on a machine set for DHCP
dhclient -1 - tries once to get a lease

Notes:

You may need to be logged in as the root user (su) before you can run this command. Also, under later versions of Linux such as the Fedora cores, it is sometimes necessary to include the full path to this command..

/sbin/ifconfig