Linux Basic Administration Concepts

Manually mounting file-systems

In Linux, you can manipulate file-system mounts in runtime. This is useful for mounting removable storage such as CDROM and floppy. Note that you must unmount a file-system before ejecting the removable media, or data loss will occur.

The current status of mounts is kept in /etc/mtab and /proc/mounts, and can be seen by running mount with no parameters. The format of these files is similar to /etc/fstab.

To mount a file-system in /etc/fstab type (as root): mount mountpoint. To unmount, type umount mountpoint. For example to access the CD-ROM:

[root@localhost alon]# mount  /mnt/cdrom  # Mount the CD-ROM and lock the drive
[root@localhost alon]# ls /mnt/cdrom # List files on CD-ROM
Mandrake/
[root@localhost alon]# umount /mnt/cdrom # Unmount CD-ROM (drive unlocked)
[root@localhost alon]# eject /mnt/cdrom # Open CD-ROM tray

Note: Various graphical desktop systems will automatically mount CDROM disks you insert into the CD-ROM drive, for your convenience.

Originally written by Valid HTML 4.01!Alon Altman