cmdxray / commands / mount

What does mount do?

attach a filesystem to the directory tree (or list current mounts).

▸ Explain your own mount command →

mount examples, explained

$ mount

  • mountattach a filesystem to the directory tree (or list current mounts)

$ mount -t ext4 -o ro /dev/sdb1 /mnt

  • mountattach a filesystem to the directory tree (or list current mounts)
  • -tspecify the filesystem type (ext4, xfs, nfs…)
  • ext4value for -t
  • -opass a comma-separated list of mount options
  • rovalue for -o
  • /dev/sdb1an argument passed to the command
  • /mntan argument passed to the command

mount flags & options

-tspecify the filesystem type (ext4, xfs, nfs…)
-opass a comma-separated list of mount options
-amount everything listed in /etc/fstab
-rmount the filesystem read-only
-wmount the filesystem read-write
-vverbose output
-Bbind-mount an existing directory somewhere else

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.