Skip to main content

One-Liners

Full System Updates on Ubuntu
apt update && apt dist-upgrade -y && apt autoremove --purge -y && apt autoclean && snap refresh
Update LXD Containers (Needs to be saved to Script)
#!/bin/bash
apt update
apt dist-upgrade -y
apt autoremove --purge -y
apt autoclean
snap refresh
for i in $(lxc ls -c ns --format csv | grep RUNNING$ | cut -f1 -d,); do
    lxc exec $i -- apt update
    lxc exec $i -- apt dist-upgrade -y
    lxc exec $i -- apt autoremove --purge -y
    lxc exec $i -- apt autoclean
done
Write random data to disk
dd if=/dev/urandom of=/dev/sd bs=4096 status=progress