2025-03-14 21:59:59 -06:00
|
|
|
# swapon
|
|
|
|
|
|
|
|
|
|
> Enable devices and files for swapping.
|
|
|
|
|
> Note: `path/to/file` can either point to a regular file or a swap partition.
|
2025-04-03 20:36:56 -06:00
|
|
|
> More information: <https://manned.org/swapon.8>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Show swap information:
|
|
|
|
|
|
|
|
|
|
`swapon`
|
|
|
|
|
|
|
|
|
|
- Enable a given swap area:
|
|
|
|
|
|
|
|
|
|
`swapon {{path/to/file}}`
|
|
|
|
|
|
|
|
|
|
- Enable all swap areas specified in `/etc/fstab` except those with the `noauto` option:
|
|
|
|
|
|
2025-04-03 20:36:56 -06:00
|
|
|
`swapon {{[-a|--all]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Enable a swap partition by its label:
|
|
|
|
|
|
|
|
|
|
`swapon -L {{label}}`
|