Author: System Administration Reference
Date: October 2025
Topic: Network Management and Symbol Table Commands
The nm* command family in Linux/UNIX encompasses several distinct utilities, primarily divided into two categories:
nmcli, nmtui, and nm-connection-editor that interface with NetworkManagernm command itself, used for examining binary object filesnmcli [OPTIONS] OBJECT { COMMAND | help }
| Object | Description | Common Usage |
|---|---|---|
general |
NetworkManager general status and operations | nmcli general status |
networking |
Overall networking control | nmcli networking on/off |
radio |
Radio switch management (WiFi, WWAN) | nmcli radio wifi on |
connection |
Network connection profiles | nmcli connection show |
device |
Network device management | nmcli device status |
# Show all connections
nmcli connection show
# Show all devices and their status
nmcli device status
# Show detailed device information
nmcli device show eth0
# Show NetworkManager status
nmcli general status
# Activate a connection
nmcli connection up "connection-name"
# Deactivate a connection
nmcli connection down "connection-name"
# Delete a connection
nmcli connection delete "connection-name"
# Reload connection files from disk
nmcli connection reload
# Create a new Ethernet connection with DHCP
nmcli connection add type ethernet con-name "MyEthernet" ifname eth0
# Create a static IP connection
nmcli connection add type ethernet con-name "StaticIP" ifname eth0 \
ip4 192.168.1.100/24 gw4 192.168.1.1
# Create a WiFi connection
nmcli device wifi connect "SSID" password "password"
# Create WiFi connection with specific settings
nmcli connection add type wifi con-name "MyWiFi" ifname wlan0 ssid "SSID" \
wifi-sec.key-mgmt wpa-psk wifi-sec.psk "password"
# Modify IP address
nmcli connection modify "MyConnection" ipv4.addresses 192.168.1.150/24
# Modify DNS servers
nmcli connection modify "MyConnection" ipv4.dns "8.8.8.8 8.8.4.4"
# Change to DHCP
nmcli connection modify "MyConnection" ipv4.method auto
# Add additional IP address
nmcli connection modify "MyConnection" +ipv4.addresses 192.168.1.151/24
nmcli connection down "MyConnection" && nmcli connection up "MyConnection"
# Terse output (script-friendly)
nmcli -t device status
# Custom fields
nmcli -f NAME,TYPE,DEVICE connection show
# Pretty output (default)
nmcli -p device status
# Colored output
nmcli -c yes device status
A menu-driven interface for users who prefer a visual approach without requiring a full GUI.
# Launch main menu
nmtui
# Directly edit connections
nmtui edit
# Directly activate connections
nmtui connect
# Set system hostname
nmtui hostname
nmtui is excellent for quick configuration on servers without X11, or when SSH'd into remote systems. Navigation uses arrow keys, Tab, and Enter.
Full-featured GUI application for desktop environments. Provides comprehensive access to all connection settings including VPN, bonding, bridging, and advanced options.
# Launch connection editor
nm-connection-editor
# Edit specific connection
nm-connection-editor -c "connection-name"
Utility to determine if NetworkManager is online (has network connectivity)
# Wait for network connectivity (useful in scripts)
nm-online -t 30 # Wait up to 30 seconds
# Check connectivity status
nm-online -q && echo "Online" || echo "Offline"
Monitor NetworkManager changes in real-time
# Monitor all NetworkManager activity
nmcli monitor
# Monitor specific connection
nmcli connection monitor "MyConnection"
The nm command is part of the GNU binutils package and is essential for examining compiled binaries, debugging, and understanding program structure.
nm [OPTIONS] [FILE...]
| Option | Description |
|---|---|
-A |
Display filename before each symbol |
-a |
Display all symbols, including debugger-only |
-C |
Demangle C++ symbol names |
-D |
Display dynamic symbols only |
-g |
Display only external symbols |
-n |
Sort numerically by address |
-p |
Don't sort; display in symbol table order |
-u |
Display only undefined symbols |
-l |
Display line number information |
--size-sort |
Sort by symbol size |
nm displays a letter code for each symbol indicating its type:
| Code | Description |
|---|---|
A |
Absolute symbol (value won't change with relocation) |
B/b |
Uninitialized data (BSS) - uppercase for global, lowercase for local |
C |
Common symbol (uninitialized data) |
D/d |
Initialized data section |
G/g |
Initialized data for small objects |
I |
Indirect reference to another symbol |
N |
Debugging symbol |
R/r |
Read-only data section |
S/s |
Uninitialized data for small objects |
T/t |
Text (code) section |
U |
Undefined symbol |
V/v |
Weak object |
W/w |
Weak symbol (untagged weak if not T/D/B) |
- |
Stabs symbol (debugging) |
? |
Unknown type |
# List all symbols in a binary
nm /bin/ls
# List symbols in a library
nm /usr/lib/libc.so.6
# List symbols in object file
nm myprogram.o
# Show only undefined symbols (dependencies)
nm -u /bin/ls
# Show only global (external) symbols
nm -g myprogram.o
# Show dynamic symbols only
nm -D /usr/lib/libssl.so
# Demangle C++ symbols
nm -C mycppprogram
# Sort by symbol size (find largest symbols)
nm --size-sort -S mybinary
# Find specific symbol
nm mybinary | grep "main"
# Show line numbers (if debug info available)
nm -l mybinary
# List all functions exported by a shared library
nm -D --defined-only /usr/lib/libpthread.so.0
# Find what symbols a program needs
nm -u myprogram
# Check if a library provides a specific symbol
nm -D /usr/lib/libm.so.6 | grep "sin"
# Find duplicate symbols across multiple object files
nm *.o | grep " T " | sort
# Identify missing symbols causing link errors
nm -u myprogram | grep " U "
# Compare symbols between two versions of a library
nm libfoo.so.1 > v1_symbols.txt
nm libfoo.so.2 > v2_symbols.txt
diff v1_symbols.txt v2_symbols.txt
ip - Show/manipulate routing, devices, policy routingifconfig - Configure network interfaces (deprecated, use ip)systemctl - Control NetworkManager servicejournalctl - View NetworkManager logs# Control NetworkManager service
systemctl status NetworkManager
systemctl restart NetworkManager
systemctl enable NetworkManager
# View NetworkManager logs
journalctl -u NetworkManager -f
objdump - Display information from object filesreadelf - Display information about ELF filesldd - Print shared library dependenciesstrings - Find printable strings in filesfile - Determine file type/etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile
dns=default
[ifupdown]
managed=false
[device]
wifi.scan-rand-mac-address=yes
/etc/NetworkManager/system-connections/
Each connection is stored as a separate file with restrictive permissions (600).
[connection]
id=MyEthernet
uuid=12345678-1234-1234-1234-123456789abc
type=ethernet
autoconnect=true
interface-name=eth0
[ethernet]
[ipv4]
method=manual
address1=192.168.1.100/24,192.168.1.1
dns=8.8.8.8;8.8.4.4;
[ipv6]
method=auto
# Method 1: Using nmcli
nmcli connection modify "Wired connection 1" \
ipv4.method manual \
ipv4.addresses "192.168.1.100/24" \
ipv4.gateway "192.168.1.1" \
ipv4.dns "8.8.8.8,8.8.4.4"
nmcli connection up "Wired connection 1"
# Method 2: Using nmtui
nmtui edit
# Check device status
nmcli device status
# Check connection status
nmcli connection show --active
# Restart NetworkManager
systemctl restart NetworkManager
# Check logs
journalctl -u NetworkManager -n 50
# Test connectivity
nmcli general status
ping -c 4 8.8.8.8
# Find what libraries a program needs
ldd /bin/ls
# Find undefined symbols in object file
nm -u myprogram.o
# Verify library provides required symbol
nm -D /usr/lib/libfoo.so | grep "symbol_name"
# Check for symbol conflicts
nm *.o | grep " T symbol_name"
nmcli -t for scripting to get consistent, parseable output/etc/NetworkManager/system-connections/nmcli connection reload after manually editing connection files-C option for C++ programs to demangle namesgrep, awk, and sort for powerful analysis--size-sort to identify bloated symbolsnm -D for dynamic libraries to see exported symbols#!/bin/bash
# Check if connection exists, create if not
CONNECTION="MyStaticIP"
INTERFACE="eth0"
IP="192.168.1.100/24"
GATEWAY="192.168.1.1"
DNS="8.8.8.8,8.8.4.4"
if nmcli connection show "$CONNECTION" &>/dev/null; then
echo "Connection exists, modifying..."
nmcli connection modify "$CONNECTION" \
ipv4.addresses "$IP" \
ipv4.gateway "$GATEWAY" \
ipv4.dns "$DNS"
else
echo "Creating new connection..."
nmcli connection add \
type ethernet \
con-name "$CONNECTION" \
ifname "$INTERFACE" \
ipv4.method manual \
ipv4.addresses "$IP" \
ipv4.gateway "$GATEWAY" \
ipv4.dns "$DNS"
fi
nmcli connection up "$CONNECTION"
#!/bin/bash
# Find all undefined symbols across multiple object files
echo "Undefined symbols across all object files:"
for obj in *.o; do
echo "=== $obj ==="
nm -u "$obj" | grep " U " | awk '{print $2}' | sort -u
done
| Problem | Solution |
|---|---|
| Connection not appearing | nmcli connection reload |
| Changes not taking effect | Bring connection down and up again |
| Can't modify system connections | Check permissions, may need sudo |
| NetworkManager not running | systemctl start NetworkManager |
| DNS not working | Check /etc/resolv.conf and DNS settings |
| Problem | Solution |
|---|---|
| No symbols in file | Binary may be stripped; use file to check |
| Mangled C++ names | Use nm -C to demangle |
| Can't find symbol | Try nm -a for all symbols including debug |
| Wrong architecture | Verify with file command |
man nmcli
man nmcli-examples
man nm-settings
man nm-online
man NetworkManager.conf
man nm