LINUX- Partition
In Linux and other operating systems, a partition is a section of a hard drive that is treated as a separate entity. A hard drive can be divided into multiple partitions, each of which can be used to store files or to hold a separate operating system.
In window we have disk partition like [C: ] [D: ] drives. These drives are created by dividing the Hard disk space.
In Linux, partitions are created and managed using a disk partitioning tool, such as fdisk or gdisk. When you create a partition, you specify the size of the partition and the type of filesystem it will contain (such as ext4, NTFS, or FAT32).
To store any data we need hard disk, to use hard disk we need to partition it. We cannot store any data in hard disk directly. it’s stored in file.
Hard disk can’t understand the units like MG/GB..etc. it’s only understands sectors. 1 sector== 512 bytes.
To see all hard disk attached to particular OS in Linux we can use the below command.
fdisk -l
if you want to view specific hard disk: fdisk -l /dev/sda.
In below output we can see the hard disk name as- /dev/sda
How to create Partition in Linux?
We can follow 3 important steps to partition the Hard disk in Linux: