]> git.ipfire.org Git - thirdparty/util-linux.git/blame - mount/swapon.8
Imported from util-linux-2.11t tarball.
[thirdparty/util-linux.git] / mount / swapon.8
CommitLineData
6dbe3af9
KZ
1.\" Copyright (c) 1980, 1991 Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
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.
19.\"
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
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)swapon.8 6.3 (Berkeley) 3/16/91
33.\"
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
726f69e2 38.\" Mon Sep 25 14:12:38 1995: Added -v and -p information
fd6b7a7f 39.\" Tue Apr 30 03:32:07 1996: Added some text from A. Koppenhoefer
6dbe3af9 40.\"
726f69e2 41.TH SWAPON 8 "25 September 1995" "Linux 1.x" "Linux Programmer's Manual"
6dbe3af9
KZ
42.SH NAME
43swapon, swapoff \- enable/disable devices and files for paging and swapping
44.SH SYNOPSIS
726f69e2 45.B /sbin/swapon [\-h \-V]
6dbe3af9 46.br
726f69e2 47.B /sbin/swapon \-a [\-v]
6dbe3af9 48.br
726f69e2 49.BI "/sbin/swapon [\-v] [\-p " "priority" "] " " specialfile " ...
6dbe3af9 50.br
fd6b7a7f
KZ
51.B /sbin/swapon [\-s]
52.br
726f69e2
KZ
53.B /sbin/swapoff [\-h \-V]
54.br
55.B /sbin/swapoff \-a
56.br
57.BI /sbin/swapoff " specialfile " ...
6dbe3af9
KZ
58.SH DESCRIPTION
59.B Swapon
60is used to specify devices on which paging and swapping are to take place.
61Calls to
62.B swapon
63normally occur in the system multi-user initialization file
64.I /etc/rc
65making all swap devices available, so that the paging and swapping activity
66is interleaved across several devices and files.
67
68Normally, the first form is used:
69.TP
726f69e2
KZ
70.B \-h
71Provide help
72.TP
73.B \-V
74Display version
75.TP
fd6b7a7f 76.B \-s
63cccae4
KZ
77Display swap usage summary by device. Equivalent to "cat /proc/swaps".
78Not available before Linux 2.1.25.
fd6b7a7f 79.TP
6dbe3af9
KZ
80.B \-a
81All devices marked as ``sw'' swap devices in
82.I /etc/fstab
83are made available.
726f69e2
KZ
84.TP
85.BI \-p " priority"
86Specify priority for
87.BR swapon .
88This option is only available if
89.B swapon
90was compiled under and is used under a 1.3.2 or later kernel.
fd6b7a7f
KZ
91.I priority
92is a value between 0 and 32767. See
93.BR swapon (2)
94for a full description of swap priorities. Add
95.BI pri= value
96to the option field of
97.I /etc/fstab
98for use with
99.BR "swapon -a" .
6dbe3af9
KZ
100.PP
101.B Swapoff
63cccae4
KZ
102disables swapping on the specified devices and files.
103When the
6dbe3af9 104.B \-a
63cccae4
KZ
105flag is given, swapping is disabled on all known swap devices and files
106(as found in
107.I /proc/swaps
108or
109.IR /etc/fstab ).
5c36a0eb
KZ
110.SH NOTE
111You should not use
112.B swapon
113on a file with holes.
22853e4a 114Swap over NFS may not work.
6dbe3af9 115.SH SEE ALSO
22853e4a
KZ
116.BR swapon (2),
117.BR swapoff (2),
118.BR fstab (5),
119.BR init (8),
120.BR mkswap (8),
121.BR rc (8),
122.BR mount (8)
6dbe3af9 123.SH FILES
726f69e2 124.I /dev/hd??
6dbe3af9
KZ
125standard paging devices
126.br
726f69e2 127.I /dev/sd??
6dbe3af9
KZ
128standard (SCSI) paging devices
129.br
130.I /etc/fstab
131ascii filesystem description table
132.SH HISTORY
133The
134.B swapon
135command appeared in 4.0BSD.