How to increase or decrease the size of static partition in Linux!

In this task we can increase or decrease the size of static partition in Linux by following these steps!

Check partitions using command

fdisk -l

Now we will make a partition and put some data in it.

fdisk<name>

Now we will format the partition

mkfs.ext4 <device name>

Now we will mount the folder!

mount <partition name> <location>

Now add some data to it!

To increase/decrease the size we unmount it!

umount <device name>

Now delete the existing partition

After the partition is deleted we again create a partition using fdisk with the same device name. But this time in the option we will give +3GB.

You can also check for error by using command

e2fsck -f <device name>

Thank You