MMotor OS
Userspace

Commands

Motor OS boots into rush, a POSIX-style shell. PATH is /system/bin:/user/bin, plus /devtools/bin on the developer image. ls /system/bin and ls /user/bin list what is installed.

sysbox

Most everyday commands are calls into /system/bin/sysbox, which was inspired by busybox in Linux. Motor OS has no symbolic links, so each command is a two-line rush script of the same name in /system/bin that forwards to sysbox; sysbox help lists them.

CommandWhat it does
cat, less, wcPrint, page, and count files. less is a full pager built on the crossterm port.
head [-n [-]NUM | -c [-]NUM] [-q | -v] [-z] [FILE]...The first 10 lines of each file, or the first NUM lines or bytes; a leading - on NUM prints all but the last NUM. With several files, each gets a ==> NAME <== header. Options follow GNU head.
tail [-n [+]NUM | -c [+]NUM] [-q | -v] [-z] [FILE]...The last 10 lines of each file, or the last NUM lines or bytes; a leading + on NUM starts at line or byte NUM instead. Options follow GNU tail, except that following a growing file (-f, -F) is not supported.
diff [-u | -U NUM | -c | -C NUM] [-q] [-s] [-r] [-N] [-i] [-b] [-w] FILE1 FILE2Compare files, or directories, line by line. Output formats, messages, exit status (0 same, 1 different, 2 trouble), and the hunks themselves follow GNU diff. Side-by-side and ed output, -B, -I, and -x are not supported.
ls, findList and search directories.
cp, mv, rm, mkdir, rmdirCopy (preserving permissions), move, and delete files and directories. A denied operation fails with a nonzero status.
chmod MODE PATH...Set permissions; MODE is nine characters in System, Interactive, None order (see Filesystem).
ps, pstat, top, free, uptime, statsProcesses (with role markers * System and + Interactive), CPU usage, memory, and any metric (see Logs and diagnostics).
ssTCP sockets known to sys-io.
ping [-c COUNT] [-i SECONDS] [-W SECONDS] [-s BYTES] DESTINATIONICMP echo to an IPv4 or IPv6 address, localhost, or a DNS name.
date, time, sleepThe current time, timing a command, and pausing.
printenvThe environment.
loopRun a command repeatedly.

A few names in /system/bin are scripts without a sysbox applet behind them: df (over stats), uname (prints "Motor OS"), sh (forwards to rush, so C library system() and popen() work), and exit (so that ssh host exit 5, which looks for an executable, works). kill, cd, history, clear, and the other shell builtins are part of rush. rg is ripgrep, a real binary, on the standard and developer images.

Programs

ProgramWhereWhat it is
rush/system/binThe shell, on the console and over SSH.
rmux/user/binA tmux-like terminal multiplexer with detachable sessions.
red/user/binA vi-like editor with syntax highlighting.
kibim/user/binA small kilo-style editor; standard and developer images.
httpd/user/binA small static-file HTTP server with optional TLS: httpd -a ADDR:PORT -d DIR [--ssl-cert PEM --ssl-key PEM].
httpd-axum/user/binThe same job on axum, tower-http, and Tokio, with TLS through rustls. Serves this website.
russhd/system/servicesThe SSH server; started by sys-init (see Running Motor OS).
curl/system/binDeveloper image: a small curl-compatible HTTPS client written in Rust, used by Lorry to fetch crates and by gix for Git transfers.
gix/devtools/binDeveloper image: a small Git client with init, clone and fetch over HTTPS or SSH, status, log, diff, add, unstage, restore, commit, branch, tag, remote, switch, checkout, merge, recover, and push of one branch or tag over SSH. See the gix page.
lua/devtools/binDeveloper image: Lua 5.4, built natively against the C library.
sed/devtools/binDeveloper image: the stream editor, uutils sed (GNU-compatible, in Rust). sed -i edits a file in place: the file keeps its permissions, and so must be writable.

The developer image adds gix, Lorry, Gears, mdbg, the native compilers, and the test suites; see Developer image.

Configuration files

FileUsed by
/system/cfg/sys-init.cfgsys-init: the console program and role, strobe, and the services with their capability masks.
/system/cfg/sys-net.tomlsys-io: network devices, addresses, routes, DNS servers, and limits.
/system/cfg/sshd.tomlrusshd: listen address, host key, users, passwords, and authorized keys.
/system/cfg/sys-tty.cfg, /system/cfg/rush.cfgThe console shell's environment and startup file.
/system/cfg/libc/hosts, resolv.confThe DNS resolver and the C library. resolv.conf is written by sys-io.
/user/cfg/red.toml, rmux.toml, kibim/, gears.toml, lorry/Per-program settings, all optional.