Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

aws ec2 swap

# 4 GB
sudo dd if=/dev/zero of=/swapfile bs=128M count=32
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon -s
# Start the swap file at System Startup
sudo nano /etc/fstab
/swapfile swap swap defaults 0 0
 
PREVIOUS NEXT
Tagged: #aws #swap
ADD COMMENT
Topic
Name
7+9 =