SWAPLABEL(8)
๐
SWAPLABEL โ the swaplabel(8) glow-up
ok bestie so this is the manual page for swaplabel, from section 8 (System Administration, aka the grown-up sysadmin section), and it's literally here to read or rewrite the label and UUID of your swap area. no cap. ๐ซถ
โจ NAME โจ
swaplabel โ print or change the label or UUID of a swap area ๐ธ
๐ SYNOPSIS ๐
swaplabel [-L label] [-U UUID] device
that's it. that's the whole vibe. โจ
๐ฆ DESCRIPTION ๐ฆ
okay so swaplabel will display or change the label or UUID of a swap partition located on device (or a regular file, bestie, files count too ๐).
If the optional arguments -L and -U are not given, swaplabel will simply display the current swap-area label and UUID of device. it's giving "just here to look, not touch" ๐
If an optional argument is present, then swaplabel will change the appropriate value on device. and listen โ these values can also be set during swap creation using mkswap(8). the whole point of the swaplabel utility is that it lets you change the label or UUID on an actively used swap device. main character energy fr fr. ๐
๐ OPTIONS ๐
-L,--labellabel โ specify a new label for the device. swap partition labels can be at most 16 characters long. iflabelis longer than 16 characters,swaplabelwill truncate it and print a warning message. so likeโฆ it'll still do it, but it will side-eye you. ๐-U,--uuidUUID โ specify a new UUID for the device. the UUID must be in the standard 8-4-4-4-12 character format, such as is output byuuidgen(1). yes the dashes matter bestie, do not freestyle them. ๐-h,--helpโ display help text and exit. the classic "just tell me what to do" button. ๐-V,--versionโ display version and exit. โญ
๐ ENVIRONMENT ๐
LIBBLKID_DEBUG=allโ enableslibblkiddebug output. it's the "show me everything, I need to see it all" setting ๐ฅ
๐ AUTHORS ๐
swaplabel was written by Jason Borden <jborden@bluehost.com> and Karel Zak <kzak@redhat.com>. legends, honestly. ๐ซถ
๐ธ SEE ALSO ๐ธ
uuidgen(1), mkswap(8), swapon(8)
go read those too, they're all in the same friend group ๐
๐ REPORTING BUGS ๐
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.
found something cursed? tell the devs, don't just suffer in silence bestie ๐ญ
โจ AVAILABILITY โจ
The swaplabel command is part of the util-linux package which can be downloaded from the Linux Kernel Archive at <https://www.kernel.org/pub/linux/utils/util-linux/>.
and that's the whole page, periodt. ๐
this was util-linux 2.42.4, dated 2026-09-21 โ mwah, slay, go label a swap partition responsibly ๐โจ
๐ฆ where this page comes from
- arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms