Linux Mount HOWTO

Published on Christian Mayer's Weblog

Be careful: mount can damage your system. If you use it wrong it can cause data loss.

In most cases you need to be root to mount something. You need to replace DEVICE and PATH. Replace DEVICE with the path to the device. For example /dev/sda1, /dev/sdb1 or /dev/sdh1. You need to know which device has which path. PATH is the destination path on your root device. This path must exist. For example /mnt/windows, /mnt/usb.

img-/iso-File

$ mount -o loop,ro file.img PATH
$ mount -o loop,ro file.iso PATH
$ mount -t iso9660 -o loop,ro file.iso PATH

mdf-File

$ mount -t iso9660 -o loop file.mdf PATH

NTFS (Windows Partition)

$ mount -t ntfs -o uid=1000,gid=100,dmask=0027,fmask=0137 DEVICE PATH
$ ntfsmount DEVICE PATH -o uid=1000,gid=100,dmask=0027,fmask=0137

Samba (Windows)

$ mount -t smbfs -o username=USER,password=PASSWORT //WINDOWSPC/DIRECTORY PATH

USB

$ mount -t auto DEVICE PATH

Remove mount

$ umount DEVICE

or

$ umount PATH

Digicam/iPhone

$ gphotofs PATH

Unmount Digicam/iPhone

$ fusermount -u pfad

Recent Posts

About the Author

Christian is a professional software developer living in Vienna, Austria. He loves coffee and is strongly addicted to music. In his spare time he writes open source software. He is known for developing automatic data processing systems on Debian Linux server.

Categories: Productivity
Tags: Linux, Mount, HOWTO, img, iso, mdf, NTFS, Samba, SMB, USB, umount, Windows, Digicam, iPhone

Archive | Categories | RSS Feed | Usage | Imprint
Copyright © 2006 by