Score:0

How to change the location of a swapfile?

ro flag

Thanks to this, I have a swapfile on my primary ssd drive (500GB) where I have Ubuntu installed. I have a faster ssd (2TB). I’d like to move my swapfile to the faster drive if possible, if not how do I correctly go about creating a new swapfile on the faster drive and then deleting the initial swapfile and all related references/entries.

Score:2
cn flag

You can create a new swap file anywhere you like. Then update /etc/fstab and add there the new path, also remove the old one.

Then you can reboot and delete the old swap file.

It can be done without rebooting using

sudo swapoff -a
sudo swapon -a

Swap file permissions should be 600. Format it using mkswap command.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.