Assigning an IP address to an interface
Assigning a permanent IPv4 address is something that you will likely need to do on almost every server that you build. Luckily, it's pretty simple to do. In the new command set, we'll use the nmcli
command (Network Manager Command Line). We'll set the IP address, default gateway, and DNS server. Finally, we'll set the addressing mode to manual
. We'll display the network connections in nmcli
format:
robv@ubuntu:~$ sudo nmcli connection show NAME UUID TYPE DEVICE Wired connection 1 02ea4abd-49c9-3291-b028-7dae78b9c968 ethernet ens33
Our connection name is Wired connection 1
. We don't need to type this each time, though...