mount

All files accessible in Linux, are arranged in one big tree: the file hierarchy, rooted at /. These files can be spread out over several devices. Themountcommand mounts a storage device or filesystem to the file tree, making it accessible and attaching it to an existing directory structure Conversely, the umount command will detach it again.

The mount command mounts a storage device or filesystem, making it accessible and attaching it to an existing directory structure.

The umount command "unmounts" a mounted filesystem, informing the system to complete any pending read or write operations, and safely detaching it. Let us look some examples.

Mount CD-ROM or DVD-ROM

sudo mount -t iso9660 -o ro /dev/cdrom /mnt/cdrom

-t iso9660specify the format of CD,-o romeans the device is read-only./dev/cdromis our CD/DVD device,/mnt/cdromis our mount directory. Make sure the directory exist before mount.

Mount .iso file

mount -t iso9660 -o loop /home/csci3150/myiso.iso /mnt/myiso

-o loopuse loop device (a pseudo-device that makes a file accessible as a block device) to mount .iso file. After finish mount, you can see the contents of myiso.iso under /mnt/myiso directory.

results matching ""

    No results matching ""