[root@liutao ~]# swapon -a #开启swap swapon: /swap: insecure permissions 0644, 0600 suggested. [root@liutao ~]# free -m total used free shared buff/cache available Mem: 1838 550 831 0 456 1124 Swap: 1023 0 1023 [root@liutao ~]# swapoff -a #关闭swap [root@liutao ~]# free -m total used free shared buff/cache available Mem: 1838 549 832 0 456 1124 Swap: 0 0 0