Sunday, 19 June 2016

How to mount and unmount a file system ?


1. Mount the file system

  • To mount a particular file system
  • Description : This tells the kernel to attach the file system found on device (which is of type type) at the directory dir.mount /directory (mount a file system)
  • If you want to check which file systems are already mountedmount
  • If you want to mount all the file systemsmount –a
  • Mount a CD-ROMThe device file for CD would exist under /dev directory.
    For example, a CD-ROM device will be mounted as shown below.
    mount -t iso9660 -o ro /dev/cdrom /mnt
The option “-o ro” indicates that the cdrom should be mounted with read-only access
Also, make sure that the destination directory (in the above example, /mnt) exist before you execute the mount command.


2. Unmount the file system
       umount  /directory (unmount a file system)

No comments:

Post a Comment

Note: only a member of this blog may post a comment.