How To Install Nasm On Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

How To Install Nasm On Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

nasm

The Netwide Assembler, a portable 80×86 assembler.

Maintainer: Anibal Monsalve Salazar



Section: devel

Install nasm

  • Debian apt-get install nasm Click to copy
  • Ubuntu apt-get install nasm Click to copy
  • Alpine OS apk add nasm Click to copy
  • Arch Linux pacman -S nasm Click to copy
  • Kali Linux apt-get install nasm Click to copy
  • CentOS yum install nasm Click to copy
  • Fedora dnf install nasm Click to copy
  • Raspbian apt-get install nasm Click to copy
  • macOS brew install nasm Click to copy

The Netwide Assembler, a portable 80x86 assembler.

How to use nasm?

Below are few example commands for nasm that you can use in the terminal.

Assemble `source.asm` into a binary file `source`, in the (default) raw binary format:
nasm source.asmClick to copy
Assemble `source.asm` into a binary file `output_file`, in the specified format:
nasm -f format source.asm -o output_fileClick to copy
List valid output formats (along with basic nasm help):
nasm -hfClick to copy
Assemble and generate an assembly listing file:
nasm -l list_file source.asmClick to copy
Add a directory (must be written with trailing slash) to the include file search path before assembling:
nasm -i /path/to/include_dir/ source.asmClick to copy
Installing nasm command is simple. just copy one of the above commands for your operating system and paste it into terminal. This command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS operating systems. Once you run the command it will install the latest version of nasm 2026 package in your OS.