diff --git a/linux/Swap2g.sh b/linux/Swap2g.sh new file mode 100755 index 0000000..8bfaf65 --- /dev/null +++ b/linux/Swap2g.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# + fallocate -l 2G /swap2file + chmod 600 /swap2file + mkswap /swap2file + swapon /swap2file +echo "/swap2file swap swap defaults 0 0" | tee -a /etc/fstab + +mount -a +systemctl daemon-reload + diff --git a/linux/Swap4g.sh b/linux/Swap4g.sh new file mode 100755 index 0000000..ccedca4 --- /dev/null +++ b/linux/Swap4g.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# + fallocate -l 4G /swap4file + chmod 600 /swap4file + mkswap /swap4file + swapon /swap4file +echo "/swap4file swap swap defaults 0 0" | tee -a /etc/fstab + +mount -a +systemctl daemon-reload + diff --git a/linux/Swap8g.sh b/linux/Swap8g.sh new file mode 100755 index 0000000..14f7678 --- /dev/null +++ b/linux/Swap8g.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# + fallocate -l 8G /swap8file + chmod 600 /swap8file + mkswap /swap8file + swapon /swap8file +echo "/swap8file swap swap defaults 0 0" | tee -a /etc/fstab + +mount -a +systemctl daemon-reload +