One-Liners
Full System Updates on Ubuntu
apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y && apt-get autoremove --purge -y && apt-get autoclean && snap refresh
Update Ubuntu LXD Host & Containers (Needs to be saved to Script)
#!/usr/bin/env bash
# Update host system
env DEBIAN_FRONTEND=noninteractive apt-get update --allow-releaseinfo-change
env DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y
env DEBIAN_FRONTEND=noninteractive apt-get autoremove --purge -y
env DEBIAN_FRONTEND=noninteractive apt-get autoclean
snap refresh
# Update LXD Containers
for i in $(lxc ls status=running -c n --format csv); do
lxc exec $i --env DEBIAN_FRONTEND=noninteractive -T -- apt-get update --allow-releaseinfo-change
lxc exec $i --env DEBIAN_FRONTEND=noninteractive -T -- apt-get dist-upgrade -y
lxc exec $i --env DEBIAN_FRONTEND=noninteractive -T -- apt-get autoremove --purge -y
lxc exec $i --env DEBIAN_FRONTEND=noninteractive -T -- apt-get autoclean
lxc exec $i -T -- bash -c "hash snap 2>/dev/null && snap refresh"
done
Write random data to disk
dd if=/dev/urandom of=/dev/sd bs=4096 status=progress