# LinuxCNC M61

Instructions · `M61` · verification: source checked

M61 sets the current tool number while in MDI or Manual mode without performing a tool change. It is used, for example, when LinuxCNC starts with a tool already in the spindle and the current tool number needs to be set. The Q word gives the tool number and must be 0 or greater.

## Specification

| Property | Value |
|---|---|
| Language | gcode |
| Code | M61 |
| Syntax | M61 Q- |
| Dialect | LinuxCNC |

### Parameters

| Name | Description |
|---|---|
| Q | Tool number to set as current. It is an error if Q is not 0 or greater. |

## Connected

- Related: [LinuxCNC G43](https://machineschema.com/instruction/gcode-g43.md)

## Safety

- M61 does not change the tool length offset; use G43 after M61 to change the tool length offset.
- It is an error to program Q less than 0.

## Study notes

- M61 changes the current tool number without performing a tool change.
- The document gives powering up LinuxCNC with a tool already in the spindle as an example use for M61.

## Sources

1. [M-Codes](https://linuxcnc.org/docs/html/gcode/m-code.html#mcode:m61) (accessed 2026-10-26)

---

Source page: https://machineschema.com/instruction/mcode-m61  
JSON: https://machineschema.com/instruction/mcode-m61.json  
License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Cite Machine Schema and the original sources.
