
This cheatsheet collects commands and tools you might find useful when starting out with Void Linux. This guide will be updated as I learn .
ยงXBPS Package Manager
The Void package manager is XBPS โ the X Binary Package System. It was written from scratch for use with Void. Common commands:
xbps-install -Su
โ update the systemxbps-install PACKAGE
โ install PACKAGExbps-install -A
โ install a package temporarily, for evaluation. this package and its dependencies will be removed whenxbps-remove -o
is runxbps-query -Rs QUERY
โ search repositories for packagesxbps-query -f PACKAGE
โ list files provided by PACKAGExbps-query -l
โ list all packages with versions and descriptionsxbps-query -l | cut -d " " -f 2 | sed "s/^\(.*\)-.*$/\1/"
โ list all package names (might want to alias this)xbps-remove -R PACKAGE
โ remove a package and any of its dependendcies that are no longer neededxbps-remove -Oo
โ remove orphan packages and clean the cache. will also remove packages installed withxbps-install -A
Install xtools
for additional tools:
xlocate -S | QUERY
โ search for paths within all packages. Useful to find which package a command is in, etc.- Run
xlocate -S
first to cache package data. Run occasionally to keep the cache updated - Use like
xlocate /usr/bin/dig
. Absolute paths work best;xlocate npm
returns 2716 results,xlocate /usr/bin/npm
returns one.
- Run
xcheckrestart [-v]
โ XBPS does not restart services when they're updated. Run this to check for services that need to be restarted.
ยงService Management
Services are managed with the sv
command. Usage examples:
ln -s /etc/sv/SERVICE /var/service/
โ start a service now and configure it to start at bootrm /var/service/SERVICE
โ stop a service now and prevent it from starting at bootsv up SERVICES
โ start a service now and re-start it if it stops, but don't configure it to start at bootsv down SERVICES
โ stop a service now and do not restart it. doesn't prevent a service from re-starting at bootsv restart SERVICES
sv status SERVICES
ls /var/service
โ contains symlinks for all running servicessv s /var/service/*
โ show status of all running services
Install sv-helper for some additional tools:
sv-list
โ list all available servicessvls SERVICE
โ likesv-list
but you can limit output to a single SERVICEsv-enable SERVICE
โ enable a service to start at boot, and start it nowsv-disable SERVICE
โ stop a service from starting at boot, and stop it now
ยงManaging old kernels
Old kernels are not removed when new ones are built, to allow you rollback to previous versions. This will eventually cause your /boot
partition to run out of space, causing update errors and kernel panics.
You can manage old kernel versions using vkpurge
:
vkpurge list
โ list unused, removable kernelsvkpurge rm all
โ remove all removable kernelsvkpurge rm '2.6.*' 4.3.4_1
โ remove all removable kernels matching a pattern, and remove a specific version