4 Commands to Check HBA WWN WWNN WWPN on Linux

Table of Contents

How to get HBA WWPN on Linux is a common task for a storage engineer. We need the WWPN to configure zone on the switch side.We will look at this question today.

In our SAN environment, we have two HBAs installed on the Linux system. We can get the HBA WWN/WWPN using the following way without installing any package.

How to check HBA WWNN WWPN on Linux?

$ find /sys/class/fc_host/*/ -name ‘port_name’ << retrieve path to wwpn entry


$ find /sys/class/fc_host/*/ -name ‘node_name’ << retrieve path to wwnn entry


$ grep -v “zZzZ” -H /sys/class/fc_host/host*/*_name

/sys/class/fc_host/host0/port_name:0x2100001b32923dc9 <
/sys/class/fc_host/host0/symbolic_name:QLE2462 FW:v8.07.00 DVR:v10.
/sys/class/fc_host/host5/port_name:0x2101001b32b23dc9 << WWPN
/sys/class/fc_host/host5/symbolic_name:QLE2462 FW:v8.07.00 DVR:v10.

$ find /sys/devices -type d -name ‘host*’ | egrep -v “host_busy|fc_host|scsi_host” | sort



Related Post:

15 Linux multipath examples for Linux admin


Welcome to!

Our website is dedicated to providing comprehensive information on using Linux.

We hope you find our site helpful and informative, and we welcome your feedback and suggestions for future content.

Learn More