From 4a6c9c5d2c1de44f54b4a916431dd2b9b26120e5 Mon Sep 17 00:00:00 2001 From: henk Date: Thu, 2 Jan 2025 21:03:29 +0100 Subject: [PATCH] 2025-01-02 21:03:29 --- linux/Swap2g.sh | 11 +++++++++++ linux/Swap4g.sh | 11 +++++++++++ linux/Swap8g.sh | 11 +++++++++++ 3 files changed, 33 insertions(+) create mode 100755 linux/Swap2g.sh create mode 100755 linux/Swap4g.sh create mode 100755 linux/Swap8g.sh 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 +