1SWAPON(8)                  Linux Programmer's Manual                 SWAPON(8)
2
3
4

NAME

6       swapon, swapoff - enable/disable devices and files for paging and swap‐
7       ping
8

SYNOPSIS

10       /sbin/swapon [-h -V]
11       /sbin/swapon -a [-v] [-e]
12       /sbin/swapon [-v] [-p priority]  specialfile ...
13       /sbin/swapon [-s]
14       /sbin/swapoff [-h -V]
15       /sbin/swapoff -a
16       /sbin/swapoff specialfile ...
17

DESCRIPTION

19       Swapon is used to specify devices on which paging and swapping  are  to
20       take place.
21
22       The  device  or file used is given by the specialfile parameter. It may
23       be of the form -L label or -U uuid to indicate a  device  by  label  or
24       uuid.
25
26       Calls  to swapon normally occur in the system multi-user initialization
27       file /etc/rc making all swap devices available, so that the paging  and
28       swapping activity is interleaved across several devices and files.
29
30       Normally, the first form is used:
31
32       -a     All  devices  marked  as ``swap'' swap devices in /etc/fstab are
33              made available, except for those  with  the  ``noauto''  option.
34              Devices that are already running as swap are silently skipped.
35
36       -e     When  -a  is  used  with  swapon,  -e makes swapon silently skip
37              devices that do not exist.
38
39       -h     Provide help
40
41       -L label
42              Use the partition that has  the  specified  label.   (For  this,
43              access to /proc/partitions is needed.)
44
45       -p priority
46              Specify  priority  for swapon.  This option is only available if
47              swapon was compiled under and is used under  a  1.3.2  or  later
48              kernel.  priority is a value between 0 and 32767. Higher numbers
49              indicate higher priority. See swapon(2) for a  full  description
50              of  swap  priorities.  Add  pri=value  to  the  option  field of
51              /etc/fstab for use with swapon -a.
52
53       -s     Display  swap  usage  summary  by  device.  Equivalent  to  "cat
54              /proc/swaps".  Not available before Linux 2.1.25.
55
56       -U uuid
57              Use  the  partition  that  has  the  specified uuid.  (For this,
58              access to /proc/partitions is needed.)
59
60       -v     Be verbose.
61
62       -V     Display version
63
64       Swapoff disables swapping on the specified devices and files.  When the
65       -a  flag  is  given, swapping is disabled on all known swap devices and
66       files (as found in /proc/swaps or /etc/fstab).
67

NOTE

69       You should not use swapon on a file with holes.  Swap over NFS may  not
70       work.
71

SEE ALSO

73       swapon(2), swapoff(2), fstab(5), init(8), mkswap(8), rc(8), mount(8)
74

FILES

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

HISTORY

81       The swapon command appeared in 4.0BSD.
82
83
84
85Linux 1.x                      25 September 1995                     SWAPON(8)
Impressum