]>
Commit | Line | Data |
---|---|---|
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 |
43 | swapon, swapoff \- enable/disable devices and files for paging and swapping | |
44 | .SH SYNOPSIS | |
726f69e2 | 45 | .B /sbin/swapon [\-h \-V] |
6dbe3af9 | 46 | .br |
95f1bdee | 47 | .B /sbin/swapon \-a [\-v] [\-e] |
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 | |
60 | is used to specify devices on which paging and swapping are to take place. | |
756bfd01 KZ |
61 | |
62 | The device or file used is given by the | |
63 | .I specialfile | |
64 | parameter. It may be of the form | |
65 | .BI \-L " label" | |
66 | or | |
67 | .BI \-U " uuid" | |
68 | to indicate a device by label or uuid. | |
69 | ||
6dbe3af9 KZ |
70 | Calls to |
71 | .B swapon | |
72 | normally occur in the system multi-user initialization file | |
73 | .I /etc/rc | |
74 | making all swap devices available, so that the paging and swapping activity | |
75 | is interleaved across several devices and files. | |
76 | ||
77 | Normally, the first form is used: | |
78 | .TP | |
79 | .B \-a | |
95f1bdee | 80 | All devices marked as ``swap'' swap devices in |
6dbe3af9 | 81 | .I /etc/fstab |
d162fcb5 KZ |
82 | are made available, except for those with the ``noauto'' option. |
83 | Devices that are already running as swap are silently skipped. | |
95f1bdee KZ |
84 | .TP |
85 | .B \-e | |
86 | When | |
87 | .B \-a | |
88 | is used with swapon, | |
a47f2e66 | 89 | .B \-e |
756bfd01 KZ |
90 | makes swapon silently skip devices that do not exist. |
91 | .TP | |
92 | .B \-h | |
93 | Provide help | |
94 | .TP | |
95 | .BI \-L " label" | |
96 | Use the partition that has the specified | |
97 | .IR label . | |
98 | (For this, access to | |
99 | .I /proc/partitions | |
100 | is needed.) | |
726f69e2 KZ |
101 | .TP |
102 | .BI \-p " priority" | |
103 | Specify priority for | |
104 | .BR swapon . | |
105 | This option is only available if | |
106 | .B swapon | |
107 | was compiled under and is used under a 1.3.2 or later kernel. | |
fd6b7a7f | 108 | .I priority |
756bfd01 KZ |
109 | is a value between 0 and 32767. Higher numbers indicate higher |
110 | priority. See | |
fd6b7a7f KZ |
111 | .BR swapon (2) |
112 | for a full description of swap priorities. Add | |
113 | .BI pri= value | |
114 | to the option field of | |
115 | .I /etc/fstab | |
116 | for use with | |
117 | .BR "swapon -a" . | |
a47f2e66 | 118 | .TP |
756bfd01 KZ |
119 | .B \-s |
120 | Display swap usage summary by device. Equivalent to "cat /proc/swaps". | |
121 | Not available before Linux 2.1.25. | |
122 | .TP | |
123 | .BI \-U " uuid" | |
124 | Use the partition that has the specified | |
125 | .IR uuid . | |
126 | (For this, access to | |
127 | .I /proc/partitions | |
128 | is needed.) | |
129 | .TP | |
a47f2e66 KZ |
130 | .B \-v |
131 | Be verbose. | |
756bfd01 KZ |
132 | .TP |
133 | .B \-V | |
134 | Display version | |
6dbe3af9 KZ |
135 | .PP |
136 | .B Swapoff | |
63cccae4 KZ |
137 | disables swapping on the specified devices and files. |
138 | When the | |
6dbe3af9 | 139 | .B \-a |
63cccae4 KZ |
140 | flag is given, swapping is disabled on all known swap devices and files |
141 | (as found in | |
142 | .I /proc/swaps | |
143 | or | |
144 | .IR /etc/fstab ). | |
5c36a0eb KZ |
145 | .SH NOTE |
146 | You should not use | |
147 | .B swapon | |
148 | on a file with holes. | |
22853e4a | 149 | Swap over NFS may not work. |
6dbe3af9 | 150 | .SH SEE ALSO |
22853e4a KZ |
151 | .BR swapon (2), |
152 | .BR swapoff (2), | |
153 | .BR fstab (5), | |
154 | .BR init (8), | |
155 | .BR mkswap (8), | |
156 | .BR rc (8), | |
157 | .BR mount (8) | |
6dbe3af9 | 158 | .SH FILES |
726f69e2 | 159 | .I /dev/hd?? |
6dbe3af9 KZ |
160 | standard paging devices |
161 | .br | |
726f69e2 | 162 | .I /dev/sd?? |
6dbe3af9 KZ |
163 | standard (SCSI) paging devices |
164 | .br | |
165 | .I /etc/fstab | |
166 | ascii filesystem description table | |
167 | .SH HISTORY | |
168 | The | |
169 | .B swapon | |
170 | command appeared in 4.0BSD. |