Grbl system commands are special instructions used to configure and control your CNC controller. They all begin with a $
and are typically sent manually via a serial terminal or through your G-code sender's console.
These commands are not part of standard G-code — they are Grbl-specific and execute immediately.
Configuration and Control Commands
Command | Description |
$$ |
View all settings – Displays the current values of all Grbl configuration parameters. |
$x=val |
Set a setting – Sets the value of setting $x to val . For example: $100=250.000 . |
$# |
View coordinate offsets – Shows the current G54–G59 work coordinate offsets and any programmed tool or probe offsets. |
$G |
View modal state – Displays the active G-code modes (e.g., G21, G90, G54). Helpful for debugging command behavior. |
$I |
Build info – Returns firmware version and any build metadata (optional). |
$N |
Startup lines – Shows or sets G-code commands that run automatically on startup. |
$N0=... / $N1=... |
Set startup line – Defines custom commands that execute after Grbl initializes. Useful for setting defaults like units or coordinate systems. |
$C |
Check mode – Enables "dry-run" mode where G-code is parsed but not executed. Great for simulation or code validation. |
$X |
Kill alarm lock – Unlocks the machine after an alarm or hard reset. Be sure the machine is safe to move before using this. |
$H |
Run homing cycle – Initiates a homing routine if homing is enabled in settings ($22=1 ). |
~ |
Cycle start/resume – Starts or resumes G-code execution after a feed hold. |
! |
Feed hold – Pauses motion immediately but safely. Can be resumed with ~ . |
? |
Status report – Asks Grbl to send back a real-time status report. Can be sent repeatedly. |
Ctrl+X |
Soft reset – Instantly resets Grbl without cutting power. Stops motion, clears buffer, and reloads settings. |
Safety Considerations
-
Always home the machine (
$H
) after powering on or unlocking to ensure accurate positioning. -
Use
$C
to validate new G-code without risking machine motion. -
The
$X
unlock command should only be used when you're certain the machine is not in a dangerous or unknown state.