Differences

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

Link to this comparison view

Next revision
Previous revision
howto:create_swap_at_linux [2014/09/09 16:36] – created yehudahowto:create_swap_at_linux [2022/01/03 16:03] (current) – external edit 127.0.0.1
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.1410280585.txt.gz · Last modified: (external edit)
Back to top
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0