Saturday, January 21, 2023

How to Extend Swap Space using Swap file in Linux

dd if=/dev/zero of=/swap_file bs=1G count=1

sudo fallocate -l 1G /swap_file

chmod 600 /swap_file

mkswap /swap_file

echo "swap_file swap swap defaults 0 0" >> /etc/fstab 
or 
vi /etc/fstab/swap_file swap swap defaults 0 0

swapon /swap_file

No comments:

Post a Comment

Headers Security Advanced & HSTS WP setup manually

Open the file for editing and paste the following snippet inside the  .htaccess file: <IfModule mod_headers.c> Header always set S...