How do I increased Swap Memory of Ubuntu OS using terminal from 1GB to 7GB

 Hi, I have increase my Ubuntu OS swap memory from 1GB to 7GB by adding additional 6GB space to swap. Process which I followed is as follows:

1> Check previous Swap Memory:

cat /proc/swaps

2> Check previous Swap Memory:

swapon

3> Check previous Swap Memory:

free

4> Create new Swap Memory:

sudo dd if=/dev/zero of=/newswap bs=1024 count=6M

5> Set permissions for new Swap Memory

sudo chmod 0600 /newswap

6> Bake new swap:

sudo mkswap /newswap

7> Turn on new swap:

sudo swapon /newswap

8> Check new Swap Memory:

swapon

9> Modify /etc/fstab file by adding following lines at the end

/newswap    swap    swap   defaults 0 0

Done!

No comments:

Post a Comment

If you have any doubts, please let me know.

Regarding site Free Browser Tool (https://free-browser-tools.mohitkrgupta.dev) (discussion with google search AI)

Various discussions with Google Search AI regarding site  Free Browser Tool are as below: site free-browser-tools.mohitkrgupta.dev what doe...