swapon, swapoff - enable/disable devices and files for paging and swapping

       /sbin/swapon [-h -V]
       /sbin/swapon -a [-v] [-e]
       /sbin/swapon [-v] [-p priority]  specialfile ...
       /sbin/swapon [-s]
       /sbin/swapoff [-h -V]
       /sbin/swapoff -a
       /sbin/swapoff specialfile ...

to specify devices for swapping

The device or file used is given by specialfile . May be of the form -L label or -U uuid

Calls to swapon normally occur in the system multi-user initialization file /etc/rc making all swap devices available, so that the paging and swapping activity is interleaved across several devices and files.

Normally, the first form is used:
-a All devices marked as swap swap devices in /etc/fstab are made available, except for those with the noauto option. Devices that are already running as swap are silently skipped.
-e skip devices that do not exist when -a
-L label Use the partition with label. (access to /proc/partitions is needed.)
-U uuid Use the partition with uuid. (access to /proc/partitions is needed.)
-p priority a value between 0 and 32767 with higher numbers indicating higher priority. See swapon(2) . Add pri=value to the option field of a /etc/fstab for use with swapon -a.
-s Display swap usage summary . Equivalent to cat /proc/swaps.
-v Be verbose.
-V Display version
-h help
usage: swapon [-hV]
       swapon -a [-e] [-v]
       swapon [-v] [-p priority] special|LABEL=volume_name ...
       swapon [-s]

swapoff disables swapping on the specified devices and files. When the -a flag is given, swapping is disabled on all known swap devices and files (as found in /proc/swaps or /etc/fstab).

Do not use swapon on a file with holes.
Swap over NFS may not work.

SEE swapon(2), swapoff(2), fstab, init(8), mkswap(8), rc(8), mount(8)

/dev/hd?? standard paging devices
/dev/sd?? standard (SCSI) paging devices
/etc/fstab ascii filesystem description table


major minor  #blocks  name 
   8     0  104846336 sda
   8     1     104391 sda1
   8     2  103683510 sda2
   8     3    1052257 sda3
   8    16 2823802880 sdb
   8    17 2823802846 sdb1
   7     0     512000 loop0
Linux 1.x 25 September 1995 SWAPON(8)