LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

mount

attaches a filesystem found on a device to the directory tree

TLDR

Show all mounted filesystems
$ mount
copy
Mount a device to a directory
$ mount [path/to/device] [path/to/target_directory]
copy
Mount a device for a specific user
$ mount -o uid=[user_id],gid=[group_id] [device] [directory]
copy
Mount a CD-ROM as read-only
$ mount -t iso9660 -o ro /dev/cdrom /cdrom
copy
Mount all filesystems defined in /etc/fstab
$ mount -a
copy
Bind mount a directory to another location
$ mount --bind [old_directory] [new_directory]
copy
Create directory if needed and mount
$ mount -m [device] [directory]
copy

SYNOPSIS

mount [-t type] [-o options] [device] [directory]

DESCRIPTION

mount attaches a filesystem found on a device to the directory tree. Without arguments, it displays currently mounted filesystems. The filesystem type can be auto-detected in most cases.

PARAMETERS

-t, --types type

Specify filesystem type (ext4, ntfs, iso9660, vfat, etc.)
-o, --options options
Mount options (ro, rw, noexec, nosuid, uid, gid, etc.)
-a, --all
Mount all filesystems in /etc/fstab
-B, --bind
Bind mount (mount directory to another location)
-m, --mkdir
Create mount point directory if it doesn't exist
-r, --read-only
Mount read-only (equivalent to -o ro)
-w, --rw
Mount read-write (default)
-v, --verbose
Verbose mode
-n
Mount without writing to /etc/mtab
-L label
Mount partition by label
-U uuid
Mount partition by UUID

COMMON OPTIONS

ro: read-onlyrw: read-writenoexec: don't allow executionnosuid: ignore setuid bitsnoatime: don't update access timesuid/gid: set owner user/group

INSTALL

sudo apt install mount
copy
sudo apk add mount
copy
nix profile install nixpkgs#mount
copy

CAVEATS

Most mount operations require root privileges. Use /etc/fstab for persistent mounts across reboots.

HISTORY

Part of util-linux package. The mount command has been part of Unix since early versions, dating back to 1971.

SEE ALSO

umount(8), fstab(5), findmnt(8), lsblk(8)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid