Skip to content

Instantly share code, notes, and snippets.

View tgulacsi's full-sized avatar

Tamás Gulácsi tgulacsi

View GitHub Profile
@joshenders
joshenders / swap.md
Last active September 14, 2026 08:48
Stop making swap partitions

Stop making swap partitions—use swap files instead!

Swap files have had the same performance characteristics as swap partitions for more than 20 years and yet, linux distributions continue to encourage the use of swap partitions during install.

Swap files are easier to use/add/remove/modify/extend after installation. They're better in every way––use swap files!

  1. Create and format the swap file.
mkswap --size 4G --file /swapfile