Run this command: echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab STEP 9: Once everything is set, you must set the SWAP file as permanent, else you will lose the SWAP after reboot. STEP 8: Also recheck the final partition structure. STEP 7: You can now check using the same swapon command to check if SWAP is created. STEP 5: Mark the file as SWAP space: sudo mkswap /swapfile Use your number instead of 4: Terminal Showing all Steps (Sorry about a typo command!) sudo fallocate -l 4G /swapfile In this example, I choose to go with twice that of RAM. But you can even go ahead with exactly as much as your RAM – your choice. Typically, it is good to have twice as much as your RAM for the SWAP size. Make sure you have enough hard disk space. It’s a matter of preference on how much SWAP size you need. STEP 3: Now it’s time to create the SWAP file. You should see the partition structure like the one I got in my test PC. STEP 2: Next, let’s see the current partition structure of your computer’s hard disk. If you see no output, it means that the SWAP doesn’t exist.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |