[Notes] Network Planning and Administration: Installing and Configuring Network Adapters
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