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¶
Every tree, whether it is enabled, which group it is in, and what it contains.
The same for one tree, with the contents drawn as a dependency graph.
One service: its state, type, tree, pid, dependencies.
Only the fields you asked for. Add -n to drop the field names, which is what
you want in a script:
Read the logs¶
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:
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 signal sends any other signal, either by name or with a dedicated flag:
Change a service's configuration¶
Services carry their own environment, versioned. To see it:
To change one value:
To edit the whole thing in your editor:
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:
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:
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¶
See Trees.
Power¶
When something is wrong¶
66 -z tree status— is the tree enabled, does it contain what you expect?66 status <service>— is the service enabled, does it have a pid?66 log <service>— what did it say before it gave up?- Re-run the failing command with
-v4. 66 status -g <service>— is a dependency the real problem?
Never repair by deleting files. See the rule in the introduction.