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#

CommandWhat it doesUsage
basenamestrip directory and suffix from filenamesbasename NAME [SUFFIX]
catconcatenate files and print on the standard outputcat [-n] [FILE...]
chmodchange file mode bitschmod MODE FILE...
chownchange file owner (needs sudo)chown [-R] USER[:GROUP] FILE...
cpcopy files and directoriescp [-rv] SOURCE... DEST
dfreport file system space usagedf [-h]
dirnamestrip last component from file namedirname NAME
duestimate file space usagedu [-sh] [FILE...]
echodisplay a line of textecho [-n] [-e] [STRING...]
exprevaluate expressionsexpr INT +|-|*|/|% INT
falsedo nothing, unsuccessfullyfalse
findsearch for files in a directory hierarchyfind [PATH...] [-name GLOB] [-type f|d] [-maxdepth N]
lnmake links between filesln [-s] TARGET LINK
lslist directory contentsls [-1aAlhRrtSdF] [FILE...]
mkdirmake directoriesmkdir [-p] DIR...
mvmove (rename) filesmv [-v] SOURCE... DEST
printfformat and print dataprintf FORMAT [ARG...]
readlinkprint resolved symbolic linksreadlink [-f] FILE
realpathprint the resolved absolute file namerealpath PATH...
rmremove files or directoriesrm [-rfv] FILE...
rmdirremove empty directoriesrmdir DIR...
seqprint a sequence of numbersseq [FIRST [INCR]] LAST
statdisplay file statusstat FILE...
teeread from standard input and write to standard output and filestee [-a] [FILE...]
test · also [check file types and compare valuestest EXPRESSION (also [ EXPRESSION ]: -e -f -d -L -s -x -z -n, = != -eq -ne -lt -le -gt -ge, !, -a)
touchchange file timestamps (creating files)touch FILE...
treelist contents of directories in a tree-like formattree [-a] [-L N] [DIR]
truedo nothing, successfullytrue
yesoutput a string repeatedly until killedyes [STRING...]

Text#

CommandWhat it doesUsage
awkpattern scanning (subset: print fields, -F, /re/, NR, NF)awk [-F SEP] 'PROGRAM' [FILE...]
base64base64 encode/decode database64 [-d] [FILE]
cutremove sections from each linecut -d DELIM -f FIELDS | -c CHARS [FILE...]
diffcompare files line by line (unified format)diff [-u] FILE1 FILE2
grepprint lines that match patternsgrep [-ivnclrHhoqEFw] PATTERN [FILE...]
headoutput the first part of fileshead [-n N] [FILE...]
hexdump · also xxddisplay file contents in hexadecimalhexdump [FILE]
less · also moreview text one screen at a time (vi keys)less [FILE]
md5sumcompute MD5 message digestmd5sum [FILE...]
nlnumber lines of filesnl [FILE...]
revreverse lines characterwiserev [FILE...]
sedstream editor (s, d, p commands)sed [-n] [-i] [-e] SCRIPT [FILE...]
sha1sumcompute SHA1 message digestsha1sum [FILE...]
sha256sumcompute SHA256 message digestsha256sum [FILE...]
sha512sumcompute SHA512 message digestsha512sum [FILE...]
sortsort lines of text filessort [-rnuf] [-k N] [-t SEP] [FILE...]
stringsprint printable character sequences in filesstrings [FILE...]
tacconcatenate and print files in reversetac [FILE...]
tailoutput the last part of filestail [-n N] [-f] [FILE...]
trtranslate or delete characterstr [-d] SET1 [SET2]
uniqreport or omit repeated linesuniq [-cdu] [FILE]
wcprint newline, word, and byte countswc [-lwcm] [FILE...]
xargsbuild and execute command lines from standard inputxargs [-n N] [CMD [ARG...]]

System#

CommandWhat it doesUsage
caldisplay a calendarcal
clear · also clsclear the terminal screenclear
dateprint the system date and timedate [+FORMAT] [-u]
dmesgprint the kernel ring bufferdmesg
envprint the environment, or run a command in a modified oneenv [NAME=VALUE...] [COMMAND [ARG...]]
freedisplay amount of free and used memoryfree [-h] [-m]
helplist available commandshelp [COMMAND]
hostnameshow or set the system's host namehostname [NAME]
idprint user and group informationid [USER]
keysshow keybindings loaded from the dotfileskeys [editor|tmux|shell|git]
killsend a signal to a processkill [-9|-STOP|-CONT|-TERM] PID...
lsmodshow the status of modules in the Linux kernellsmod
manshow the manual for a commandman COMMAND
modprobeadd a module (and its dependencies) to the kernel (needs sudo)modprobe MODULE [PARAM=VALUE...]
mountmount a filesystem / list mountsmount [-t TYPE] [-o OPTS] SOURCE DIR
neofetch · also fetch, aboutshow system informationneofetch
pbcopy · also xclip, xsel, wl-copycopy standard input to the clipboardpbcopy [-o]
pbpaste · also wl-pastepaste the clipboard to standard outputpbpaste
pgreplook up processes by namepgrep PATTERN
pkillsignal processes by namepkill PATTERN
poweroff · also halt, shutdownpower off the machine (flushes the disk first) (needs sudo)poweroff
printenvprint environment variablesprintenv [NAME...]
psreport a snapshot of the current processesps [-e] [aux]
rebootreboot the machine (needs sudo)reboot
resetreset the terminalreset
resizeset the terminal size from the terminal emulator's windowresize
rmmodremove a module from the kernel (needs sudo)rmmod MODULE...
sleepdelay for a specified amount of timesleep SECONDS
sttyshow terminal settings (size)stty [size | rows N cols M]
syncflush filesystem bufferssync
timerun a command and report how long it tooktime COMMAND [ARG...]
topdisplay Lepton processes (q to quit)top
ttyprint the file name of the terminaltty
umountunmount a filesystem (needs sudo)umount DIR...
unameprint system informationuname [-asnrmo]
uptimetell how long the system has been runninguptime
watchexecute a program periodically, showing output fullscreenwatch [-n SECS] COMMAND
whoamiprint effective user namewhoami

Network#

CommandWhat it doesUsage
curl · also wget, fetchtransfer a URL (HTTP/HTTPS)curl [-o FILE] [-I] [-s] URL
dhclient · also udhcpc, dhcpcdconfigure an interface with DHCP (needs sudo)dhclient [IFACE]
ifconfigshow network interfacesifconfig
ipshow / manipulate network interfaces, addresses and routesip [addr|link|route]
nslookup · also hostquery DNSnslookup NAME
pingsend ICMP ECHO_REQUEST to a hostping [-c COUNT] HOST
sshOpenSSH-compatible client: remote shells and commands, keys from ~/.sshssh [-p PORT] [-i KEY] [-l USER] [-o StrictHostKeyChecking=VALUE] [-T|-t] [USER@]HOST [COMMAND...]
ssh-keygencreate an SSH key, show fingerprints, forget a hostssh-keygen [-t ed25519] [-f FILE] [-C COMMENT] | -l -f FILE | -y -f FILE | -R HOST
ssh-keyscanprint a host's SSH public keys (known_hosts lines)ssh-keyscan [-p PORT] [-t TYPES] HOST...
www · also lynx, browsetext-mode web browser (preview of the Lepton browser)www URL

Development#

CommandWhat it doesUsage
elixirrun Elixir codeelixir [-e CODE] [FILE.exs] [ARGS...]
erlErlang version informationerl
ghGitHub 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
gitdistributed version control, with HTTPS and SSH remotes (Elixir implementation)git COMMAND [ARGS]
iexinteractive Elixir (loads ~/.iex.exs)iex
le · also vi, vim, nvim, emacs, emacsclient, spacemacs, editthe Lepton editor (Spacemacs keybindings from your dotfiles)le [FILE...]
lepton-testrun the Lepton self-test suite (ExUnit, inside the OS)lepton-test [--only TAG] [FILE...]
lsh · also sh, zsh, bashthe Lepton shelllsh [-c COMMANDS | SCRIPT [ARG...]]
mixElixir build tool (runs in the project in the current directory)mix TASK [ARGS...]
tmuxterminal multiplexer (key table from ~/.tmux.conf)tmux [new [-s NAME] | attach [-t NAME] | ls | kill-session -t NAME | list-keys]

Administration#

CommandWhat it doesUsage
creditswho made Leptoncredits
lepton-installinstall Lepton from the ISO onto a disk (needs sudo)lepton-install [-y] [-u NAME --password-stdin] [/dev/DISK]
lepton-tutorial · also tutorialan interactive tour of Leptonlepton-tutorial
lpmLepton package manager (packages from hex.pm)lpm search|info|install|list|remove|update|official|upgrade|revert ...
passwdchange your password (root: anyone's)passwd [--stdin] [USER]
subecome another user (default root) in a new shell; exit or C-d returnssu [-|-l] [USER] [-c COMMAND]
sudorun a command as root, after asking for your passwordsudo [-S] COMMAND [ARG...] | sudo [-S] -i | -s | sudo -k | -v | -l
useradd · also addusercreate a user account (and its home) (needs sudo)useradd [--sudo] [-c FULL_NAME] [--password-stdin] NAME
userdel · also deluserdelete a user account (needs sudo)userdel [-r] NAME
wifiWi-Fi: status, scan, connect and saved networkswifi [status] | scan [IFACE] | connect SSID [PASSPHRASE] | forget [SSID] | setup

Services#

CommandWhat it doesUsage
httpdserve a directory over HTTP (static files)httpd [-p PORT] [DIR]
journalctlshow service logs (journalctl -u NAME [-n N] [-f])journalctl -u NAME [-n N] [-f]
svc · also systemctlstart, stop and restart long-running services (like systemctl)svc [list|status|start|stop|restart|enable|disable|logs|cat|new|edit] ...

Desktop#

CommandWhat it doesUsage
classicthe classic desktop: Photon with a Windows 95-style window managerclassic
photonthe graphical desktop (Photon, a Wayland compositor) and its terminal windowsphoton [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.

Generated from the source of lepton@ac55150.