# Linux swap Commands: Create and Manage Swap Files/Partitions

DevFeed: [Linux swap Commands: Create and Manage Swap Files/Partitions](<https://devfeed.tech/articles/linux-swap-commands-create-and-manage-swap-files-partitions-20882.md>)

Original publisher: [Read original article](<https://linuxblog.io/swap-command-create-manage-swap-files-partitions/>)

Author: Hayden James

Published: 2026-08-26T15:13:53Z

Content type: tutorial

Language: en

Sources: [Hayden James](<https://devfeed.tech/sources/hayden-james.md>)

Topics: [Linux](<https://devfeed.tech/topics/linux.md>), [btrfs](<https://devfeed.tech/topics/btrfs.md>), [Kernel](<https://devfeed.tech/topics/kernel.md>), [rhel](<https://devfeed.tech/topics/rhel.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [btrfs](<https://devfeed.tech/tags/btrfs.md>), [commands](<https://devfeed.tech/tags/commands.md>), [desktop](<https://devfeed.tech/tags/desktop.md>), [files](<https://devfeed.tech/tags/files.md>), [fstab](<https://devfeed.tech/tags/fstab.md>), [gotchas](<https://devfeed.tech/tags/gotchas.md>), [guide](<https://devfeed.tech/tags/guide.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [linux](<https://devfeed.tech/tags/linux.md>), [partition](<https://devfeed.tech/tags/partition.md>), [performance](<https://devfeed.tech/tags/performance.md>), [server](<https://devfeed.tech/tags/server.md>), [sysadmins](<https://devfeed.tech/tags/sysadmins.md>)

## AI overview

A practical guide to creating, activating, deactivating, and troubleshooting Linux swap files and partitions using mkswap, swapon, and swapoff. It also explains filesystem-specific considerations, including Btrfs and older XFS kernels.

## Source excerpt

A practical guide to creating, managing, and tuning swap files and swap partitions on Linux using mkswap, swapon, and swapoff, with real commands and common troubleshooting fixes. Continue reading...