> ## 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 System and Control Shell Commands Reference

> Reference for system info and control commands: uname, date, uptime, echo, sleep, reboot, selftest, synctest, language, and faulttest.

MVH Kernel provides a set of system information and control commands that let you query kernel identity, read the hardware clock, manage shell behaviour, run self-tests, and trigger a clean hardware reboot — all from the `mvh>` prompt. Two additional commands, `faulttest` and `faulttest page`, deliberately halt the kernel so you can validate the exception-handling path.

***

## uname

Print the kernel name, hostname, version, and architecture on a single line.

**Syntax**

```sh theme={null}
uname
```

**Example**

```text theme={null}
mvh> uname
MVHKernel mvhcloud 1.1.2 x86_64
```

***

## version

Print detailed version information: kernel name, version string, architecture, and binary format.

**Syntax**

```sh theme={null}
version
```

**Example**

```text theme={null}
mvh> version
MVH Kernel 1.1.2 x86_64 ELF64
```

***

## hostname

Display the system hostname.

**Syntax**

```sh theme={null}
hostname
```

**Example**

```text theme={null}
mvh> hostname
mvhcloud
```

***

## whoami

Display the current user identity. MVH Kernel runs entirely in kernel mode, so this always returns `root`.

**Syntax**

```sh theme={null}
whoami
```

**Example**

```text theme={null}
mvh> whoami
root
```

***

## about

Display a formatted panel with product name, kernel version, architecture, website, active language, keyboard layout, loaded drivers, and the MIT license notice.

**Syntax**

```sh theme={null}
about
```

**Example**

```text theme={null}
mvh> about
+==================== MVHCLOUD ====================+
| Product      : MVHCLOUD OS
| Kernel       : MVH Kernel 1.1.2
| Architecture : x86_64 / ELF64
| Website      : https://MVHCLOUD.com
| Language     : English
| Keyboard     : English US QWERTY
| Drivers      : VGA, PS/2, UART, RTC, PCI, PIT
| License      : MIT
+--------------------------------------------------+
MVHCLOUD builds independent software foundations
for custom operating systems and experiments.
```

***

## date

Read the current date and time from the CMOS real-time clock (RTC) and display it in `YYYY-MM-DD HH:MM:SS UTC` format.

**Syntax**

```sh theme={null}
date
```

**Example**

```text theme={null}
mvh> date
2025-06-14 10:23:47 UTC
```

***

## uptime

Print how long the system has been running since boot. The output is formatted as days (if non-zero), hours, minutes, and seconds.

**Syntax**

```sh theme={null}
uptime
```

**Example**

```text theme={null}
mvh> uptime
up 2h 14m 38s
```

***

## ticks

Print the raw PIT tick counter and the timer frequency. The PIT is configured at 100 Hz, so the tick value increments 100 times per second.

**Syntax**

```sh theme={null}
ticks
```

**Example**

```text theme={null}
mvh> ticks
81200 ticks at 100 Hz
```

***

## echo

Print the supplied text to the shell, followed by a newline. All characters after `echo ` are passed through verbatim.

**Syntax**

```sh theme={null}
echo <text>
```

**Example**

```text theme={null}
mvh> echo Hello, MVH Kernel!
Hello, MVH Kernel!
```

***

## sleep

Pause shell execution for a given number of milliseconds. The maximum allowed value is 60 000 ms (60 seconds).

**Syntax**

```sh theme={null}
sleep <ms>
```

**Example**

```sh theme={null}
sleep 500
sleep 2000
```

If you supply a value greater than 60 000 or a non-numeric argument, the shell prints `Usage: sleep <milliseconds>, maximum 60000`.

***

## language

Show available shell languages or switch to a different one immediately. All subsequent shell output uses the chosen language.

**Syntax**

```sh theme={null}
language            # show available languages with active marker
language <code>     # switch to the given language
```

**Supported codes**

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

**Example**

```text theme={null}
mvh> language de
Sprache auf Deutsch geaendert.
```

Running `language` without an argument lists all available codes and marks the currently active one with `[active]`.

***

## clear / cls

Clear the VGA text screen. Both `clear` and `cls` produce the same result. After clearing, the shell prints a brief confirmation message and re-displays the `mvh>` prompt.

**Syntax**

```sh theme={null}
clear
cls
```

***

## reboot

Perform a staged hardware reboot. The sequence locks the shell, stops keyboard input, disables CPU interrupts, prepares the reset controller, and then issues the hardware reset. Each stage is displayed on screen with progress dots and a green `[OK]` indicator.

**Syntax**

```sh theme={null}
reboot
```

**Example**

```text theme={null}
mvh> reboot

+=============== MVHCLOUD REBOOT ===============+
+------------------------------------------------+
Locking kernel shell      ..... [OK]
Stopping keyboard input   ..... [OK]
Disabling CPU interrupts  ..... [OK]
Preparing reset controller..... [OK]
Sending hardware reset.....
```

***

## selftest

Run the full kernel self-test suite. Each sub-test prints `[PASS]` or `[FAIL]` followed by its name. A summary line at the end confirms whether all tests passed.

**Syntax**

```sh theme={null}
selftest
```

**Tests included**

| Test                      | What it checks                                         |
| ------------------------- | ------------------------------------------------------ |
| `physical page allocator` | PMM allocation and free round-trip                     |
| `kernel heap`             | Heap allocator correctness                             |
| `atomics and locks`       | Atomic ops, spinlocks, and mutex foundations           |
| `heap structure`          | Heap canary and block-list integrity                   |
| `null page protection`    | Confirms VA `0x0` is unmapped                          |
| `dynamic page mapping`    | VMM map, query, and unmap                              |
| `VFS root`                | Reads `/etc/version` through the VFS layer             |
| `device registry`         | Verifies at least 9 devices are registered             |
| `timer progress`          | Confirms PIT tick counter advances after a 20 ms sleep |

**Example**

```text theme={null}
mvh> selftest
[PASS] physical page allocator
[PASS] kernel heap
[PASS] atomics and locks
[PASS] heap structure
[PASS] null page protection
[PASS] dynamic page mapping
[PASS] VFS root
[PASS] device registry
[PASS] timer progress
All kernel self-tests passed
```

***

## synctest

Test the atomic operations, spinlock, and mutex foundations in isolation. This is a subset of what `selftest` covers, useful for quickly verifying the synchronisation primitives after a change.

**Syntax**

```sh theme={null}
synctest
```

**Example**

```text theme={null}
mvh> synctest
Synchronization self-test passed
```

***

## faulttest

Trigger a deliberate `int3` breakpoint exception to validate the exception-handling path for exceptions that carry no CPU error code. The kernel captures the exception, produces a full register and stack-trace dump on VGA and serial output, and halts.

**Syntax**

```sh theme={null}
faulttest
```

**Example**

```text theme={null}
mvh> faulttest
Triggering breakpoint exception.
[kernel panic — MVH-EX-03 — exception dump on VGA/serial]
```

***

## faulttest page

Trigger a deliberate unmapped-page access at virtual address `0x40000000` to validate page-fault exception handling and verify that the CR2 register (faulting address) is correctly reported in the panic dump. The kernel halts after displaying the dump.

**Syntax**

```sh theme={null}
faulttest page
```

**Example**

```text theme={null}
mvh> faulttest page
Triggering unmapped page access.
[kernel panic — MVH-EX-0E — page fault dump with CR2 on VGA/serial]
```

<Warning>
  `faulttest` and `faulttest page` **intentionally halt the kernel**. Running either command ends your session — you will need to reboot to use the shell again. Use these commands only when you want to validate the exception-handling path, verify panic output formatting, or confirm that CR2 is reported correctly on a page fault.
</Warning>
