Ubuntu Linux Release an IP Address ( DHCP IP )

last updated in Categories

How can I release an IP in Ubuntu Linux using command line options?

You need to simply type the following command. First, explicitly releases the current lease, and once the lease has been released, get the new IP:

sudo dhclient -r
sudo dhclient

Open a command-line terminal (select Applications > Accessories > Terminal), and then type:

sudo dhclient -r
sudo dhclient eth0

The above will release the eth0 interface IP and assigned it again. For a wireless interface called wlan0, try:

sudo dhclient -r
sudo dhclient wlan0

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

1 comment

    Have a question? Post it on our forum!