02.01.2026
Dedicated Servers Linux
Which linux command can you use to display or change ip configuration settings?
Remove an IP address
Replace IP address (common pattern)
sudo ip addr add 192.168.10.50/24 dev eth0
Add a default gateway
Replace default gateway (cleanly)
Add a static route
Persistent changes (recommended on desktops/servers)
If you use NetworkManager: nmcli
Best for Ubuntu Desktop, many RHEL-based desktops, and lots of cloud images.
Show connections
Set static IPv4 on a connection
If you use systemd-networkd: networkctl
Common on minimal servers.
Persistence is done by editing *.network files under:
/etc/systemd/network/
Legacy commands you’ll still see (but not preferred)
ifconfig (net-tools) — often not installed by default anymore
route — replaced by ip route
Practical takeaway
Display + change (modern standard): ip
Make it persistent (common): nmcli (NetworkManager) or systemd-networkd config
If you tell me your distro (Ubuntu/Debian/RHEL/Alma/etc.) and whether it’s server or desktop, I can give the exact persistent method you should use.
