Ubuntu - Create Swap file to extend your RAM

Revision as of 01:34, 25 March 2020 by Ardaut (talk | changes) (Created page with "1. Create the swap file (1 GB) <pre>fallocate -l 1G /auslagerungsdatei</pre> <br> 2. Set permission <pre>chmod 600 /auslagerungsdatei</pre> 3. Create swap file <pre>mkswa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

1. Create the swap file (1 GB)

fallocate -l 1G /auslagerungsdatei


2. Set permission

chmod 600 /auslagerungsdatei


3. Create swap file

mkswap /auslagerungsdatei

4. Activate swap file

swapon /auslagerungsdatei

You can add the swap file permantly in /etc/fstab

/auslagerungsdatei none swap sw 0 0

Or you can add the command from the point 4 in the crontab (@reboot)