Mount external hard drive Linux

Mounting an external hard drive in Linux is a straightforward process. This guide will take you through the process of mounting an external hard drive in Linux step by step.

mount external hard drive linux

Before we start, make sure that your external hard drive is properly connected to your Linux machine. You can check whether your system recognizes the external hard drive by running the following command in the terminal:

Copy codesudo fdisk -l

This command will list all the storage devices connected to your system. If your external hard drive is recognized, you should see its device name listed in the output.

Now, let’s proceed with the steps to mount the external hard drive:

Step 1: Create a Mount Point The first step is to create a mount point for your external hard drive. A mount point is a directory in your file system where the external hard drive will be mounted. You can create a mount point using the mkdir command. For example, to create a mount point named “externalhdd” in the “/mnt” directory, you can run the following command:

bashCopy codesudo mkdir /mnt/externalhdd

Step 2: Find the Device Name of the External Hard Drive To mount the external hard drive, you need to know its device name. You can find the device name by running the “fdisk -l” command. The device name typically starts with “/dev/”. For example, if your external hard drive is listed as “/dev/sdb1”, the device name is “sdb1”.

Step 3: Mount the External Hard Drive Once you have created the mount point and found the device name of the external hard drive, you can mount the drive using the mount command. The syntax of the mount command is as follows:

phpCopy codesudo mount <device_name> <mount_point>

For example, to mount the external hard drive with device name “sdb1” to the mount point “/mnt/externalhdd”, you can run the following command:

bashCopy codesudo mount /dev/sdb1 /mnt/externalhdd

Step 4: Verify the Mount After mounting the external hard drive, you can verify that it has been mounted by running the “df -h” command. This command lists all the mounted file systems in your system. You should see your external hard drive listed as a mounted file system.

Step 5: Unmount the External Hard Drive To safely remove the external hard drive from your system, you need to unmount it first. You can unmount the external hard drive using the umount command. The syntax of the umount command is as follows:

phpCopy codesudo umount <mount_point>

For example, to unmount the external hard drive mounted at “/mnt/externalhdd”, you can run the following command:

bashCopy codesudo umount /mnt/externalhdd

Conclusion: In conclusion, mounting an external hard drive in Linux is a simple process that involves creating a mount point, finding the device name of the external hard drive, mounting the drive to the mount point using the mount command, and verifying the mount using the df command. Remember to always unmount the external hard drive before removing it from your system to avoid data loss.

Mount external hard drive Linux

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top