Installing

This page shows how to install the Zig language and have an environment which allows you to easily experiment.

Linux

  1. Go to the download page

  2. Scroll down to the Linux section inside master

  3. Download the binary for your computer architecture. For example, if you have a x86-64 CPU, download the file named zig-linux-x86_64-[version].tar.xz

  4. Extract it and put it in a suitable place.

  5. Add it to PATH

  6. Open a terminal. Run zig zen If you get something like

* Communicate intent precisely.
 * Edge cases matter.
 * Favor reading code over writing code.
 * Only one obvious way to do things.
 * Runtime crashes are better than bugs.
 * Compile errors are better than runtime crashes.
 * Incremental improvements.
 ...

Congratulations 😀. You have successfully installed zig 🎉🎉. Now go to the section to create a zig project.

Windows

  1. Go to the download page

  2. Scroll down to the Windows section inside master

  3. Download the binary for your computer architecture. For example, if you have a x86-64 CPU, download the file named zig-windows-x86_64-[version].zip

  4. Extract it and put it in a suitable place.

  5. Add it to PATH

  6. Open a terminal. Run zig zen If you get something like

* Communicate intent precisely.
 * Edge cases matter.
 * Favor reading code over writing code.
 * Only one obvious way to do things.
 * Runtime crashes are better than bugs.
 * Compile errors are better than runtime crashes.
 * Incremental improvements.
 ...

Congratulations 😀. You have successfully installed zig 🎉🎉. Now go to the next section to create a zig project.

macOS

  1. Go to the download page

  2. Scroll down to the macOS section inside master

  3. Download the binary for your computer architecture. For example, if you have an Apple Silicon, download the file named zig-macos-aarch64-[version].tar.xz

  4. Extract it and put it in a suitable place.

  5. Add it to PATH

  6. Open a terminal. Run zig zen If you get something like

* Communicate intent precisely.
 * Edge cases matter.
 * Favor reading code over writing code.
 * Only one obvious way to do things.
 * Runtime crashes are better than bugs.
 * Compile errors are better than runtime crashes.
 * Incremental improvements.
 ...

Congratulations 😀. You have successfully installed zig 🎉🎉. Now go to the next section to create a zig project.