Ubuntu 18.04: Create/Modify SWAP partition memory limit.

Common error:
fallocate: fallocate failed: Text file busy in ubuntu OS 

Check the allocation:
free -m
or
sudo swapon --show

Make sure you have enough free disk space by
df -h

Disable the use of swap, allocate new swap space, enable swap.
sudo swapoff -a

sudo fallocate -l 8G /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

Check the allocation:
free -m
or
sudo swapon --show

For detailed information: https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-18-04

3 comments:

  1. Great insights! I really appreciate how clearly you’ve outlined the topic. Your post has provided some valuable clarity. Thanks for sharing!

    ReplyDelete

Install CMake 3.30.8 on Ubuntu 22.04

How to Install CMake 3.30.8 on Ubuntu 22.04 CMake is a powerful open-source tool for managing the build process of software proje...