-
-
Notifications
You must be signed in to change notification settings - Fork 4
Shell
kazah-png edited this page Jul 11, 2026
·
2 revisions
NyxOS has 40+ built-in commands in the kernel shell (over serial) and a growing set of ring-3 ELF programs that can be run via exec/spawn or from the userspace shell (/sh.elf).
The userspace shell (/sh.elf, v0.7) features:
- Line editor: cursors (←/→/Home/End), insert/delete in the middle of a line
- 16-entry history: ↑/↓ to recall, dedup against the last entry
-
Tab completion: commands (builtins +
*.elfs) and filesystem paths (pipeline-aware after|), longest common prefix + candidate listing -
Pipelines:
a | b | c— up to 4 stages wired viapipe()+dup2() -
I/O redirection:
>(truncate),>>(append),<(input from file) -
Background jobs:
cmd &spawns in background,jobslists them,wait [pid]blocks until done -
Builtins:
cd [dir],pwd,export NAME=value,exit -
Variable expansion:
$VARfrom shell-local env,$?for last exit status
See also: Process Management, Networking Stack, Filesystem, GUI Subsystem, Userspace
ls cd pwd cat touch mkdir rm cp mv echo write diff head tail grep sort wc find tree which
exec spawn ps kill jobs wait nice renice mem cpus mtdemo
ifconfig dhcp ping setip tcptest tcpserve tcploop tcpdrop
help clear nyxfetch uname version date uptime reboot crash mount layout hexdump mode cowtest
doom beep play sb16play gui fonttest desktop
| Command | Description |
|---|---|
sh |
Userspace shell (interactive REPL or sh -c "...") |
echo |
Print argv to stdout (pipeline-friendly) |
upper |
Stdin → uppercase → stdout filter (pipeline test) |
cat |
Concatenate files or stdin to stdout |
wc |
Line/word/byte counts |
ls |
Directory listing |
ps |
Process table snapshot |
kill |
Send signal by pid |
top |
Live process monitor (interactive TUI) |
edit |
Full-screen text editor (interactive TUI) |
grep |
Print lines matching a pattern |
head |
Print first N lines |
tail |
Print last N lines |
sort |
Sort lines alphabetically |
find |
Recursive directory walk |
mkdir |
Create a directory |
rm |
Remove a file |
touch |
Create empty file |
Contact: uselessalter on Discord | nyxos@inbox.lv | GitHub