110 lines
3.4 KiB
Groff
110 lines
3.4 KiB
Groff
.TH SHELL 1
|
|
.SH NAME
|
|
shell - MontaukOS interactive command shell
|
|
|
|
.SH DESCRIPTION
|
|
The MontaukOS shell is a command interpreter launched by init
|
|
after system services have started. It provides command
|
|
execution, file navigation, and command history.
|
|
|
|
Commands are either shell builtins or external programs. When
|
|
a command is not a builtin, the shell searches for a matching
|
|
ELF binary and executes it as a child process.
|
|
|
|
.SH COMMAND RESOLUTION
|
|
When a non-builtin command is entered, the shell searches for
|
|
a matching binary in the following order:
|
|
|
|
1. 0:/os/<command>.elf
|
|
2. 0:/games/<command>.elf
|
|
3. 0:/<cwd>/<command>.elf (if cwd is set)
|
|
4. 0:/<command>.elf
|
|
|
|
The first match is spawned and the shell waits for it to exit.
|
|
If no match is found, the shell prints:
|
|
|
|
<command>: command not found
|
|
|
|
Arguments after the command name are passed to the spawned
|
|
process. File path arguments are resolved against the current
|
|
working directory before being passed to external programs.
|
|
|
|
.SH BUILTINS
|
|
|
|
.SS help
|
|
Display a categorized list of available commands.
|
|
|
|
.SS ls [dir]
|
|
List files in the current directory, or in the specified
|
|
directory. When a directory argument is given, the output
|
|
shows only the entries inside that directory with the
|
|
directory prefix stripped. Directory entries are shown
|
|
with a trailing slash.
|
|
Examples: ls, ls man, ls os
|
|
|
|
.SS cd [dir]
|
|
Change the working directory. With no argument or with /,
|
|
returns to the root (0:/). Use cd .. to go up one level.
|
|
Trailing slashes on directory names are stripped.
|
|
The shell prompt reflects the current directory.
|
|
Examples: cd os, cd .., cd
|
|
|
|
.SS exit
|
|
Terminate the shell process.
|
|
|
|
.SH EXTERNAL COMMANDS
|
|
|
|
.SS System commands (0:/os/)
|
|
man <topic> View manual pages
|
|
cat <file> Display file contents
|
|
info Show system information
|
|
date Show current date and time
|
|
uptime Show system uptime
|
|
clear Clear the screen and framebuffer
|
|
fontscale [n] Get or set terminal font scale
|
|
reset Reboot the system
|
|
shutdown Shut down the system
|
|
|
|
.SS Network commands (0:/os/)
|
|
ping <host> Send ICMP echo requests
|
|
nslookup <host> DNS lookup
|
|
ifconfig Show/set network configuration
|
|
tcpconnect <host> <port> Interactive TCP client
|
|
irc IRC client
|
|
dhcp DHCP client
|
|
fetch HTTP/HTTPS client (TLS 1.2)
|
|
wiki Wikipedia article viewer
|
|
httpd HTTP server
|
|
|
|
Network commands accept both IP addresses and hostnames.
|
|
Hostnames are resolved via the configured DNS server.
|
|
|
|
.SS Games (0:/games/)
|
|
doom DOOM
|
|
|
|
.SH INPUT
|
|
The shell uses non-blocking keyboard input via SYS_GETKEY to
|
|
support arrow key detection. Lines are limited to 255
|
|
characters.
|
|
|
|
.SS Editing
|
|
Backspace Delete character before cursor
|
|
Enter Execute command
|
|
|
|
.SS History
|
|
The shell stores the last 32 unique commands. Duplicate
|
|
consecutive entries are suppressed.
|
|
|
|
Up Arrow Recall previous command
|
|
Down Arrow Recall next command (or clear line)
|
|
|
|
.SH PROMPT
|
|
The prompt displays the current working directory:
|
|
|
|
0:/> _ (at root)
|
|
0:/os> _ (in os/ directory)
|
|
0:/man> _ (in man/ directory)
|
|
|
|
.SH SEE ALSO
|
|
man(1), intro(1), syscalls(2)
|