Skip to content

Linux partitions - the guide with all the essential information

If you were another person who surrendered to Linux, then you are certainly looking for information about the particularities of this system, right? In this case, know that one of those subjects that you must learn (and master) are Linux partitions.

Yes, mastering disk partitioning on the Linux system is an issue that can make a difference in your security, flexibility and agility in various processes, from the simplest, such as formatting, to the most complex.

So, if you want to discover everything about Linux partitions, continue reading this complete guide with all the information you need to know. Shall we go?

First of all, what are partitions?

First of all, we need to understand what disk partitioning is. In this sense, partitions are simply the divisions of a hard drive, the famous HD.

This disk partitioning occurs within the logical structure of the disk, that is, in the abstract part. In other words, the physical structure does not undergo any type of division.

In this way, each disk partition can be directed to a purpose, such as: data storage, operating system, Swap memory, among others.

It should be noted that when there is interference with one of the partitions, the other is not affected. For example: if the partition on which the operating system is located is formatted, the one containing the data storage does not suffer anything and remains intact.

Now understand what Linux Partitions are

Now that you know what partitions are, it’s time to understand specifically what Linux partitions are, right?

In this sense, Linux partitions refer to the space on the hard drive dedicated to installing the distribution of that operating system specifically.

However, there is still much to be understood about this disk partitioning in Linux. Continue reading to understand.

Understand the difference between Linux Partitions and Windows Partitions

Before proceeding, it must be understood that Linux partitions and Windows partitions have many differences, despite the fact that the purpose of both is the same: to divide the logical structure of the HD.

Thus, in terms of similarity, we can say that both the Linux and Windows system partitions have the types “Primary” and “Logical” (although Linux also has the “Extended” type).

That said, now look at the differences!

Linux partitions can be divided into two categories: data partitions (these are the files that start and execute the system) and swap partitions (they expand the computer’s physical memory, since they use the partition as a cache).

Thus, thanks to the exchange partitions existing in the Linux system, the computer will never run out of memory, something that does not happen in Windows.

In addition, another difference relates to the nomenclature of hard disk drives. While in Windows they will be named “C” or “D”, in Linux the hard drive is named “/dev/sdb”, “/dev/sdb”, “/dev/sdc”, among others.

It is worth saying that “dev” is the translation for “device”.

Are you migrating from Windows to Linux? Attention EFI!

If you’ve made it this far, you might want to migrate from Windows to Linux, right?

However, be aware that, in order to do so, it is necessary to pay attention to EFI, an exclusive partition for safely loading drivers used by the Microsoft system.

We know that, since most computers come with Windows installed at the factory, it can be very common for you to experience this migration situation and therefore need this care when managing partitions.

Therefore, if you use specific programs to perform this management on a computer that had Windows installed, be careful not to format or delete the EFI, as this action may compromise the Linux boot.

![migrar para linux](https://www.certificacaolinux.com.br/wp-content/uploads/2022/04/migrar-para-linux.jpg)
What are the three types of partitions? ---------------------------------------

As we mentioned before, Linux partitions are divided into three main types: Primary, Logical, and Extended.

  • Primary: this type of partition stores file systems. Therefore, these are usually operating system partitions.
  • Extended: This type of partition houses logical partitions.
  • Logical: obviously, this type of partition is within the “Extended”, and receives file systems.

There are two disk partitioning table standards

Disk partitioning tables are used for the purpose of describing the appearance of partitions on a hard disk, that is, how you view those partitions.

Thus, there are two table standards: the Master Boot Record (MBR) and the GUID Partition Table (GPT). Shall we get to know each of them better?

MBR

This is the most common standard, even supported by the BIOS. So, on older computers, it’s the MBR that you’re going to run into.

However, this is a standard that has some limitations. For this reason, the GPT was created to replace it, since this one is more modern.

In this sense, some of the limitations of the MBR standard is the fact that it does not allow the configuration of more than 4 primary partitions and each partition is limited to 2 TB.

GPT

The GPT came precisely to put an end to the limitations suffered by the MBR. Therefore, this is a more modern standard, supported by the UEFI interface, and is present on newer computers.

Thus, GTP supports up to 128 primary partitions that store more than 2 TB, the limit being 1 ZB. That should be enough for you, shouldn’t it?

How to make Linux partitions?

To perform partitioning on Linux, it is necessary, first of all, to concentrate completely on this action, since any mistake can corrupt your disk.

Next, you should download a disk partitioning program, such as GParted and Fdisk. Within it, you will type:

<a data-id="1082" data-type="post" href="https://www.linuxcertification.academy/sudo-command-on-linux-privilege-scale-basic-guide/">sudo</a> <a data-id="516" data-type="post" href="https://www.linuxcertification.academy/parted-command-on-linux-partitioning-disk-basic-guide/">parted</a> mkpart Linux 2 partition 50000MB

Where “50000MB” is (equivalent to 50GB), you can enter another number as long as it is compatible with the size of your Linux partition.

LVM: Logical Volume Manager — Create logical volumes on the hard disk

Logical Volume Manager, or simply LVM, is a program that can contribute considerably to the organization of your partitions. In addition, it can resize the size of those and enable snapshots of disk volumes.

Therefore, it is an essential tool that allows you to quickly and simplify the location of the partitions on your hard drive and reduce or increase their size whenever you consider it necessary, without the need to resort to formatting.

We offer Linux courses with a fully didactic structure and certification. Be wild on Linux partitions and stand out because of this, come find out more!

Conclusion

Did you notice how Linux partitions are very simple to understand and implement?