| NVME-GEN-HOSTNQN(1) | NVMe Manual | NVME-GEN-HOSTNQN(1) |
NAME
nvme-gen-hostnqn - Generate a host NVMe Qualified Name
SYNOPSIS
nvme [<global-options>] gen-hostnqn
DESCRIPTION
Generate a host NQN in the form: nqn.2014-08.org.nvmexpress:uuid:1b4e28ba-2fa1-11d2-883f-0016d3cca427 and print it to stdout.
The UUID is taken from the first of these sources that provides a usable value:
The first two sources describe the hardware and survive a reinstall. The machine ID describes the installation and does not. A UUID that is all zeros or all ones is a placeholder reported by some virtual machines and firmware, and is skipped.
This command must be run as root. The DMI and device tree files are readable by root only, so an unprivileged run cannot reach the stable sources, and its output cannot be written to /etc/nvme/hostnqn either.
OPTIONS
GLOBAL OPTIONS
The following options are defined at the top-level nvme command and are available to this subcommand:
--dry-run
--no-ioctl-probing
--no-retries
-o <fmt>, --output-format=<fmt>
--output-format-version=<version>
--timeout=<ms>
-v, --verbose
These options can also be set as machine-wide defaults in nvme-cli.conf(5). A command-line flag always overrides the file.
EXAMPLES
nvme gen-hostnqn
NVME
Part of the nvme-user suite
| 09/18/2026 | NVMe |