The file system table (/etc/fstab)

It might seem like "mount -t iso9660 /dev/cdrom /mnt/cdrom" is a lot to type every time you want to mount a CD or a disk. One way around this is to edit the file/etc/fstab. This file allows you to provide defaults for your mountable devices, thereby shortening the commands required to mount them. My_/etc/fstab_looks like this:

/dev/hda2 / ext2 defaults 1 1 /dev/hda5 /mnt/apps vfat user,noauto,defaults 0 0 /dev/hda6 /mnt/data vfat user,noauto,defaults 0 0 /dev/hda3 swap swap defaults 0 0 /dev/fd0 /mnt/floppy vfat user,noauto 0 0 /dev/hdc /mnt/cdrom iso9660 user,noauto,ro 0 0 /dev/sda4 /mnt/zip vfat user,noauto,defaults 0 0 none /proc proc defaults 0 0

The columns are:

Illegal HTML tag removed :

With this/etc/fstab, I can mount a floppy or CD by simply typing:

mount /mnt/floppy

mount /mnt/cdrom

The abovemountcommands look incomplete. When not enough

information is given, themountcommand will look to_/etc/fstab_to fill in the blanks. If it finds the required info, it will go ahead with the mount.

Note the "user" entry in the options column for some devices. This allows non-root users to mount the devices. Very useful. To find out more about available options for/etc/fstab, enterinfo fstabat the command prompt.

Also keep in mind that default Linux installations will often create/mnt/floppy_and/mnt/cdromfor you already. After installing a new Linux system, have a look at/etc/fstab_to see what is available for you. If what you need isn’t there, add it.

results matching ""

    No results matching ""