How to Set a Static IP Address in Ubuntu Network Settings

By default, Ubuntu configures network adapters using DHCP (Dynamic Host Configuration Protocol), which automatically leases an IP address from your local router. While ideal for standard laptops moving between different Wi-Fi networks, a dynamic IP address can change unexpectedly. If you run local file shares, media servers, network printers, or remote SSH services, assigning a fixed static IP address ensures your Ubuntu machine remains reachable at the same address every time.

While server editions rely on Netplan configuration files in the terminal, Ubuntu desktop allows you to configure a permanent static IP address directly through graphical settings. Here is how to configure a static IP address using Ubuntu Network Settings.


Step 1: Check Your Current Network Details

Before entering manual network values, note down your current subnet range, default gateway (router address), and active DNS servers:

  1. Click the Quick Settings menu in the top-right corner of the Ubuntu desktop (the battery, volume, and network icons).
  2. Click the arrow next to your Wired or Wi-Fi connection and select Settings.
  3. In the Network window, click the gear (cog) icon next to your active connection.
  4. Under the Details tab, note your current IPv4 Address, Subnet Mask, Default Route (Gateway), and DNS.

Step 2: Assign a Static IPv4 Address

Once you have your network parameters ready, switch the connection mode from automatic to manual:

  1. In the connection settings dialogue, click on the IPv4 tab at the top.
  2. Under IPv4 Method, select Manual.
  3. In the Addresses row, fill in the three fields:
    • Address: Enter your chosen static IP address outside your router’s automatic DHCP pool (e.g. 192.168.1.150).
    • Netmask: Enter your subnet mask, typically 255.255.255.0 or prefix 24.
    • Gateway: Enter your router’s local IP address (e.g. 192.168.1.1).
  4. In the DNS section, switch the Automatic toggle to Off.
  5. Enter your preferred DNS provider in the text box (e.g. 1.1.1.1, 8.8.8.8, separated by a comma).
  6. Click the green Apply button in the top-right corner of the window.

Step 3: Restart the Network Adapter to Apply Changes

Network Manager requires a quick reconnect to release the DHCP lease and bind your new static IP address:

  1. In the Network Settings window, toggle the connection switch to Off.
  2. Wait two seconds, then toggle the switch back to On.
  3. Click the gear icon again and verify that the Details tab displays your new manual IPv4 address.
  4. Open your web browser and load any webpage to confirm active internet connectivity.

Tips to Avoid Network Conflicts

  • Check Router DHCP Range: Log into your home router’s admin panel and inspect its DHCP range. Set your static IP address outside that pool (e.g., if DHCP assigns 192.168.1.2 through 192.168.1.100, choose an address between 101 and 250) to prevent IP collisions with other devices.
  • Reverting to Automatic DHCP: If you take your laptop to a café or office, return to the IPv4 tab in Network Settings, select Automatic (DHCP), turn on automatic DNS, and click Apply.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.