Setting Up Static IP Address on Ubuntu 22.04 LTS

Static IP address is a type of address that cannot be changed over the internet and remains the same. Dynamic addresses, however, may change over time. The Static IP address is used for communication over the internet and access programs remotely. In Ubuntu 22.04, you can set a Static IP address using a command-line interface or default System Settings.

We will demonstrate the procedure for setting Static IP Address on Ubuntu 22.04:

  • Using command line
  • Using Default System Settings

Let’s get started!

Method 1: Set up Static IP Address Using Command Line

Follow the instructions provided below to configure a static IP address on Ubuntu 22.04 using the command line.

Step 1: Check Current IP Address

First, open up the terminal using “CTRL+ALT+T” and execute the “ip” command with “a” option to check the current IP address of the system:

$ ip a

The given output indicates that our current IP address is “”:

Step 2: Open Network Manager

Open up the Network Manager User Interface with the help of the given command:

$ nmtui

Step 3: Set New Static IP Address

After opening the Network manager, the “NetworkManager TUI” window will appear on the screen. Remember to use the “Arrow” keys to choose between the options. First, select the “Edit a connection” option and hit the “Enter” button:

Next, use the “Arrow” keys to select the “Edit” option, and press the “Enter“ key:

Upon doing so, the “Edit Connection” window will be displayed on the screen. Choose the “IPv4 CONFIGURATION” option and press “Enter”:

Select the “Manual” option from the drop-down menu:

Use the right arrow key, and hit the “Show” option:

Click on the “Add” option to set the Static IP address for your Ubuntu 22.04 system:

Add a “Gateway” address or default system address of your device and specify the “DNS servers” according to your desire:

After that, use the down arrow key and click on the “OK” option:

Select the “Activate a connection” option and hit the “Enter” key:

Next, use the right arrow key and refresh the connection. To do so, select the “Deactivate” option to deactivate the connection:

Then, activate it again by selecting the “Activate” option, and that’s it:

Let’s move to verify the Static IP address changes.

Step 4: Verify Static IP Address Settings

Verify the set Static IP address by checking the system IP:

$ ip a

As you can see, “” is set as the Static IP address for our Ubuntu 22.04 system:

Let’s check out the connection of the new Static IP address with the network by using the “ping” command:

$ ping -c 3

Want to set up Static IP address using GUI? Have a look at the following section!

Method 2: Setting up Static IP Address Using Default System Settings

To set a Static IP address on Ubuntu using default System Settings, check the below-given instructions.

Step 1: Open System Settings

Search for “Settings” in the “Activities” menu and open it:

Step 2: Open Network Settings

From the “Settings” menu, select the “Network” option. After that, click on the “gear” icon next to the wired connection:

Here, you can see the automatically assigned address from the router:

Step 3: Set Static IP Address

Switch to the “IPv4” tab and click on the “Manual” option as shown in the below-given image:

Next, set the Static IP address in the “Address” menu. Also, add Netmask default value “” and provide the System Gateway or router address.

Note: Remember that you can change the only host id (last three digits) of the IP address, and the Gateway Address remains the same; you cannot change it:

Next, refresh the connection by enabling and disabling the highlighted connection toggle:

That’s it! On Ubuntu 22.04, we have successfully set the Static IP Address using Default System Settings:

We have completely demonstrated all the possible methods to set up a Static IP address on Ubuntu 22.04.


On Ubuntu 22.04, to set up a Static IP address, first, open up the Network Manager Text User interface using the “$ nmtui” command on the terminal. Then, edit the connection, set up a Static IP address, and activate it on the network. Default System Settings can also be used to set a Static IP address. We have illustrated the procedure for setting up a Static IP address with the help of the command line and GUI on Ubuntu 22.04.