[리눅스] Swap 생성/수정
- 09-04
- 2,153 회
- 0 건
# Swap 을 4기가로 생성
[code]
dd if=/dev/zero of=/var/swapfile bs=1k count=4194304
mkswap /var/swapfile
swapon /var/swapfile
swapon -s
echo '/var/swapfile swap swap defaults 0 0' >> /etc/fstab
[/code]
# Swap 을 수정시
[code]
swapoff swapfile
dd if=/dev/zero of=/var/swapfile bs=1k count={수정크기}
mkswap /var/swapfile
swapon /var/swapfile
swapon -s
[/code]
[code]
dd if=/dev/zero of=/var/swapfile bs=1k count=4194304
mkswap /var/swapfile
swapon /var/swapfile
swapon -s
echo '/var/swapfile swap swap defaults 0 0' >> /etc/fstab
[/code]
# Swap 을 수정시
[code]
swapoff swapfile
dd if=/dev/zero of=/var/swapfile bs=1k count={수정크기}
mkswap /var/swapfile
swapon /var/swapfile
swapon -s
[/code]