Void Linux Documentation

repository·master·Indexed 42 days ago

https://github.com/void-linux/void-docs

Official documentation for Void Linux, featuring the Void Linux Handbook for installing, configuring, and maintaining systems. Includes guides on Bluetooth setup, chroot environments using xvoidstrap and bubblewrap, virtualization with libvirt, and unprivileged LXC containers. Also contains the InfraDocs for managing project infrastructure.

Tokens
48K
Snippets
218
Records
331
Agent score
50%

What's inside Void Linux

  1. Alternative container technologies for Void Linux

    master

    Depending on your use case, other technologies may be more appropriate than manual chroots:

    • Flatpak: Best for running many applications (including graphical or proprietary ones) on both glibc and musl systems.
    • OCI Containers (Docker/Podman): Best for integrated, polished solutions. Void provides OCI containers that work with tools like docker or podman and do not require manual creation of a chroot directory.
  2. Understand the purpose of the Void Linux Handbook

    master
    The Void Linux Handbook is specifically designed to explain how to install, configure, and maintain Void Linux systems, and to highlight the differences between Void and other common Linux distributions. It is not intended to be an exhaustive guide for configuring general Linux software; for software-specific configuration, users should consult upstream documentation or the Arch Wiki.
  3. Check Void Linux base system requirements

    master

    Void Linux can run on low-powered hardware. Minimum recommended resources depend on the architecture and edition (glibc vs musl). Note that Xfce installation images require more resources than the base images.

    Minimum Recommendations:

    ArchitectureCPURAMStorage
    x86_64-glibcx86_64520MB700MB
    x86_64-muslx86_64520MB600MB
    i686-glibcPentium 4 (SSE2)520MB700MB

    Architecture Support:

    • Supported: x86_64, i686, aarch64, armv7l, and armv6l.
    • Editions: Both glibc and musl are available on all architectures except i686 (which only supports glibc).
    • Not Supported: i386, i486, or i586 architectures.

    Warning: If installing the musl edition, review the musl documentation first to understand software incompatibilities.

  4. Understand runit service directories

    master

    Each service managed by runit is defined by a service directory. At a minimum, a service directory must contain an executable named run which executes the process in the foreground.

    Optional components include:

    • check: An executable run to verify if the service is available (exiting with 0 indicates success).
    • finish: An executable run when the service is shut down or the process stops.
    • conf: A configuration file containing environment variables to be sourced and referenced in the run script.
    • log/: A directory containing a run process that acts as a logging facility, receiving the output of the main service's run process via a pipe.

    When a service runs for the first time, a supervise folder is automatically created in the directory.

  5. Interpret command prompt symbols in documentation

    master

    When reading commands in the Void Linux documentation, use the following prefix symbols to identify the required user context:

    • $ : Run the command as a normal user.
    • # : Run the command as root.

    Lines following these symbols that do not start with a prefix are typically the example output of the command.

  6. Compare NVIDIA Optimus switching methods

    master

    Void Linux supports several mutually exclusive methods for managing NVIDIA Optimus configurations:

    MethodSupported DriversUsage PatternNotes
    PRIME Render Offloadnvidia, nvidia470prime-run <app>Flexible; power saving depends on hardware (pre-Turing devices may not shut down completely).
    RandR 1.4 Offloadingnvidia, nvidia470, nvidia390At X session startLess flexible; allows complete shutdown of NVIDIA GPU to save power.
    Bumblebeenvidia, nvidia470, nvidia390optirun <app>Unofficial; poor performance.
    Nouveau PRIMEnouveauDRI_PRIME=1 <app>Uses open source driver; poor performance.
  7. Harden the kernel with init_on_alloc and init_on_free

    master

    Void Linux enables init_on_alloc by default for kernels 5.4 and greater. This provides security with minimal performance impact (<1%).

    • init_on_alloc: Enabled by default. Disable via kernel command line with init_on_alloc=0.
    • init_on_free: Provides more security but has a higher performance cost (~5%). Enable manually via kernel command line with init_on_free=1.

    Legacy kernels (< 5.4): Use slub_debug=P page_poison=1 for similar hardening, though this has a higher performance impact.

  8. Understand musl support in Void Linux

    master

    Void Linux officially supports the musl libc implementation across all target platforms (except for i686, where binary packages are unavailable). For most compatible packages in the official repositories, musl-linked binaries are provided alongside their glibc counterparts.

    Note the following repository availability for musl:

    • Supported: Official repositories (musl-linked binaries), nonfree sub-repository, and debug sub-repository.
    • Not Supported: There is currently no multilib sub-repository for musl.