How To Create Swap File As A Ram Or Delete Them

In This Tutorial We Are going To Learn How To Create Swap File As A Ram Or How To Delete Them
Step-1 Firstly We Have To Create A File By Using DD Command

Here Is The Command

dd if=/dev/zero of=/hacking bs=1M count=1000

Step-2 Now Here Is The Command Of Swap

  Mkswap /hacking {hacking Is The File Name}
 free -m {For Check File IS Created Or Not}
 Swapon /hacking {Swapon Command }
 Free -m {For Check Swap Command Is Working Or Not}

This Is How We create Swap File As A Ram

Step-3 Now How To Delete Swapon

Here Is The Command

Swapoff /hacking {hacking Is The File Name And Swapoff For Stoping Swap}
free -m {For Check Swap Is Stopped Or Not}
rm -rf /hacking {For deleting The Swap File}

This Is How We Create Or Delete Swap File for Using Swap File As A Ram

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s