Find knowledge base article(s) by searching for keywords in the title e.g. type linux in the search box below
Find knowledge base article(s) by browsing the subject categories of articles
Technology quick references, cheatsheets, user manuals etc.
Shop Online through ShopifyLite
Tutorials on various IT applications.
Search Title    (UL:0 |SS:f)

Software >> OS >> Unix >> Linux >> how to create a file as a swap filesystem and add to you swap space

check current swaps

# cat /proc/swaps

identify the directory to create the file of size for swap e.g. /root
This example we are adding 1GB swap

# dd if=/dev/zero of=/root/swap2 bs=1M count=1024

create swap file system

# mkswap /root/swap2

add swap

# swapon /root/swap2

 

create permanent entry in /etc/fstab

/root/swap2          swap                 swap       defaults,pri=9        0 0

[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]