Skip to content

Instantly share code, notes, and snippets.

@slackingfred
Created July 17, 2024 20:49
Show Gist options
  • Save slackingfred/475c0f7ded20cd8dd7286b05cc217071 to your computer and use it in GitHub Desktop.
Save slackingfred/475c0f7ded20cd8dd7286b05cc217071 to your computer and use it in GitHub Desktop.
Enable swap on an Ubuntu cloud instance
#!/bin/bash
# Run with sudo
dd if=/dev/zero of=/Win386.swp bs=1M count=4096
chmod 600 /Win386.swp
mkswap /Win386.swp
echo '/Win386.swp none swap sw 0 0' >> /etc/fstab
swapon -a
free -m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment