HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

swapoff — Disable devices and files for swapping. Note: `path/to/file` can either point to a regular file or a

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commanddevicesfilesandcliswapofffordisable
linux

Problem

How to use the swapoff command: Disable devices and files for swapping. Note: path/to/file can either point to a regular file or a swap partition. More information: <https://manned.org/swapoff.8>.

Solution

swapoff — Disable devices and files for swapping. Note: path/to/file can either point to a regular file or a swap partition. More information: <https://manned.org/swapoff.8>.

Disable a given swap area:
sudo swapoff {{path/to/file}}


Disable all swap areas in /proc/swaps:
sudo swapoff {{[-a|--all]}}


Disable a swap partition by its label:
sudo swapoff -L {{label}}

Code Snippets

Disable a given swap area

sudo swapoff {{path/to/file}}

Disable all swap areas in `/proc/swaps`

sudo swapoff {{[-a|--all]}}

Disable a swap partition by its label

sudo swapoff -L {{label}}

Context

tldr-pages: linux/swapoff

Revisions (0)

No revisions yet.