The main headache of today is installing and running the latest version of Ubuntu Lts in a VMware. Since Ubuntu version 18.04 (maybe from 17.10), there are no /etc/network/interfaces and net-tools with the usual ifconfig and route commands. They were replaced by netplan and iproute2.
Now this is what network configuration looks like:
alex@ubuntu-server-lts:~$ ip -c addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:0c:29:28:ef:9a brd ff:ff:ff:ff:ff:ff
inet 192.168.15.129/24 brd 192.168.15.255 scope global dynamic ens33
valid_lft 1575sec preferred_lft 1575sec
inet6 fe80::20c:29ff:fe28:ef9a/64 scope link
valid_lft forever preferred_lft forever
alex@ubuntu-server-lts:~$ ls /etc/netplan
00-installer-config.yaml
alex@ubuntu-server-lts:~$ cat /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
ethernets:
ens33:
dhcp4: true
addresses: []
optional: true
version: 2
In this case the ip-address is received from dhcp. For now to set the ip-address, you need to write something like:
ip addr add 192.168.0.77/24 broadcast 192.168.0.255 dev eth0
for to make changes available after a reboot, edit the yaml file in the /etc/netplan directory and apply the changes with the command
sudo netplan apply
By the way you can test changes before committing with the command
sudo netplay try
in this case, the system will wait for 2 minutes for confirmation, and then return the old settings. It is useful for configure remote servers.
I’m not used to the new ip something
commands yet and use the tips from the article “Тяжелое расставание с Net-Tools”.