Skip to content

[Linux] How to mount a hard disk drive

Step 1: format the disk

If you have a new hard disk drive, you need to plug it into the computer. And then, we can open the settings menu with a tool “Disks”.

Open it and you will see:

If you had a formatted hard disk drive, you don’t need to format it. But if you have a new one, I recommend you format it to “Ext4”.


Step 2: find the UUID

Each hard disk drive has its own UUID. We can use the following instruction to check:

sudo blkid

But if you not sure which one is your HDD, maybe you can recheck with application “Disks”.

Usually displayed here.


Step 3: Mount the hard disk drive

If you don’t preset the path where you want to mount the hard disk drive, you can create a folder directly like me:

sudo mkdir /D

And we check the “fstab” file:

sudo vim /etc/fstab

The drive “fstab” file written will mount automatically. So we want to add a new HDD, we need to write the “UUID” of our new HDD.

UUID="Your UUID" /D ext4 defaults 0 0

This will automatically mount this hard disk the next time you boot! But of course, we never reboot our system for mounting one disk, we can use the following instruction to mount it:

sudo mount /D

Using “df -h” to check it, the new HDD should be mounted now.


References

Tags:

Leave a ReplyCancel reply

Click to Copy
Exit mobile version