on OpenBSD, specifically

Commands cheatsheet

sysupgrade -n
not to be confused with syspatch, upgrade release/snapshot. the -n prevents it from automatically rebooting.
pkg_info -Q namequery
searches the first matching repo for packages names matching namequery
usbdevs
list usb devices
sndioctl
sound volume

ksh

yeah there is no !!. Use the fc command. By default it will run ed.

ifconfig

hostname.if(5) are /etc/hostname.[if] files

for iwn0, start with several "join (essid) wpakey (psk)", ending with "inet autoconf"

for wg0: wgpeer (pub) wgendpoint (host) (port) wgaip (allowed range) wgaip (allowed range) wgpka (persistent keepalive seconds) wgkey (priv) [repeat line for many peers]
inet (ipv4)
inet6 (ipv6)

doas sh /etc/netstart iwn0
but it's only ifconfig commands being ran so maybe don't go for that

See also wireguard on openbsd

misc

OpenBSD used to have systrace until 6.0 (5.9)

https://bsd.slashdot.org/story/02/10/17/2347226/openbsd-gains-privilege-elevation

https://www.informit.com/articles/article.aspx?p=363731

https://man.openbsd.org/OpenBSD-5.9/systrace

https://man.openbsd.org/OpenBSD-4.0/systrace.4

https://daemonforums.org/showthread.php?t=9795 - removed in 6.0

Stuff on rc.d

https://www.bsdfrog.org/pub/events/openbsd-rcd-AsiaBSDCon2016-paper.pdf

https://www.bsdfrog.org/pub/events/openbsd-rcd-AsiaBSDCon2016.pdf

https://www.oreilly.com/library/view/absolute-openbsd-2nd/9781457172496/packages_and_rc_d_scripts.html

https://ircnow.org/kb/doku.php?id=openbsd:rc.d

compare https://docs.freebsd.org/en/articles/rc-scripting/

https://support.hashicorp.com/hc/en-us/articles/360001964767-OpenBSD-rc-Script-Example