Network Configuration consists of methods to change the network settings, policy, and control flow. By default, any new device connected to the internet will have a Dynamic IP Address. However, the dynamic IP can be changed into a static IP address.
In this article, we will discuss the process of configuring our network settings in Ubuntu 22.04.
How to Configure Network Settings in Ubuntu 22.04?
Ubuntu uses the same policy when the new device connects to the internet, but we can change the network configuration i.e. change the IP Address from DHCP to Static i.e. manual. To make changes in the Network Configuration, use the following two methods:
- Configuring Network Settings Using the CLI.
- Configuring Network Settings Using GUI.
Depending on your ease, any of the methods can be used to configure your network settings.
Method 1: Configuring Network Settings in Ubuntu 22.04 Using CLI
To configure your network settings using the CLI, follow the steps depicted below.
Step 1: Check your current IP Address
To check the IP that is assigned by the Router to your device, run the command below in the terminal:
The details of your IP can be seen on your terminal, and your assigned IP will be in front of the “inet” statement:
The current IP is “192.168.130/24”. It can vary and will be different for your system.
Step 2: Editing the Connection
To configure and edit our connection settings, use the NMTUI Network Manager. Run the command below to open up the NMTUI Network Manager Menu:
Once the command executes, the NMTUI Menu appears:
Select the “Edit a Connection” option and hit “Enter”:
Once you hit Enter, a new window pops up asking you to select the type of connection. Select your connection type and then select the “Edit” option:
In the “Edit Connection Menu”, the configurations are set to “Automatic” by default:
Step 3: Configuring the IP Address
Navigate to the “IPv4 Configuration” using the Tab Key and then select it by pressing Enter:
Among the available options of configurations, select “Manual”:
Select “Show” to display the details of your configuration:
In the details menu, it asks for you to add the configuration details:
Add the Address, DNS Server Address, and the Gateway:
You can change the addresses according to your requirements. Once added, scroll down and select “OK”:
Step 4: Activate the Connection
Apply the settings and go back to the Home Menu. Select the “Activate a Connection” option:
Select your connection type and then “Deactivate” your connection:
Once deactivated, select the “Activate” option again to restart your connection:
Quit the Menu once the connection restarts and then Quit the “Network Manager”:
Step 5: Verifying Changes
Verify your changes by typing in the command below:
Here you can see your system IP has changed from Dynamic to Static:
This is how you can change your network IP Address from dynamic to static using the Command Line Interface.
Method 2: Configuring Network Settings in Ubuntu 22.04 Using GUI
To change the Network Settings, i.e. the IPv4 Connection from DHCP to Static, click on the “Network Icon” in the top-right corner of the Ubuntu Home Screen:
In the drop-down menu, click on “Settings”:
In the settings window, click on the “Network” tab:
Among the available network options, click on the “Settings” icon that appears next to your internet connection:
Upon clicking the settings icon, the Details of your network will appear:
Click on the IPv4 Tab:
In the IPv4 Settings Menu, you can see the Connection Method is set to Automatic (DHCP):
Select the “Manual” Option to change your Network Configuration Settings manually i.e. changing it to static:
Once Manual is selected, the Address Detail Boxes appear:
Enter the “IP Address” in the Address Box, “Netmask” and the “Default Gateway” in Gateway. Click on “Apply” once the addresses are entered:
To verify the changes, open the Network Settings again and you can see the IP Addresses are changed from DHCP to Static:
In this way, you can change your network IP Address from dynamic to static using the Graphical User Interface.
Conclusion
Network Settings can be changed or managed in Ubuntu 22.04 either by using the Command Line or the Graphical User Interface. With Network Configuration we can change the Network settings as well as the Policy and Control Flow. This article showcases the procedure for changing and configuring the Network Settings in Ubuntu 22.04, i.e. changing the Network Connection Method from DHCP (Automatic) to Static (Manual).