From this video you will learn how to create and enable a swap file on your Linux system.
Swap partition was a necessity of any linux installation in the past. Nowadays with increased amount of RAM, swap partition is not used at all by some systems. There is no need of large swap. So, you can create small swap file and if it happened that you need more swap you can easily change the size of your swap file. It is especially useful for small size SSD.
This video is primarily designed to show how to enable a swap file in Arch Linux https://youtu.be/GKdPSGb9f5s
Create a swap file:
sudo fallocate -l 1Gb /swapfile
for F2FS or XFS: sudo dd if=/dev/zero of=/swapfile bs=1M count=512
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
add to /etc/fstab the line /swapfile none swap defaults 0 0
sudo nano /etc/fstab
Remove swap file.
swapoff -a
rm -f /swapfile
If you want to remove a swap file completely, remove the relevant entry from /etc/fstab.
Wallpaper can be found in my Google+ Wallpaper collection https://plus.google.com/collection/YlkQNE
################################################
Support on Patreon: https://www.patreon.com/averagelinuxuser
Donate through PayPal: https://www.paypal.me/Kryvokhyzha
################################################
More cool Linux stuff at other social media:
Google+ – Best Linux Stuff: https://plus.google.com/+AverageLinuxUser
Facebook – Top Linux Tips: https://www.facebook.com/AverageLinuxUser
Twitter – Daily Linux News: http://twitter.com/AVGLinuxUser
Website: http://averagelinuxuser.com/