You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
488 B

5 years ago
# swapon
7 years ago
6 years ago
## 说明
7 years ago
5 years ago
**swapon命令** 用于激活Linux系统中交换空间Linux系统的内存管理必须使用交换区来建立虚拟内存
7 years ago
5 years ago
## 选项
7 years ago
5 years ago
```markdown
5 years ago
-a将/etc/fstab文件中所有设置为swap的设备启动为交换区
-h显示帮助
-p<优先顺序>:指定交换区的优先顺序
-s显示交换区的使用状况
-V显示版本信息
7 years ago
```
5 years ago
## 实例
7 years ago
5 years ago
```bash
mkswap -c /dev/hdb4 # -c是检查有无坏块
7 years ago
swapon -v /dev/hdb4
swapon -s
5 years ago
7 years ago
```