This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Creating a 1G swap file | |
sudo dd if=/dev/zero of=/swapfile bs=1M count=1024 | |
# Changing the file permission | |
sudo chmod 600 /swapfile | |
sudo chown root:root /swapfile |