nm

List symbol names in object files. More information: <https://manned.org/nm>.

Install

All systems
curl cmd.cat/nm.sh
Debian Debian
apt-get install binutils-i586-linux-gnu
Ubuntu
apt-get install binutils-2.26
Alpine
apk add binutils
Arch Arch Linux
pacman -S aarch64-linux-gnu-binutils
image/svg+xml Kali Linux
apt-get install binutils-mipsisa32r6el-linux-gnu
CentOS
yum install binutils
Fedora
dnf install binutils-arc-linux-gnu
Windows (WSL2)
sudo apt-get update sudo apt-get install binutils-2.26
OS X
brew install binutils
Raspbian
apt-get install binutils-multiarch
Docker
docker run cmd.cat/nm nm powered by Commando

List symbol names in object files. More information: <https://manned.org/nm>.

  • List global (extern) functions in a file (prefixed with T):
    nm -g path/to/file.o
  • List only undefined symbols in a file:
    nm -u path/to/file.o
  • List all symbols, even debugging symbols:
    nm -a path/to/file.o
  • Demangle C++ symbols (make them readable):
    nm --demangle path/to/file.o

© tl;dr; authors and contributors