PDF download Download Article
Use the mount command or Ubuntu’s built-in Disk Utility to make disks available in Linux
PDF download Download Article

If you've connected a new SSD, HDD, or other external or internal disk type to your Linux system, you'll need to mount the drive to access its files. To mount a drive on Linux, you'll need to find the default name of the drive (e.g., /dev/sdc), create a directory for your mount point, and then use the "mount" command to mount that default drive name to the new directory. If you're using Ubuntu , you can also use the Disks utility to mount and unmount drives. Mounting a drive in Linux is simple, and this wikiHow will show you two ways to get the job done.

Things You Should Know

  • Use the command "lsblk -lf" to find the new drive's name (e.g., sdb or sdc ).
  • Create a new directory for your new mount point. For example, sudo mkdir /media/myflashdrive .
  • To mount the drive to the directory, use the syntax mount /dev/<drivename> </new/directory> .
Method 1
Method 1 of 2:

Using the Mount Command

PDF download Download Article
  1. Open a Terminal window . If you want to mount an internal or external drive in Linux, you can do so easily from the command line. You can open a terminal on most Linux distributions by pressing Ctrl + Alt + T .
  2. When you run this command, you'll see an entry for each drive that's connected to your system—including any internal drives. Make note of the new drive's "NAME" column value (e.g., sdc or sdc1 ) and the file system type (e.g., ext4 , vfat ).
    • If the drive is already mounted, you will see a path under "MOUNTPOINTS." You can use cd to enter that directory to access the files on the drive.
    Advertisement
  3. For example, use sudo mkdir /media/myflashdrive to create a directory called myflashdrive in /media.
  4. The syntax is mount /dev/drivename <new mount point> .
    • For example, if the drive is /dev/sdc1 and you want to mount the drive at /media/myflashdrive, use sudo mount /dev/sdc1 /media/myflashdrive .
  5. If you don't want to have to mount the drive every time you sign into Linux, you can add an entry for it to /etc/fstab so it mounts automatically. This will be helpful if you've installed a new internal drive. [1] Don't do this for removable drives—if the drive isn't connected at boot time, your system will not boot at all.
    • Open /etc/fstab in a text editor like Vim or Nano.
    • Add a line to the file using this syntax:
      • /dev/sdc1 /media/myflashdrive ext4 defaults 0 0
      • Replace "ext4" with the file system type you found with lsblk -lf earlier.
      • Save and exit the file .
  6. To unmount the drive, just run the command sudo umount /media/myflashdrive .
  7. Advertisement
Method 2
Method 2 of 2:

Using Ubuntu Disks Utility

PDF download Download Article
  1. If you're running Ubuntu and want to use a graphical option to mount a drive, the Disks utility makes it easy. Just go to the Activities overview, type disks , and click Disks in the search results. [2]
  2. Details about the drive will appear.
  3. If the drive is not mounted, you'll see a Play button (a sideways triangle). Clicking it will mount the drive.
    • If the drive is already mounted, you'll see a Stop button (a square).
  4. This displays a window with several customization options.
    • If you want this drive to mount automatically each time Ubuntu boots up, check the box next to "Mount at system startup." Keep in mind that you shouldn’t do this for a flash drive or SD card, as your system may not boot if the drive is not connected.
    • If you want to be able to access this drive in your file manager and other GUI apps, check the box next to "Show in user interface."
    • To change the mount point to something that's easier to remember and type, you can edit the mount point. Just make sure you're entering a directory that already exists (e.g., if you want to mount the drive at /mnt/media/mydrive, you will need to sudo mkdir /mnt/media/mydrive before entering that path.
    • Click OK when you're finished.
  5. It's the square to the left of the gear button. This unmounts the drive.
  6. Advertisement

Expert Q&A

Ask a Question
      Advertisement

      Tips

      • You can also permanently mount a drive in Linux using the UUID of the drive instead of the default mount point. Use the command sudo blkid to view each drive's UUID. Then, in /etc/fstab, use the syntax UUID <path to mount point> <file system type> defaults 0 1 .
      • The mount command and the Ubuntu Disks utility can both also mount ISO files .
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!
      Advertisement

      About This Article

      Thanks to all authors for creating a page that has been read 137,380 times.

      Is this article up to date?

      Advertisement