Configure static IP address in Fedora 39

Here is how to configure a static IP address in Fedora 39.

Configure static IP address in Fedora 39

Here is how to configure a static IP address in Fedora 39:

GUI

  1. Go to Settings > Network
    configure-static-ip-address-in-fedora-39-1
  2. Click on the gear icon at the right of Connected - 1000 Mb/s
    configure-static-ip-address-in-fedora-39-2
  3. Click on IPv4 tab in the dialog window
    configure-static-ip-address-in-fedora-39-3
  4. Select Manual and type your static IP address, network mask, and gateway in the Addresses section. Click on Apply to save changes and exit the window
    configure-static-ip-address-in-fedora-39-4
  5. To check everything is ok you can run ifconfig command from any terminal and you should see the IP address you just configured on the corresponding interface.
    configure-static-ip-address-in-fedora-39-5

Command line (Terminal)

  1. List the available connections and identify the name of the one you want to configure a static IP address on.
nmcli connection show

Example:

ghost@quieter3:~$ nmcli connection show
NAME                UUID                                  TYPE      DEVICE 
DEFCON_97235        1fb8ecc6-2713-47c3-9c63-8ceb91a8fff1  wifi      wlp3s0 
Wired connection 1  aad51190-2dc1-3501-aa8f-8e5b98d3fd9d  ethernet  --     

  1. Configure the static IP address withe the following command:
sudo nmcli connection modify "DEFCON_97235" ipv4.method manual ipv4.addresses 192.168.1.223/24 ipv4.gateway 192.168.1.1 ipv4.dns "192.168.1.1"

You will be promted for your password.
3. Reactivate the connection to apply the changes:

sudo nmcli connection up "DEFCON_97235"

Example:

ghost@quieter3:~$ sudo nmcli connection up "DEFCON_97235"
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/2)

That's it. You can run ip a to verify the changes have been applied.