Linux命令:swapoff 关闭swap
swapoff :关闭系统交换分区
语 法
swapoff[必要参数][选择参数]
功 能
swapoff 命令:可以关闭交换分区,swapon 命令可以打开交换分区。
执行权限: 超级用户 普通用户
命令属性: 系统设置
参数
必要参数
-a 关闭所有交换设备
选择参数
-h 帮助信息
-V 版本信息
范例
范例1: 显示分区信息。
[root@hx ~]# sfdisk -l //显示分区信息
Disk /dev/sda: 1305 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 * 0+ 12 13- 104391 83 Linux
/dev/sda2 13 1304 1292 10377990 8e Linux LVM
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
Disk /dev/sdb: 652 cylinders, 255 heads, 63 sectors/track
sfdisk: ERROR: sector 0 does not have an msdos signature
/dev/sdb: unrecognized partition
No partitions found
[root@hnlinux ~]#
范例2: 关闭交换分区。
[root@hx ~]# swapoff /dev/sda2 // 关闭交换分区
- 转载请注明来源:IT学习网 网址:http://www.t086.com/ 向您的朋友推荐此文章
- 特别声明: 本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系我们,我们会尽快予以更正。