Linux: add swap file – onliner

fallocate -l 512M /mnt/swap ; \
dd if=/dev/zero of=/mnt/swap bs=512 count=1048576 \
 ; mkswap /mnt/swap ; swapon /mnt/swap ; swapon -s ; free -m


Leave a Reply

Your email address will not be published. Required fields are marked *