2018-02-17 12:27:28 +00:00
|
|
|
# swapoff
|
|
|
|
|
2023-08-19 05:06:31 +01:00
|
|
|
> Disable devices and files for swapping.
|
|
|
|
> Note: `path/to/file` can either point to a regular file or a swap partition.
|
2022-01-25 15:47:56 +00:00
|
|
|
> More information: <https://manned.org/swapoff>.
|
2018-02-17 12:27:28 +00:00
|
|
|
|
2023-08-19 05:06:31 +01:00
|
|
|
- Disable a given swap area:
|
2018-02-17 12:27:28 +00:00
|
|
|
|
|
|
|
`swapoff {{path/to/file}}`
|
|
|
|
|
2023-08-19 05:06:31 +01:00
|
|
|
- Disable all swap areas in `/proc/swaps`:
|
2018-02-17 12:27:28 +00:00
|
|
|
|
2023-08-19 05:06:31 +01:00
|
|
|
`swapoff --all`
|
2018-02-17 12:27:28 +00:00
|
|
|
|
2023-08-19 05:06:31 +01:00
|
|
|
- Disable a swap partition by its label:
|
2018-02-17 12:27:28 +00:00
|
|
|
|
2023-08-19 05:06:31 +01:00
|
|
|
`swapoff -L {{label}}`
|