ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 手动增加swap的空间

手动增加swap的空间

原创 Linux操作系统 作者:波仔strong 时间:2018-01-26 17:14:58 0 删除 编辑
1.use dd to create a new file for swap
dd if=/dev/zero of=/home/swapfile bs=1M count=1024

2.create the file system which is swap
mkswap /home/swapfile

3.make the new swap file work
swapon /home/swapfile

4.check
swapon -s

5.add the fallowing line into the /etc/fstab for next reboot the system use the new swap file as default;
vi /etc/fstab  -----open
/home/swapfile swap swap defaults 0 0

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31485142/viewspace-2150557/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2017-08-25

  • 博文量
    87
  • 访问量
    91912