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.
| Command | What it does |
|---|---|
cat, less, wc | Print, page, and count files. less is a full pager built on the crossterm port. |
ls, find | List and search directories. |
cp, mv, rm, mkdir, rmdir | Copy (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, stats | Processes (with role markers * System and + Interactive), CPU usage, memory, and any metric (see Logs and diagnostics). |
ss | TCP sockets known to sys-io. |
ping [-c COUNT] [-i SECONDS] [-W SECONDS] [-s BYTES] DESTINATION | ICMP echo to an IPv4 or IPv6 address, localhost, or a DNS name. |
date, time, sleep | The current time, timing a command, and pausing. |
printenv | The environment. |
loop | Run 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
| Program | Where | What it is |
|---|---|---|
| rush | /system/bin | The shell, on the console and over SSH. |
| rmux | /user/bin | A tmux-like terminal multiplexer with detachable sessions. |
| red | /user/bin | A vi-like editor with syntax highlighting. |
| kibim | /user/bin | A small kilo-style editor; standard and developer images. |
| httpd | /user/bin | A small static-file HTTP server with optional TLS: httpd -a ADDR:PORT -d DIR [--ssl-cert PEM --ssl-key PEM]. |
| httpd-axum | /user/bin | The same job on axum, tower-http, and Tokio, with TLS through rustls. Serves this website. |
| russhd | /system/services | The SSH server; started by sys-init (see Running Motor OS). |
| curl | /system/bin | Developer image: a small curl-compatible HTTPS client written in Rust, used by Lorry to fetch crates. |
| lua | /devtools/bin | Developer image: Lua 5.4, built natively against the C library. |
The developer image adds Lorry, Gears, mdbg, the native compilers, and the test suites; see Developer image.
Configuration files
| File | Used by |
|---|---|
/system/cfg/sys-init.cfg | sys-init: the console program and role, strobe, and the services with their capability masks. |
/system/cfg/sys-net.toml | sys-io: network devices, addresses, routes, DNS servers, and limits. |
/system/cfg/sshd.toml | russhd: listen address, host key, users, passwords, and authorized keys. |
/system/cfg/sys-tty.cfg, /system/cfg/rush.cfg | The console shell's environment and startup file. |
/system/cfg/libc/hosts, resolv.conf | The 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. |