G-code reference

G01 G-Code: Linear Interpolation (Feed Move)

Linear Interpolation (Feed Move) — Moves the tool in a straight line at the programmed feed rate F. This is the basic cutting move used for facing, contouring, slotting and drilling plunges.

By cnccode · Updated
PropertyValue
CodeG01
FunctionLinear Interpolation (Feed Move)
Modal group01
TypeModal — stays active until replaced by another code of the same group
Used onMills and lathes
SyntaxG01 X_ Y_ Z_ F_

What does G01 do?

Moves the tool in a straight line at the programmed feed rate F. This is the basic cutting move used for facing, contouring, slotting and drilling plunges.

G01 is modal: once programmed it remains in effect for the following blocks until another code from modal group 01 replaces it or the control is reset.

Syntax and parameters

Format
G01 X_ Y_ Z_ F_
AddressMeaning
X Y ZEnd point of the line
FFeed rate (mm/min or in/min in G94; per revolution in G95/G99)

G01 example program

Example
G01 Z-2.0 F150.
G01 X50.0 F600.
G01 Y30.0
G01 X0

▶ Open this example in the G-code viewer

Tips and common mistakes

  • F is modal: once set it stays active until changed.
  • If no F has been programmed yet, most controls raise an alarm on the first G01.
  • Combine X/Y/Z in one block for ramping entry moves.

Controller compatibility

G01 follows the ISO/Fanuc dialect used by Fanuc, Haas, Brother, Doosan, Hurco (ISO mode), Mazak (EIA/ISO mode), Okuma (G-code mode) and Siemens in ISO dialect mode. Parameters, option packages and builder-specific behaviour can differ, so confirm the details in your machine's programming manual before running a new program.

Frequently asked questions

Is G01 modal?
Yes. G01 belongs to modal group 01 and stays active until another code of that group is programmed.
What does G01 mean in CNC?
G01 means Linear Interpolation (Feed Move). Moves the tool in a straight line at the programmed feed rate F. This is the basic cutting move used for facing, contouring, slotting and drilling plunges.
What is the difference between G01 and G00?
G01 is Linear Interpolation (Feed Move), while G00 is Rapid Positioning. See the G00 page for its syntax and examples.
Can I use G01 on a lathe?
Yes, G01 is used on both mills and lathes, although some parameters differ between them.