Linux mount Command: Inspect and Mount Filesystems

mount connects a file system to the directory tree or checks the current mount status. It is the operation that allows you to read and write files in a directory after connecting a device.

What is the mount command?

The target directory for mounting must already exist. Mounting a file system over it does not delete the existing directory contents, but they are hidden until the mount is removed. Running it without arguments shows a list of currently connected file systems, and for structured queries, findmnt is convenient.

Basic syntax

mount [option] [device] [mount point]

The installed implementation and options may vary depending on the distribution. Check the description of the current system with man mount.

Examples

Check current connection status

Check which file system the specified path belongs to.

findmnt /mnt/data

Mount as read-only

After verifying that it matches the target device and content, mount it as read-only.

sudo mount -o ro /dev/sdb1 /mnt/data

Connection Result Verification

Check the device, format, and read-only options.

findmnt /mnt/data

Check where it is visible after mounting

mount connects a device's filesystem to the directory tree. When you only want to check the status, it is easier to look up the source and type of a specific path with findmnt.

findmnt /mnt/data

Example output of a mounted environment:

TARGET    SOURCE    FSTYPE OPTIONS
/mnt/data /dev/sdb1 ext4   rw,relatime

When the mount succeeds, mount itself usually does not produce any output. Files originally in the mount point may be hidden while it is mounted, so check to make sure it is an empty directory before performing any operations. If you select the wrong device, partition, or filesystem, you may read or write unexpected data.

For a mount to persist across reboot, a one-time mount command is not enough; configure /etc/fstab or the appropriate mount unit. Device names can change between boots, so prefer a verified UUID where appropriate and validate the configuration according to your operating procedure.

Main Options and Format

Options/Format Description
-o ro Mount as read-only.
-t format Specify the file system format.
-o option list Specify mount options separated by commas.
-a Mount all targets specified in the configuration file at once.
--bind Reattach an existing directory to a different location.

Precautions when using

Replace the example /dev/sdb1 and /mnt/data with the actual target, and check the data and mount status with lsblk -f before performing any operation. Mounting a filesystem that is already mounted elsewhere can cause confusion. Permanent mounting requires separate configuration in /etc/fstab, and incorrect settings can affect booting.

Frequently Asked Questions

If I run mount, will it persist after reboot?

A one-time mount performed with a command generally does not automatically restore after reboot. Automatic mounting requires separate configurations such as in /etc/fstab.

Official Documentation

You can check the exact behavior of options and implementation differences in the official mount documentation.

More in This Category
Linux dd Command: Copy and Convert Data by Blocks

Linux dd Command: Copy and Convert Data by Blocks

Learn how to copy and convert files or block devices with Linux dd, choose block sizes and ranges, display progress, verify results, and avoid overwriting the wrong device.

Linux journalctl Command: Read systemd Logs

Linux journalctl Command: Read systemd Logs

Learn how to read systemd Logs with the Linux journalctl command, including practical examples, key options, and important precautions.

Linux Tutorial / Inspect, Pause, and Stop Processes

Linux Tutorial / Inspect, Pause, and Stop Processes

Inspect Linux processes with ps, top, and pgrep, then safely pause, resume, and terminate a practice process while distinguishing shell jobs from services.

Linux Tutorial / What Is Linux? Understanding the Kernel, Distributions, and Open Source

Linux Tutorial / What Is Linux? Understanding the Kernel, Distributions, and Open Source

Understand how the Linux kernel differs from a distribution, what user space and open source mean, and how to check your system's kernel and distribution versions.

Linux df Command: Check Filesystem Free Space

Linux df Command: Check Filesystem Free Space

Learn how to check Filesystem Free Space with the Linux df command, including practical examples, key options, and important precautions.

Linux rsync Command: Synchronize Files and Directories

Linux rsync Command: Synchronize Files and Directories

Learn how to synchronize Files and Directories with the Linux rsync command, including practical examples, key options, and important precautions.

Linux unzip Command: List and Extract ZIP Archives

Linux unzip Command: List and Extract ZIP Archives

Learn how to list and Extract ZIP Archives with the Linux unzip command, including practical examples, key options, and important precautions.

Linux unxz Command: Decompress xz Files

Linux unxz Command: Decompress xz Files

Learn how to decompress xz Files with the Linux unxz command, including practical examples, key options, and important precautions.

Linux locate Command: Search Indexed File Paths Quickly

Linux locate Command: Search Indexed File Paths Quickly

Learn how Linux locate searches a filename database, how updatedb affects freshness, how to limit and filter matches, and when find is the better tool.

Linux Tutorial / Choosing a Linux Distribution

Linux Tutorial / Choosing a Linux Distribution

Explore major Linux distributions and learn when to choose Ubuntu LTS or Rocky Linux for study and server practice. Compare package management, release policies, and practical selection criteria.