• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / Ubuntu / Understanding Linux Mount Command

Understanding Linux Mount Command

By Sourabh / July 26, 2017 Category: Ubuntu

Understanding the Linux umount command and Linux mount command options. This post explains about the mount command in Ubuntu.

Mount Command

The mount command mounts a storage device or filesystem, making it accessible and attaching it to an existing directory structure.


mount [-lhV] mount -a [-fFnrsvw] [-t vfstype] [-O optlist] mount [-fnrsvw] [-o option[,option]...] device|dir
mount [-fnrsvw] [-t vfstype] [-o options] device|dir

The standard form of the mount command, is mount -t type device dir This tells the kernel to attach the file system found on device (which is of type type) at the directory dir.

If only the directory or the device is given, for example “mount /dir” then mount looks for a mountpoint (and if not found then for a device) in the /etc/fstab file. The –target or –source options to avoid ambivalent interpretation of the given argument. For example “mount –target /mountpoint”

List All The Mounted Filesystems

The listing mode is maintained for backward compatibility only. For more robust and customizable output use findmnt(8), especially in your scripts. Note that control characters in the mountpoint name are replaced with ‘?’.

The following command lists all mounted filesystems (of type type):

mount [-l] [-t type]

The option -l adds labels to this listing.

When No Argument Is Given

If no arguments are given to mount, the list of mounted filesystems is printed.

The file /etc/fstab may contain lines describing what devices are usually mounted where, using which options. The programs mount and umount traditionally maintained a list of currently mounted filesystems in the file /etc/mtab.

Mount Commands That Doesn’t Mount Anything

Also note that three forms of invocation do not actually mount anything: mount -h prints a help message; mount -V prints a version string; and just mount [-l] [-t type] lists all mounted file systems (of type type). The option -l adds the (ext2, ext3 and XFS) labels in this listing.

All files accessible in a Unix system are arranged in one big tree, the file hierarchy, rooted at /. These files can be spread out over several devices. The mount command serves to attach the file system found on some device to the big file tree. Conversely, the umount command will detach it again.

umount

The umount command “unmounts” a mounted filesystem, informing the system to complete any pending read or write operations, and safely detaching it.

umount [-hV] umount -a [-dflnrv] [-t vfstype] [-O options] umount [-dflnrv] {dir|device}...

Tags: How To Mount A Directory In Linux From Another Server, Linux Mount Command Nfs, Linux Mount Command Options, Linux Mount File, Linux Mount Remote Directory, Linux Umount Command, Mount Command Ubuntu, Mount Command Windows, Mounting And Unmounting File System In Unix, Umount Command In Linux

Primary Sidebar

Latest Posts

Ubuntu 25.04 ‘Plucky Puffin’ Is Available To Download

How to Login as Root User in Linux Terminal

Install Firefox In Ubuntu Terminal Command Line

How To Check Kernel Installed Date In Linux Ubuntu

How To List All Kernel Modules That Are Loaded In Ubuntu

Enable Ubuntu Auto Login Without Password

Download Ubuntu 25.04 Official Default Wallpapers

How To Fix Initramfs Error In Ubuntu Command Line

How To Check All Available Kernel Version In Linux Ubuntu

3 Best Artificial Intelligence Domain Name Generators

© 2025 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap