Topic: tech myref prev next
tech myref > Ubuntu Notes
setting up recent editions of Ubuntu
Ubuntu uses Netplan to define the configuration of the system’s network
interfaces. To enable Netplan, edit the file ‘/etc/netplan/local.yaml
’.
Here is an example Netplan configuration, which is encoded as a YAML file;
cat /etc/netplan/local.yaml
network:
version: 2
renderer: networkd
ethernets:
eno1:
addresses:
- 172.18.2.18/24
nameservers:
search: [lan]
addresses: [172.18.2.1]
routes:
- to: default
via: 172.18.2.1
An alternative, encapsulating the local configuration in a bridge. It is functionally equivalent to the basic config above;
network:
version: 2
renderer: networkd
ethernets:
eno1:
wakeonlan: true
bridges:
br2:
interfaces: [eno1]
addresses: [172.18.2.31/24]
nameservers:
search: [lan]
addresses: [172.18.2.1]
routes:
- to: default
via: 172.18.2.1
Another example, now encapsulating the IP interface inside a VLAN interface.
Install the vlan
package (‘sudo apt install vlan
) before using this config;
network:
version: 2
renderer: networkd
ethernets:
eno1:
wakeonlan: true
bridges:
br2:
interfaces: [vlan.2]
addresses: [172.18.2.31/24]
nameservers:
search: [lan]
addresses: [172.18.2.1]
routes:
- to: default
via: 172.18.2.1
vlans:
vlan.2:
id: 2
link: eno1
Netplan config can be edited, then applied without a reboot, as follows;
sudo netplan generate
sudo netplan --debug apply
Create a network bridge, and move the local, static IP address to it. Then, add the local network interface to the bridge. Additional local interfaces, such as virtual machines and other physical network adapters, can be added to the bridge.
sudo brctl addbr br0
sudo ip addr del local 172.18.2.31/24 dev eno1
sudo ip addr add local 172.18.2.31/24 dev br0
sudo brctl addif br0 eno1
sudo ip link set br0 up
sudo ip route add 0.0.0.0/0 via 172.18.2.1
sudo resolvectl dns br0 172.18.2.1
Recent versions of Ubuntu install Firefox as a Snap package. There are some
teething problems with Snap applications, so installing Firefox through apt
is sometimes preferred.
Remove the Snap package and the apt
redirect package;
sudo snap remove firefox
sudo apt remove firefox
Add the Mozilla PPA;
sudo apt-add-repository ppa:mozillateam/ppa
Edit ‘/etc/apt/preferences.d/mozillateamppa
’ and add;
Package: firefox*
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 501
Install the apt
package;
sudo apt install firefox
Edit .config/darktable/darktablerc
and add the following line;
plugins/darkroom/clipping/extra_aspect_ratios/passport=35:45
pdf2ps myfile.pdf - | psbook | psnup -s1 -2 | ps2pdf - myfile_booklet.pdf