Categories
Linux

How to Create Linux Swap Partition

How to Create Linux Swap Partition

Hi friends, In this post I will show you How to Create Linux Swap Partition. Swap partition in Linux is used when the amount of physical memory (RAM) is full. If the system required more memory resources, then swap space is used as a backup.

You can define swap space, while you are creating your machine or post creation machine. In this post we are discussing about Linux swap partition post operating system installation.

1. Log into your operating system with root user, and open terminal.

2. Now use the command lsblk to list all out all storage blocks.

how to create linux swap partition

3. Now use the command mkswap <device name>.

swap partition linux

4. Now use the command swapon <device name> to enable the swap space.

5. Now do a entry of swap partition in fstab file.

swap fstab

6. Now use the command free, it will display the amount of swap space.

swap space in linux

Video tutorial:

Keywords: How to Create Linux Swap Partition, Linux swap partition, swap partition in linux, swap space in linux, linux swap space, swap linux.