Warning: THE VOID WIKI IS DEPRECATED. It is no longer being maintained, contains outdated and incorrect information, and will eventually be shut down. Please refer to the Void Handbook, https://docs.voidlinux.org/, for the official documentation. If you can't find the information you're seeking, please raise an issue at https://github.com/void-linux/void-docs/issues

User:Rdeckard/Post installation

From Void Linux Wiki
Jump to navigation Jump to search


If you have a wireless connection, create the following file:


Then connect to a wifi network with:

# wpa_supplicant -B -i interface -c /etc/wpa_supplicant/wpa_supplicant.conf
# wpa_cli
> scan
> scan_results
> add_network
> set_network 0 ssid "SSID"
> set_network 0 psk "passphrase"
> enable_network 0
> save_config
> quit

Now add the dhcpcd hook for wpa_supplicant:

# ln -s /usr/share/dhcpcd/hooks/10-wpa_supplicant /usr/lib/dhcpcd/dhcpcd-hooks/

For both wired and wireless connections, enable the dhcpcd service.

Tip: To generate a minimal configuration for an SSID and passphrase already known use wpa_passphrase SSID passphrase. Then add to the wpa_supplicant configuration file.

Time synchronization

Enable the ntpd service and mark it down by default.

Add it as a dhcpcd hook:

sv start ntpd

DNS resolver

Install the unbound package.

Set your DNS server to


Ensure that dhcpcd won't overwrite it:

nohook resolv.conf

Add the following configuration file for unbound. It includes DNSSEC, root hints, and ad blocking. Add the IP addresses of DNS servers where indicated.


  username: unbound
  pidfile: "/etc/unbound/unbound.pid"
  directory: "/etc/unbound"

  trust-anchor-file: "/etc/unbound/root.key"
  root-hints: "/etc/unbound/root.hints"
  include: /etc/unbound/ads.conf

  do-not-query-localhost: no
    name: "."
    forward-addr: dns_ip_addr1
    forward-addr: dns_ip_addr2

Update the trust anchor file:

# unbound-anchor -a /etc/unbound/root.key

Update the root hints file:

# curl -o /etc/unbound/root.hints https://www.internic.net/domain/named.cache

Update the ad blocking file:

# curl https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts | awk '/^0\.0\.0\.0/ {print "local-zone: \""$2"\" redirect\nlocal-data: \""$2" A\""}' > /etc/unbound/ads.conf
Tip: Put the above commands in a cron job to regularly update the files.

Enable the unbound service, mark it as down by default, and then add it as a dhcpcd exit hook.


$ unbound-host -C /etc/unbound/unbound.conf -v sigok.verteiltesysteme.net

The first output line should be something like the following. Note the word "secure".

sigok.verteiltesysteme.net has address (secure)
$ unbound-host -C /etc/unbound/unbound.conf -v sigfail.verteiltesysteme.net

The first output line should be something like the following. Note the word "BOGUS".

sigfail.verteiltesysteme.net has address (BOGUS (security failure))

Setup cron

Install cronie, postfix, and s-nail.

Setup postfix for local mail only. Append the following to the specified file.

myhostname = localhost
mydomain = localdomain
mydestination = $myhostname, localhost.$mydomain, localhost
inet_interfaces = $myhostname, localhost
mynetworks_style = host
default_transport = error: outside mail is not deliverable

Edit your crontab to mail cron output to your user:

# crontab -e

Enable cronie and postfix.

To access output from cron:

$ mail