Set up a Linux swap area on a device or in a file. Note:
path/to/filecan either point to a regular file or a swap partition. More information: https://manned.org/mkswap.
sudo mkswap path/to/file
sudo mkswap -c path/to/file
swapon to use the label):sudo mkswap -L label /dev/sda1