Snippets for yer computer needs

Linux Distributions


Upgrading to new Fedora versions

sudo dnf upgrade --refresh
sudo dnf install dnf-plugin-system-upgrade
sudo dnf system-upgrade download --refresh --releasever=33

Building live images

# Install the tooling
sudo dnf install livecd-tools spin-kickstarts
# Kickstart files are located in /usr/share/spin-kickstarts

# Build the ISO
sudo livecd-creator --verbose \
--config /path/to/kickstart/file.ks \
--fslabel Image-Label \
--cache /var/cache/live

# Test on KVM
sudo qemu-kvm -m 2048 -vga qxl -cdrom filename.iso


Building AMIs


Uses /etc/nixos/configuration.nix for machine config

nixos-rebuild to use it

nix-channel handles the repositories


# auto upgrade system
system.autoUpgrade.enable = true;

NixOS containers

As of 2019-01-04, “NixOS containers are not perfectly isolated from the host system. This means that a user with root access to the container can do things that affect the host. So you should not give container root access to untrusted users.” from

# Create a container
nixos-container create foo
# Run a container
nixos-container start foo


Package management

# Install a package
dpkg -i file.deb
# Remove a package
dpkg -r packagename
# Purge package (ie get rid of config files, too)
dpkg -p packagename

# Get list of packages on the system
dpkg -l
# List files in a package
dpkg -L packagename
# Get package information
dpkg -s packagename
# See what package provides a file
dpkg -S /path/to/file

# Reconfigure a package
dpkg-reconfigure packagename

# Update repo list
apt-get update
# Upgrade installed packages
apt-get upgrade
# Install a package
apt-get install packagename
# Remove a package
apt-get remove packagename

# Search for a package
apt-cache search KEYWORD
# See dependencies for a package
apt-cache depends packagename
# Get package version
apt-cache showpkg packagename


Default run level is 2


# Install a package
zypper install PACKAGE
# Search for a package
zypper search -t PACKAGE

Arch Linux

# Installing packages
pacman -S [package]



sudo apt update
sudo apt install -y --reinstall virtualbox-guest-x11