Skip to content

Everyday commands

A cookbook. For the full interface of any command, run 66 <command> -h, or read the 66 documentation.

Two global options are worth putting in your fingers from the start:

Option Effect
-z Colourise the output. Much easier to read.
-v4 Maximum verbosity. Use it when something does not work.

The shell configuration Obarun ships already aliases 66 to 66 -z.

Look at what you have

$ 66 -z tree status

Every tree, whether it is enabled, which group it is in, and what it contains.

$ 66 -z tree status -g global

The same for one tree, with the contents drawn as a dependency graph.

$ 66 status crond

One service: its state, type, tree, pid, dependencies.

$ 66 status -f name,enabled,pid crond

Only the fields you asked for. Add -n to drop the field names, which is what you want in a script:

$ 66 status -nf pid crond

Read the logs

$ 66 log crond
$ 66 log --follow crond
$ 66 log system

system is the boot and scandir catch-all. With no operand at all, 66 log interleaves every service plus the system log. See Boot output.

Enable and start

Enabling marks a service to come up at the next boot. Starting brings it up now. They are separate on purpose.

# 66 enable crond            # next boot
# 66 enable --start crond    # next boot, and now
# 66 start crond             # now only

A service enabled without naming a tree goes into global. To put it elsewhere:

# 66 -t net enable dhcpcd

If the tree net does not exist, this creates it.

Stop and disable

# 66 stop wpa_supplicant     # now, comes back at next boot
# 66 disable wpa_supplicant  # next boot, keeps running now
# 66 disable -S wpa_supplicant

Restart and reload

# 66 restart crond           # stop then start, in one pass
# 66 reload crond            # send SIGHUP

66 signal sends any other signal, either by name or with a dedicated flag:

# 66 signal -s USR1 crond
# 66 signal -t crond         # SIGTERM

Change a service's configuration

Services carry their own environment, versioned. To see it:

# 66 configure -L crond

To change one value:

# 66 configure -r KEY=value crond

To edit the whole thing in your editor:

# 66 configure -e $EDITOR crond

Editing the configuration is not enough on its own, and what you run next depends on what kind of service it is.

An ordinary daemon

66 configure changed the service's environment. The daemon itself re-reads its own configuration on SIGHUP, which is what most daemons do, and that is what 66 reload sends:

# 66 reload crond

A module

A module is not a single service, it is a set built from your parameters by the module's own configure script. Changing a value means that script has to run again and the module has to be parsed again. That is 66 reconfigure:

# 66 reconfigure boot@system

reconfigure stops the service, unsupervises it, parses it again and brings it back up, in one pass. Use it for a module, and for any service whose frontend file you edited, since a frontend change only exists once it has been parsed.

Modules in the boot group are a special case

When the module belongs to a tree of the boot group, reconfigure only parses, so the running boot sequence is left alone. The change applies at the next reboot. boot@system is exactly that case, see The boot module.

Whole trees at once

# 66 tree start net
# 66 tree stop net
# 66 tree free net           # stop, and unsupervise

See Trees.

Power

# 66 poweroff
# 66 reboot
# 66 halt

When something is wrong

  1. 66 -z tree status — is the tree enabled, does it contain what you expect?
  2. 66 status <service> — is the service enabled, does it have a pid?
  3. 66 log <service> — what did it say before it gave up?
  4. Re-run the failing command with -v4.
  5. 66 status -g <service> — is a dependency the real problem?

Never repair by deleting files. See the rule in the introduction.