
StackFlow AI Platform
fallocate -l 2G /swapfile chmod 600 /swapfile
mkswap /swapfile swapon /swapfile
swapon --show
free -h tee /etc/systemd/system/enable-swapfile.service >/dev/null <<'EOF'
[Unit]
Description=Enable swapfile via swapon
After=local-fs.target
Requires=local-fs.target
[Service]
Type=oneshot
ExecStart=/sbin/swapon /swapfile
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
EOF systemctl daemon-reload
systemctl enable enable-swapfile.service