Skip to content

Shell Commands

NtinosTheGamer2324 edited this page Dec 28, 2025 · 2 revisions

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 <directory>

Example:

# cd /ModuOS
# cd /ModuOS/System64
# cd $/dev

cat

Display file contents

Syntax: cat <file>

Example:

# cat /ModuOS/System64/pcname.txt
# cat $/dev/input/kbd0

echo

Print text to console

Syntax: echo <text>

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 <path> or run <path>

Example:

# exec /Apps/sh.sqr
# exec /Apps/snakegfx.sqr &
# jobs

ps

List running processes

Syntax: ps

kill

Terminate a process

Syntax: kill <pid>

help

Display help information

Syntax: help

Userland Programs

cat.sqr

Display file contents (standalone version)

Usage: cat <file>

echo.sqr

Print text (standalone version)

Usage: echo <text>

sh.sqr

Simple shell (alternative shell)

Usage: sh

memtest.sqr

Memory testing utility

Usage: memtest

zsfetch.sqr

System information utility

Usage: zsfetch

Next Steps

Clone this wiki locally