Linux-Download-Free-Operating-System

How to config SWAP in Linux (CentOS, Ubuntu,..)

Step 1

set 1024mb (bs=1024k)

cd /var
touch swap.img
chmod 600 swap.img
dd if=/dev/zero of=/var/swap.img bs=1024k count=1000

Step 2

mkswap /var/swap.img

Complete

swapon /var/swap.img

Check swap memory

free -m

 

 

Config SWAP in Linux

Category: LinuxOperating System
0
1750 views

Join the discussion

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