Skip to main content

One-Liners

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