How To Create Swap File As A Ram Or Delete Them

Our Score
Click to rate this post!
[Total: 0 Average: 0]
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