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.
|
2022-01-25 22:47:56 +07:00
|
|
|
> More information: <https://manned.org/swapoff>.
|
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
|
|
|
|
2023-08-19 06:06:31 +02:00
|
|
|
`swapoff --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}}`
|