Entry
Linux: Mount: Device: View: All: How to see all mounted devices? [mtab]
Dec 31st, 2003 05:52
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 17 September 2003 - 06:11 pm ------------------
Linux: Mount: Device: View: All: How to see all mounted devices? [mtab]
---
Method: use the 'mount' command:
---
The 'mount' command, with no parameters, shows the currently mounted
filesystems.
---
For more information about 'mount', type on the command line:
man mount
---
Steps: Overview:
1. -In a console, type the command:
mount
2. This will e.g. show:
in Linux Red Hat v7.3:
+--------------------------------------------------+
| |
| /dev/sda5 on / type ext3 (rw) |
| |
| none on /proc type proc (rw) |
| |
| usbdevfs on /proc/bus/usb type usbdevfs (rw) |
| |
| /dev/sda1 on /boot type ext3 (rw) |
| |
| none on /dev/pts type devpts (rw,gid=5,mode=620) |
| |
| /dev/sda3 on /home type ext3 (rw) |
| |
| none on /dev/shm type tmpfs (rw) |
| |
| /dev/sda2 on /usr type ext3 (rw) |
| |
| /dev/sda6 on /var type ext3 (rw) |
| |
+--------------------------------------------------+
---
This will e.g. show in Linux Red Hat v8.0:
+--------------------------------------------------+
| |
| /dev/sda5 on / type ext3 (rw) |
| |
| none on /proc type proc (rw) |
| |
| usbdevfs on /proc/bus/usb type usbdevfs (rw) |
| |
| /dev/sda1 on /boot type ext3 (rw) |
| |
| none on /dev/pts type devpts (rw,gid=5,mode=620) |
| |
| /dev/sda3 on /home type ext3 (rw) |
| |
| none on /dev/shm type tmpfs (rw) |
| |
| /dev/sda2 on /usr type ext3 (rw) |
| |
| /dev/sda6 on /var type ext3 (rw) |
| |
| /dev/scd0 on /mnt/cdrom type udf (ro) |
| |
+--------------------------------------------------+
---
This will e.g. show in Linux Red Hat v9.0:
+--------------------------------------------------+
| |
| /dev/sda2 on / type ext3 (rw) |
| |
| none on /proc type proc (rw) |
| |
| usbdevfs on /proc/bus/usb type usbdevfs (rw) |
| |
| /dev/sda1 on /boot type ext3 (rw) |
| |
| none on /dev/pts type devpts (rw,gid=5,mode=620) |
| |
| none on /dev/shm type tmpfs (rw) |
| |
+--------------------------------------------------+
---
What this command does is basically showing the
content of the file 'mtab':
If you want to check the content of this file yourself,
type on the command line:
cat /etc/mtab
---
---
Note: so e.g. the entry
/dev/scd0 on /mnt/cdrom type udf (ro)
is clearly missing.
---
---
Method: use the 'dir /mnt' command:
if you type the command:
dir /mnt
this will show the block devices that are currently mounted
---
e.g. in Linux v7.3 you will see:
floppy disk cdrom
---
e.g. in Linux v9.0 you will see:
cdrom flash floppy hgfs
---
---
Method: use the 'df' command:
---
df = Disk Free
---
if you type the command:
df
this will show e.g. the following on my computer,
using Linux Red Hat v9.0:
-------------------------------------------------------------
File system 1K-blocks Used Available Use% Mounted on
-------------------------------------------------------------
/dev/sda2 3771316 2992772 586972 84% /
/dev/sda1 101089 9426 86444 10% /
none 40776 0 40776 0% /dev/shm
/dev/cdrom 584960 576504 8456 99% /mnt/cdrom
-------------------------------------------------------------
---
on another computer it showed,
using Linux Red Hat v9.0:
-------------------------------------------------------------
File system 1K-blocks Used Available Use% Mounted on
-------------------------------------------------------------
/dev/hda3 5036316 2625616 2154868 55% /
/dev/hda2 101107 24385 71501 26% /boot
/dev/md0 17410628 482708 16043504 3% /home
none 127632 0 127632 0% /dev/shm
/dev/md1 26114256 1044640 23743072 5% /software
-------------------------------------------------------------
---
After a CD was put in, and the CDROM mounted the same computer
showed:
---
-------------------------------------------------------------
File system 1K-blocks Used Available Use% Mounted on
-------------------------------------------------------------
/dev/hda3 5036316 2625712 2154772 55% /
/dev/hda2 101107 24385 71501 26% /boot
/dev/md0 17410628 486956 16039256 3% /home
none 127632 0 127632 0% /dev/shm
/dev/md1 26114256 1048768 23738944 5% /software
/dev/cdrom 510 510 0 100% /mnt/cdrom
-------------------------------------------------------------
---
---
Internet see also:
---
How can I add new hard disk after I have installed Linux?
http://www.faqts.com/knowledge_base/view.phtml/aid/1263/fid/107
---
Linux: Mount: Check: Device: Block: View: How to view all devices?
http://www.faqts.com/knowledge_base/view.phtml/aid/24400/fid/107
----------------------------------------------------------------------