The instruction from this link works to change from DHCP dynamic IP to static. But there's a step where it says:
You need to also remove the dhcp client for this to stick (thanks to Peter for noticing). You might need to remove dhcp-client3 instead.
And then:
sudo apt-get remove dhcp-client
Is that really necessary? If so why? Is there any other way without removing dhcp-client
?
No, you don't need to do that. Refer to this other answer on askubuntu site
I personally use the following bit of code in
/etc/dhcp/dhclient.conf
file on my home PC which has a USB wireless dongle attached to it:As you can see, the PC always asks for 192.168.0.222 address.
i have never removed the dhcp-client for a static lease. if you edit the interfaces file to make your eth0, or which eth you are configuring, static. It should work after a reboot or a network restart.
So imho no you don't have to remove it... hope it helps