Configure static IP address in Fedora 39
Here is how to configure a static IP address in Fedora 39.
Here is how to configure a static IP address in Fedora 39:
GUI
- Go to Settings > Network
- Click on the gear icon at the right of
Connected - 1000 Mb/s
- Click on
IPv4
tab in the dialog window
- Select
Manual
and type your static IP address, network mask, and gateway in theAddresses
section. Click on Apply to save changes and exit the window
- 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.
Command line (Terminal)
- 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 --
- 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.