Linux – Network Configuration (ip, route, dhclient, systemd-resolve, netplan)

Configuring Networking at the command line in Linux can be confusing. It’s important to know that you use many different application to manage networking and these applications may be different based on your distribution or version.

ifconfig – See IP address and Network Interface ID (deprecated, but works)

ip addr – See IP address and Network Interface ID

route -n – view default gateway

systemd-resolve –status – view DNS

sudo dhclient -v -r – DHCP release

sudo dhclient -v – DHCP renew

Set Static IP Address

  • Navigate to: /etc/netplan/
  • sudo vim file.yaml – edit thye file that ends in yaml
  version: 2
  renderer: networkd
      dhcp4: no
              addresses: [,]
  • sudo netplan apply – apply network changes

Be the first to comment

Leave a Reply