Last active
March 19, 2023 18:50
-
-
Save ErFUN-KH/a8e95d7cf15e40d752b49a532a80d9ef to your computer and use it in GitHub Desktop.
Create 4GB swap memory
This file contains 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 | |
touch /var/swap.img && \ | |
chmod 600 /var/swap.img && \ | |
dd if=/dev/zero of=/var/swap.img bs=1024k count=4000 && \ | |
mkswap /var/swap.img && \ | |
swapon /var/swap.img && \ | |
echo "/var/swap.img none swap sw 0 0" >> /etc/fstab && \ | |
ulimit -n 51200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment