Close the specified swap space
swapoff command is used to close the specified swap space (including swap files and swap partitions). Swapoff is actually a symbolic link to swapon, which can be used to close the system's swap area.
swapoff(option)(parameter)
-a: Close all swap spaces in the configuration file "/etc/fstab".
Swap space: Specify the swap space that needs to be activated, which can be a swap file or a swap partition. If it is a swap partition, specify the device file corresponding to the swap partition.
Close swap partition
swapoff /dev/sda2