Skip to content

Latest commit

 

History

History
46 lines (36 loc) · 2.22 KB

File metadata and controls

46 lines (36 loc) · 2.22 KB

Shell Commands Documentation

Overview

The Astra OS shell is a modular, interactive kernel task that manages system operations through a command registry.

Current Working Directory and Prompt

The shell displays the full absolute path in the prompt format astra(/path/to/current)>. Users are automatically logged into /home/astrauser/ on startup, which is the default workspace for user operations. Files created without an absolute path are placed relative to the current working directory.

Command Categories

Commands are categorized to facilitate organization and help discovery.

System Commands

  • help [cmd] — List all commands or get detailed help for a specific command.
  • version — Display kernel version and build information.
  • clear — Clear the terminal screen.
  • echo <text> — Print text to the console. Supports \n, \t, \\ escapes.
  • reboot — Trigger a hardware reset.
  • rand [max] | rand [min] [max] — Generate random numbers using hardware RDRAND or software fallback.
  • uname [-a] — Print system information.
  • dmesg — Print the kernel log buffer.
  • sudo <command> [args] — Execute command with elevated privileges. Grants access to restricted directories like /dev, /sys, and /kernel.
  • exit — Exit the shell and trigger a system reboot.

Applications

  • calculator — Launch full-screen calculator app (interactive).
  • timer — Launch full-screen timer/stopwatch app (interactive).

Filesystem Commands

  • ls [path] — List directory contents. Defaults to current working directory.
  • cat <path> — Display the contents of a file or device node.
  • stat <path> — Show file/directory metadata.
  • tree [path] — Recursively show the directory tree.
  • mkdir <path> — Create a directory.
  • cd [path] — Change the current working directory.
  • pwd — Print the current working directory.
  • rm <path> — Remove a file or directory.
  • cp <src> <dest> — Copy a file.
  • mv <src> <dest> — Move/rename a file (implemented as copy + remove).
  • mount — List currently mounted filesystems.

Process Management

  • ps — List all running tasks (PID, State, Name).
  • kill <pid> — Terminate a task by PID (marks it as Dead for reaping).