Note = Technical Maintenance And General
Linux CMD and GUI |
[root@ipx ~]# free
-m |grep Swap
Swap:
1200
978 221
[root@ipx ~]# dd
if=/dev/zero of=/swap bs=1024 count=2097152
2097152+0 records in
2097152+0 records out
2147483648 bytes (2.1 GB) copied, 223.838 seconds, 9.6 MB/s
[root@ipx ~]#
mkswap /swap && chown root. /swap && \
> chmod 0600 /swap &&
swapon /swap
Setting up swapspace version 1, size = 2147479 kB
[root@ipx ~]# echo
/swap swap swap defaults 0 0 >> /etc/fstab
[root@ipx ~]# echo vm.swappiness = 0
>> /etc/sysctl.conf && sysctl -p
net.ipv4.ip_forward = 1
trunked.........................
[root@ipx ~]# free -m |grep Swap
Swap:
3248
978 2269
[root@ipx ~]#