Increase Swap Space in Ubuntu14.10

The process to add 4G swap on your original swap:

1.Create a 4G swap file
$ size="4G" && sudo fallocate -l $size /$size-swap && sudo mkswap /$size-swap && sudo swapon -p 20 /$size-swap
2.Make your swap permanent
Add a line in your /etc/fstab file so that swap will be initialized on the next reboot.
# in your /ets/fstab file
/4G-swap     none    swap    sw,pri=20      0       0
3.Reboot

Now your swap space will be original-swap + 4G.

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。