Contents...
To list the mounted devices in Linux system, you can use any one of the following command to see mounted devices under Linux Operating System.
1. df command – It show file system disk space usage.
2. mount command – It show all mounted file systems.
3. /proc/mounts or /proc/self/mounts file – Show all mounted file systems.
Examples
Open the terminal and login into your Linux machine using ssh and type the following command:
Using df Command
Use the df command to show the mounted devices on the Linux system. df command report file system disk space usage. Popular options are given below:
- df -a :- All file systems
- df -h :- Print the output in human readable format (e.g., 1K 230M 2G)
- df -T :- Print the file system type
# df -haT Filesystem Type Size Used Avail Use% Mounted on proc proc 0 0 0 - /proc sysfs sysfs 0 0 0 - /sys devtmpfs devtmpfs 488M 56K 488M 1% /dev devpts devpts 0 0 0 - /dev/pts tmpfs tmpfs 498M 0 498M 0% /dev/shm /dev/xvda1 ext4 7.8G 2.6G 5.2G 33% / none binfmt_misc 0 0 0 - /proc/sys/fs/binfmt_misc
Using mount Command
You can use mount command to show the mounted device. There are lots of option ( see man mount) with mount command. In my case, I will only use -l option which adds the labels in the mount output:
# mount proc on /proc type proc (rw,relatime) sysfs on /sys type sysfs (rw,relatime) devtmpfs on /dev type devtmpfs (rw,relatime,size=498776k,nr_inodes=124694,mode=755) devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /dev/shm type tmpfs (rw,relatime) /dev/xvda1 on / type ext4 (rw,noatime,data=ordered) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
OR
# mount -l proc on /proc type proc (rw,relatime) sysfs on /sys type sysfs (rw,relatime) devtmpfs on /dev type devtmpfs (rw,relatime,size=498776k,nr_inodes=124694,mode=755) devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /dev/shm type tmpfs (rw,relatime) /dev/xvda1 on / type ext4 (rw,noatime,data=ordered) [/] none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
Using /proc/mounts or /proc/self/mounts Files
Follow the below command:
# cat /proc/mounts proc /proc proc rw,relatime 0 0 sysfs /sys sysfs rw,relatime 0 0 devtmpfs /dev devtmpfs rw,relatime,size=498776k,nr_inodes=124694,mode=755 0 0 devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0 tmpfs /dev/shm tmpfs rw,relatime 0 0 /dev/xvda1 / ext4 rw,noatime,data=ordered 0 0 none /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0
OR
# cat /proc/self/mounts proc /proc proc rw,relatime 0 0 sysfs /sys sysfs rw,relatime 0 0 devtmpfs /dev devtmpfs rw,relatime,size=498776k,nr_inodes=124694,mode=755 0 0 devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0 tmpfs /dev/shm tmpfs rw,relatime 0 0 /dev/xvda1 / ext4 rw,noatime,data=ordered 0 0 none /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0
I hope this article will help you to show the mounted devices on Linux Operating Systems.
Thanks:)
If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at LookLinux Submit Article. Stay connected to Facebook.
Leave a Comment