“if” means input_file, “of” means output_file, “bs” means block_size, “count” means counting way. Here, I used the data block size 1M, the number of data blocks 2048, so that the allocation of space is 2G size.
Format the swap file:
1
$ mkswap /mnt/swapfile
1 2
Setting up swapspace version 1, size = 2 GiB (2147479552 bytes) no label, UUID=e509fbd9-f640-446d-9261-180f2bdb444c