您当前的位置:首页 > 电脑办公 > Linux教程
| PPT | 电脑打字 | 计算机基础 | word | excel | Linux教程 |

自学教程:Linux swapoff命令

51自学网 2023-01-07 20:47:40
  Linux教程
这篇教程Linux swapoff命令写得很实用,希望能帮到您。

Linux swapoff命令用于关闭系统交换区(swap area)。

swapoff实际上为swapon的符号连接,可用来关闭系统的交换区。

语法

swapoff [设备]

参数:

  • -a 将/etc/fstab文件中所有设置为swap的设备关闭
  • -h 帮助信息
  • -V 版本信息

实例

显示分区信息:

# sfdisk -l //显示分区信息Disk /dev/sda: 1305 cylinders, 255 heads, 63 sectors/trackUnits = 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 EmptyDisk /dev/sdb: 652 cylinders, 255 heads, 63 sectors/tracksfdisk: ERROR: sector 0 does not have an msdos signature/dev/sdb: unrecognized partitionNo partitions found

关闭交换分区。

# swapoff /dev/sda2 // 关闭交换分区

Linux sfdisk命令
Linux apachectl命令
51自学网,即我要自学网,自学EXCEL、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。
京ICP备13026421号-1