From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

List, create, delete partitions on MBR and GPT disks

List, create, delete partitions on MBR and GPT disks - Linux Tutorial

From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)

Start my 1-month free trial

List, create, delete partitions on MBR and GPT disks

- [Male] Let's create some partitions now. Power up your VM, log in, and open a terminal. The first thing we want to do is get a list of drives in the system. We can do this by catting proc partitions. In a terminal, type in cat /proc/partitions, and hit enter. This information comes from the kernel directly. This is the list of drives and partitions that the kernel currently recognizes. Another tool that's useful in determining the available drives is lsblk. Type in lsblk, and hit enter. This also gives a visual of the drives and their partitions, or logical volumes. We can see that /dev/sda has partitions on it, and they're mounted as /boot, and /, but /dev/sdb is bare. This is one of our new drives. If you want to read the partition table for all drives directly, you can use fdisk -l. Type in clear, and then type in sudo fdisk -l, and hit enter, type in your password if prompted. This will show all partitions on all…

Contents