---
title: "Common G-Codes Every CNC Beginner Should Know"
description: "A short reference list of the G-codes that show up in almost every CNC program, with a one-line meaning for each, built for beginners."
url: https://gcodepractice.com/journal/common-g-codes-for-cnc-beginners/
canonical: https://gcodepractice.com/journal/common-g-codes-for-cnc-beginners/
author: "Lawrence Arya"
authorUrl: https://www.linkedin.com/in/vibecoding/
published: 2026-05-29
updated: 2026-05-29
category: "Code reference"
tags: ["g-code", "reference", "cheat sheet", "beginner"]
lang: en
---

# Common G-Codes Every CNC Beginner Should Know

> **TL;DR** The core beginner G-codes are G00 (rapid), G01 (linear feed), G02 and G03 (clockwise and counterclockwise arcs), G17 to G19 (plane select), G20 and G21 (inch and metric), G28 (return to reference), G40 to G43 (cutter and tool length comp), G54 to G59 (work offsets), and G90 and G91 (absolute and incremental). Learn these first.

There are dozens of G-codes in the standard, but a CNC beginner does not need all of them to start reading programs. A smaller core shows up constantly. Learn this set first.

## The motion codes

These command movement and appear in almost every line of cutting:

- **G00**: rapid positioning (non-cutting). See [G00 vs G01](/journal/g00-vs-g01/).
- **G01**: linear interpolation, a straight feed move.
- **G02**: clockwise circular interpolation (arc).
- **G03**: counterclockwise circular interpolation. See [G02 vs G03](/journal/g02-vs-g03/).

## Setup and mode codes

These set up how the machine interprets everything else:

- **G17 / G18 / G19**: select the working plane (XY, XZ, YZ). G17 is the common default for milling.
- **G20 / G21**: units, inch (G20) or millimeters (G21). Getting this wrong scales your whole part.
- **G90 / G91**: absolute (G90) or incremental (G91) positioning.
- **G54 to G59**: work coordinate offsets, telling the machine where your part zero is.

## Reference and compensation codes

- **G28**: return to the machine reference (home) position.
- **G40 / G41 / G42**: cutter compensation off, left, and right.
- **G43**: tool length compensation.

## How to learn them

A list like this is a reference, and reading a reference builds recognition, not recall. To actually memorize these, drill them as code-to-meaning and meaning-to-code questions, and put extra reps on the confusable pairs. That is the core of the [practice-first method for beginner CNC code](/journal/beginner-cnc-code-practice/). Many beginners get the modal behavior wrong too, so it is worth reading about [modal versus non-modal G-codes](/journal/modal-vs-non-modal-g-codes/) once these names are familiar.

Then do the same for the machine functions in [common M-codes for CNC beginners](/journal/common-m-codes-for-cnc-beginners/).

## Bottom line

Start with the motion codes, the units and positioning modes, work offsets, and compensation. That dozen covers most beginner programs. Memorize them by recall, not re-reading.

*G-Code Sprint is a study and practice tool only. Always follow your instructor, employer, machine manual, and shop safety procedures.*

---

Source: https://gcodepractice.com/journal/common-g-codes-for-cnc-beginners/
Author: Lawrence Arya — https://www.linkedin.com/in/vibecoding/
