this post was submitted on 04 Nov 2025
13 points (93.3% liked)

Ask

892 readers
84 users here now

Rules

  1. Be nice
  2. Posts must be legitimate questions (no rage bait or sea lioning)
  3. No spam
  4. NSFW allowed if tagged
  5. No politics
  6. For support questions, please go to !newtolemmy@lemmy.ca

Icon by Hilmy Abiyyu A.

founded 7 months ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] SnotFlickerman@lemmy.blahaj.zone 4 points 7 hours ago* (last edited 7 hours ago) (1 children)

I just use a swap file.

This is what I do to alter the size

#Disable swap
sudo swapoff /swapfile
#Increase the file swap size
#This is for 8gb, or 8192mb, change the 8192 to whatever best suits your purposes
sudo dd if=/dev/zero of=/swapfile bs=1M count=8192 oflag=append conv=notrunc
#Make the new file a swap file
sudo mkswap /swapfile
#Re-enable the swap
sudo swapon /swapfile
#Check to make sure it worked (Will be under "Swap total")
cat /proc/meminfo

I use Kubuntu (the horror!) so my commands are Debian-oriented. You may need to do it differently if you use Arch or something. Also mind that the bit oflag=append conv=notrunc appends to the original swapfile, I hardly know how to use dd, so I'm not sure of the flags for not appending.

[โ€“] Blaze@piefed.zip 2 points 6 hours ago