Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to mount a drive from terminal at startup. At startup if I use ls /media, I notice that it is empty. If I go to Computer and click on VM drive there, I can then see the VM driver in ls /media.

How can I mount that drive from the terminal without having to go to Computer? Something like

mount VM

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

share|improve this question

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

This question came from our site for professional system and network administrators.

4 Answers 4

up vote 3 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.
share|improve this answer

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.

share|improve this answer

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

share|improve this answer

Remember you've to make a directory first like this:

sudo mkdir /media/Name_of_directory

The above command will create a directory (folder) in media folder by replacing "Name_of_directory" with your providing folder name.

You can see drives numbers or id by:

sudo fdisk -l

Then mount the drive through:

sudo mount /dev/sda# /media/Name_of_directory

Where # must be replaced with legal number associated with your drives in Ubuntu (Linux Distro)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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