fbpx Linux Partitions: The Essential Guide | Certificação Linux

Linux Partitions: The Essential Guide

📅 04/25/2022 ⏱ 6 min ✍️ Uira Ribeiro
Linux
Linux Partitions: The Essential Guide
Exam Pass App — mais de 7.000 questões LPI, offline, em 5 idiomas, disponível no Android e na App Store
Available on
Google Play
Available on
App Store

If you're one more person who has surrendered to Linux, then you certainly live searching for information about the particularities of this system, right? In this case, know that one of these topics you should learn (and master) is Linux partitions.

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

Therefore, if you want to discover everything about Linux partitions, continue reading this complete guide with all the information you need to know. Let's go?

First of all, what are partitions?

First of all, we need to understand what disk partitioning is. In this regard, 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 is not divided in any way.

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

It is worth mentioning that, when there is an interference in one of the partitions, the other is not affected. For example: if the partition where the operating system is located is formatted, the one containing the data storage is not affected and remains intact.

Now understand what Linux Partitions are

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

In this regard, Linux partitions refer to the space on the HD dedicated to installing the distribution of this operating system specifically.

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

Understand the difference between Linux Partitions and Windows Partitions

Before we proceed, it is necessary to understand that Linux partitions and Windows partitions have many differences, although the purpose of both is the same: to fractionate the logical structure of the HD.

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

That said, now see the differences!

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

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

Moreover, another difference refers to the naming of hard drive units. While in Windows they will be named as "C" or "D", in Linux the hard drive is named as "/dev/sda", "/dev/sdb", "/dev/sdc", among others.

It is worth saying that "dev" stands for "device".

Going to migrate from Windows to Linux? Pay attention to EFI!

If you have come this far, you may want to migrate from Windows to Linux, right?

However, know that, for this, it is necessary to pay attention to EFI, an exclusive partition to securely load the drivers used by the Microsoft system.

We know that, since most computers come with Windows installed from the factory, it may 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 EFI, as this action may compromise the Linux boot.

migrate to linux

What are the three types of partitions?

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

  • Primary: this type of partition stores file systems. Therefore, it is generally about 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 in order to describe the appearance of a hard drive's partitions, that is, the way you see these divisions.

This way, there are two table standards: Master Boot Record (MBR) and GUID Partition Table (GPT). Shall we get to know each one better?

MBR

This is the most common standard, also supported by BIOS. Therefore, on older computers, it is with MBR that you will encounter.

However, this is a standard that has some limitations. That's exactly why GPT was created to replace it, as it is more modern.

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

GPT

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

Thus, GPT supports up to 128 primary partitions and that store more than 2 TB, with the limit being 1 ZB. This should be enough for you, right?

How to make Linux partitions?

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

Then, you must download a disk partitioning program, such as GParted and Fdisk. Inside it, you will type:

sudo parted mkpart PartiçãoLinux 2 50000MB

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

To confirm this action, just type:

sudo parted quit

LVM: Logical Volume Manager – Create logical volumes on the hard drive

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

Therefore, it is an essential tool that enables quick and simplified location of your hard disk partitions and the reduction or increase of their size whenever you consider necessary, without the need to resort to formatting.

We offer Linux courses with a fully didactic structure and certification. Become a pro at Linux partitions and stand out for it, come find out more!

Conclusion

Did you notice how Linux partitions are quite simple to understand and to implement? And all of this can become even easier with Linux Certification.

After all, our online courses can solve all your doubts about this operating system and help you become a specialist in the field.

Therefore, take the opportunity to learn about all the Linux Certification courses, coordinated and taught by Professor Uirá Ribeiro, and become a reference in the market!

Uira Ribeiro

Prof. Uirá Ribeiro

Chair do Board do Linux Professional Institute

After years of watching professionals waste hours on simple tasks because they didn't know the right Linux tools, I decided to teach.
Today I'm the author of most of LPI's official Learning Materials and mentor to over 14,000 certified students.

See my full story →

That was just one piece. The course teaches the whole path — from your first command to exam day.

Certificação Linux — a plataforma líder em certificações Linux no Brasil
WhatsApp