- Linux Training
- Desktop Tutorials
- Server Tutorials
|Linux Commands - Managing Drivers and Formats|
The mount command will allow you to mount a drive for use.
mount /dev/cdrom /cdrom
This command tells the system to mount the CDROM and where to mount it.
Another more common example would be mounting the cdrom off of the media directory.
-a mounts all partitions in the /etc/fstab file
-r mounts as read only
-w mounts as read/write
Below is a typical /etc/fstab which shows all of the mount points on the system. If you use the -a option it will try to mount all the points that are listed here.
# /etc/fstab: static file system information.
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1/dev/hda5 none swap sw 0 0
/dev/hdb /media/cdrom0 udf,iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
The option to mount a directory as read only using the -r option may be useful in mounting a directory that provides information to users but should not be modified. You can also mount a directory as read/write with the -w option.
mount -r /media/floppy
This mounts the floppy drive as read only.
mount -w /media/usbdisk
This will mount the usb drive as read and write.