Mounting and Unmounting Filesystems

You need to mount a filesystem to make the files it contains available — you use the mount command to do that. In Linux, everything that can be seen is part of one big tree of files and directories. Those that are on physically different partitions, disks, or remote machines are "grafted" onto the system at a particular place — a mount point, which is usually an empty directory.

To find out what is currently mounted, simply type the command mount on its own. We discuss the mount command further in Chapters 14 and 22.

SUSE Linux now mounts removable devices such as CD-ROMs, floppy disks, and USB sticks automatically. This means that you no longer have to mount them explicitly; for example, if you put a CD into the drive, you can simply change to the directory /media/, and a new directory will be visible there where the contents of the CD will be visible. At the same time, the KDE or GNOME user interface will pop up a Konqueror or Nautilus window displaying the contents of the media. Examples of the use of the mount command:

■ mount — Mounts the remote network filesystem /home/bible/ from the machine on the mount point /mnt

■ mount /dev/hda3 /usr/local — Mounts the disk partition /dev/hda3 on the mount point /usr/local

■ umount /mnt — Unmounts whatever is mounted on the mount point /mnt

Was this article helpful?

0 0

Post a comment