[Notes] Network Planning and Administration: Installing and Configuring Network Adapters

Miguel Menéndez

Installation and configuration of network adapters.

To view DNS on older GNU/Linux:

$ cat /etc/resolv.conf

On current GNU/Linux:

$ systemd-resolve --status

(last lines)

On GNU/Linux, when the net-tools package is not installed and there is no way to install it:

See network adapters:

$ ip link

View IP:

$ ip addr | grep 'inet '

See gateway and metrics (the lower the metric, the higher the priority):

$ ip route

Configure network in GNU/Linux (if netplan)

# nano /etc/netplan/???.yaml

⚠️ Use blank spaces, not tabs!

Where says

network:
 ethernets:
  ens33:
   addresses: []
   dhcp4: true
 version: 2

Should say

network:
 ethernets:
  version: 3
  ens33:
   dhcp4: false
   addresses: [192.168.241.20/24]
   gateway4: 192.168.241.2
   nameservers: [1.1.1.1, 8.8.8.8]
# netplan generate
# netplan apply

See also

Comments

Found a bug? Do you think something could be improved? Feel free to let me know and I will be happy to take a look.