Linux 硬盘挂载及设置交换分区swap
作者:互联网
mkswap /dev/sda2
[root@localhost ~]# swapon /dev/sda2 -a
[root@localhost ~]# free -m
total used free shared buff/cache available
Mem: 96271 793 95198 9 279 94951
Swap: 8191 0 8191
写入开机自启动
[root@localhost ~]# tail -1 /etc/fstab
/dev/sda2 swap swap defaults 0 0
[root@localhost ~]#
标签:8191,dev,硬盘,sda2,swap,Linux,root,localhost 来源: https://blog.51cto.com/wujianwei/2458622