If you’re using Ubuntu Dekstop on your laptop or a desktop, and one day you decided to change the IP address of your machine from automatic (DHCP) to static configuration. how do you achieve that?
In this blog lets discover, How to configure the Static IP in Ubuntu using GUI for both wired and wireless networks.
And I am using my laptop running Ubuntu 20.04 in it. The steps mentioned here are similar on the ubuntu version other versions of ubuntu GUI as well. So let’s get started.
How to change static IP in Ubuntu ?
The easiest and better way is via GUI. But you can also make changes via CLI as well which I covered here using netplan.
Configuring the static IP in Ubuntu wired using GUI
Goto right top corner, and click on the network icon and from the drop-down list, expand Wired Connected, and click on wired settings.
The network configuration wizard now pops up.
Click on the gear icon, this will open the network configuration.
Under the Details tab, you can see the current network configuration, as you can see my current DHCP IP address is 192.168.0.71.
I need to change that now so click on the IPv4 tab.
Under IPv4 you can see the automatic (DHCP) is selected.
Select manual and change the IP address to what you wanted to configure, in my case I am going to configure
IP address as 192.168.0.100
And the DNS is 188.8.131.52, 184.108.40.206
Click on Apply.
Once you click on Apply you now will be back to the network configuration settings, click on the switch to turn the wired connection off and turn it back on. Then click on the gear icon again.
You should now be able to see the new network configurations applied.
Configure static IP for Ubuntu WiFi.
Changing the ip address in ubuntu wifi is not different then wired.
Click on the right top corner, instead of selecting the wired select wireless this time.
And click on Wi-Fi settings.
I am now connected to a wifi network, click on the gear icon here.
This should open up the network IP configuration on Ubuntu.
Click on IPv4 tab, and you can see the current configuration is Automatic (DHCP)
To change it to static, select Manual and configure the IPv4 address, its netmask and the gateway.
Then click on Apply.
You are now back to the wifi configuration page, click on the wifi switch to turn it off.
And turn it back on again, to make the changes affect. You may now click on the gear icon see the IP configureations.
As you can see the IP address has been changed to the one which we configured.
One of the benfit of configuring the static IP is that, every time when you reboot the PC, its IP will never change.