Tuesday, 21 May 2019

How to Mount and Unmount Storage Devices from the Linux Terminal

File systems in Linux and Unix-like operating systems like macOS can be mounted, unmounted, and remounted using the terminal. This is a powerful and versatile tool—here’s everything you need to know.

The Linux File System

The file systems in Linux, macOS, and other Unix-like operating systems don’t use separate volume identifiers for storage devices in the way that, say, Windows does. Windows assigns each volume a drive letter such as C: or D: and the file system for each volume is a tree of directories sitting below that drive letter.

In Linux, the file system is an all-in-one directory tree. A mounted storage device has its file system grafted onto that tree so that it appears to be an integral part of one cohesive file system. The newly mounted file system will be accessible via the directory to which it is mounted. That directory is called the mount point for that file system.

Many file systems are auto-mounted at boot time or on-the-fly as storage volumes connected to the computer during runtime. Cautious system admins can turn off the runtime auto-mount features so that they can control connections to the system.

This means storage devices connected during runtime might not auto-mount and will require mounting manually. Mounting a file system manually lets you make decisions about that file system, such as where the mount point will be and whether the file system is going to be read-only or read-write.

Whether it is out of necessity or through choice, the mount, umount and remount commands give you the ability to take control of this important aspect of your Linux system.

Interrogate Your File System With mount

Mount has a great many options, but to list all of the mounted file systems on your computer requires no options at all. Simply type mount and hit Enter:

mount command in a terminal window

Read the remaining 133 paragraphs



from How-To Geek http://bit.ly/2WWE3Ep

No comments:

Post a Comment