Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 have ubuntu 12.04 running on my system. I repartitioned my hard disk yesterday, I have an empty 40GiB partiton.

Can I mount it at say /data-part ? How do I do this ?

I have formatted it as ext4.

share|improve this question
up vote 2 down vote accepted


I am assuming you want it to be mounted every time you boot, if what you want is to mount it one time:

$ sudo mkdir /data-part
$ sudo mount /dev/sdaX /data-part

should do the trick.

=== EDIT ENDS ===

Sure you can. First you need to know device file of the partition you need to mount (it should be something like sda* in most cases). If you don't know, install and run gparted and find out device file of the partition.


Once you find the device file, fire up your favorite editor from terminal (assuming device file you want to mount is /dev/sdaX, replace accordingly):

$ sudo gedit /etc/fstab

When editor opens, go to the bottom of the file and add a line like:

/dev/sdaX /data-part ext4 defaults 0 0

And then, all you need to do is to create a directory at mount point:

$ sudo mkdir /data-part

After your next reboot, partition should be mounted at the mount point automatically.

share|improve this answer
Awesome, This will be first thing I'll do once I get back home.. Yes I want it to be mouted automatically everytime... So this is how partitions are handled in Linux ?? Is this like Windows' D:/, E:/ etc., – Bhargav Jan 28 '13 at 10:01
Yes, you can mount a partition to directory you want. What I can suggest is that, instead of mounting partitions in random places, you shall keep mounted directories in a specific folder. For example, I am keeping them in /media folder (like /media/storage /media/backup). – th0th Jan 28 '13 at 11:46

Try running these commands:

sudo mkdir -p /data-part
sudo mount -t ext4 /dev/sdb1 /data-part

This will do the trick.

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.