mkswap /dev/sda2
[[email protected] ~]# swapon /dev/sda2 -a
[[email protected] ~]# free -m
total used free shared buff/cache available
Mem: 96271 793 95198 9 279 94951
Swap: 8191 0 8191
写入开机自启动
[[email protected] ~]# tail -1 /etc/fstab
/dev/sda2 swap swap defaults 0 0
[[email protected] ~]#
原文地址:https://blog.51cto.com/wujianwei/2458622
时间: 2024-10-03 23:53:57