System theme Light theme Dark theme

Final notes

Automating SSD trimming

You can easily automate SSD trimming, which will definitely help in boosting the performance of your disk. To begin, check if your SSD supports trimming in the first place:

lsblk --discard

If your SSD's DISC-GRAN and DISC-MAX columns are non-zero, then the trim command is supported.

For the trimming script, you need to be able to run scripts periodically as root; see Running superuser scripts periodically. Create file /etc/cron.weekly/fstrim with contents:

#!/bin/sh
fstrim /

Then make it executable with sudo chmod +x /etc/cron.weekly/fstrim.

Replace / with the mountpoint of your SSD partition; leave as is if your root is in an SSD itself.

You can add more fstrim commands if you have more than one partition in an SSD, but remember to make sure they're always mounted if you don't want the command to fail.

Keeping up-to-date

It is worth setting up some scripts to check and notify about updates, so your system doesn't become quickly outdated.

My setup is pretty simple; one script is set to run once a day and syncs the void repositories. The other one runs when you open a terminal, and it prints a message to notify that updates are available.

For the first script, you need to be able to run scripts periodically as root; see Running superuser scripts periodically. Create the file /etc/cron.daily/xbps-sync with contents:

#!/bin/sh
xbps-install -S

Then make it executable with sudo chmod +x /etc/cron.daily/xbps-sync. This will sync the repository daily.

Then, on your ~/.bashrc file, you can add the following:

# Check for updates.
xbps_check_updates=$(xbps-install -nu)
if [[ -n $xbps_check_updates ]]; then
    echo "There are updates available! Run sudo xbps-install -Su to update the system."
    echo "The following packages can be updated:"
    echo "$xbps_check_updates"
    echo ""
fi

Managing runit services

Void Linux uses runit to run services. If you followed the guides preceding this one, you've already interacted with it plenty of times.

Managing packages with xbps

The package manager in Void Linux is quite powerful. Here is a cheatsheet of commands that may be useful in keeping the installation clean:

You should definitely rummage through the Void Linux Handbook; it is more thorough than these guides and includes information about things I didn't bother to cover.

Beyond that, definitely feel free to look at all of the other guides in the repository if you feel like they're relevant to you.

Table of Contents