---
name: "libnvme_set_hostid-libnvme3"
section: "2"
platform: "linux"
package: "nvme-cli"
version: "3.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libnvme_set_hostid-libnvme3"
---

# libnvme\_set\_hostid-libnvme3(2)

Set hostid.

## NAME

libnvme\_set\_hostid - Set hostid.

## SYNOPSIS

**void libnvme\_set\_hostid** **(struct libnvme\_global\_ctx \*p** *,* **const char \*hostid** *);*

## ARGUMENTS

- p

  The *struct libnvme\_global\_ctx* instance to update.

- hostid

  New string; a copy is stored. Pass NULL to clear.
