Differences

This shows you the differences between two versions of the page.

Link to this comparison view

howto:create_swap_at_linux [2014/09/09 16:36]
yehuda created
howto:create_swap_at_linux [2014/09/09 16:37] (current)
yehuda
Line 9: Line 9:
 dd if=/​dev/​zero of=$SWAP_FILE bs=$BLOCK_SIZE count=$SWAP_BLOCKS dd if=/​dev/​zero of=$SWAP_FILE bs=$BLOCK_SIZE count=$SWAP_BLOCKS
  
 +# Make swap
 mkswap $SWAP_FILE mkswap $SWAP_FILE
 +
 +# Security
 chown root:root $SWAP_FILE chown root:root $SWAP_FILE
 chmod 0600 $SWAP_FILE chmod 0600 $SWAP_FILE
 +
 +# Swap enable
 swapon $SWAP_FILE swapon $SWAP_FILE
  
 +# Add to fstab to auto start
 echo "​$SWAP_FILE swap swap defaults 0 0" >> /etc/fstab echo "​$SWAP_FILE swap swap defaults 0 0" >> /etc/fstab
  
 +# Check if you have new 
 free -m free -m
 </​code>​ </​code>​
  
howto/create_swap_at_linux.txt ยท Last modified: 2014/09/09 16:37 by yehuda
Back to top
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0