1 .\" Copyright (c) 1980, 1991 Regents of the University of California.
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)swapon.8 6.3 (Berkeley) 3/16/91
34 .\" Sun Dec 27 12:31:30 1992: Modified by faith@cs.unc.edu
35 .\" Sat Mar 6 20:46:02 1993: Modified by faith@cs.unc.edu
36 .\" Sat Oct 9 09:35:30 1993: Converted to man format by faith@cs.unc.edu
37 .\" Sat Nov 27 20:22:42 1993: Updated authorship information, faith@cs.unc.edu
38 .\" Mon Sep 25 14:12:38 1995: Added -v and -p information
39 .\" Tue Apr 30 03:32:07 1996: Added some text from A. Koppenhoefer
41 .TH SWAPON 8 "25 September 1995" "Linux 1.x" "Linux Programmer's Manual"
43 swapon, swapoff \- enable/disable devices and files for paging and swapping
81 is used to specify devices on which paging and swapping are to take place.
83 The device or file used is given by the
85 parameter. It may be of the form
89 to indicate a device by label or uuid.
93 normally occur in the system boot scripts making all swap devices available, so
94 that the paging and swapping activity is interleaved across several devices and
98 disables swapping on the specified devices and files.
101 flag is given, swapping is disabled on all known swap devices and files
109 All devices marked as ``swap'' in
111 are made available, except for those with the ``noauto'' option.
112 Devices that are already being used as swap are silently skipped.
114 .B "\-e, \-\-ifexists"
115 Silently skip devices that do not exist.
117 .B "\-f, \-\-fixpgsz"
118 Reinitialize (exec /sbin/mkswap) the swap space if its page size does not
119 match that of the the current running kernel.
121 initializes the whole device and does not check for bad blocks.
127 Use the partition that has the specified
133 .B "\-p, \-\-priority \fIpriprity\fP"
134 Specify the priority of the swap device.
136 is a value between 0 and 32767. Higher numbers indicate higher
139 for a full description of swap priorities. Add
141 to the option field of
146 .B "\-s, \-\-summary"
147 Display swap usage summary by device. Equivalent to "cat /proc/swaps".
148 Not available before Linux 2.1.25.
151 Use the partition that has the specified
154 .B "\-v, \-\-verbose"
157 .B "\-V, \-\-version"
162 on a file with holes.
163 Swap over NFS may not work.
166 automatically detects and rewrites swap space signature with old software
167 suspend data (e.g S1SUSPEND, S2SUSPEND, ...). The problem is that if we don't
168 do it, then we get data corruption the next time an attempt at unsuspending is
181 standard paging devices
184 ascii filesystem description table
188 command appeared in 4.0BSD.
190 The swapon command is part of the util-linux-ng package and is available from
191 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.