> ## Documentation Index
> Fetch the complete documentation index at: https://kernel.mvhcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MVH Kernel Interactive Shell Commands — Complete Reference

> MVH Kernel includes an interactive shell with 50+ built-in commands. Access filesystem, diagnostics, system info, and more at the mvh> prompt.

After a successful boot, MVH Kernel drops you directly into an interactive shell session. No login sequence or init system is involved — the kernel initialises its hardware abstraction layer, memory manager, VFS, and device registry, then presents the `mvh>` prompt and waits for your input. Everything you need to inspect the system, exercise the filesystem, run self-tests, and trigger diagnostic output is available as a built-in command at that prompt.

## Shell basics

The shell prompt is `mvh>`, displayed in green on the VGA text console and mirrored to the COM1 serial port. Input is read from a PS/2 keyboard using the EN-US QWERTY layout. **Shift** and **Caps Lock** are both supported for uppercase entry. **Backspace** erases the last character and **Ctrl+C** cancels the current input line.

The shell language is switchable at runtime. Run `language <code>` with one of the supported codes to change all shell output immediately:

| Code | Language          |
| ---- | ----------------- |
| `en` | English (default) |
| `de` | Deutsch           |
| `es` | Español           |
| `fr` | Français          |

## Command reference

All built-in commands are listed below by category. Click a category heading to go to the detailed reference page.

### Filesystem

| Command                | Summary                           |
| ---------------------- | --------------------------------- |
| `ls [path]`            | List directory contents           |
| `dir [path]`           | Alias for `ls`                    |
| `cd <path>`            | Change working directory          |
| `pwd`                  | Print working directory           |
| `mkdir <path>`         | Create a directory                |
| `touch <path>`         | Create an empty file              |
| `write <path> <text>`  | Write text to a file (overwrites) |
| `append <path> <text>` | Append text to a file             |
| `cat <path>`           | Print file contents               |
| `type <path>`          | Alias for `cat`                   |
| `open <path>`          | Open and read a file              |
| `rm <path>`            | Remove a file                     |
| `rmdir <path>`         | Remove a directory                |
| `mount`                | List mounted filesystems          |
| `df`                   | Show filesystem usage             |

See [Filesystem Commands](/shell/filesystem) for full syntax and examples.

### Diagnostics

| Command      | Summary                                                 |
| ------------ | ------------------------------------------------------- |
| `meminfo`    | Physical memory stats, PMM counters                     |
| `free`       | Brief memory and heap summary                           |
| `heapinfo`   | Heap stats: sizes, blocks, fragmentation                |
| `heaptest`   | Run heap allocator self-test                            |
| `cpuinfo`    | Extended CPU diagnostics (vendor, caches, TSC, temp)    |
| `features`   | CPUID capability and kernel protection flags            |
| `irqstat`    | Per-vector interrupt counters and spurious count        |
| `pagetable`  | Query kernel page-table mappings                        |
| `pagetest`   | Run VMM self-test                                       |
| `dmesg`      | Dump the 16 KiB structured kernel log ring              |
| `ps`         | Task list with PID, priority, state, and name           |
| `devices`    | Device registry: ID, type, name, online status          |
| `lspci`      | PCI bus device scan                                     |
| `drivers`    | List registered kernel drivers                          |
| `statics`    | Full-screen live system monitor (exit with Q or Ctrl+C) |
| `paniccodes` | List all stable kernel panic codes                      |

See [Diagnostics Commands](/shell/diagnostics) for full details.

### System info

| Command    | Summary                                        |
| ---------- | ---------------------------------------------- |
| `uname`    | Kernel name, version, and architecture         |
| `version`  | Detailed version string (name, version, ABI)   |
| `hostname` | Display the hostname                           |
| `whoami`   | Display current user identity                  |
| `date`     | Current date and time from CMOS RTC            |
| `uptime`   | System uptime in days, hours, minutes, seconds |
| `ticks`    | Raw PIT tick counter at 100 Hz                 |
| `about`    | Kernel information and credits                 |

### Control

| Command           | Summary                                                          |
| ----------------- | ---------------------------------------------------------------- |
| `help`            | List all available shell commands                                |
| `echo <text>`     | Print text to the shell                                          |
| `sleep <ms>`      | Sleep for N milliseconds (max 60 000)                            |
| `language [code]` | Show or switch shell language                                    |
| `clear` / `cls`   | Clear the screen                                                 |
| `reboot`          | Staged hardware reboot with progress display                     |
| `selftest`        | Full kernel self-test (memory, heap, locks, VFS, devices, timer) |
| `synctest`        | Test atomic operations, spinlocks, and mutex foundations         |

### Testing and debug

| Command          | Summary                                                            |
| ---------------- | ------------------------------------------------------------------ |
| `faulttest`      | Validates exception path without CPU error code — **halts kernel** |
| `faulttest page` | Validates page-fault handling and CR2 reporting — **halts kernel** |

<Warning>
  `faulttest` triggers a deliberate breakpoint exception (`int3`). `faulttest page` triggers a deliberate unmapped-page access. Both commands **intentionally halt the kernel** and produce a full panic dump on VGA and serial output. Use them only when you want to validate the exception-handling path. You will need to reboot after running either command.
</Warning>

See [System and Control Commands](/shell/system) for complete details on all system, control, and test commands.
