From the course: Complete Guide to Navigating Linux: Working with Users, Files, and Networks
Understanding mounts - Linux Tutorial
From the course: Complete Guide to Navigating Linux: Working with Users, Files, and Networks
Understanding mounts
- Let's talk about mounts. The Linux FileSystem Handling Standard defines the directory structure on Linux systems. We talked about that before. And different storage devices might be integrated into this directory structure by mounting them on the directory. You can use one of the following to get an overview of all mounts. Lsblk, or the mount command, which is giving a lot of information. Probably better use mount pipe grep ^/ to only show lines that start with the slash, or findmnt, which shows the entire directory structure, including the mounts that have been created. Now, on some configurations, new devices will be mounted automatically. This doesn't always happen. In the next video, you will learn how to manually mount these devices. For now, let's check out what is mounted by default. So first, I'd like to show you lsblk for list block devices. Ignore all the loop devices because these loop devices are used by snap. We'll talk about snap later. Pretend as if they're not there. Or even better, use lsblk | grep -v loop. And there we have a reasonable list. So what do we see? We see sr0. sr0 is the Ubuntu installation disk, which is mounted on media/student/ubuntu, some subdirectory. And we have nvme0n1 and nvme0n1 is the hard disk. Now, you don't mount a hard disk directly. You will mount partitions on the hard disk. So here we have the first partition, here we have the second partition, mounted on the directory boot/efi, and on the directory /. If you would use mount, you get the same information, but a lot of information also that you don't care about. Now, that means that if you want mount and you want to see your devices, well, first, you want to grep -v snap because all these snap mounts don't make it easier to read. And now we can see the real mounts and also administrative mounts. I would say don't go for the administrative mounts, but filter on lines that start with / because these are your block devices that are mounted and you can see where they are mounted. And finally, there is findmnt, which is showing the entire direct restructure, but here also, a lot of information that you really don't care about. So probably the best way to figure out if your devices be mounted successfully is the lsblk command, because lsblk, even if you don't filter out all these lines for snap, it's still a bit readable.
Contents
-
-
-
-
-
(Locked)
Learning objectives43s
-
(Locked)
Creating text files5m 55s
-
(Locked)
Using common text file processing tools8m 18s
-
(Locked)
A primer to regular expressions4m 59s
-
(Locked)
Reading system logs3m 11s
-
Understanding mounts2m 55s
-
(Locked)
Mounting a USB thumb drive4m 2s
-
(Locked)
Command overview1m 22s
-
(Locked)
Lesson 3 lab: Managing text files, logs, and editors31s
-
(Locked)
Lesson 3 lab solution: Managing text files, logs, and editors1m 47s
-
(Locked)
-
-