Advertisement
metalx1000

Create a Swap image

May 20th, 2017
734
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.24 KB | None | 0 0
  1. #create a swap image
  2. touch /var/swap.img
  3. chmod 600 /var/swap.img
  4. dd if=/dev/zero of=/var/swap.img bs=1024k count=1000 #1GB size
  5. mkswap /var/swap.img
  6. swapon /var/swap.img
  7. free
  8. echo "/var/swap.img    none    swap    sw    0    0" >> /etc/fstab
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement