23.13 Mounting Disks


Before a disk can be mounted it needs to be formatted. See Section 23.12.

A disk can then be mounted onto the file system of the computer so that its contents can easily be accessed. A quick way to do so is to simply mount the device onto the temporary mount point:

sudo mount /dev/sdb1 /mnt
ls /mnt

To mount the disk on boot and into a fixed location we will give the disk a name, like sabrina. We then create a mount point for the disk:

sudo mkdir /media/sabrina

Add an entry into /etc/fstab

UUID=767f41ad-5b32-310f-aa89-54a24e26687 /media/sabrian ext4 defaults,errors=remount-ro,noatime 0 0

The UUID comes from:

sudo -i blkid | grep sdb1

We can manually mount the disk using:

sudo mount /media/sabrina

Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0