$ timedatectl list-timezones
$ sudo timedatectl set-timezone Asia/Singapore
$ date
How to Fix ‘E: Could not get lock /var/lib/dpkg/lock’ Error in Ubuntu Linux
When trying to install components but saw this: E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
This may be some apt-get install process is happening:
$ sudo vi /etc/netplan/00-installer-config.yaml
$ cat /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
ethernets:
enp0s3:
dhcp4: true
enp0s8:
dhcp4: true
version: 2
$ sudo netplan try
This setting leads to VMs provisioned on VirtualBox like this:
It can ping Internet through NAT from Host laptop;
It has a potential static IP if you want
$ ip 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: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:4a:d7:4d brd ff:ff:ff:ff:ff:ff
inet 192.168.56.105/24 brd 192.168.56.255 scope global dynamic enp0s3
valid_lft 848sec preferred_lft 848sec
inet6 fe80::a00:27ff:fe4a:d74d/64 scope link
valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:36:40:11 brd ff:ff:ff:ff:ff:ff
inet 10.0.3.15/24 brd 10.0.3.255 scope global dynamic enp0s8
valid_lft 86048sec preferred_lft 86048sec
inet6 fe80::a00:27ff:fe36:4011/64 scope link
valid_lft forever preferred_lft forever