Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Is it more stable to use mkswap with the option label? Do you do it that way? Better usability later? Commented Jul 27, 2016 at 13:32
  • 1
    it makes no difference to stability. labels on swap partitions (and on filesystems too) are mostly cosmetic, also convenient so you don't have to remember the swap's /dev/ node or the long and ugly UUID. I only mentioned it in my answer to highlight the fact that labels are optional. Commented Jul 27, 2016 at 13:47
  • How do you use swaps in your system everyday? I do not understand how I could benefit from it when I just create the swap and use it. Commented Jul 27, 2016 at 13:49
  • 1
    that's how you use it. you create the swap device, run swapon (or put it in your /etc/fstab) and..........that's it. nothing more to do. your system now has more virtual memory (RAM plus swap) available. The kernel will swap stuff in and out of RAM as needed, automatically. You really don't need to do anything more (except maybe enable zswap as I mentioned in my answer to your other, related question). Commented Jul 27, 2016 at 13:53
  • if you meant "how do i use a swap label", you use it the same as you use a filesystem label. e.g. instead of something like /dev/sdaX none swap defaults,discard 0 0 in /etc/fstab, you'd use LABEL=swaplabel none swap defaults,discard 0 0. You can also use swapon -L swaplabel instead of, e.g., swapon /dev/sdaX. Commented Jul 27, 2016 at 13:54