Ubuntu: Mount The Drive From Command Line.

Stan Lee. March 05, 2017 Comments

You need to use the mount command. # Open a command-line terminal (select Applications > Accessories > Terminal), and then type the following command to mount /dev/sdb1 at /media/newhd/. 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

A Note About Automatic Mount At Boot Time

You need to edit /etc/fstab file, enter:

$ sudo vi /etc/fstab

Add the following line for ext3 file system:

/dev/sdb1    /media/newhd   ext3    defaults     0        2

Add the following line for Windows FAT32 file system:

/dev/sdb1    /media/windowshd   vfat    defaults     0        2

Save and close the file.


See also:


  • ubuntu
  • HDD
  • mount