Monitor IO disk utilization

Install sysstat package:

sudo dnf install sysstat -y

Install ttyplot to plot data and kazy to extract data with grm

grm install jsnjack/kazy-go
grm install tenox7/ttyplot==1.6.1 -n ttyplot -l

Check available disk partitions with df command. nvme0n1 is used in example:

iostat -dx 1 | kazy -i nvme0n1 | kazy -r -x "[\d.]*$" | ttyplot -s 100
| 10 May 2022

Remove unused runtimes in flatpak

flatpak uninstall --unused

Maintenance commands for flatpak:

flatpak update && flatpak uninstall --unused
| 30 Apr 2022

Find out the filesystem type

df -Th
| 28 Apr 2022

lxd: Manually remove lvm storage pool

lvremove /dev/default/LXDThinPool

To list all lvm pools:

lvdisplay
| 22 Apr 2022

Do I need to restart after dnf update?

Reboot is needed if one of the following packages was updated:

kernel
glibc
linux-firmware
systemd
dbus

There is an application to easily check it:

sudo dnf install yum-utils
needs-restarting -r
| 22 Apr 2022

Establish SSL connection with openssl using custom CA bundle

openssl s_client -verify_return_error -CAfile ats_certs.pem -showcerts -connect www.zilverenkruis.nl:443 -servername www.zilverenkruis.nl
| 21 Apr 2022

curl: Request URL via proxy

It is possible to request a URL in curl via proxy server using -x flag:

curl -x http://127.0.0.1:8080 https://google.com

This will send CONNECT request to your proxy server 127.0.0.1:8080. CONNECT request will ask proxy server to tunnel TCP connection to the destination. This means that, for example, proxy server won’t verify SSL certificate.

To force curl to send regular GET request, use the following command:

curl --request-target https://google.com -x 127.0.0.1:8080 127.0.0.1:8080
| 21 Apr 2022

No sound in Fedora after sleep

If you have no sound after the system comes back from sleep, try to run this command:

sudo systemctl start systemd-suspend
| 28 Mar 2022

Disable USB device

To disable USB device (audio device from Dell WD-19TB dock station in the example) when connecting it to your laptop, find it’s ids:

sudo lsusb -v

For example:

...
Bus 005 Device 007: ID 0bda:402e Realtek Semiconductor Corp. USB Audio
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0bda Realtek Semiconductor Corp.
  idProduct          0x402e 
  bcdDevice            0.01
  iManufacturer           3 Generic
  iProduct                1 USB Audio
  iSerial                 2 200901010001
...

Save idVendor and idProduct values.

Create new file /lib/udev/rules.d/90-delldock.rules with the following content:

ACTION=="add", ATTR{idVendor}=="0bda", ATTR{idProduct}=="402e", RUN="/bin/sh -c 'echo 1 >/sys/\$devpath/remove'"

When the device is connected it will be automatically removed and your system won’t know about it

| 18 Mar 2022

Do not start LXD containers on boot

For all newly created containers:

lxc profile set default boot.autostart=false

Or for existing container:

lxc config set <container_name> boot.autostart false
| 28 Feb 2022