---
title: "G-Code Basics in 10 Minutes: A Free Beginner Guide"
description: "Learn the G-code essentials fast: what a program is, the dozen codes that cover most of it, and a tiny example. Then practice them so they actually stick."
url: https://gcodepractice.com/journal/g-code-basics-in-10-minutes-free-guide/
canonical: https://gcodepractice.com/journal/g-code-basics-in-10-minutes-free-guide/
author: "Lawrence Arya"
authorUrl: https://www.linkedin.com/in/vibecoding/
published: 2026-06-04
updated: 2026-06-04
category: "Practice"
tags: ["g-code", "beginner", "learn-fast", "practice"]
lang: en
---

# G-Code Basics in 10 Minutes: A Free Beginner Guide

> **TL;DR** G-code is a list of blocks the machine runs top to bottom, each made of a letter plus a number. About a dozen codes cover most programs: G00 and G01 for moves, G02 and G03 for arcs, G20 and G21 for units, G90 and G91 for positioning, M03 and M05 for the spindle, and M30 to end. Learn those, read one short example, then drill them.

You will not master machining in ten minutes, but you can absolutely grasp how G-code is built and learn the codes that do most of the work. This guide gives you the map; a few minutes of practice afterward turns it into recall.

## Minute 1 to 3: how a program is built

A G-code program is a list of **blocks** (lines) the machine runs in order, top to bottom. Each block is made of **words**, and a word is a letter address followed by a number, the [word address format](https://en.wikipedia.org/wiki/G-code) used on every control. In `G01 X50. F150` there are three words. That is the entire grammar. Read left to right, then down, exactly as covered in [how to read a CNC program](/journal/how-to-read-a-cnc-program-for-beginners/).

## Minute 3 to 6: the dozen codes that matter

Most programs lean on a short set. Learn these and you can read the majority of any beginner program:

| Code | What it does |
| --- | --- |
| `G00` | Rapid move (positioning, not cutting) |
| `G01` | Feed move (cutting in a straight line) |
| `G02` / `G03` | Clockwise / counterclockwise arc |
| `G20` / `G21` | Inch / millimeter units |
| `G90` / `G91` | Absolute / incremental positioning |
| `M03` / `M05` | Spindle on / spindle off |
| `M30` | End the program |

The `G` words set how the machine moves and the `M` words switch things on and off, which is the whole [G-code vs M-code](/journal/g-code-vs-m-code-difference/) distinction. The first pair to truly understand is [G00 vs G01](/journal/g00-vs-g01/), and the rest live in the [common G-codes](/journal/common-g-codes-for-cnc-beginners/) and [common M-codes](/journal/common-m-codes-for-cnc-beginners/) lists.

## Minute 6 to 8: read one tiny program

Here is a complete short program. With the table above, you can already read it:

```
G21 G90        (millimeters, absolute)
S1200 M03      (spindle 1200 rpm, on)
G00 X0 Y0      (rapid to start)
G01 Z-5. F100  (feed down to depth)
G01 X50. F150  (feed across, cutting)
G00 Z25.       (rapid up, clear)
M05            (spindle off)
M30            (end)
```

Notice the shape: setup at the top, motion in the middle, shutdown at the end. Almost every program follows it.

## Minute 8 to 10: how to make it stick

Reading this once is not the same as remembering it. The fastest way to lock in the codes is [active recall](https://en.wikipedia.org/wiki/Active_recall): testing yourself instead of rereading. Look at `G02` and try to say what it does before checking, then repeat the ones you miss. That is far more effective than studying a chart, and it is the method behind [how to memorize G-code faster](/journal/how-to-memorize-g-code-faster/). The exact meanings to test against are in the [LinuxCNC reference](https://linuxcnc.org/docs/html/gcode/g-code.html).

A free practice tool does this for you: it shows a code, you answer, and it brings back whatever you keep missing. That is what a routine on the [G-code practice hub](/g-code-practice/) is built for, and it is the difference between a ten-minute read you forget by tomorrow and recall that holds.

## After the 10 minutes: what to learn next

Once the starter set is solid, a few concepts take you from reading code to understanding it. Modal state is first: most G-codes stay active until changed, the idea behind [modal vs non-modal G-codes](/journal/modal-vs-non-modal-g-codes/), and it is why you track active modes down the page. Then the offsets that tell the machine where things are: the [G54 work offset](/journal/g54-work-offsets-explained/) locates the part and the [G43 tool length offset](/journal/g43-tool-length-offset-explained/) locates each tool. After that, the safety details that prevent crashes, especially the [decimal point](/journal/missing-decimal-point-in-g-code-crash/), and finally feeds and speeds, like [calculating the feed rate for G01](/journal/how-to-calculate-feed-rate-for-g01/). None of it is hard once the basics are automatic.

## Bottom line

G-code is blocks read top to bottom, each a letter plus a number. About a dozen codes (`G00`, `G01`, `G02`, `G03`, `G20`, `G21`, `G90`, `G91`, `M03`, `M05`, `M30`) cover most beginner programs. Spend ten minutes on the structure and that set, read one short example, then drill the codes with active recall so they stick.

## Sources

- [Wikipedia: G-code](https://en.wikipedia.org/wiki/G-code)
- [LinuxCNC G-code reference](https://linuxcnc.org/docs/html/gcode/g-code.html)
- [Wikipedia: Active recall](https://en.wikipedia.org/wiki/Active_recall)

## Frequently asked questions

### Can you learn G-code basics in 10 minutes?
You can learn the structure and the dozen most common codes in about ten minutes, enough to read a simple program. Becoming fluent takes short repeated practice after that.

### What G-codes should a beginner learn first?
`G00` and `G01` for moves, `G02` and `G03` for arcs, `G20` and `G21` for units, `G90` and `G91` for positioning, `M03` and `M05` for the spindle, and `M30` to end.

### Is G-code hard to learn?
The basics are not. A program is blocks read in order, each a letter plus a number. The hard part is recall speed and safety details like decimals and offsets, which come with practice.

### What is the best free way to learn G-code basics?
Read a short overview to get the map, then drill with active recall. A free app like G-Code Sprint quizzes the everyday codes and repeats whichever ones you miss, turning a ten-minute read into lasting recall.

*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/g-code-basics-in-10-minutes-free-guide/
Author: Lawrence Arya — https://www.linkedin.com/in/vibecoding/
