# Shell Commands ## Paths and namespaces ModuOS uses the following path namespaces: - `/...` – real filesystem paths on the **currently selected mount** (boot drive by default) - `$/mnt/vDriveN/...` – explicit mount views (e.g. `$/mnt/vDrive0/`, `$/mnt/vDrive1/`) - `$/dev/...` – DevFS device nodes (e.g. `$/dev/input/kbd0`, `$/dev/graphics/video0`) Examples: ``` # dir / # dir $/mnt/vDrive0/ # dir $/dev ``` ModuOS includes a built-in shell (Zenith4) with various commands and utilities. ## Built-in Shell Commands ### dir / ls List directory contents **Syntax**: `dir [path]` or `ls [path]` **Example**: ``` # dir # dir /ModuOS/System64 # dir $/dev ``` Notes: - `/...` paths are resolved against the currently selected filesystem slot (boot drive by default). - `$/...` paths are routed through the virtual namespace router (DevFS, mount views, etc.). ### cd Change current directory **Syntax**: `cd ` **Example**: ``` # cd /ModuOS # cd /ModuOS/System64 # cd $/dev ``` ### cat Display file contents **Syntax**: `cat ` **Example**: ``` # cat /ModuOS/System64/pcname.txt # cat $/dev/input/kbd0 ``` ### echo Print text to console **Syntax**: `echo ` **Example**: ``` # echo Hello, ModuOS! ``` ### cls / clear Clear the screen **Syntax**: `cls` or `clear` ### mount / mount views ModuOS exposes mounted drives under the virtual namespace: - `$/mnt/vDrive0/` - `$/mnt/vDrive1/` - ... If the `mount` command is present, it mounts/rescans drives (implementation-defined), but user navigation is typically done via `$/mnt/vDriveN/`. **Examples**: ``` # dir $/mnt/ # dir $/mnt/vDrive0/ # cd $/mnt/vDrive0/ ``` ### umount Unmount support is implementation-defined. In current builds, prefer the `$/mnt/vDriveN/` view for browsing mounts. ### drives List all available drives **Syntax**: `drives` ### memtest Run memory tests **Syntax**: `memtest` ### zsfetch Display system information **Syntax**: `zsfetch` **Output**: - OS name and version - CPU information - Total/used/free memory - Uptime - Storage devices ### game Launch game menu **Syntax**: `game` **Available Games**: 1. Raycaster FPS 2. Eat Fruit (Snake) 3. Stack Blocks 4. Vertical Ping Pong 5. Mine Sweeper ### exec / run Execute an ELF program **Syntax**: `exec ` or `run ` **Example**: ``` # exec /Apps/sh.sqr # exec /Apps/snakegfx.sqr & # jobs ``` ### ps List running processes **Syntax**: `ps` ### kill Terminate a process **Syntax**: `kill ` ### help Display help information **Syntax**: `help` ## Userland Programs ### cat.sqr Display file contents (standalone version) **Usage**: `cat ` ### echo.sqr Print text (standalone version) **Usage**: `echo ` ### sh.sqr Simple shell (alternative shell) **Usage**: `sh` ### memtest.sqr Memory testing utility **Usage**: `memtest` ### zsfetch.sqr System information utility **Usage**: `zsfetch` ## Next Steps - [Applications](Applications.md) - Detailed app documentation - [Games](Games.md) - Game controls and features