Customize & modules
Install software, keep your changes and make your own Slax modules or ISO.
Customize Slax
Even when Slax starts from a read-only CD or ISO, its running root filesystem is writable. You can install applications, edit settings and make yourself at home. OverlayFS stores your modifications in a writable layer above the compressed system modules.
A persistent session keeps that layer for the next boot. Without persistence, changes stay in memory; you can save them as a module before shutting down. The session guide explains the storage choices.
Adding software with apt
The application launcher provides one-click installation for its optional apps. For other software, use
apt in a terminal. Refresh the package list, search for a name if necessary, then install
the package you want:
apt update apt search vlc apt install vlc
Apt downloads the application and its required dependencies. An internet connection is needed. Keep using
the same persistent session to retain the installed software after a restart. If the package list is
old or missing, run apt update again before installing.
Adding software manually
You can also compile software from source. Install build-essential for a compiler, make and
the basic development tools, plus any development libraries required by the application. Install
git if you need to clone a source repository.
apt update apt install build-essential git
Compiled software follows the same persistence rules as installed packages: use a persistent session, or save the changes you want to keep into a module.
Making your changes permanent
If you selected a writable persistent session, Slax is already saving your system changes. For a portable
snapshot, or when working without persistence, use savechanges to create a compressed
.sb module:
savechanges /tmp/99-my-changes.sb
This captures the current writable layer, including installed applications and configuration, while excluding predefined temporary files, caches, logs and runtime mounts. It does not copy every base system file or files stored on separately mounted drives.
The example writes to /tmp, which is temporary. Copy the resulting module to a writable drive
before shutting down, or include it in a new ISO as described below.
Adding modules at the next boot
Place additional .sb files in /slax/modules/ within the Slax directory you boot
from. At the next startup, Slax finds them and adds them to its OverlayFS root. Use distinct filenames;
higher numeric prefixes take priority when modules contain the same path.
On a USB prepared by copying the Slax folder, you can copy a module directly into that folder. From the running system, the usual path for that setup is:
mkdir -p /run/initramfs/memory/data/slax/modules cp /tmp/99-my-changes.sb /run/initramfs/memory/data/slax/modules/
After a normal shutdown and restart, the module is included. Remove its file from that directory to
leave it out of the following boot. Module layers are not added or removed inside a running Slax session;
applications can still be installed immediately with apt.
A USB written directly from the ISO has a read-only system partition, just like a CD/DVD. To add modules there, first create a new ISO containing them, then write that image to the USB. Alternatively, use the graphical installer for editable system files.
genslaxiso /tmp/my-slax.iso /tmp/99-my-changes.sb
genslaxiso recreates the BIOS/UEFI hybrid image with the supplied modules and boot files.
It leaves saved sessions out of the ISO. Export changes with savechanges first when you want
to include them. Save the resulting ISO outside temporary storage before shutting down.
Working with modules
Use sb2dir to examine or modify a module. With one argument it replaces the module file with
a directory of the same name, mounted in memory. dir2sb converts that directory back into
a compressed module. rmsbdir unmounts and removes the temporary directory if you no longer need it.
| Command | What it does |
|---|---|
apt search keyword | Search for available packages. |
apt install package | Download and install a package and its dependencies. |
savechanges target.sb | Save the current writable layer as a module, excluding temporary and runtime data. |
sb2dir module.sb | Replace the module file with an editable in-memory directory. |
dir2sb module.sb | Replace that directory with a compressed module file. |
rmsbdir module.sb | Unmount and remove the editable module directory. |
slax list | List the modules mounted in the current system. |
genslaxiso target.iso module.sb | Create a bootable ISO with an additional module. |
The .sb suffix on a directory tells dir2sb to pack its contents at the module’s
root. Repacking without a separate output filename replaces the source directory, so keep a copy if
you want to continue editing it.
Example: make a module with a new wallpaper
Slax reads its default wallpaper from /usr/share/wallpapers/slax_wallpaper.jpg. Build a small
directory tree with a replacement at that path, then turn it into a module:
# Create a temporary module directory with the .sb suffix mkdir -p /tmp/99-wallpaper.sb/usr/share/wallpapers # Supply your own JPEG cp /path/to/new_wallpaper.jpg /tmp/99-wallpaper.sb/usr/share/wallpapers/slax_wallpaper.jpg # Replace the directory with a compressed module file dir2sb /tmp/99-wallpaper.sb
Copy /tmp/99-wallpaper.sb into the booted Slax directory’s modules/ folder, or
pass it to genslaxiso. The replacement is available at the next boot.
Example: add Firefox to Slax
Start without a saved session if you want the module to contain just this installation rather than your
other accumulated changes. The Firefox package is called firefox-esr:
apt update apt search firefox apt install firefox-esr # Save the installed browser into a module savechanges /tmp/99-firefox.sb # Create a new ISO containing it genslaxiso /tmp/slax-with-firefox.iso /tmp/99-firefox.sb
On a writable drive prepared with Slax Installer, copy 99-firefox.sb into its /slax/modules/ folder
instead. Firefox will be part of the system on the next boot. To keep it only in your own persistent
session, installing it with apt is enough; no module is required.