The <spec> parameter: -L <label> LABEL of device to be used -U <uuid> UUID of device to be used LABEL=<label> LABEL of device to be used UUID=<uuid> UUID of device to be used <device> name of device to be used <file> name of file to be used
注意
无
示例
1 2 3 4 5 6 7 8 9
$ swapon NAME TYPE SIZE USED PRIO /dev/dm-1 partition 2G 0B -2 /swapfile file 1000M 0B -3 # 关闭所有swap $ swapoff -a $ swapon $ more /proc/swaps Filename Type Size Used Priority