If you have already made a swap file during setup of ubuntu, would the commands mkswap and swapon add to it or it replaces it? Is there a way to add to it rather than replace it? Is there a way to do it while you are not sudoer?
Asked
Active
Viewed 2,503 times
2 Answers
4
You can
create a partition and make it a swap partition with
mkswaporgpartedadd a corresponding line in the file
/etc/fstabto make it active at boot. You can usesudo swapon -ato make all swap devices (files and partitions in
/etc/fstab) active.You can also create a second swapfile (with another name), or maybe better, replace the current swapfile with a new one.
But first you should consider, if you really need more swap and in that case why and how much.
Managing swap is a typical task, where you need sudo permissions.
sudodus
- 47,684
1
The command swapon <specialfile> adds a swap area prepared with mkswap <device>.
swapon --show displays the active swap areas.
muclux
- 5,324