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?
You can mount the drive from command line easily even without creating a folder in
/media as other question suggests.
- Open a terminal
udisks --mount /dev/sda2
/dev/sda2 will be mounted in the
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
How do i know, My Drive "Drivename"'s
sdaX number ?
You can execute
sudo blkidcommand 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
If the partition has no label:
If your partition has no label, it will be mounted in
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
Hope this will help.
You have to create a dir (preferably in
/media), for example
win. You can do it with
sudo mkdir /media/win.
After that you can use the
sudo ntfs-3g /dev/device /media/win command. You have to replace the device with the correct device identifier (sdb2 for example means the second partition of the second storage device in your computer).
If everything went OK,
/media/win will contain that NTFS partition.