Skip to content

Instantly share code, notes, and snippets.

View MarkGavalda's full-sized avatar

Mark Gavalda MarkGavalda

View GitHub Profile
@MarkGavalda
MarkGavalda / ubuntu-swap.sh
Last active June 9, 2016 19:28
Create a swap file on Ubuntu of 1GB with 15% swappiness
#!/bin/bash
# Creating a 1G swap file
sudo dd if=/dev/zero of=/swapfile bs=1M count=1024
# Changing the file permission
sudo chmod 600 /swapfile
sudo chown root:root /swapfile