Linux View Mounted Drives: Quick Commands to Check Mounted Drives | Discover Now!

Share On

Are you a Linux user who wants to know how to view the mounted drives on your system? Look no further! In this article, we will explore a variety of quick commands that you can use to check the mounted drives on your Linux system. Whether you are a beginner or an experienced user, these commands will help you gain valuable insights into the drives that are currently mounted on your system.

By understanding how to view mounted drives, you can easily identify the storage devices that are connected to your Linux system and access their contents. This knowledge is particularly useful when you need to manage your storage space, troubleshoot issues, or perform system maintenance tasks. So, let’s dive in and discover these essential commands!

Introduction

Before we delve into the specific commands, let’s briefly discuss what it means to view mounted drives in the context of Linux. When we talk about mounted drives, we are referring to the storage devices that have been attached to the system and made accessible to the operating system. These drives can be internal hard drives, external USB drives, network drives, or any other type of storage device that Linux supports.

When a drive is mounted, it is assigned a mount point, which is a directory in the file system hierarchy where the contents of the drive can be accessed. By checking the mounted drives, you can see which devices are currently connected to your system and where they are mounted.

1. df -h

The first command we will explore is df -h. This command displays information about the file system usage, including the mounted drives, their mount points, and the amount of disk space used and available on each drive. The -h option is used to display the sizes in a human-readable format.

To use this command, open a terminal and simply type df -h. The output will show a table with columns for the file system, size, used space, available space, percentage of usage, and the mount point for each mounted drive.

This command is particularly useful when you want to quickly check the overall disk usage on your system and identify any drives that may be running out of space.

2. mount

The mount command is another powerful tool for viewing the mounted drives on your Linux system. When executed without any arguments, it displays a list of all currently mounted file systems along with their mount points.

To use this command, open a terminal and type mount. The output will show a list of mounted file systems, including the device name, mount point, file system type, and any additional mount options.

This command provides a comprehensive overview of all the mounted drives on your system, allowing you to quickly identify the devices and their corresponding mount points.

3. lsblk

The lsblk command is a handy utility for listing information about block devices, including the mounted drives on your Linux system. It provides a tree-like view of the block devices and their relationships.

To use this command, open a terminal and type lsblk. The output will show a hierarchical view of the block devices, including the device name, size, type, and mount point (if applicable).

This command is particularly useful when you want to visualize the block devices and their relationships, making it easier to understand the structure of your storage devices.

4. blkid

The blkid command is used to print the attributes of block devices, including the UUID (Universally Unique Identifier) and the file system type. By using this command, you can obtain detailed information about the mounted drives on your Linux system.

To use this command, open a terminal and type blkid. The output will show a list of block devices along with their attributes, including the UUID, file system type, and other relevant information.

This command is particularly useful when you need to identify the UUID of a specific drive or determine the file system type of a mounted drive.

5. cat /proc/mounts

The cat /proc/mounts command is a simple yet effective way to view the mounted drives on your Linux system. It reads the contents of the /proc/mounts file, which contains information about the currently mounted file systems.

To use this command, open a terminal and type cat /proc/mounts. The output will display a list of mounted file systems, including the device name, mount point, file system type, and any additional mount options.

This command provides a quick and straightforward way to view the mounted drives on your system without the need for any additional tools or utilities.

6. findmnt

The findmnt command is a powerful utility for finding and displaying information about mounted file systems. It allows you to search for specific mount points or devices and provides detailed information about the corresponding file systems.

To use this command, open a terminal and type findmnt. The output will show a list of mounted file systems, including the device name, mount point, file system type, and other relevant information.

This command is particularly useful when you want to search for specific mount points or devices and obtain detailed information about the corresponding file systems.

7. ls -l /dev/disk/by-uuid

The ls -l /dev/disk/by-uuid command is used to list the symbolic links in the /dev/disk/by-uuid directory, which contains the UUID-based device names for the mounted drives on your Linux system.

To use this command, open a terminal and type ls -l /dev/disk/by-uuid. The output will show a list of symbolic links, each representing a UUID-based device name for a mounted drive.

This command is particularly useful when you need to identify the UUID-based device names for the mounted drives on your system.

8. ls -l /dev/disk/by-label

The ls -l /dev/disk/by-label command is similar to the previous command, but it lists the symbolic links in the /dev/disk/by-label directory, which contains the label-based device names for the mounted drives on your Linux system.

To use this command, open a terminal and type ls -l /dev/disk/by-label. The output will show a list of symbolic links, each representing a label-based device name for a mounted drive.

This command is particularly useful when you need to identify the label-based device names for the mounted drives on your system.

9. ls -l /dev/disk/by-path

The ls -l /dev/disk/by-path command is another useful command for viewing the mounted drives on your Linux system. It lists the symbolic links in the /dev/disk/by-path directory, which contains the device names based on their physical connection paths.

To use this command, open a terminal and type ls -l /dev/disk/by-path. The output will show a list of symbolic links, each representing a device name based on its physical connection path.

This command is particularly useful when you want to identify the device names based on their physical connection paths, such as the USB port or the SATA port they are connected to.

10. ls -l /dev/disk/by-partuuid

The ls -l /dev/disk/by-partuuid command is used to list the symbolic links in the /dev/disk/by-partuuid directory, which contains the partition UUID-based device names for the mounted drives on your Linux system.

To use this command, open a terminal and type ls -l /dev/disk/by-partuuid. The output will show a list of symbolic links, each representing a partition UUID-based device name for a mounted drive.

This command is particularly useful when you need to identify the partition UUID-based device names for the mounted drives on your system.

11. ls -l /dev/disk/by-partlabel

The ls -l /dev/disk/by-partlabel command is similar to the previous command, but it lists the symbolic links in the /dev/disk/by-partlabel directory, which contains the partition label-based device names for the mounted drives on your Linux system.

To use this command, open a terminal and type ls -l /dev/disk/by-partlabel. The output will show a list of symbolic links, each representing a partition label-based device name for a mounted drive.

This command is particularly useful when you need to identify the partition label-based device names for the mounted drives on your system.

12. ls -l /dev/disk/by-id

The ls -l /dev/disk/by-id command is another useful command for viewing the mounted drives on your Linux system. It lists the symbolic links in the /dev/disk/by-id directory, which contains the device names based on their unique identifiers.

To use this command, open a terminal and type ls -l /dev/disk/by-id. The output will show a list of symbolic links, each representing a device name based on its unique identifier.

This command is particularly useful when you want to identify the device names based on their unique identifiers, such as the serial number or the WWN (World Wide Name).

Conclusion

In conclusion, being able to view the mounted drives on your Linux system is essential for managing your storage space, troubleshooting issues, and performing system maintenance tasks. The commands we have explored in this article provide quick and easy ways to check the mounted drives and obtain valuable information about them.

Whether you prefer using the df -h command for a high-level overview, the mount command for a comprehensive list, or the various ls commands for specific details, you now have a range of options to choose from based on your needs.

So, the next time you need to check the mounted drives on your Linux system, remember these quick commands and make your life easier!

FAQs

1. How can I check if a specific drive is mounted on my Linux system?

To check if a specific drive is mounted on your Linux system, you can use the mount command and search for the device name or the mount point associated with the drive. Alternatively, you can use the lsblk command to list all block devices and look for the drive in question.

2. Can I view the mounted drives on my Linux system using a graphical interface?

Yes, most Linux distributions provide graphical tools that allow you to view the mounted drives on your system. These tools often provide a user-friendly interface with visual representations of the drives and their mount points. Examples of such tools include the GNOME Disks utility and the KDE Partition Manager.

3. How can I unmount a drive on my Linux system?

To unmount a drive on your Linux system, you can use the umount command followed by the mount point or the device name of the drive. For example, to unmount a drive mounted at /mnt/drive, you can use the command umount /mnt/drive. It is important to note that you should not unmount a drive that is currently in use, as it may result in data loss or system instability.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *