Ubuntu – How to mount a ntfs disk in the text mode(from command line)

command linemount

In the gui, mode to mount a disk , I just click the name of the drive in the menu "place", and the disk gets mounted. However, can I mount that drive easily in the text mode (from terminal or command line) just using a command?

Best Answer

You can mount the drive from command line easily even without creating a folder in /media as other question suggests.

  • Open a terminal
  • Type udisks --mount /dev/sda2

The result?

Your /dev/sda2 will be mounted in the /media/label, where label refers to the name of label of the partition. For example, my /dev/sda2 is labeled as Main, and when i do the command, "/dev/sda2" will be mounted on /media/Main.

How do i know, My Drive "Drivename"'s sdaX number ?

  • You can execute sudo blkid command in a terminal to know, which sdaX you have to input.

    Example: My example run returns this:

anwar@edubuntu-lenovo:~$ sudo blkid
/dev/sda1: UUID="01CD4993623F05D0" TYPE="ntfs" 
/dev/sda2: LABEL="Main" UUID="A80C1BD70C1B9F7E" TYPE="ntfs" 
/dev/sda3: LABEL="Work" UUID="01CCB271A80A07E0" TYPE="ntfs" 
/dev/sda5: LABEL="Free" UUID="DE53-CB6B" TYPE="vfat" 
/dev/sda6: UUID="364126ac-01c9-4dd2-ab19-eecc733a9640" TYPE="ext4" 
/dev/sda7: UUID="b1537dfc-e918-4fea-9a99-44a034e57429" TYPE="swap" 
/dev/sda8: UUID="01CD49906DD38770" TYPE="ntfs" 
/dev/sda9: LABEL="Precise-New" UUID="7c934266-dfcb-45de-879b-e3ceafcd0862" TYPE="ext4"

So i know that, if I wanted to mount "Work", I have to use sda3.

If the partition has no label:

If your partition has no label, it will be mounted in /media/UUID, where UUID refers to the UUID of the partition.
For example: If i mount my /dev/sda8, which does not have a Label, it will be mounted in /media/01CD49906DD38770 Folder.

Hope this will help.

Related Question