Linux服务器增加swap分区 centos操作过程记录

Linux服务器增加swap分区 centos操作过程记录
Xtong查看swap分区大小
free -m
查看内存。
1 | [root@localhost ~]# free -m |
创建swap分区
创建2G大小的swap
1 | 2G = 2*1024*1024 = 2097152 |
1 | 添加一行 |
运行结果
1 | [root@localhost ~]# dd if=/dev/zero of=/var/swap bs=1024 count=2097152 |
1 |
|
1 | [root@localhost ~]# free -m |