Table of Contents
Introduction
If you work with Fibre Channel (FC) storage, sooner or later you’ll need to find your server’s HBA (Host Bus Adapter) identifiers. Whether you’re zoning a SAN switch, presenting a LUN from a storage array, or troubleshooting a multipath issue, the storage team will inevitably ask you for one thing: “What’s your WWPN?”
Before we get to the commands, let’s clear up the terminology, because these three acronyms trip people up constantly.
WWN vs. WWNN vs. WWPN
A WWN (World Wide Name) is a unique 64-bit identifier (like a MAC address for Fibre Channel) burned into HBA hardware. There are two kinds:
| Term | Full Name | What It Identifies |
|---|---|---|
| WWNN | World Wide Node Name | The HBA adapter/node as a whole. A dual-port card often shares one WWNN. |
| WWPN | World Wide Port Name | An individual port on the HBA. Each port has its own unique WWPN. |
WWN is the umbrella term; WWNN and WWPN are the two specific types. For SAN zoning, the value you almost always need is the WWPN — the per-port name. A WWN looks like this:
0x21000024ff3a1b2c
Now, here are four reliable ways to find these values on Linux.
Command 1: systool (The Cleanest Method)
systool reads the sysfs filesystem and presents HBA information in a clean, human-readable format. It’s the go-to command for most administrators.
It comes from the sysfsutils package, which may not be installed by default:
# Debian/Ubuntu
sudo apt install sysfsutils
# RHEL/CentOS/Fedora
sudo dnf install sysfsutils
Then query all Fibre Channel hosts with verbose output:
systool -c fc_host -v
Sample output (trimmed):
Class = "fc_host"
Class Device = "host1"
...
node_name = "0x20000024ff3a1b2c"
port_name = "0x21000024ff3a1b2c"
port_state = "Online"
speed = "16 Gbit"
...
Here:
See also: Mastering the Linux Command Line — Your Complete Free Training Guide
node_name= the WWNNport_name= the WWPN
To quickly extract just the names across all ports:
systool -c fc_host -v | grep -E "port_name|node_name"
This is the most readable option and also shows useful extras like port state and link speed.
Command 2: Reading Directly from /sys (Always Available)
If you can’t install extra packages, the kernel already exposes everything through the sysfs filesystem under /sys/class/fc_host/. This method works on virtually any modern Linux system with zero dependencies.
First, list the FC hosts present:
ls /sys/class/fc_host/
# host1 host2
Then read the port and node names directly:
# WWPN (port name)
cat /sys/class/fc_host/host1/port_name
# 0x21000024ff3a1b2c
# WWNN (node name)
cat /sys/class/fc_host/host1/node_name
# 0x20000024ff3a1b2c
To grab the WWPN for every HBA port in one shot:
cat /sys/class/fc_host/host*/port_name
You can also check the link status the same way:
cat /sys/class/fc_host/host1/port_state # Online / Linkdown
cat /sys/class/fc_host/host1/speed # e.g. 16 Gbit
Because it relies only on the kernel, this is the most portable and dependency-free approach — ideal for minimal servers, rescue environments, or scripting.
Command 3: cat /proc/scsi/... for QLogic / Emulex (Legacy but Handy)
Many HBA drivers expose details through the /proc filesystem. This is especially useful on older systems and gives vendor-specific detail.
For QLogic HBAs
cat /proc/scsi/qla2xxx/*
Look for lines showing the adapter’s node and port names, along with firmware version and connected targets.
For Emulex HBAs
cat /proc/scsi/lpfc/*
⚠️ Note: The
/proc/scsi/<driver>interface is deprecated on newer kernels and may be absent. If these paths don’t exist, fall back tosystoolor the sysfs method above. Still, on legacy enterprise systems you’ll often find rich diagnostic output here.
You can also identify which HBA hardware is installed at the PCI level:
lspci | grep -i "fibre\|fibre channel\|HBA"
# 05:00.0 Fibre Channel: QLogic Corp. ISP2532 8Gb Fibre Channel ...
This confirms the vendor and model, which tells you which driver-specific /proc path to check.
Command 4: Vendor Tools — scli / hbacmd (Deepest Detail)
For the most comprehensive information — including firmware, configuration, and live SAN status — the HBA vendor’s own management tools are unmatched.
QLogic: scli or qaucli
# List adapter information including WWNN/WWPN
scli -i
# Or with the newer utility
qaucli -pr fc -i
Emulex (Broadcom): hbacmd
# List all HBA ports and their WWPNs
hbacmd listhbas
# Detailed attributes for a specific port
hbacmd hbaattributes <WWPN>
Sample hbacmd listhbas output:
Manageable HBA List
Port WWN : 21:00:00:24:ff:3a:1b:2c
Node WWN : 20:00:00:24:ff:3a:1b:2c
Model : LPe16002B-M6
...
These tools must be downloaded from the vendor (QLogic/Marvell or Broadcom/Emulex) and aren’t in standard repos. But when you need to flash firmware, change parameters, or diagnose SAN connectivity in depth, they’re the definitive source.
Quick Comparison
| Command | Package Needed | Best For |
|---|---|---|
systool -c fc_host -v | sysfsutils | Clean, readable everyday use |
cat /sys/class/fc_host/* | None (built-in) | Portability, scripting, minimal systems |
cat /proc/scsi/<driver>/* | None (driver-dependent) | Legacy systems, vendor detail |
scli / hbacmd | Vendor tools | Firmware, deep diagnostics, SAN status |
A Handy One-Liner
To quickly print every WWPN and WWNN on the system with labels — no extra packages required:
for host in /sys/class/fc_host/host*; do
echo "=== ${host##*/} ==="
echo " WWPN: $(cat $host/port_name)"
echo " WWNN: $(cat $host/node_name)"
echo " State: $(cat $host/port_state)"
done
Output:
=== host1 ===
WWPN: 0x21000024ff3a1b2c
WWNN: 0x20000024ff3a1b2c
State: Online
=== host2 ===
WWPN: 0x21000024ff3a1b2d
WWNN: 0x20000024ff3a1b2d
State: Online
Formatting the WWN for SAN Zoning
sysfs prints the WWN as a raw hex string (0x21000024ff3a1b2c), but SAN switches usually expect the colon-separated format (21:00:00:24:ff:3a:1b:2c). Convert it like this:
cat /sys/class/fc_host/host1/port_name | \
sed 's/0x//; s/\(..\)/\1:/g; s/:$//'
# 21:00:00:24:ff:3a:1b:2c
Hand that value to your storage/SAN team and you’re ready for zoning.
Conclusion
Finding your HBA’s WWN identifiers on Linux comes down to four dependable approaches:
systool -c fc_host -v— the cleanest, most readable everyday method.cat /sys/class/fc_host/*— dependency-free and perfect for scripting.cat /proc/scsi/<driver>/*— legacy but rich vendor detail.scli/hbacmd— vendor tools for the deepest diagnostics.
For quick day-to-day work, remember the key mapping: port_name is your WWPN (what SAN zoning needs) and node_name is your WWNN. Start with systool or the sysfs method, and reach for the vendor tools only when you need firmware-level detail.


