GTKC Knowledgebase
A little bit of wisdom
Void Linux tips
Posted by  Admin on



Update a system:
xbps-install -Su

Passing 'y' (-Syu) will answer yes to all questions.

Package management:

To search available repositories for packages, use xbps-query(1):

xbps-query -Rs search_pattern

The -R flag specifies that repositories should be searched. Without it, -s searches for locally-installed packages.

To get a list of all installed packages, without their version:

xbps-query -l | awk '{ print $2 }' | xargs -n1 xbps-uhelper getpkgname

Query manually installed packages:

xbps-query -m

To get a list without versions use sed/awk or xpkg from the xtools package: xpkg -m

Remove / uninstall a package and all its dependencies that aren't required by other packages

xbps-remove -R packagename

-R = recursive

Remove orphaned packages and clean cache. (this can be split into two commands, see below)

xbps-remove -Oo

Clean package cache:

xbps-remove -O

Remove orphans:

xbps-remove -o

A list of available packages can be found in the Void repository: Void package repository

Install / create and manage services:

Create the service in /etc/sv/servicename

Create a startup script and make it executable /etc/sv/servicename/run

Run example (this is for YMPD, an MPD client)

#!/bin/sh
#
[ -r conf ] && . ./conf
exec /usr/bin/ympd --user mpd --webport 8080 --host 127.0.0.1 --port 6600 ${OPTS:-}

To enable it at boot create a symbolic link

ln -s /etc/sv/servicename /var/service

To start a service:

sv start servicename

To stop a service:

sv stop servicename

Service status:

sv status servicename
System shutdown

I have found that unlike other Linux versions, shutdown now -h doesn't behave in the same way.

You need to simply type poweroff to shut the system down, and reboot to reboot.



Tags: Void , Linux

Return to home page: Home