66 is a collection of system tools built as a wrapper around the
s6 supervision suite and
s6-rc service manager created to make the implementation and manipulation of service files easier.
In Artix, the name
suite66 is used instead of
66 in package names.
If somehow your trees get deleted, to build boot and default trees from scratch, first set
EDITOR to your favorite text editor. (Example:
export EDITOR=/bin/vi 66-env -t boot [email protected] 66-enable -t boot -F [email protected] 66-tree -ncE default 66-enable -t default acpid dhcpcd dbus logind syslog-ng # add your desired services here 66-all -t default up
The above method can be used to recreate them (for example, from a live ISO chroot).
This guide will be more of a crash course than an in depth guide on the usage of 66. For more information, please see the websites given in the section "Additional information".
Service directories for init scripts are located in:
Modified init scripts, to avoid being overwritten by pkg updates, should be placed in:
In 66, a tree is a collection of services. Trees exist to enable starting or stopping of several services at once, and to enable ordering. They roughly translate to bundles in s6. Two trees are set up by default:
boot containing the essential system services that need to run first on boot, and
default containing the non-essential services, running after
If, for example, you want to create a tree named
audio for your audio services, you could use the command
66-tree -ncE audio
To have the above tree start after the tree
default, run instead
66-tree -nc -S default -E audio
The option flags are:
-n create a new tree -c set the tree as "current" tree -E enable the tree -S PARENT start the tree after PARENT
You can enable/disable/remove a tree with
66-tree OPTIONS TREE_NAME -E Enable -D Disable -R Remove
Ordering of options is important. Refer to the manpage 66-tree(1) for more information.
When operating on a service, the tree must be explicitly given as a parameter, unless the tree is marked as "current". So, first decide which tree the service will go in. For this example we are enabling/disabling the service
chrony in the tree
66-enable -t default chrony
66-disable -t default chrony
Services are configured using the command
66-env, which operates much like the command
git commit. It opens up the configuration file in the text editor given in the environment variable
EDITOR (or with the command-line parameter
-e) and configures the service. For example:
66-env -t default chrony
EDITOR is not set and you wish to use
/usr/bin/vim as editor,
66-env -t default -e /usr/bin/vim chrony
66-env, it needs to be restarted for changes to take effect.
Having the same tree and service as in the previous sections, you can start/stop/restart the service using the following commands.
66-start -t default chrony
66-stop -t default chrony
66-start -t default -r chrony
Note: In order to (re)start a service, it must first be enabled in a tree.
Start all services from the tree
66-all -t default up
Stop all services from the tree
66-all -t default down
General 66 configuration is done by configuring the
[email protected] service in the tree
66-env -t boot [email protected] # if the EDITOR environment variable is set
66-env -t boot -e /bin/vi [email protected]
as per above. This allows changing the timezone, console font, hostname, and so on, as well as features enabled on boot such as swap, LVM, BTRFS and more. After changing the configuration, it must be activated using:
66-enable -t boot -F [email protected]
Note: Special care must be given when configuring
[email protected], as it can lead to an unbootable system.
As in the other examples, we are using the tree
66-intree -go contents default
The number before each service name is its PID. If it is 0, it means the service is not running.
66-inservice -t default sshd
This will show various information about the service, including its current settings (environment), start script and last few lines from its log file.
Unique feature of 66 in Artix is that it executes scripts from
/etc/local.d/*.stop, like OpenRC. The service responsible for this feature is called
local-rc and is placed in the tree
boot by default. Scripts are run by programs
forx in the glob order. The file
/etc/local.d/local.start, installed by the package
artix-branding-base, will in turn execute
/etc/rc.local, a script traditionally run at boot.
After all of the above scripts are executed, as a more standard feature of 66, user-configurable (within the
local-rc service) script is run, which defaults to
User services are placed in:
66's user services are useful for services that do not need root privileges and are preferred to be run as a user. To be able to use this feature first install the suite66-scandir package
pacman -S suite66-scandir
In order for a user to be able to run services, root must enable scandir for the user's service directory.
For this example, user's username is
artix. The following must then be run as root:
66-enable -t TREE_NAME [email protected] 66-start -t TREE_NAME [email protected]
Now a user can place their service files in $HOME/.66/service and run as a regular user:
66-tree -cnE TREE_NAME 66-enable -t TREE_NAME service 66-start -t TREE_NAME service
This will only work if the frontend service file has the word
user inside of the
@user key in the section
[main], for example:
[main] @user = ( user )
Refer to frontend documentation for more information.
A note about going to another init and back to 66. Make sure all service files from previous tree still exists and run
or you can delete the default tree: (The following three steps are only needed if you want or need to recreate the default tree)
66-tree -RD default
and create the default tree again.
66-tree -ncE default
Last step is to enable services you want to run in the default tree
If a service during boot crashes and causes tty to not show,
tty12 should be available for diagnostic purposes and to allow service(s) to be fixed. It is activated by pressing the key combination