9 lines
161 B
Bash
9 lines
161 B
Bash
#!/bin/bash
|
|
|
|
fallocate -l 2G /swapfile
|
|
chmod 600 /swapfile
|
|
mkswap /swapfile
|
|
swapon /swapfile
|
|
echo "/swapfile swap swap defaults 0 0" >> /etc/fstab
|
|
swapon --show
|