---
name: "systemd-machine-tag@.service"
section: "8"
platform: "linux"
package: "systemd"
version: "262.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/systemd-machine-tag@.service"
---

# systemd-machine-tag@.service(8)

Add a machine tag to the host

## NAME

systemd-machine-tag@.service - Add a machine tag to the host

## SYNOPSIS

systemd-machine-tag@.service

## DESCRIPTION

systemd-machine-tag@*TAG*.service is a service template that adds the machine tag *TAG* (taken from the instance name) to the host's list of machine tags. Whenever an instance of this template is pulled in, the corresponding tag is added; the operation is idempotent, so pulling it in repeatedly has no further effect.

The primary use of this template is automatic, hardware-driven tagging: the *SYSTEMD\_MACHINE\_TAG* udev property, when set on a device, causes the matching instance of this template to be pulled in (via *SYSTEMD\_WANTS=*), so that plugging in or detecting a specific device automatically tags the host. See [**systemd.device**(5)](/systemd.device/5.md) for details on the *SYSTEMD\_WANTS=* mechanism.

Machine tags may be inspected and edited with the **tags** verb of [**hostnamectl**(1)](/hostnamectl/1.md), and are stored in the *TAGS=* field of [**machine-info**(5)](/machine-info/5.md). Each tag must be 1...255 characters long and consist only of ASCII alphanumeric characters, "-" and ".".

Added in version 262.

## SEE ALSO

[**systemd**(1)](/systemd/1.md), [**hostnamectl**(1)](/hostnamectl/1.md), [**systemd-hostnamed.service**(8)](/systemd-hostnamed.service/8.md), [**machine-info**(5)](/machine-info/5.md), [**udev**(7)](/udev/7.md)
