The Linux Newbie Guide  ⇒    Fundamentals     Advanced     Supplement   Command Index   ENG⇒中
All rights reserved, please indicate the source when citing
  

swapoff - Disabling Swap





The swapoff command is used to disable swap (swap space) in a Linux system.

The basic syntax of the swapoff command is:swapoff OPTIONS] [DEVICE] .Here, "DEVICE" represents the device where the swap space is located.

Some common options for the swapoff command include:

Examples:
# swapoff -a ←Disable swap based on settings in /etc/fstab
# swapoff /tmp/swap-filename ←Disable a specific swap file

For more examples and detailed information about using swapoff, please refer to the provided link.