How to Access External Hard Drive Linux Terminal
To how to access external hard drive linux terminal, first identify the drive with a command like lsblk, then mount the correct partition to a mount point, and finally open the files from that mounted location. If the drive is already mounted, you can use it right away, but if not, you will usually need sudo mount and, in some cases, filesystem support for NTFS or exFAT.
Quick answer
The safest workflow is: find the disk, verify the partition, check whether it is mounted, mount it if needed, then open the files. Most Linux systems can read external drives directly from the terminal once the device name and filesystem are identified correctly.
Here is the short version:
- Plug in the external hard drive.
- Run
lsblkorsudo fdisk -lto find the device name. - Check whether a partition is already mounted.
- Create a mount point if needed.
- Mount the correct partition with
sudo mount. - Browse the files in the mount directory.
- Unmount it safely when finished.
Find the drive in the terminal
The first step is to identify the external drive without guessing its name. On Linux, device names can change across boots or when you plug drives into different ports, so do not assume the disk will always appear as the same /dev/sdX name.
Use lsblk first because it is one of the clearest ways to compare disk size, partitions, and mount points:
lsblkA typical result might look like this:
NAME SIZE TYPE MOUNTPOINT
sda 476G disk
├─sda1 512M part /boot/efi
├─sda2 475G part /
sdb 1.8T disk
└─sdb1 1.8T part /media/user/BackupDriveIn this example, sdb is likely the external drive because it has a different size and a separate mount point. The partition you usually want to mount is the part entry, such as /dev/sdb1, not the whole disk /dev/sdb.
Other useful commands:
sudo fdisk -l
sudo blkid
dmesg | tail -n 30fdisk -l shows partition tables and sizes, blkid shows filesystem types and labels, and dmesg helps if you just plugged the drive in and want to see what the kernel detected.
How to distinguish the external drive from internal disks
When several disks are attached, compare these details:
- Size, external backup drives are often much larger or much smaller than the internal system disk.
- Model name, shown in some
lsblkorfdiskoutputs. - Partition labels, such as “Backup,” “Data,” or a manufacturer label.
- Mount point, if it is already mounted, the path appears in the
MOUNTPOINTcolumn. - Filesystem type, such as ext4, NTFS, or exFAT.
If you are unsure, stop and verify before mounting anything. Mounting the wrong device can lead to confusion or accidental writes to the wrong disk.
Check whether it is mounted
Before mounting manually, see whether Linux already mounted the drive automatically. Many desktop distributions auto-mount external drives under /media or /run/media.
lsblk -fThis version of lsblk shows filesystem type, label, UUID, and mount point. If the external partition already has a mount point, you can access it immediately.
You can also check with:
mount | grep sdor, if you know the device name:
mount | grep sdb1If the drive is already mounted, note the path, then skip to opening the files.
Mount the drive manually
If the external hard drive is not mounted, create a mount point and mount the correct partition. A mount point is just an empty directory where the drive will appear in the filesystem.
1. Create a mount point
sudo mkdir -p /mnt/externalYou can use another path if you prefer, such as /mnt/backup or /media/external. The important part is to choose a directory that does not already contain files you need to protect.
2. Mount the partition
If the partition is /dev/sdb1, mount it like this:
sudo mount /dev/sdb1 /mnt/externalIf the filesystem is recognized automatically, that may be enough. If Linux does not detect the type correctly, you can specify it:
sudo mount -t ext4 /dev/sdb1 /mnt/externalCommon filesystem types include:
- ext4, common on Linux systems
- NTFS, common on Windows-formatted drives
- exFAT, common for portable drives shared between Windows, macOS, and Linux
3. For NTFS or exFAT drives
On many modern Linux distributions, NTFS and exFAT work out of the box or with installed support packages. If mounting fails, the system may be missing the driver or userspace tools needed for that filesystem.
If an NTFS drive mounts read-only or fails to mount, check whether the system suggests a specific helper. If the drive is exFAT and not supported, install the necessary package through your distribution’s package manager.
Examples of what may be needed, depending on your distro:
- NTFS support, often handled by
ntfs-3gor built-in kernel support on newer systems - exFAT support, often handled by
exfatprogsor equivalent packages
If you are not sure which filesystem the drive uses, check with:
lsblk -for:
sudo blkid /dev/sdb1Open and use the files
After mounting, the drive contents are available in the mount directory. If you used /mnt/external, then browse it like this:
cd /mnt/external
lsFrom there, you can list folders, copy files, or inspect directory contents with normal shell commands. For example:
cp important-file.zip ~/Downloads/If you want to open the mounted drive in a graphical file manager from the terminal, you can usually launch it by opening the mount path, for example:
xdg-open /mnt/externalThis keeps the workflow terminal-first while still giving you a visual file browser when needed.
Fix common permission issues
Sometimes the drive mounts successfully, but you cannot read or write files. The cause is usually filesystem permissions, ownership, or a read-only mount.
Permission denied on a Linux filesystem
If the drive uses ext4 or another Linux filesystem, file ownership matters. A drive mounted as root may be readable but not writable for your normal user.
Check the ownership of the mount point and files:
ls -ld /mnt/external
ls -l /mnt/externalIf you need your user to own the mounted filesystem on a removable Linux drive, you can remount with ownership options in some cases, or change ownership of files after mounting if that is appropriate. Be careful with ownership changes on shared systems or multi-user drives.
Read-only mount
If the drive mounts read-only, Linux may be protecting it because the filesystem was not cleanly unmounted, or it detected possible corruption.
Check the mount flags:
mount | grep /mnt/externalIf you see ro, the filesystem is read-only. For Windows filesystems like NTFS, this can also happen when Windows left the drive in a hibernated or unsafe shutdown state. In that case, you may need to repair the drive on Windows before Linux will mount it normally.
Troubleshoot missing or unreadable drives
If the external hard drive does not show up, work through the problem in this order: detection, partitioning, filesystem support, and hardware issues.
The drive does not appear in lsblk
If lsblk does not show the drive at all, try unplugging and reconnecting it, then run:
dmesg | tail -n 50Look for USB errors, power issues, or messages that mention the new device. If nothing appears, the cable, enclosure, USB port, or power source may be the problem rather than Linux itself.
The disk appears but has no partition
Sometimes Linux detects the physical disk, but there is no usable partition entry. In that case, you cannot mount the whole disk like a normal filesystem. You need an existing partition or a filesystem created on the device.
If the drive should already contain data, do not format it. Check the partition table carefully with:
sudo fdisk -l /dev/sdbLook for a partition such as /dev/sdb1. If there is none, the disk may be unpartitioned, damaged, or using a setup that needs additional inspection.
The filesystem type is unsupported
If mounting fails with an unknown filesystem error, identify the type with blkid or lsblk -f. Then install the proper support tools for that filesystem. NTFS and exFAT are the most common cross-platform formats that need extra attention.
The drive is damaged or inconsistent
If the filesystem has errors, Linux may refuse to mount it normally or may force a read-only mount. Avoid writing to a possibly damaged drive until you have copied off important data. In some cases, a filesystem repair tool may be needed, but the correct repair method depends on the filesystem type and the kind of damage.
Why device names can change
The same external hard drive may show up as /dev/sdb one time and /dev/sdc another time. This happens because Linux assigns device letters based on the order devices are detected, not by a permanent human-friendly name.
That is why it is safer to identify drives by:
- size
- filesystem label
- UUID
- model name
- partition table
When possible, use labels or UUIDs in scripts and permanent mount configurations instead of relying only on /dev/sdb1.
Unmount the drive safely
Before unplugging the drive, always unmount it. This makes sure all cached writes are flushed and reduces the chance of file corruption.
sudo umount /mnt/externalIf you mounted the partition directly and not the directory, you can unmount by device name too:
sudo umount /dev/sdb1If unmounting fails because the device is busy, close any terminal sessions, file managers, or applications using files on that drive, then try again. You can check what is using the mount point with:
lsof +f -- /mnt/externalAfter unmounting, confirm it is no longer mounted:
lsblk -fOnce the mount point is clear, it is safe to disconnect the drive.
Useful command flow you can reuse
If you want a compact reference, this is the basic sequence most readers need:
lsblkto find the drive.lsblk -forblkidto confirm the filesystem.sudo mkdir -p /mnt/externalto create a mount point.sudo mount /dev/sdb1 /mnt/externalto mount the partition.cd /mnt/externalto access the files.sudo umount /mnt/externalwhen finished.
Replace /dev/sdb1 with the actual partition you found on your system.
Frequently Asked Questions About how to access external hard drive linux terminal
How do I find my external hard drive in Linux terminal?
Use lsblk first. It shows disks, partitions, sizes, and mount points. If you need more detail, try sudo fdisk -l or lsblk -f.
How do I mount an external hard drive manually in Linux?
Create a mount point with sudo mkdir -p /mnt/external, then mount the correct partition with sudo mount /dev/sdb1 /mnt/external. Replace the device name with the one on your system.
Why is my external hard drive not showing up in Linux terminal?
If it does not appear in lsblk, the issue may be the cable, USB port, enclosure, power supply, or the drive itself. Check dmesg | tail for detection errors after reconnecting the drive.
How do I access files on an external drive after mounting it?
Go to the mount point with cd, then list files with ls. For example, if the drive is mounted at /mnt/external, use cd /mnt/external.
How do I fix permission denied on an external hard drive in Linux?
Check whether the drive mounted read-only, then inspect ownership and permissions with ls -l and mount. On Linux filesystems, you may need to adjust ownership or remount with suitable options. On NTFS or exFAT, missing filesystem support can also cause access problems.
Can I open the drive in a file manager from the terminal?
Yes. After mounting, you can use xdg-open /mnt/external to open the location in your desktop file manager while still starting from the terminal.
What should I do if the drive mounts read-only?
Check whether the filesystem was uncleanly removed or has errors. If it is NTFS, Windows may have left it in a hibernated state. Avoid writing to the drive until you understand why it is read-only.
Conclusion
The most reliable way to how to access external hard drive linux terminal is to identify the correct partition, confirm its filesystem, mount it to a directory, and then access the files from that mount point. If something goes wrong, the usual causes are a wrong device name, missing filesystem support, permissions, or filesystem errors. When you are done, unmount the drive before unplugging it so your data stays safe.
