The swap partition is not installed during Ubuntu installation. Create a new swap partition without reinstalling the system.

1. Download the gparted partition tool, compress or expand memory, and create a new swap partition.
& sudo apt-get install gparted

Insert image description here

2. Activate swap partition
& mkswap /dev/sda5 
Setting up swapspace version 1, size = 2097148 KiB
no label, UUID=cc64ac36-f5b0-4877-afe6-a49e76c72336
& swapon /dev/sda5
3. Modify the fstab file
& sudo gedit /etc/fstab

Insert image description here

4. Check the swap partition activation status
& free -h

Insert image description here
Activation successful!

Guess you like

Origin blog.csdn.net/weixin_45112559/article/details/130152955