# ½º¿Ò È°¼ºÈ ¿µ¿ª È®ÀÎ
[root@localhost ~]# swapon -s
Filename Type Size Used Priority
[root@localhost ~]# free
total used free shared buffers cached
Mem: 1020748 945260 75488 0 20052 786928
-/+ buffers/cache: 138280 882468
Swap: 0 0 0
# 4G Ãß°¡
[root@localhost ~]# dd if=/dev/zero of=/swapfile bs=1M count=4096
4096+0 records in
4096+0 records out
4294967296 bytes (4.3 GB) copied, 124.143 s, 34.6 MB/s
# ½º¿Ò¿µ¿ª »ý¼º
[root@localhost ~]# mkswap /swapfile
mkswap: /swapfile: warning: don't erase bootbits sectors
on whole disk. Use -f to force.
Setting up swapspace version 1, size = 4194300 KiB
no label, UUID=70d648c8-8ab1-42a6-bcef-8f0daa45107e
# ½º¿Ò¿µ¿ª È°¼ºÈ
[root@localhost ~]# swapon /swapfile
[root@localhost ~]# swapon -s
Filename Type Size Used Priority
/swapfile file 4194296 0 -1
[root@localhost ~]# free
total used free shared buffers cached
Mem: 1020748 947980 72768 0 20052 786944
-/+ buffers/cache: 140984 879764
Swap: 4194296 0 4194296
# /etc/fstab ¼öÁ¤
/swapfile none swap sw 0 0
¡Ø ½º¿Ò°ü¸® µµ±¸¸í·É¾î
- swapon : ½º¿Ò¿µ¿ª È°¼ºÈ
- swapoff : ½º¿Ò¿µ¿ª ºñÈ°¼ºÈ
- mkswap : ½º¿Ò¿µ¿ª »ý¼º