Command reference#
All 125 commands that ship with Lepton, generated from the command registry. Inside Lepton, help lists them and man COMMAND shows one. Packages can add more (packages).
Files and basics#
| Command | What it does | Usage |
basename | strip directory and suffix from filenames | basename NAME [SUFFIX] |
cat | concatenate files and print on the standard output | cat [-n] [FILE...] |
chmod | change file mode bits | chmod MODE FILE... |
chown | change file owner (needs sudo) | chown [-R] USER[:GROUP] FILE... |
cp | copy files and directories | cp [-rv] SOURCE... DEST |
df | report file system space usage | df [-h] |
dirname | strip last component from file name | dirname NAME |
du | estimate file space usage | du [-sh] [FILE...] |
echo | display a line of text | echo [-n] [-e] [STRING...] |
expr | evaluate expressions | expr INT +|-|*|/|% INT |
false | do nothing, unsuccessfully | false |
find | search for files in a directory hierarchy | find [PATH...] [-name GLOB] [-type f|d] [-maxdepth N] |
ln | make links between files | ln [-s] TARGET LINK |
ls | list directory contents | ls [-1aAlhRrtSdF] [FILE...] |
mkdir | make directories | mkdir [-p] DIR... |
mv | move (rename) files | mv [-v] SOURCE... DEST |
printf | format and print data | printf FORMAT [ARG...] |
readlink | print resolved symbolic links | readlink [-f] FILE |
realpath | print the resolved absolute file name | realpath PATH... |
rm | remove files or directories | rm [-rfv] FILE... |
rmdir | remove empty directories | rmdir DIR... |
seq | print a sequence of numbers | seq [FIRST [INCR]] LAST |
stat | display file status | stat FILE... |
tee | read from standard input and write to standard output and files | tee [-a] [FILE...] |
test · also [ | check file types and compare values | test EXPRESSION (also [ EXPRESSION ]: -e -f -d -L -s -x -z -n, = != -eq -ne -lt -le -gt -ge, !, -a) |
touch | change file timestamps (creating files) | touch FILE... |
tree | list contents of directories in a tree-like format | tree [-a] [-L N] [DIR] |
true | do nothing, successfully | true |
yes | output a string repeatedly until killed | yes [STRING...] |
Text#
| Command | What it does | Usage |
awk | pattern scanning (subset: print fields, -F, /re/, NR, NF) | awk [-F SEP] 'PROGRAM' [FILE...] |
base64 | base64 encode/decode data | base64 [-d] [FILE] |
cut | remove sections from each line | cut -d DELIM -f FIELDS | -c CHARS [FILE...] |
diff | compare files line by line (unified format) | diff [-u] FILE1 FILE2 |
grep | print lines that match patterns | grep [-ivnclrHhoqEFw] PATTERN [FILE...] |
head | output the first part of files | head [-n N] [FILE...] |
hexdump · also xxd | display file contents in hexadecimal | hexdump [FILE] |
less · also more | view text one screen at a time (vi keys) | less [FILE] |
md5sum | compute MD5 message digest | md5sum [FILE...] |
nl | number lines of files | nl [FILE...] |
rev | reverse lines characterwise | rev [FILE...] |
sed | stream editor (s, d, p commands) | sed [-n] [-i] [-e] SCRIPT [FILE...] |
sha1sum | compute SHA1 message digest | sha1sum [FILE...] |
sha256sum | compute SHA256 message digest | sha256sum [FILE...] |
sha512sum | compute SHA512 message digest | sha512sum [FILE...] |
sort | sort lines of text files | sort [-rnuf] [-k N] [-t SEP] [FILE...] |
strings | print printable character sequences in files | strings [FILE...] |
tac | concatenate and print files in reverse | tac [FILE...] |
tail | output the last part of files | tail [-n N] [-f] [FILE...] |
tr | translate or delete characters | tr [-d] SET1 [SET2] |
uniq | report or omit repeated lines | uniq [-cdu] [FILE] |
wc | print newline, word, and byte counts | wc [-lwcm] [FILE...] |
xargs | build and execute command lines from standard input | xargs [-n N] [CMD [ARG...]] |
System#
| Command | What it does | Usage |
cal | display a calendar | cal |
clear · also cls | clear the terminal screen | clear |
date | print the system date and time | date [+FORMAT] [-u] |
dmesg | print the kernel ring buffer | dmesg |
env | print the environment, or run a command in a modified one | env [NAME=VALUE...] [COMMAND [ARG...]] |
free | display amount of free and used memory | free [-h] [-m] |
help | list available commands | help [COMMAND] |
hostname | show or set the system's host name | hostname [NAME] |
id | print user and group information | id [USER] |
keys | show keybindings loaded from the dotfiles | keys [editor|tmux|shell|git] |
kill | send a signal to a process | kill [-9|-STOP|-CONT|-TERM] PID... |
lsmod | show the status of modules in the Linux kernel | lsmod |
man | show the manual for a command | man COMMAND |
modprobe | add a module (and its dependencies) to the kernel (needs sudo) | modprobe MODULE [PARAM=VALUE...] |
mount | mount a filesystem / list mounts | mount [-t TYPE] [-o OPTS] SOURCE DIR |
neofetch · also fetch, about | show system information | neofetch |
pbcopy · also xclip, xsel, wl-copy | copy standard input to the clipboard | pbcopy [-o] |
pbpaste · also wl-paste | paste the clipboard to standard output | pbpaste |
pgrep | look up processes by name | pgrep PATTERN |
pkill | signal processes by name | pkill PATTERN |
poweroff · also halt, shutdown | power off the machine (flushes the disk first) (needs sudo) | poweroff |
printenv | print environment variables | printenv [NAME...] |
ps | report a snapshot of the current processes | ps [-e] [aux] |
reboot | reboot the machine (needs sudo) | reboot |
reset | reset the terminal | reset |
resize | set the terminal size from the terminal emulator's window | resize |
rmmod | remove a module from the kernel (needs sudo) | rmmod MODULE... |
sleep | delay for a specified amount of time | sleep SECONDS |
stty | show terminal settings (size) | stty [size | rows N cols M] |
sync | flush filesystem buffers | sync |
time | run a command and report how long it took | time COMMAND [ARG...] |
top | display Lepton processes (q to quit) | top |
tty | print the file name of the terminal | tty |
umount | unmount a filesystem (needs sudo) | umount DIR... |
uname | print system information | uname [-asnrmo] |
uptime | tell how long the system has been running | uptime |
watch | execute a program periodically, showing output fullscreen | watch [-n SECS] COMMAND |
whoami | print effective user name | whoami |
Network#
| Command | What it does | Usage |
curl · also wget, fetch | transfer a URL (HTTP/HTTPS) | curl [-o FILE] [-I] [-s] URL |
dhclient · also udhcpc, dhcpcd | configure an interface with DHCP (needs sudo) | dhclient [IFACE] |
ifconfig | show network interfaces | ifconfig |
ip | show / manipulate network interfaces, addresses and routes | ip [addr|link|route] |
nslookup · also host | query DNS | nslookup NAME |
ping | send ICMP ECHO_REQUEST to a host | ping [-c COUNT] HOST |
ssh | OpenSSH-compatible client: remote shells and commands, keys from ~/.ssh | ssh [-p PORT] [-i KEY] [-l USER] [-o StrictHostKeyChecking=VALUE] [-T|-t] [USER@]HOST [COMMAND...] |
ssh-keygen | create an SSH key, show fingerprints, forget a host | ssh-keygen [-t ed25519] [-f FILE] [-C COMMENT] | -l -f FILE | -y -f FILE | -R HOST |
ssh-keyscan | print a host's SSH public keys (known_hosts lines) | ssh-keyscan [-p PORT] [-t TYPES] HOST... |
www · also lynx, browse | text-mode web browser (preview of the Lepton browser) | www URL |
Development#
| Command | What it does | Usage |
elixir | run Elixir code | elixir [-e CODE] [FILE.exs] [ARGS...] |
erl | Erlang version information | erl |
gh | GitHub CLI (repos, issues, PRs, auth) | gh auth login|status|token|logout | repo view|list|clone|create | ssh-key list|add | config get|set git_protocol | issue list|view|create | pr list|view | browse | api PATH |
git | distributed version control, with HTTPS and SSH remotes (Elixir implementation) | git COMMAND [ARGS] |
iex | interactive Elixir (loads ~/.iex.exs) | iex |
le · also vi, vim, nvim, emacs, emacsclient, spacemacs, edit | the Lepton editor (Spacemacs keybindings from your dotfiles) | le [FILE...] |
lepton-test | run the Lepton self-test suite (ExUnit, inside the OS) | lepton-test [--only TAG] [FILE...] |
lsh · also sh, zsh, bash | the Lepton shell | lsh [-c COMMANDS | SCRIPT [ARG...]] |
mix | Elixir build tool (runs in the project in the current directory) | mix TASK [ARGS...] |
tmux | terminal multiplexer (key table from ~/.tmux.conf) | tmux [new [-s NAME] | attach [-t NAME] | ls | kill-session -t NAME | list-keys] |
Administration#
| Command | What it does | Usage |
credits | who made Lepton | credits |
lepton-install | install Lepton from the ISO onto a disk (needs sudo) | lepton-install [-y] [-u NAME --password-stdin] [/dev/DISK] |
lepton-tutorial · also tutorial | an interactive tour of Lepton | lepton-tutorial |
lpm | Lepton package manager (packages from hex.pm) | lpm search|info|install|list|remove|update|official|upgrade|revert ... |
passwd | change your password (root: anyone's) | passwd [--stdin] [USER] |
su | become another user (default root) in a new shell; exit or C-d returns | su [-|-l] [USER] [-c COMMAND] |
sudo | run a command as root, after asking for your password | sudo [-S] COMMAND [ARG...] | sudo [-S] -i | -s | sudo -k | -v | -l |
useradd · also adduser | create a user account (and its home) (needs sudo) | useradd [--sudo] [-c FULL_NAME] [--password-stdin] NAME |
userdel · also deluser | delete a user account (needs sudo) | userdel [-r] NAME |
wifi | Wi-Fi: status, scan, connect and saved networks | wifi [status] | scan [IFACE] | connect SSID [PASSPHRASE] | forget [SSID] | setup |
Services#
| Command | What it does | Usage |
httpd | serve a directory over HTTP (static files) | httpd [-p PORT] [DIR] |
journalctl | show service logs (journalctl -u NAME [-n N] [-f]) | journalctl -u NAME [-n N] [-f] |
svc · also systemctl | start, stop and restart long-running services (like systemctl) | svc [list|status|start|stop|restart|enable|disable|logs|cat|new|edit] ... |
Desktop#
| Command | What it does | Usage |
classic | the classic desktop: Photon with a Windows 95-style window manager | classic |
photon | the graphical desktop (Photon, a Wayland compositor) and its terminal windows | photon [start] | term [COMMAND...] | info | screenshot FILE.png | stop |
Shell builtins#
These run inside the shell itself (the shell): cd pwd export unset alias unalias history exit logout source . jobs fg bg wait type which read eval shift set setopt unsetopt bindkey hash rehash umask local dirs pushd popd exec builtin command return break continue.