The console shell
The Console tab in the bottom dock is an xterm terminal with two jobs. While main.py runs, it is the program's console: print() output, stderr (in red), system messages (dimmed), and the line input for input(). When no program is running, the same terminal becomes a small Pi shell with the prompt:
pi@pyrasp:~ $
The shell appears whenever the program is idle, exited or stopped — not while Python is loading or running, and not while a shell command is still answering. Typed lines are kept in a history you can walk with the up and down arrows, and Tab completes a command name when only one match remains. While a program waits at input(), the console shows "Waiting for input — type in the console" and your typing goes to the program, not the shell.
Commands
| Command | What it does | Needs the simulation running |
|---|---|---|
help | Lists every command. | No |
clear | Clears the console. | No |
ls | Lists the project's files (circuit.py, main.py, extra modules). | No |
cat <file> | Prints one project file. | No |
python3 <file> (alias python) | Runs a project file on the board. | Yes |
pinout | Prints the 40-pin header as two columns, as pinout.xyz does. | No |
gpio readall | A GPIO table: every header pin with BCM number, name, mode, pull and level. | Yes |
i2cdetect -y 1 | Scans I²C bus 1 (SDA on GPIO2, SCL on GPIO3) and prints the address grid. | Yes |
vcgencmd measure_temp | The simulated CPU temperature. | Yes |
vcgencmd measure_volts | Every supply rail's voltage and current. | Yes |
vcgencmd get_throttled | Decodes low 5 V and over-budget rails into the usual throttled bitmask. | Yes |
uptime | Simulated time since the board was powered. | Yes |
date | The simulated date and time (the real clock when stopped). | No |
uname [-a] | Linux, or a plausible kernel line with -a. | No |
hostname | pyrasp. | No |
whoami | pi. | No |
echo <text> | Prints its arguments. | No |
Commands that need a running board say so — for example gpio: the board is not running — press Run first — instead of failing silently. python3 also checks that the file exists and runs it through the same path as the editor's Run: the console shows $ python main.py when the program starts, and input() lines you type feed straight back to it.
The shell reads the live simulation: gpio readall, i2cdetect and vcgencmd go through the running session and show real state, not canned output.
Going deeper: files and where programs run
The shell's ls and cat work on the project's files — the same circuit.py, main.py and extra modules the editors hold — so it is a quick way to check what a build contains without leaving Lab mode.
The Python runtime is a separate, in-browser filesystem: main.py runs with its working directory set to /home/pi, and the project's Python files are written there before the program starts, which is why a capture such as Picamera2().start_and_capture_file("photo.jpg") lands at /home/pi/photo.jpg. Files the program saves appear in the Files instrument, and they live for the browser session. That filesystem is not what ls lists, and it is not shared between boards.
The serial monitor
The serial monitor is its own instrument tab, not part of the shell. It is a terminal for the UART on GPIO14 (TXD) and GPIO15 (RXD): it shows text sent by the Pi and received from the other end, can display bytes as hex, lets you set the virtual adapter's baud rate, and sends whatever you type into RXD. See instruments.
A program that prints to the console and a program that talks over the UART can therefore be watched at the same time — console on one tab, serial on the other.