SWAPON(8) SWAPON(8) swapon, swapoff - swapon [] [-...] swapoff [-va] [-...] swapon , '. -. -L -U uuid UUID. swapon, , , ' , ' . swapoff ' . -a, ' ' ( /proc/swaps /etc/fstab). -a, --all , <> /etc/fstab, , , <>. , ', . -T, --fstab fstab mount(8). , strverscmp(3); , <<.>> .fstab, . . , , initramfs chroot, . -d, --discard[=] ' , '. SSD, . ' : --discard=once ' swapon; --discard=pages ' , . , . /etc/fstab discard, discard=once discard=pages. -e, --ifexists , . , , nofail /etc/fstab. -f, --fixpgsz ( mkswap) ', . mkswap(8) . -L , . ( /proc/partitions.) -o, --options ' fstab . : swapon -o pri=1,discard=pages,nofail /dev/sda2 , . -p, --priority '. -1 32767. . . swapon(2), ' . pri= /etc/fstab, swapon -a. , Linux ' . -s, --summary ' . cat /proc/swaps. , --show, . --show[=...] ' . . --help, . --output-all . --noheadings --show. --raw --show . --bytes ( ') --show . -U uuid , uuid. -v, --verbose . -h, --help . -V, --version . swapoff , 2.36: 0 2 ', ' (OOM) 4 B(2) 8 ' swapoff(2) ( '...) 16 32 swapoff --all 64 swapoff --all swapoff --all 0 ( ), 32 ( ) 64 ( , ). + 2.36 , 0 <<>> . LIBMOUNT_DEBUG=all libmount. LIBBLKID_DEBUG=all libblkid. /dev/sd?? /etc/fstab ASCII ' , . , Btrfs. like cp(1) truncate(1) . swapon. , fallocate(1), , . ' XFS , Linux 4.18. ' dd(1) /dev/zero. Btrfs ' Btrfs , Linux 5.0 nocow. . btrfs(5), . Since version 2.41, the command mkswap --file can create a new swap file with the nocow attribute. NFS ' NFS . swapon ' (, S1SUSPEND, S2SUSPEND, ...). , , . swapon ' 4.0BSD. swapoff(2), swapon(2), fstab(5), init(8), fallocate(1), mkswap(8), mount(8), rc(8) swapon util-linux, Linux . util-linux 2.41 2025-03-29 SWAPON(8)