- 1 1. What Does “Mount” Mean in Ubuntu?
- 2 2. Manual Mounting in Ubuntu: Basic Methods
- 3 3. Automatic Mounting at Boot Time (fstab)
- 4 4. How to Mount USB Flash Drives and External Hard Drives
- 5 5. Mounting Network Drives (NAS)
- 6 6. Common Errors and Troubleshooting
- 7 7. Reference: Common Mount Commands and Usage
- 8 8. FAQ: Frequently Asked Questions About Mounting in Ubuntu
- 8.1 Q1. Why is my USB device not automatically mounted?
- 8.2 Q2. Ubuntu fails to boot after editing fstab. What should I do?
- 8.3 Q3. How can I automatically mount Windows shared folders?
- 8.4 Q4. How can I mount without entering a password each time?
- 8.5 Q5. How do I list currently mounted devices?
- 8.6 Q6. “Target is busy” appears even after closing applications
- 9 9. Summary
1. What Does “Mount” Mean in Ubuntu?
The Meaning and Role of Mounting
In Linux and Ubuntu, “mounting” refers to the process of attaching a storage device to the file system.
For example, simply plugging a USB flash drive or external hard drive into a PC does not immediately make its contents accessible. Ubuntu performs a process called “mounting” to make the contents of that storage device visible at a specific location, such as /media or /mnt, known as a mount point.
You can think of it as physically attaching a “component” (the storage device) to the “main system” (Ubuntu) so that its contents can finally be used.
This concept applies not only to removable media like USB drives, but also to internal hard drive partitions, SSDs, and even shared folders on a network.
The Relationship Between File Systems and Devices
In Linux, including Ubuntu, all files and directories exist within a single hierarchical structure that starts at the root directory (/).
To integrate an external device, you create an empty directory called a mount point and “attach” the device to it. Once mounted, the system treats the device as if it had always been part of the file system.
For example, if you mount a USB drive at /media/usb, its contents will appear under that directory and can be copied, edited, or deleted like any other files.
The key point is that Ubuntu cannot access a device unless it is mounted.
Even if the system recognizes the hardware, file read/write operations are impossible until mounting is complete.
Differences Between Ubuntu and Other Operating Systems (Windows / macOS)
On Windows, inserting a USB device usually results in it being automatically assigned a drive letter such as D: or E:. In Ubuntu, however, whether a device is automatically mounted depends on system settings.
In desktop environments, most storage devices are auto-mounted, but in server environments or terminal-focused setups, manual mounting is often required.
Another difference is file system awareness. Windows users rarely need to think about file system types such as NTFS or FAT32, but on Ubuntu, mount options and compatibility vary depending on the file system.
For example, to fully handle NTFS devices, you may need to install the ntfs-3g package.
In short, mounting in Ubuntu is not just about connecting hardware—it is a critical process that integrates storage into the operating system’s file system. In the following sections, we will explore practical mounting methods and configuration examples in detail.
2. Manual Mounting in Ubuntu: Basic Methods
Basic Syntax and Usage of the mount Command
To manually mount a storage device in Ubuntu, you use the mount command.
Although its syntax is simple, it is extremely powerful and flexible.
sudo mount [options] device_path mount_pointFor example, to mount a USB drive (/dev/sdb1) to the directory /mnt/usb, use the following command:
sudo mount /dev/sdb1 /mnt/usbAfter executing this command, the files on the USB drive will appear inside /mnt/usb, and you will be able to read and write them.
Note that mounting requires root privileges, so the command must be executed with sudo.
Creating and Managing Mount Points
A mount point is an empty directory used as the attachment location for a device.
You must create this directory in advance.
sudo mkdir -p /mnt/usbThe -p option automatically creates parent directories if they do not exist.
Temporary manual mounts are commonly placed under /mnt or /media, but you are free to use any directory you prefer.
Once the device is mounted, the mount point directory will contain the device’s files. After unmounting, it returns to being an empty directory.
How to Identify Device Names and UUIDs
To mount a device, you must know its device name (such as /dev/sdb1). You can check this using the following command:
lsblkThe lsblk command lists all connected block devices (HDDs, SSDs, USB drives, etc.), including their sizes and mount status.
If you need to check the UUID (Universally Unique Identifier), use:
sudo blkidThe blkid command displays the UUID and file system type (ext4, ntfs, fat32, and so on) for each device. UUIDs are especially important for automatic mounting with fstab, which we will discuss later.
Unmounting Devices with umount
To safely detach a mounted device, use the umount command.
For example, to unmount a device mounted at /mnt/usb:
sudo umount /mnt/usbYou can also specify the device name directly:
sudo umount /dev/sdb1Physically removing a device without unmounting it first may cause data corruption. Always unmount devices before disconnecting them.
3. Automatic Mounting at Boot Time (fstab)
What Is /etc/fstab?
If you want Ubuntu to automatically mount devices at startup, you use the /etc/fstab file.
This file is a system-wide configuration file that defines which devices are mounted during boot.
For example, if you regularly use an external drive or an additional partition and want to avoid mounting it manually each time, adding an entry to fstab will automate the process.
However, be careful: incorrect entries can prevent the system from booting properly.
Using UUIDs for Safer Configuration
Devices can be specified in fstab using either device names (such as /dev/sdb1) or UUIDs. Using UUIDs is strongly recommended.
Device names may change depending on connection order, while UUIDs remain constant.
First, check the UUID:
sudo blkidExample output:
/dev/sdb1: UUID="1234-ABCD" TYPE="vfat"Then add the following line to /etc/fstab:
UUID=1234-ABCD /mnt/usb vfat defaults 0 0The meaning of each field is as follows:
| Field | Description |
|---|---|
| UUID=… | Unique identifier of the target device |
| /mnt/usb | Mount point |
| vfat | File system type |
| defaults | Standard mount options |
| 0 0 | Backup and filesystem check settings |
Tips to Avoid Errors When Editing fstab
Errors in fstab can cause serious boot problems.
To minimize risk, follow these precautions:
- Always create a backup:
sudo cp /etc/fstab /etc/fstab.bak - Ensure the mount point exists: create it with
sudo mkdir -p /mnt/usb - Test the configuration using the following command:
sudo mount -aThis command attempts to mount all entries defined in fstab. If no errors appear, the configuration is valid.
4. How to Mount USB Flash Drives and External Hard Drives
Differences Between FAT32, exFAT, and NTFS File Systems
When mounting USB flash drives or external hard drives in Ubuntu, it is important to check the file system type. The following three are the most common:
| File System | Characteristics | Ubuntu Support |
|---|---|---|
| FAT32 | Readable on almost all operating systems | Supported by default |
| exFAT | Supports large files, high compatibility | Supported by default on Ubuntu 20.04+, older versions require exfat-fuse |
| NTFS | Standard file system on Windows | Read support by default; ntfs-3g recommended for full write support |
To fully handle NTFS-formatted devices, install ntfs-3g:
sudo apt update
sudo apt install ntfs-3gChecking Devices and Manual Mounting Steps
After connecting a USB device, first check the device name using:
lsblkExample output:
sdb 8:16 1 16G 0 disk
└─sdb1 8:17 1 16G 0 part /mnt/usbIn this case, /dev/sdb1 is the target partition. Create a mount point:
sudo mkdir -p /mnt/usbThen mount the device:
sudo mount /dev/sdb1 /mnt/usbThe contents of the device will appear under /mnt/usb and can be accessed normally.
What to Do When Auto-Mount Does Not Work
In desktop environments such as GNOME, USB devices are usually mounted automatically. However, auto-mount may not work in server environments or under certain configurations.
Try the following solutions:
- Reconnect using a file manager (desktop environments)
- Use the
udisksctlcommand:
udisksctl mount -b /dev/sdb1- Check kernel messages with
dmesg:
dmesg | tailIf messages such as “new USB device” do not appear, the issue may be a faulty cable or physical connection.
Safely Removing Devices (umount)
Removing a USB device without unmounting it can lead to data corruption. Always unmount before unplugging:
sudo umount /mnt/usbIf the mount point is unknown, you can specify the device directly:
sudo umount /dev/sdb1Once unmounted successfully, the device can be safely removed.

5. Mounting Network Drives (NAS)
Mounting Windows Shares (SMB / CIFS)
Ubuntu can mount shared folders from Windows systems or NAS devices using the SMB/CIFS protocol, allowing them to be accessed like local directories.
First, install the required package:
sudo apt update
sudo apt install cifs-utilsCreate a mount point:
sudo mkdir -p /mnt/shareThen mount the shared folder:
sudo mount -t cifs //192.168.1.100/share /mnt/share -o username=USERNAME,password=PASSWORD,iocharset=utf8Key points:
//192.168.1.100/share: IP address and share name/mnt/share: Local mount point-ooptions: Username, password, character encodingiocharset=utf8: Prevents garbled Japanese filenames
If you do not want to expose passwords on the command line, see the section on secure credential management below.
Mounting NFS Shares
NFS (Network File System) is well suited for file sharing between Linux systems.
Install the required client package:
sudo apt install nfs-commonCreate a mount point:
sudo mkdir -p /mnt/nfsMount the NFS share:
sudo mount -t nfs 192.168.1.200:/export/share /mnt/nfsAdjust the path according to your server configuration.
To enable automatic mounting at boot, add the following entry to /etc/fstab:
192.168.1.200:/export/share /mnt/nfs nfs defaults 0 0Secure Management of Credentials (Username / Password)
Including passwords directly in mount commands is not recommended for security reasons. Instead, you can use a credentials file.
- Create a credentials file (for example):
sudo nano /etc/samba/credentialsFile contents:
username=your_username
password=your_password- Restrict file permissions:
sudo chmod 600 /etc/samba/credentials- Add the following entry to
fstab:
//192.168.1.100/share /mnt/share cifs credentials=/etc/samba/credentials,iocharset=utf8 0 0This allows automatic mounting at boot without exposing passwords.
Preventing Garbled Japanese Filenames (Locale Settings)
If Japanese filenames appear as “????.txt” when mounting SMB shares, the issue is usually related to character encoding.
Ensure the following option is specified:
iocharset=utf8Also verify your system locale:
localeIf ja_JP.UTF-8 is not present, install and enable the Japanese locale:
sudo apt install language-pack-ja
sudo update-locale LANG=ja_JP.UTF-8Log out or reboot to apply the changes.
6. Common Errors and Troubleshooting
When “Target Is Busy” Appears
Error message:
umount: /mnt/usb: target is busy.This error occurs when the device you are trying to unmount is currently being used by one or more processes.
Common causes:
- Another terminal is currently
cd-ed into the directory - A file is open in a GUI application
- A background process is accessing files on the device
Solutions:
- Identify the processes using the mount point:
lsof /mnt/usb- Terminate or close the identified processes
- If the issue persists, use
fuser:
sudo fuser -km /mnt/usbThis command forcibly terminates processes using the mount point. Use it with caution.
Resolving “Permission Denied” Errors
Error message:
mount: /mnt/share: permission denied.This error indicates insufficient permissions for the mount point or device.
Solutions:
- Ensure
sudois used:
sudo mount /dev/sdb1 /mnt/usb- Adjust mount point ownership if necessary:
sudo chown $USER:$USER /mnt/usb- For SMB shares, verify credentials and access permissions on the server
When Automatic Mounting Does Not Work
Even after configuring fstab, devices may fail to mount automatically at boot.
Things to check:
- Syntax errors in
fstab(spacing, filesystem type) - Correct UUID (verify with
sudo blkid) - Mount point exists (create with
mkdir) - Network shares not yet available at boot time (SMB / NFS)
Debugging:
sudo mount -aIf errors appear, correct the corresponding fstab entry.
Checking Logs with dmesg and journalctl
Detailed error information is often recorded in system logs.
dmesg | tail -n 20For more detailed logs:
journalctl -xeThese logs help identify hardware issues or invalid mount options.
Other Common Mount-Related Errors
| Symptom | Cause | Solution |
|---|---|---|
| mount: unknown filesystem type ‘exfat’ | exFAT not supported | sudo apt install exfat-fuse exfat-utils |
| I/O error when mounting SMB | SMB version mismatch | Add vers=1.0 or vers=3.0 to mount options |
| Filenames appear as ???? | Locale / encoding issue | Add iocharset=utf8 or review locale settings |
7. Reference: Common Mount Commands and Usage
■ Checking Devices
lsblk
Displays connected devices and partition structure.
lsblkExample:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 1 16G 0 disk
└─sdb1 8:17 1 16G 0 part /mnt/usbblkid
Displays UUIDs and filesystem types.
sudo blkid■ Mounting and Unmounting
mount
Basic command for mounting storage.
sudo mount /dev/sdb1 /mnt/usbSpecifying filesystem and options:
sudo mount -t vfat -o uid=1000,gid=1000 /dev/sdb1 /mnt/usbumount
Unmounts a mounted device.
sudo umount /mnt/usbOr specify the device:
sudo umount /dev/sdb1■ Automatic Mounting
/etc/fstab
Configuration file for mounting devices at system startup.
sudo nano /etc/fstabExample entry:
UUID=1234-ABCD /mnt/usb vfat defaults 0 0mount -a
Validates and mounts all entries defined in fstab.
sudo mount -a■ Troubleshooting Tools
dmesg
Checks kernel logs for mount-related errors.
dmesg | tail -n 20journalctl
Displays detailed system logs.
journalctl -xelsof
Identifies processes using a mount point.
lsof /mnt/usbfuser
Forcefully terminates processes using a mount point.
sudo fuser -km /mnt/usb■ Network Shares
cifs-utils
Required for SMB/CIFS mounts.
sudo apt install cifs-utilsnfs-common
Required for NFS mounts.
sudo apt install nfs-commonudisksctl
Simple mounting/unmounting in non-GUI environments.
udisksctl mount -b /dev/sdb1
udisksctl unmount -b /dev/sdb18. FAQ: Frequently Asked Questions About Mounting in Ubuntu
Q1. Why is my USB device not automatically mounted?
A. USB devices are usually auto-mounted in desktop environments, but auto-mount may fail in the following cases:
- You are using Ubuntu Server or a non-GUI environment
- The device is not recognized correctly (cable or hardware issue)
- The device has no filesystem or is corrupted
Check device recognition using lsblk or dmesg, then try manual mounting.
Q2. Ubuntu fails to boot after editing fstab. What should I do?
A. Incorrect fstab entries can cause the system to stop in maintenance mode.
Recovery steps:
- Log in to maintenance mode and edit
fstab:
sudo nano /etc/fstab- Comment out incorrect lines using
# - Run
mount -ato confirm no errors - Reboot the system
Always create a backup before editing:
sudo cp /etc/fstab /etc/fstab.bakQ3. How can I automatically mount Windows shared folders?
A. Add an entry to /etc/fstab using a credentials file.
//192.168.1.100/share /mnt/share cifs credentials=/etc/samba/credentials,iocharset=utf8 0 0Verify functionality with sudo mount -a.
Q4. How can I mount without entering a password each time?
A. Use a credentials file for SMB mounts. For local storage devices, proper fstab configuration eliminates password prompts.
Q5. How do I list currently mounted devices?
A. Use one of the following commands:
mount | column -tOr a more visual view:
lsblk -fQ6. “Target is busy” appears even after closing applications
A. Identify remaining processes:
lsof /mnt/usbOr forcibly terminate them:
sudo fuser -km /mnt/usbThen retry umount.
9. Summary
Mounting in Ubuntu is a fundamental skill for effectively managing storage devices and network shares.
This article covered everything from basic concepts to advanced configuration and troubleshooting.
Key Takeaways
- Mounting integrates devices into the Linux file system
- Manual mounting provides flexibility and control
fstabenables reliable automatic mounting- USB, external drives, and NAS require filesystem-aware handling
- Proper unmounting prevents data corruption
- Troubleshooting tools help resolve common issues efficiently
Once mastered, Ubuntu’s mounting system offers exceptional flexibility and power.
Apply the commands and concepts from this guide to build a stable and efficient storage environment tailored to your needs.
This knowledge will support everything from daily file management to server operations and NAS integration, helping you use Ubuntu with confidence and precision.



