Skip to content

Command Reference

pkgdemon edited this page Aug 21, 2026 · 7 revisions

NextBSD's userland is mostly Darwin-derived, so a number of familiar BSD tools are replaced by their Apple equivalents. Everything below ships on the image, and each entry names its manual page where one is installed — man launchctl, man 8 ioreg, and so on.

Standard FreeBSD tools you already know — ps, top, netstat, ifconfig, vi, pkg — are all still present. This page covers what is different.


Services

launchctl(1) — control launchd jobs

launchd is PID 1. It starts, monitors and restarts every system service.

launchctl list                        # every job launchd knows about
launchctl list com.apple.syslogd      # the plist for one job
launchctl load -w /System/Library/LaunchDaemons/com.apple.notifyd.plist
launchctl unload -w /System/Library/LaunchDaemons/com.apple.notifyd.plist

-w makes the change persist across reboots by marking the job (dis)abled rather than only acting on the running system.

See Service Management with launchd for writing your own job plists. Related pages: launchd(8), launchd.plist(5).


Hardware and kernel extensions

ioreg(8) — browse the IORegistry

The IOKit registry is in-kernel and exposed at /dev/ioregistry. ioreg walks it. This is what replaces poking at devinfo or devd state.

ioreg -l              # the whole registry tree with properties
ioreg -c PCIDevice    # filter by class
ioreg -n hostb0       # find one node by name

kextstat(8), kextload(8), kextunload(8) — kernel extensions

kextstat                       # what's loaded
kextload /System/Library/Extensions/Foo.kext
kextunload /System/Library/Extensions/Foo.kext

kldload and friends are gone on purpose. The build removes the kldload, kldunload, kldstat and kldconfig command-line tools to match Darwin's shape. The kld*(2) syscalls remain, so anything linking against them still works — only the CLI front-ends were retired. If a tutorial tells you to run kldstat, run kextstat instead.

kextd(8) is the daemon behind these, started by launchd at boot.


Logging

syslog(1) — query the ASL store

NextBSD runs Darwin's syslogd (the Apple System Logger), not FreeBSD's. Logs are structured records, and syslog is how you query them.

syslog -F bsd                   # tail the log in familiar BSD text format
syslog -k Sender ipconfigd      # only records from one sender
syslog -k Level le err          # only errors and worse

syslogd(8) is the daemon; asl.conf(5) and syslog.conf(5) configure it, and aslmanager(8) handles rotation and expiry. newsyslog(8) is also present.

notifyutil(1) — the notification bus

notifyd is a lightweight named-event bus that Darwin-source daemons use to signal each other. notifyutil lets you watch and post events by hand, which is useful when debugging why a daemon is not reacting to something.

notifyutil -w com.apple.system.config.network_change   # watch a key
notifyutil -p com.example.my.event                     # post one

See notify(3) for the C API and notifyd(8) for the daemon.


Networking

ipconfig(8) — Darwin's IP configuration client

Not FreeBSD's ifconfig. Different tool, different arguments; both are on the system.

ipconfig getifaddr em0     # IP address of one interface
ipconfig ifcount           # number of interfaces

ipconfigd is the daemon: it does DHCPv4, ARP probing and lease renewal, then publishes results into configd's SCDynamicStore, where other daemons read them.

Static addressing is on the way. Interfaces are configured by DHCP today. Manual addressing is tracked in nextbsd-userland#58, and the Network preference pane that will expose it — along with DNS and search domains — in nextbsd#396. Both are open; follow them for progress, or say hello in Discussions if you need it sooner.

dns-sd(1) — Bonjour / DNS-SD

NextBSD ships Apple's mDNSResponder with its full client API.

dns-sd -B _ssh._tcp           # browse for SSH services on the network
dns-sd -R "My Box" _http._tcp . 8080   # register a service

Related: mDNSResponder(8), dnsextd(8), nss_mdns.conf(5).

wlan(8) — wireless

wland(8) owns 802.11 and is started by launchd; wlan is how you talk to it.

wlan list                            # interfaces wland manages
wlan scan                            # SSID, BSSID, signal, channel, security
wlan connect Home hunter2hunter2     # join, and remember the network
wlan status                          # current association
wlan disconnect                      # leave, and stop autojoining

Every command takes an optional trailing interface; omit it and wlan uses the first interface wland owns. Omit the passphrase for an open network.

If wlan status reports associated rather than connected, you have no IP on purpose — the port is not keyed yet and ipconfigd deliberately holds DHCP until the 4-way handshake finishes. See Wireless Networking for that distinction and for troubleshooting.


System identity

nextbsd-version — build stamps

nextbsd-version       # userland build version, e.g. 20260820-185023
nextbsd-version -k    # installed kernel version
nextbsd-version -r    # running kernel version (matches uname -r)

Every build is stamped with one UTC timestamp shared by the image name, /etc/os-release and this command, so they always agree. Kernel and userland come from different repos and different build times, so their stamps differ.


Installation and disks

nextbsd-installer

A keyboard-driven text-mode installer. Run it as root from a booted image to lay NextBSD onto a disk — see Installing NextBSD.

diskarbitrationd(8)

Darwin's disk-arbitration daemon. It enumerates storage through FreeBSD's libgeom, and learns about disks appearing and disappearing by subscribing to the in-kernel IOKit registry over /dev/ioregistry — the same notification path ioreg browses, not devd. It runs from launchd; there is no user-facing CLI for it yet.

cpdup(1)

A fast filesystem cloner. The installer uses it internally to copy the running system onto the target disk, and it is available for general use.


Development tools

mig(1) and migcom(1)

Darwin's Mach Interface Generator — it turns .defs interface descriptions into client and server RPC stubs. You need these only if you are writing something that speaks Mach IPC directly.


Manual pages by section

Section Pages
1 — commands launchctl, syslog, notifyutil, dns-sd, cpdup, mig, migcom
3 — library notify, asl, syslog, the dispatch_* family
5 — file formats launchd.plist, asl.conf, syslog.conf, newsyslog.conf, nss_mdns.conf
8 — daemons and admin launchd, configd, syslogd, notifyd, mDNSResponder, dnsextd, ioreg, kextd, kextload, kextunload, kextstat, diskarbitrationd, aslmanager, newsyslog, wlan, wland, libnss_mdns

man -k <topic> searches all of them.

Clone this wiki locally