how to use mount command with its examples

  • About mount : To mount a filesystem
  • It comes from : “util-linux-ng-2.17.2” package.
  • Configuration Files:
  • Path: /bin/mount

Examples:

1. To mount a file system

$ mount /dev/sda /support

 2. To specify the file system type

$ mount -t nfs 192.168.100.22:/home /home

3. To mount all the file systems from “/etc/fstab”

$ mount -a

4. To do the fake mounting

$ mount -f /dev/sda /support
$ mount –fake /dev/sda /support 

5. To add the labels to the mount points

$ mount -l mymount /support *

 6. To mount without writting into “/etc/mnttab”

$ mount -n /dev/sda /support
$ mount –no-mtab /dev/sda /support 

7. To avoid canonicalize paths

$ mount –no-canonicalize /dev/sdb /support

 8. To ignore ignore mount options not supported by file system type

$ mount -s /dev/sdb /support

 9. To mount a file system as read only

$ mount -r /dev/sdb /support
$ mount –read-only /dev/sdb /support

 10. To Mount the filesystem read/write

$ mount -w /dev/sdb /support
$ mount –rw /dev/sdb /support 

11. To mount the file system of specified label

$ mount -L mymount

12. To mount the partition that has the specified uuid

$ mount -U uuid

13. To mount the file system with specified options

$ mount -o noatime,nouser /dev/sdb /support
$ mount –options noatime,nouser /dev/sdb /support

 14. To get the help

$ mount -h

 15. To get the version info

$ mount -V

 

Related Commands:  umount

Leave a Reply

Your email address will not be published. Required fields are marked *