Install NASM and check the version

Install NASM

On Debian and Ubuntu NASM lives in the system repositories, so one command is enough:

sudo apt update sudo apt install nasm

nasm -v

Check the assembler after the install:

nasm -v

NASM version 3.01 compiled on Mar 3 2026

Other versions

Every example in this course works with NASM 2.14 and newer. If your distro ships an older NASM, install the current release from nasm.us, or build from source: ./configure, make, sudo make install.

You also need a linker. The GNU linker ld ships with binutils and is already on every Linux system.

The install pages walk through each system: Install NASM on Windows 11, Install NASM on Ubuntu, Install NASM on Rocky Linux, Install NASM on macOS and Install NASM on FreeBSD. To try the examples without installing anything on the machine, read Assembly in Docker.

Questions

A new set of questions in a new order every time. Choose one answer for each, then check.

  1. Which command prints the version of the installed NASM?

    Answer

    nasm -v

    NASM takes -v (or --v) and prints one line with the version and the build date.

  2. Which package holds the NASM assembler in the Debian and Ubuntu repositories?

    Answer

    nasm

    The package is simply nasm; binutils holds the linker and the other binary tools.

  3. After NASM has made an object file, which tool turns it into an executable?

    Answer

    The linker

    The linker, ld from binutils, joins the object file and the libraries into an executable.

  4. Which package provides the GNU linker ld on a Linux system?

    Answer

    binutils

    ld is part of binutils, which also holds objdump, readelf and as.

  5. What does nasm -v do after it prints the version?

    Answer

    It exits

    The option prints the version and exits; no source file is assembled.

  6. Which NASM option lists every command line option?

    Answer

    -h

    -h, also spelled --help, prints the usage and the option list.

  7. Which NASM versions does this course support?

    Answer

    2.14 and newer

    Every example works with NASM 2.14 and newer, and the pages were checked with 3.01.

  8. What does sudo apt update do before the install?

    Answer

    It refreshes the package lists

    apt update downloads the current package lists; apt install nasm is the next command.

  9. In the line NASM version 3.01 compiled on Mar 3 2026, which part is the version?

    Answer

    3.01

    The number after the word version is 3.01; the rest is the build date.

  10. Where can you get a newer NASM when the distribution ships an old one?

    Answer

    From nasm.us or by building it from source

    The page names two ways: the current release from nasm.us, or a build from source with configure, make and make install.

The apt commands were not run: they need Debian or Ubuntu with root. The version check was run on Alpine Linux 3.24.3 (x86_64) with NASM 3.01.

Article author: Arthur Isaev