shell Ubuntu update IP address
// shows the default gateway
ip route show default
// shows all of the IP configuration
ip addr show
// edit the IP configuration
cd /etc/netplan
ls
sudo nano /etc/netplan/00-installer-config.yaml
/*
// example
wifis:
wlan0:
dhcp4: no
addresses: [10.7.7.210/24]
routes:
- to: default
via: 10.7.7.1
nameservers:
addresses: [10.7.7.1, 192.168.0.1, 8.8.8.8]
*/
// exit and save
// apply the new IP configuration
sudo netplan try
sudo netplan apply
// verify the new IP configuration
ip addr show
// narrow down to lines containing "10.7"
ip addr show | grep 10.7
// confirm you can ping the gateway
ping 192.168.0.1Commands to view, update and verify the IP configuration on Ubuntu.
Updated: Thursday 17th September 2026, 09:33am
There are 0 comments
Comments are currently closed.