System#
Processes and jobs#
Every Lepton program is a BEAM process with a Unix-style PID, a parent, a terminal and a state. PID 1 is Lepton itself.
pslists them,topshows them live (qquits), andpgrep/pkillfind or signal them by name;kill PIDterminates a process,kill -9kills it, andkill -STOP/kill -CONTsuspend and resume it;- in the shell,
C-cinterrupts the foreground job,C-zsuspends it, andjobs,fg,bgandwaitmanage background jobs.
For long-running apps that should survive logouts and restart when they fail, use services.
Storage and persistence#
The live ISO runs entirely from RAM: nothing you do is kept. An installed system keeps /home (your files), /root and /var/lib/lepton (accounts, packages, services, logs and settings) on its data partition; everything else, including /etc, resets at boot.
df, du, free and mount show filesystems and memory.
Power#
poweroff (also halt, shutdown) and reboot stop services, flush the data partition and remount it read-only first. They need root: sudo poweroff. UTM's Request power down does the same through the virtual power button.
Terminals#
Each console runs a login session as root. On a serial console, full-screen programs (le, tmux, less, top) follow the terminal window's size as you resize it; resize sets the size by hand. Colours follow your terminal; NO_COLOR=1 turns them off.
Clipboard#
pbcopy and pbpaste (also xclip, xsel, wl-copy, wl-paste) share one clipboard with tmux copy mode and editor yanks. Copies are also sent to your computer's terminal with OSC 52, so they can land in the Mac clipboard over a serial console.
Elixir and Erlang#
iexis interactive Elixir. It loads~/.iex.exs, so your helpers work:sh "ls"and~x(ls -la)run commands inlsh.elixir -e CODE, orelixir FILE.exs; executable*.exsfiles on the path run as Elixir scripts.mixruns in the project in the current directory.- Commands can be added at runtime with
Lepton.Commands.register/2, or by packages.
Help and information#
help lists every command, and man CMD or help CMD describes one (the command reference has them all). keys shows the bindings loaded from your dotfiles, neofetch summarises the system, and credits says who made Lepton. The login message and help point here, to https://trylepton.app/docs/.
Self-tests#
lepton-test runs Lepton's ExUnit test suite inside the running system: mounts, drivers, DHCP, the shell, editor, multiplexer, git, packages and services. --only TAG and file arguments pick tests.
Commands on this page#
| Command | What it does | Usage |
|---|---|---|
ps | report a snapshot of the current processes | ps [-e] [aux] |
top | display Lepton processes (q to quit) | top |
kill | send a signal to a process | kill [-9|-STOP|-CONT|-TERM] PID... |
pgrep | look up processes by name | pgrep PATTERN |
pkill | signal processes by name | pkill PATTERN |
df | report file system space usage | df [-h] |
du | estimate file space usage | du [-sh] [FILE...] |
free | display amount of free and used memory | free [-h] [-m] |
mount | mount a filesystem / list mounts | mount [-t TYPE] [-o OPTS] SOURCE DIR |
poweroff | power off the machine (flushes the disk first) (needs sudo) | poweroff |
reboot | reboot the machine (needs sudo) | reboot |
resize | set the terminal size from the terminal emulator's window | resize |
pbcopy | copy standard input to the clipboard | pbcopy [-o] |
pbpaste | paste the clipboard to standard output | pbpaste |
iex | interactive Elixir (loads ~/.iex.exs) | iex |
elixir | run Elixir code | elixir [-e CODE] [FILE.exs] [ARGS...] |
mix | Elixir build tool (runs in the project in the current directory) | mix TASK [ARGS...] |
help | list available commands | help [COMMAND] |
man | show the manual for a command | man COMMAND |
keys | show keybindings loaded from the dotfiles | keys [editor|tmux|shell|git] |
neofetch | show system information | neofetch |
lepton-test | run the Lepton self-test suite (ExUnit, inside the OS) | lepton-test [--only TAG] [FILE...] |