Definition:

  • Create swap space on a storage partition. You’ll typically use it when you wish to move swap space to a different partition

Synopsis:

  • mkswap [options] device [size]

List of options:

  • -c, --check
    • Check the device (if it is a block device) for bad blocks before creating the swap area. If any bad blocks are found, the count is printed.
  • -p, --pagesize size
    • Specify the Paging size (in bytes) to use. This option is usually unnecessary; mkswap reads the size from the kernel.
  • -L, --label label
    • Specify a label for the device, to allow swapon by label.