How to mount a drive from terminal in Ubuntu?

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)


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.

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.