- 1 1. What Does “Mount” Mean in Ubuntu?
- 2 2. [Manual] How to Mount Devices in Ubuntu
- 3 3. [Automatic] How to Mount Devices at Boot (Using fstab)
- 4 4. How to Mount USB Drives and External HDDs
- 5 5. How to Mount a Network Drive (NAS)
- 6 6. Common Errors and Troubleshooting Tips
- 7 7. [Reference] Summary of Mount-Related Commands
- 8 8. FAQ: Common Questions About Mounting in Ubuntu
- 8.1 Q1. Why Isn’t My USB Drive Automatically Mounted in Ubuntu?
- 8.2 Q2. I Edited fstab and Now Ubuntu Won’t Boot. What Should I Do?
- 8.3 Q3. How Can I Auto-Mount a Windows Shared Folder (SMB)?
- 8.4 Q4. Can I Mount Without Entering a Password Every Time?
- 8.5 Q5. How Do I See Which Devices Are Currently Mounted?
- 8.6 Q6. I Ran umount but Got “Target is Busy” — How Do I Force Unmount?
- 9 9. Conclusion
1. What Does “Mount” Mean in Ubuntu?
Definition and Role of Mounting
In Linux and Ubuntu, “mounting” refers to the process of connecting a storage device to the file system.
For example, plugging in a USB drive or external HDD doesn’t automatically make its contents accessible. Ubuntu uses a process called “mounting” to make those contents appear in specific locations, such as /media
or /mnt
, known as mount points.
You can think of it like attaching a “part” (the storage device) to the “main body” (Ubuntu) to make it usable.
Mounting is not limited to USB and other removable media — it also applies to internal hard drive partitions and shared folders over a network.
Relationship Between File Systems and Devices
In Ubuntu and other Linux systems, all files and directories are organized in a hierarchy starting from the root directory (/
).
You can create an empty folder called a “mount point” and connect external devices there, making it seem like the device was part of the file system from the beginning.
For example, if you mount a USB drive at /media/usb
, its contents will appear in that folder and you’ll be able to copy, edit, and manage the files as usual.
The key point is that Ubuntu cannot interact with a device unless it is mounted.
Even if the device is detected, you won’t be able to read or write files unless it is mounted properly.
Differences from Other Operating Systems (Windows/Mac)
In Windows, plugging in a USB device typically makes it appear as drive D or E automatically. However, in Ubuntu, whether a device is mounted automatically depends on your settings.
With a GUI (desktop environment), many storage devices are mounted automatically, but in server environments or when using the terminal only, manual mounting may be required.
Also, in Windows you can usually use drives without worrying about their file system type (like NTFS or FAT32), but in Ubuntu, different file systems have different mount options and support requirements, so you’ll need to be a bit more careful.
For instance, to access NTFS drives, you may need to install a package called ntfs-3g
.
As you can see, mounting in Ubuntu is not just a connection — it’s a crucial step to integrate the storage into the file system. In the next sections, we’ll walk through practical examples and configuration methods.
2. [Manual] How to Mount Devices in Ubuntu
Basic Syntax and Usage of the mount Command
To manually mount a storage device in Ubuntu, use the mount
command.
This command is simple yet powerful and flexible.
sudo mount [options] device_path mount_point
For example, to mount a USB drive (/dev/sdb1
) to the /mnt/usb
directory, run the following:
sudo mount /dev/sdb1 /mnt/usb
After executing this command, you’ll be able to access the USB drive’s contents inside the /mnt/usb
directory and read/write files.
Note that mounting requires root privileges, so you must use sudo
.
Creating and Managing Mount Points
A mount point is an “empty directory” where the contents of a device will appear.
You need to create it in advance.
sudo mkdir -p /mnt/usb
The -p
option ensures that parent directories are also created if they don’t exist.
Typically, temporary manual mounts are placed in /mnt
or /media
, but you can use any custom directory as well.
Once mounted, the mount point shows the device’s files. After unmounting (using umount
), the directory becomes empty again.
How to Check Device Name and UUID
To mount a device, you need to know its device name (e.g., /dev/sdb1
). You can find it using this command:
lsblk
lsblk
lists connected block devices (HDD, SSD, USB, etc.).
It shows device sizes and mount status, making it very useful.
To check a device’s UUID (Universally Unique Identifier), use the following command:
sudo blkid
blkid
displays UUIDs and file system types (e.g., ext4, ntfs, fat32). UUIDs are essential for automatic mounting settings like fstab
.
How to Unmount a Device (umount)
To safely disconnect a mounted device, use the umount
command.
For example, to unmount a device mounted at /mnt/usb
:
sudo umount /mnt/usb
Alternatively, you can specify the device name directly:
sudo umount /dev/sdb1
If you remove a device without unmounting it first, there’s a risk of data corruption. Always run umount
to safely remove a device.
3. [Automatic] How to Mount Devices at Boot (Using fstab)
What Is /etc/fstab? Purpose and How It Works
If you want Ubuntu to automatically mount devices at startup, use the /etc/fstab
file.
This is a system configuration file that loads during boot, automatically mounting devices according to the entries inside.
For example, if you have an external drive or additional partition that you don’t want to mount manually every time, you can configure it in fstab
to handle it automatically.
However, mistakes in this file can prevent Ubuntu from booting. Be extra careful when editing fstab.
How to Use UUID for Safe and Reliable Mounting
In fstab
, you can specify the target device using its device name (like /dev/sdb1
), but using the UUID (Universally Unique Identifier) is highly recommended.
That’s because device names like /dev/sdb1
can change depending on USB port order or other factors, while the UUID stays consistent.
First, find the UUID of the device:
sudo blkid
This will show output like the following:
/dev/sdb1: UUID="1234-ABCD" TYPE="vfat"
Now, add a line like this to your fstab
file:
UUID=1234-ABCD /mnt/usb vfat defaults 0 0
Here’s what each part means:
Field | Description |
---|---|
UUID=… | The unique identifier for the device |
/mnt/usb | The mount point |
vfat | The file system type (e.g., FAT) |
defaults | Standard mount options |
0 0 | Backup/check settings (usually 0) |
Tips for Writing fstab Safely and Avoiding Errors
Incorrect entries in fstab
can cause Ubuntu to fail to boot.
To edit it safely, follow these tips:
- Always create a backup: Run
sudo cp /etc/fstab /etc/fstab.bak
before making any changes. - Make sure the mount point exists: If it doesn’t, create it using
sudo mkdir -p /mnt/usb
. - Test the entry before rebooting: Use the following command to verify correctness:
sudo mount -a
This command attempts to mount all entries in fstab
. If no errors appear, your setup is good.
Backup and Recovery: What to Do Before Editing fstab
If a mistake in fstab
prevents Ubuntu from booting, you’ll need to fix it via recovery mode.
To avoid that risk, backups and careful testing are critical.
We recommend using nano
as a beginner-friendly text editor:
sudo nano /etc/fstab
In nano
, save with Ctrl + O
, and exit with Ctrl + X
.
4. How to Mount USB Drives and External HDDs
Differences Between FAT32, exFAT, and NTFS — and How Ubuntu Handles Them
When mounting USB drives or external hard drives on Ubuntu, it’s important to check the file system type. These are the three most common:
File System | Key Features | Support in Ubuntu |
---|---|---|
FAT32 | Compatible with almost all OSes | Supported by default |
exFAT | Supports large files and high compatibility | Supported natively since Ubuntu 20.04; older versions require exfat-fuse |
NTFS | Standard file system for Windows | Read support built-in; write support recommended via ntfs-3g |
To fully use NTFS-formatted USB drives, install ntfs-3g
with the following commands:
sudo apt update
sudo apt install ntfs-3g
How to Check Devices and Mount Them Manually
After plugging in a USB device, check the device name with:
lsblk
Example output:
sdb 8:16 1 16G 0 disk
└─sdb1 8:17 1 16G 0 part /mnt/usb
Here, /dev/sdb1
is the partition you want to mount. First, create a mount point:
sudo mkdir -p /mnt/usb
Then mount it using the mount
command:
sudo mount /dev/sdb1 /mnt/usb
The contents of the device will now appear under /mnt/usb
, and you can access files as usual.
What to Do If USB Devices Don’t Auto-Mount
In Ubuntu desktop environments (such as GNOME), USB drives usually auto-mount. However, in server setups or certain configurations, auto-mounting might not work.
Try these steps:
- Reconnect via the file manager (if using a GUI)
- Use
udisksctl
to mount manually:
udisksctl mount -b /dev/sdb1
- Check device logs with
dmesg
:
dmesg | tail
If you don’t see logs like “new USB device,” there may be a physical connection issue or a faulty cable.
How to Safely Remove a USB Device (umount)
Removing a USB stick while it’s mounted can lead to data loss or corruption. Always unmount it first:
sudo umount /mnt/usb
If you’re unsure of the mount point, you can specify the device name instead:
sudo umount /dev/sdb1
Once unmounted, the device’s contents will no longer appear. You can now safely unplug the USB drive.

5. How to Mount a Network Drive (NAS)
How to Mount Windows Shares (SMB/CIFS)
In Ubuntu, you can mount shared folders on Windows or NAS devices (using the SMB/CIFS protocol) and treat them like local directories.
First, install the required package:
sudo apt update
sudo apt install cifs-utils
Next, create the mount point:
sudo mkdir -p /mnt/share
Now, mount the shared folder using the following command:
sudo mount -t cifs //192.168.1.100/share /mnt/share -o username=your_username,password=your_password,iocharset=utf8
Important details:
//192.168.1.100/share
: IP address and share name of the network location/mnt/share
: The local mount point-o
options: Specify your username, password, and character encodingiocharset=utf8
: Helps avoid garbled filenames, especially with Japanese characters
* If you’re concerned about entering your password directly in the command line, see the next section for secure credential storage.
Mounting NFS Shares
NFS (Network File System) is a protocol ideal for sharing files between Linux systems.
To use it, install the necessary client package:
sudo apt install nfs-common
Then, create a mount point:
sudo mkdir -p /mnt/nfs
Mount the NFS share using:
sudo mount -t nfs 192.168.1.200:/export/share /mnt/nfs
Adjust the IP address and path to match your actual server configuration.
If you want to mount it automatically at boot, add the following to /etc/fstab
:
192.168.1.200:/export/share /mnt/nfs nfs defaults 0 0
Securely Storing Credentials (Username/Password)
Typing your SMB credentials directly in the mount command isn’t safe. Instead, you can store them in a credential file for security.
- Create a file, e.g.,
/etc/samba/credentials
:
sudo nano /etc/samba/credentials
File content:
username=your_username
password=your_password
- Set file permissions:
sudo chmod 600 /etc/samba/credentials
- Add to
/etc/fstab
as follows:
//192.168.1.100/share /mnt/share cifs credentials=/etc/samba/credentials,iocharset=utf8 0 0
This way, your username and password won’t appear in plain text during mounting or startup.
Fixing Garbled Japanese Filenames (Locale Settings)
If filenames appear as “????.txt” after mounting SMB shares, you may need to specify the character encoding.
As mentioned earlier, add this mount option:
iocharset=utf8
Also, if your system locale is not set to Japanese, it might cause encoding issues. Check your current locale using:
locale
If ja_JP.UTF-8
is missing, install it with the following commands:
sudo apt install language-pack-ja
sudo update-locale LANG=ja_JP.UTF-8
After setting the locale, log out or reboot for the changes to take effect.
6. Common Errors and Troubleshooting Tips
When You See “Target is Busy”
Error Message:
umount: /mnt/usb: target is busy.
This error occurs when the device you’re trying to unmount is still being used by a process.
Common Causes:
- Another terminal is currently
cd
‘d into that directory - A file on the device is still open in the GUI
- A background process is using a file on the device
How to Fix:
- Check which processes are using the mount point:
lsof /mnt/usb
- Close the process or stop using the file
- If that doesn’t work, use
fuser
to forcefully kill the process:
sudo fuser -km /mnt/usb
This will forcibly kill any processes using the device. Use it with caution.
Fixing “Permission Denied” Errors
Error Message:
mount: /mnt/share: permission denied.
This error means that you don’t have permission to access the directory or device you’re trying to mount.
How to Fix:
- Make sure you’re using
sudo
:
sudo mount /dev/sdb1 /mnt/usb
- Change the mount point’s ownership if needed:
sudo chown $USER:$USER /mnt/usb
- For SMB shares, check credentials and share access permissions
Auto-Mount Not Working? Check These
If you’ve configured fstab
but the device doesn’t auto-mount at boot, here’s what to verify:
Things to Check:
- Check for typos or formatting errors in
fstab
- Verify the UUID using
sudo blkid
- Ensure the mount point directory exists (use
mkdir
if needed) - Network shares might not be available at boot (especially SMB or NFS)
How to Debug:
sudo mount -a
# If this shows an error, there’s likely a mistake in your fstab entry.
# Fix the entry based on the error message.
Checking Logs with dmesg or journalctl
If mounting fails, you may find helpful information in the system logs or kernel messages.
dmesg | tail -n 20
For more detailed logs:
journalctl -xe
These logs can help you identify hardware issues or incorrect mount options.
Other Common Mount-Related Errors
Issue | Cause | Solution |
---|---|---|
mount: unknown filesystem type ‘exfat’ | exFAT support not installed | sudo apt install exfat-fuse exfat-utils |
I/O error when mounting SMB share | Incompatible SMB version | Add vers=1.0 or vers=3.0 in -o options |
Filenames appear as “????” | Locale or encoding issue | Add iocharset=utf8 and review locale settings |
7. [Reference] Summary of Mount-Related Commands
■ Check Connected Devices
lsblk
Displays connected storage devices and their partition structure.
lsblk
Example:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 1 16G 0 disk
└─sdb1 8:17 1 16G 0 part /mnt/usb
blkid
Displays UUIDs (Universally Unique Identifiers) and file system types.
sudo blkid
■ Mount and Unmount Devices
mount
Basic command to mount a storage device.
sudo mount /dev/sdb1 /mnt/usb
You can also specify file system type and options:
sudo mount -t vfat -o uid=1000,gid=1000 /dev/sdb1 /mnt/usb
umount
Safely unmounts a device.
sudo umount /mnt/usb
You can also specify the device path:
sudo umount /dev/sdb1
■ Auto-Mount Configuration
/etc/fstab
Configuration file for mounting devices at boot. Edit with:
sudo nano /etc/fstab
Example entry:
UUID=1234-ABCD /mnt/usb vfat defaults 0 0
mount -a
Tests and applies all mount entries listed in fstab
.
sudo mount -a
If an error occurs, there’s likely a problem with an entry in the file.
■ Troubleshooting Commands
dmesg
Displays recent kernel logs — useful for diagnosing mount errors.
dmesg | tail -n 20
journalctl
Displays detailed system logs (systemd journal).
journalctl -xe
lsof
Shows which processes are using a specific mount point.
lsof /mnt/usb
fuser
Forcefully kills processes using a mount point (use with caution).
sudo fuser -km /mnt/usb
■ Network Share Tools
cifs-utils
Package required to mount SMB/CIFS (Windows) shares.
sudo apt install cifs-utils
nfs-common
Package required to mount NFS shares.
sudo apt install nfs-common
udisksctl
Convenient tool to mount/unmount USB devices without a GUI.
udisksctl mount -b /dev/sdb1
udisksctl unmount -b /dev/sdb1
8. FAQ: Common Questions About Mounting in Ubuntu
Q1. Why Isn’t My USB Drive Automatically Mounted in Ubuntu?
A. In most desktop environments like GNOME or KDE, USB drives are auto-mounted. However, in some cases they may not mount automatically, such as:
- You’re using Ubuntu Server or a system without a GUI
- The device isn’t recognized due to a faulty cable or unknown file system
- The device has no file system or it’s corrupted
To troubleshoot, check if the device is recognized using lsblk
or dmesg
, and try mounting it manually.
Q2. I Edited fstab and Now Ubuntu Won’t Boot. What Should I Do?
A. If there’s an error in your fstab
file, Ubuntu may fail to boot and enter “maintenance mode.”
Steps to fix:
- Log in while in maintenance mode and edit
fstab
usingnano
:
sudo nano /etc/fstab
- Comment out the problematic line by adding
#
at the beginning - Check for errors using
mount -a
- Reboot once the issue is resolved
Tip: Always back up your fstab
before editing it:
sudo cp /etc/fstab /etc/fstab.bak
Q3. How Can I Auto-Mount a Windows Shared Folder (SMB)?
A. You can auto-mount SMB shares by adding an entry to /etc/fstab
.
Make sure to securely handle your username and password.
- Create a credentials file at
/etc/samba/credentials
:
username=your_username
password=your_password
- Add an entry to
/etc/fstab
like this:
# SMB mount config
//192.168.1.100/share /mnt/share cifs credentials=/etc/samba/credentials,iocharset=utf8 0 0
- Test with
sudo mount -a
Q4. Can I Mount Without Entering a Password Every Time?
A. For SMB shares, use the credentials file mentioned above to avoid entering the password manually every time.
For local USB drives, if you configure them in fstab
with the defaults
option, no password input is needed.
Q5. How Do I See Which Devices Are Currently Mounted?
A. Use this command to see all currently mounted devices and mount points:
mount | column -t
For a more visual list, use:
lsblk -f
Q6. I Ran umount but Got “Target is Busy” — How Do I Force Unmount?
A. This usually means a process is still using the mount point. First, check which process is using it:
lsof /mnt/usb
To force unmount it, you can use:
sudo fuser -km /mnt/usb
Then try umount
again after stopping the process.
9. Conclusion
The concept of “mounting” in Ubuntu is a foundational skill for properly using storage devices and network shares.
This article has covered everything from the basic ideas to practical operations and troubleshooting tips, explained in a beginner-friendly way.
Let’s quickly review the key takeaways from each section:
🔹 Mounting Basics in Ubuntu
- Mounting means making a device accessible by connecting it to the file system
- Unlike Windows, Ubuntu sometimes requires manual mounting
🔹 Manual Mounting
- Use the
mount
command to mount devices to any directory - Check device names with
lsblk
orblkid
- Use
umount
to safely remove devices
🔹 Automatic Mounting (fstab)
- You can configure auto-mounting by editing
/etc/fstab
- Use UUIDs for more reliable mounting
- Always make a backup and check for typos before rebooting
🔹 Handling USB and External Drives
- Different file systems (FAT32, exFAT, NTFS) require different support packages
- If auto-mounting fails, manual methods or
udisksctl
can help - Always unmount before unplugging to prevent data loss
🔹 Mounting Network Drives (SMB/NFS)
- Use
cifs-utils
ornfs-common
to mount Windows or NAS shares - Store credentials in a secure file for password-free mounting
- Use
iocharset=utf8
and proper locale settings to avoid filename issues
🔹 Troubleshooting and FAQ
- Learn how to deal with common errors like “target is busy” or “permission denied”
- Use tools like
lsof
,fuser
,dmesg
, andjournalctl
to debug issues - FAQ section helps clarify frequent concerns in real-world use
Once you get used to it, Ubuntu’s storage management is flexible, powerful, and efficient.
We hope this guide helps you confidently manage mounting across your own system — whether for daily file use, setting up servers, or integrating NAS.
Mastering these techniques will give you greater control and reliability when working with Ubuntu in both personal and professional environments.