Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

9.1. Mounting and Unmounting (Floppy/CDROM/Hard-drive Partitions)

Tip Allowing Users to mount partitions
 

By default a UNIX system will allow normal users to unmount partitions. However unless given permission by the super-user, users will not be allowed to mount partitions.

The commands listed below will not work for normal users unless users have permission to mount that device.

If your particular distribution is setup not to allow users to mount partitions its not very hard to change this, simply edit the /etc/fstab file (as root) and:

Replace the word "defaults" with "user" or
Add "user" to the end of the options list for the particular partition(s).


mount Mount a device. Attach the device to the file-system hierarchy (the tree ( / )). This needs to be done so you can access the drive (see below, Section 9.1 for an example).

umount 'Unmount' a device. The command umount (no 'n') unmount's a device. It removes it from the file-system hierarchy (the tree ( / )). This needs to be done before you remove a floppy/CDROM or any other removable device (see below, Section 9.1 for an example).

smbmount //wincomp/c /mnt/win

Where "win" would be the place you want it mounted and "wincomp" is the IP address or name (the name will only work if it's listed in /etc/hosts) of your windows computer. smbmount is a tool from the samba package, it can mount a remote windows file system onto your current computer.

Un-mounting uses the same syntax as 'umount', as listed above, or you may like to use:

smbumont /mountpoint

Examples of how to mount a file-system:

mount -t ext2 /dev/fd0 /mnt/floppy (1)
mount -t iso9660 /dev/hdb /mnt/cdrom (2)
mount -t iso /tmp/image_file /mnt/iso_file/ -o loop (3)
(1)
The windows filesystem is known as vfat (standard on Windows 9x) or NFTS (standard on Windows 2000 and XP).
(2)
for CDROM's
(3)
This will mount an image file (usually a CD image file) so you can view/change the files (it will appear to be like any other device).
Note The -t option
 

On any system running a newer version of the Linux kernel the -t option is not always necessary and can be left out.

Examples of how to unmount a file-system (necessary before you eject/remove disk):

umount /mount_point

An example unmount point could be "/mnt/floppy" or "/mnt/cdrom"

 
 
  Published under the terms of the GNU General Public License Design by Interspire