Skip to content

Instantly share code, notes, and snippets.

@wen-long
Created June 9, 2014 14:35
Show Gist options
  • Save wen-long/92f2ee3f9c48147f7d60 to your computer and use it in GitHub Desktop.
Save wen-long/92f2ee3f9c48147f7d60 to your computer and use it in GitHub Desktop.
root@raspberrypi:~# dd if=/dev/zero of=/mnt/sda1/swapfile bs=1M count=512
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 17.071 s, 31.4 MB/s
root@raspberrypi:~# mkswap /mnt/sda1/swapfile
Setting up swapspace version 1, size = 524284 KiB
no label, UUID=be997b16-5b25-4366-a804-674c296f8616
root@raspberrypi:~# swapon /mnt/sda1/swapfile
root@raspberrypi:~# free -m
             total       used       free     shared    buffers     cached
Mem:           485        471         13          0          2        429
-/+ buffers/cache:         39        445
Swap:          611         12        599
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment