how to Extend /Increase swap memory | Redhat | CentOS | Ubuntu

Опубликовано: 06 Октябрь 2024
на канале: Nischal Tech Support
348
1

how to Extend /Increase swap memory in Linux
============================================================
Follow the below steps for swap

[root@localhost ~]#free -ht
[root@localhost ~]#fdisk -l
[root@localhost ~]#fdisk /dev/sda (select the partition)

n : add a new partition
p : primary partition
partition number : 1
Type in the desired size for the amount of swap memory you want to increase.
w : save
q :quite

[root@localhost ~]# mkswap /dev/sda1
[root@localhost ~]# swapon /dev/sda1
[root@localhost ~]# vim /etc/fstab
/dev/sda1 swap swap defaults 0 0
[root@localhost ~]swapon -s

[root@localhost ~]# free -ht

#nischaltechsupport #redhat #swap #rhel