Created
November 4, 2014 12:01
-
-
Save bcho/a3f8ebf653377fc2ddbf to your computer and use it in GitHub Desktop.
trick
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 | |
| # root privilege required. | |
| # Create an empty file: | |
| # Count size base is `B`, so 65536 (B) is 64 MB | |
| dd if=/dev/zero of=/path/to/your/swapfile bs=1024 count=65536 | |
| # Enable swap file: | |
| mkswap /path/to/your/swapfile | |
| swapon /path/to/your/swapfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment