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, --label label โ€” specify a new label for the device. swap partition labels can be at most 16 characters long. if label is longer than 16 characters, swaplabel will truncate it and print a warning message. so likeโ€ฆ it'll still do it, but it will side-eye you. ๐Ÿ’€
  • -U, --uuid UUID โ€” 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 by uuidgen(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 โ€” enables libblkid debug 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