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-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)
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:
sv up SERVICES
โ start a service and re-start it as neededln -s /etc/sv/SERVICE /var/service/
โ configure a service to start at bootsv down SERVICES
โ stop a service and do not restart itrm /var/service/SERVICE
โ stop a service from 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 rubyists/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