Page 50 - RHEL8 BOOK
P. 50

CRAETING A SWAP PARTITION

            While Installation we can assign the swap memory after installation also we can increase the swap
             memory by using partition space.
            If PC has below 2 GB RAM, then no need to assign swap memory.
            In case also we need the swap memory we can assign the swap space same size of RAM.

          1. To see the partition list
          [root@sun ~] # fdisk -l

          2. To create the partition
          [root@sun ~] # fdisk /dev/sda
          Command (m for help): p
          Command (m for help): n
          Command (m for help): t
          Command (m for help): 82
          Command (m for help): w

           3. Update the kernel without restarting
          [root@sun ~] # partprobe /dev/sda
          [root@sun ~] # fdisk –l
          [root@ sun ~] # partx -v -a /dev/sda

          4. Make the partition as swap
          [root@sun ~] #mkswap /dev/sda9

          5. To see the status
          [root@sun ~] #swapon –s

          6. To on the swap partition
          [root@sun ~] #swapon /dev/sda9

          6.     To off the swap partition
          [root@sun ~] #swapoff /dev/sda9
















                                                       S. Pradhan
                             (MCA, MBA-IT, BCA, CCNA, MCSA 2012, RHCE, ETHICAL HACKING)
                                             Email Id:-spradhan.iiht@gmail.com
                                                           50
   45   46   47   48   49   50   51   52   53   54   55