2018-02-17 17:57:28 +05:30
|
|
|
# swapoff
|
|
|
|
|
2023-08-19 06:06:31 +02:00
|
|
|
> Disable devices and files for swapping.
|
|
|
|
> Note: `path/to/file` can either point to a regular file or a swap partition.
|
2025-03-28 16:06:49 +02:00
|
|
|
> More information: <https://manned.org/swapoff.8>.
|
2018-02-17 17:57:28 +05:30
|
|
|
|
2023-08-19 06:06:31 +02:00
|
|
|
- Disable a given swap area:
|
2018-02-17 17:57:28 +05:30
|
|
|
|
|
|
|
`swapoff {{path/to/file}}`
|
|
|
|
|
2023-08-19 06:06:31 +02:00
|
|
|
- Disable all swap areas in `/proc/swaps`:
|
2018-02-17 17:57:28 +05:30
|
|
|
|
2025-03-28 16:06:49 +02:00
|
|
|
`swapoff {{[-a|--all]}}`
|
2018-02-17 17:57:28 +05:30
|
|
|
|
2023-08-19 06:06:31 +02:00
|
|
|
- Disable a swap partition by its label:
|
2018-02-17 17:57:28 +05:30
|
|
|
|
2023-08-19 06:06:31 +02:00
|
|
|
`swapoff -L {{label}}`
|