Ubuntu Linux Release an IP Address ( DHCP IP )

Ubuntu Linux Release an IP Address ( DHCP IP )

To release an IP address that has been assigned to a Linux system using DHCP (Dynamic Host Configuration Protocol), you can use the dhclient command.

To release the current IP address, you can use the -r flag with the dhclient command. For example:

sudo dhclient -r
Source:w‮l.ww‬autturi.com

This command will send a request to the DHCP server to release the current IP address, and the DHCP client on the system will stop using it. Note that you will need to run this command with superuser privileges, which is why it is preceded by sudo.

After running this command, the system will no longer have an IP address assigned to it. If you want to obtain a new IP address from the DHCP server, you can use the dhclient command without any flags:

sudo dhclient

This will send a request to the DHCP server to obtain a new IP address, and the DHCP client will start using it once it has been assigned.

Keep in mind that releasing an IP address using dhclient only affects the IP address that has been assigned to the system through DHCP. If the system has a static IP address configured, it will not be affected by this command.

Created Time:2017-10-30 14:27:26  Author:lautturi