Creating / Removing a Swap File

Create Swap File:

sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

Make Swap File Permanent:

sudo nano /etc/fstab

Add to the end:

/swapfile none swap sw 0 0

Removing a Swap File:

sudo vi /etc/fstab

Remove from the end:

/swapfile none swap sw 0 0
(line aforementioned may vary on configuration)

, ,
Previous Post
How to set up Exchange accounts on your iPhone, iPad, or iPod touch
Next Post
libvips Framework Installation

Related Posts

Leave a Reply

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

Fill out this field
Fill out this field
Please enter a valid email address.