tldr/pages/linux/swapon.md

22 lines
441 B
Markdown
Raw Normal View History

2018-02-14 20:00:27 +00:00
# swapon
> Enable 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/swapon>.
2018-02-14 20:00:27 +00:00
- Show swap information:
2018-02-14 20:00:27 +00:00
`swapon`
2018-02-14 20:00:27 +00:00
- Enable a given swap area:
2018-02-14 20:00:27 +00:00
`swapon {{path/to/file}}`
- Enable all swap areas specified in `/etc/fstab` except those with the `noauto` option:
2018-02-14 20:00:27 +00:00
`swapon --all`
2018-02-14 20:00:27 +00:00
- Enable a swap partition by its label:
2018-02-14 20:00:27 +00:00
`swapon -L {{label}}`