Nm Installation On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

Nm Installation On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

nm

List symbol names in object files.

Install nm

  • Debian apt-get install binutils-i586-linux-gnu Click to copy
  • Ubuntu apt-get install binutils-2.26 Click to copy
  • Alpine OS apk add binutils Click to copy
  • Arch Linux pacman -S aarch64-linux-gnu-binutils Click to copy
  • Kali Linux apt-get install binutils-mipsisa32r6el-linux-gnu Click to copy
  • CentOS yum install binutils Click to copy
  • Fedora dnf install binutils-arc-linux-gnu Click to copy
  • Raspbian apt-get install binutils-multiarch Click to copy
  • macOS brew install binutils Click to copy

List symbol names in object files.

How to use nm?

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

List global (extern) functions in a file (prefixed with T):
nm -g file.oClick to copy
Demangle C++ symbols (make them readable):
nm --demangle file.oClick to copy
List only undefined symbols in a file:
nm -u file.oClick to copy
List all symbols, even debugging symbols:
nm -a file.oClick to copy
Install the latest version of nm in Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS from terminal. To install the nm just copy the above command for your OS and run into terminal. After you run the command it will grab the latest version of nm from the respository and install it in your computer/server.