-
-
Save alexanderstephan/017a4866fecbc0bfd1eac9e5d2c1c0d8 to your computer and use it in GitHub Desktop.
Create a swap file on Manjaro or Arch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create the file itself | |
sudo dd if=/dev/zero of=/swapfile bs=1M count=4096 status=progress | |
# Only root should be able to read and write | |
sudo chmod 600 /swapfile | |
# Format the swap file | |
sudo mkswap /swapfile | |
# Enable the swap | |
sudo swapon /swapfile | |
# Add entry in /etc/fstab for auto start | |
sudo bash -c "echo /swapfile none swap defaults 0 0 >> /etc/fstab" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
saved for future use cases for potato machines 👯♀️