Linux mkswap command
The Linux mkswap command is used to set up a swap area.
mkswap can set a disk partition or file as a Linux swap area.
Syntax
mkswap [-cf][-v0][-v1][设备名称或文件][交换区大小]
Parameters:
- -c Before creating the swap area, first check for damaged blocks.
- -f When creating a swap area on a SPARC computer, this parameter must be added.
- -v0 Create an old-style swap area; this is the default.
- -v1 Create a new-style swap area.
- [swap size] Specify the size of the swap area, in units of 1024 bytes.
Linux Command Reference