首页 > 系统服务 > 详细

Ubuntu add swap

时间:2018-10-11 14:05:43      阅读:144      评论:0      收藏:0      [点我收藏+]

1. create a 1G file for the swap.

  sudo fallocate -l 1G /swapfile

  we can verify that the correct amount of space was reserved by typing:

  ls -lh /swapfile

2. Enabling the Swap File.

  1.Make the file only accessible by typing:

    sudo chmod 600 /swapfile.

       2.Make the file as swap space by typing:

    sudo mkswap /swapfile

  3.Enabling the swap file and allow our system to start utilizing it .

    sudo swapon /swapfile.

  4.Now you can find that the swap space was added by typing:

    free -h / (sudo swapon --show)

  

Ubuntu add swap

原文:https://www.cnblogs.com/magicpig666/p/9772003.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!