mkswap

Set up a Linux swap area on a device or in a file. Note: path/to/file can either point to a regular file or a swap partition. More information: https://manned.org/mkswap.

sudo mkswap {{path/to/file}}

sudo mkswap {{[-c|--check]}} {{path/to/file}}

sudo mkswap {{[-L|--label]}} {{label}} {{/dev/sdXY}}

sudo mkswap {{[-U|--uuid]}} {{clear|random|time|UUID_value}}

sudo mkswap {{[-s|--size]}} {{file_size}} {{[-F|--file]}} {{path/to/swapfile}}