I want to mount a drive from terminal at start up. At start if i use ls /media then its empty

but if i go to computer and then click VM drive there and after that i use ls /media then it shows VM drive .

How can i mount that drive at from terminal

something like

mount VM

or how can find the path of VM like /dev/sda or something

link|improve this question

69% accept rate
feedback

migrated from serverfault.com Apr 26 '10 at 6:41

This question came from our site for system administrators and desktop support professionals.

3 Answers

up vote 1 down vote accepted

You can use pmount, from the manual page:

 pmount  ("policy mount") is a wrapper around the standard mount program
 which permits normal users to mount removable devices without a  match-
 ing /etc/fstab entry.

 pmount is invoked like this:

 pmount device [ label ]

 This  will  mount  device  to a directory below /media if policy is met
 (see below). If label is given, the mount point will  be  /media/label,
 otherwise it will be /media/device.
link|improve this answer
feedback

devkit-disks will let you query and mount devices, with the --enumerate-device-files and --mount options respectively.

link|improve this answer
feedback

You can run fdisk -l to show you all the disk devices, or after mounting it in the GUI, drop down to the Terminal and run cat /proc/mounts and find your device that's mounted. You can then copy/paste that line from cat /proc/mounts into /etc/fstab and it'll be mounted at startup.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.