1. Name

mount [man page] - mount a file system

2. Synopsis

mount [-lhV]

mount -a [-fFnrsvw] [-t vfstype] [-O optlist]
mount [-fnrsvw] [-o options [,...]] device | dir
mount [-fnrsvw] [-t vfstype] [-o options] device dir

3. Frequently used options

-t     vfstype The  argument following the -t is 
used to indicate the file system type.The file 
system types which are  currently  supported 
include:adfs,  affs,  autofs,  coda, coherent, 
cramfs, devpts, efs, ext, ext2, ext3, hfs, hpfs,
iso9660,  jfs,  minix,  msdos, ncpfs,  nfs,  
nfs4, ntfs, proc, qnx4, ramfs, reiserfs, romfs,
smbfs, sysv, tmpfs, udf, ufs, umsdos, usbfs,
vfat,  xenix,  xfs, xiafs.
-o     Options are specified with a -o flag
followed by a  comma  separated  string of options. 

4. Examples

Check your partitions with command:

fdisk -l 

Lets mount our /dev/sdb1 disk partition with ext3 filesystem to mount point /mnt/sdb1:

mkdir /mnt/sdb1
mount -t ext3 /dev/sdb1 /mnt/sdb1

mount disk partition with ext3 filesystem
we can now use -o remount option to remount it with read only permitions only:

mount -o remount,ro /dev/sdb1 

re-mount disk partition with ext3 filesystem read-only
To mount it back with read & write permitions:

mount -o remount,rw /dev/sdb1 

re-mount disk partition with ext3 filesystem write

With mount command we can mount all kinds of filesystem. For example to mount ISO image we can do:

mount -t iso9660 myiso.iso /mnt/cdrom -o loop 

ISO image is now available from /mnt/cdrom direcotry.

Free Linux eBooks

Go to top