Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to Linux and have a home server set up running Ubuntu.

In the GUI it's very easy to mount my additional internal hard drives. I just double click on them. Since I have made this server headless, I now need to mount via the command line.

How can I replicate the very simple double click GUI behavior?

So far all the information I've found is very complex. Ubuntu auto generated folders for each hdd under /media and I can see the hard drives under /dev but have no idea which is which, as the hardware is identical between them. I also don't know how they are formated.

share|improve this question
up vote 6 down vote accepted

Need to check your new hard drive is mounted as sdb or hdb and you can do it by using

$ sudo fdisk -l

Lets say your hard drive is mounted as sdb1.

You need to create a mount point using the mkdir command. This will be the location from which you will access the /dev/sdb1 drive.

$ sudo mkdir /media/newhd

To mount the drive, enter:

$ sudo mount /dev/sdb1 /media/newhd
$ df -H

To view files cd to /media/newhd, enter:

$ cd /media/newhd
$ ls -l
share|improve this answer
1  
I think you've used numeric 1. It would be lowercase 'l' (for list) – Suvasish Sarker Aug 28 '12 at 8:36
    
-l returns nothing – Fresheyeball Aug 28 '12 at 15:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .