Modular Computers the manual GitHub

label

label: show or set a device’s label.

Synopsis

label device [label]

Description

With only a device, label prints its label (nothing when it has none). With a label, it sets it; an empty one, ””, clears it.

A device is named as lsdev(1) names it (storage0, eeprom), with or without /dev/ before it, or by its id.

The label is kept on the device’s item, and shown in its details (hold Shift over it), so it goes wherever the device goes. lsdev shows every device’s label. A label is at most 32 printable characters.

Exit status

0 when the label was printed or set; 1 for a device that isn’t there, a label that can’t be one, or a device that can’t have one (a cabled block’s: it has no item to keep it on).

Examples

label storage1 backups
label eeprom
label storage1 ""

Notes

Linux labels a disk’s filesystem (e2label, fatlabel); mcos labels any device that is an item, as OpenOS did.

See also

lsdev(1)