Jump to content



Photo

external HD view in linux command line?


  • Please log in to reply
7 replies to this topic

#1 Original Poster

Original Poster

    Systems Developer

  • Tech Issues Solved: 1
  • Joined: 15-July 08
  • Location: my room
  • OS: windows 7/8, Kali, ubuntu, OSx 10.9
  • Phone: Android

Posted 11 July 2013 - 03:25

hi! firstly I need to view a external HD (connected via usb) in ubuntu command line! also after that! i need to work out how to add it to my directory listings (so I can browse it) !?! any help ? 

 

 

_edit_

 

I can see it is connected using "lsusb" but i cannot access it via cd /media




#2 Eric

Eric

    Neowinian Senior

  • Tech Issues Solved: 13
  • Joined: 02-August 06
  • Location: Greenville, SC

Posted 11 July 2013 - 03:38

How is it formatted?

 

"mount" should show you all available volumes.

You can use "mount -a" if you have it set up in fstab already, otherwise find the volume with mount then use "mount /dev/<volume> <mountPoint>" for the simplest method.

 

For example:

mount /dev/sda1 /media/usb

 

Note that you will need to create a directory somewhere to use as a mount point if you haven't already.



#3 Sikh

Sikh

    Neowin Addict!

  • Tech Issues Solved: 2
  • Joined: 11-March 07
  • Location: localhost
  • OS: Windows 7 / 10.8 / Ubuntu Server
  • Phone: Nexus 5 PA 4.4.2 / iPhone 5

Posted 11 July 2013 - 03:40

Do "sudo fdisk -l" and that will list all the drives. sda should be your boot, so whatever is mounted next, should be your ext drive. CD to it and then ls it to make sure it is.

Then, to mount it to a custom mount point, if its a NTFS drive (going to assume it is) then type in the below

 

sudo mount -t cifs /dev/diskgoeshere(i.e. sdb, sdc, etc) /media/your_mount_name

 

man mount if you want to see what all the options do. You can set it to read only, blah blah blah



#4 Eric

Eric

    Neowinian Senior

  • Tech Issues Solved: 13
  • Joined: 02-August 06
  • Location: Greenville, SC

Posted 11 July 2013 - 03:41

^ cifs is for samba shares, isn't it?

 

There's also the automount option but you have to set up a file for it first. It's not too difficult.



#5 Sikh

Sikh

    Neowin Addict!

  • Tech Issues Solved: 2
  • Joined: 11-March 07
  • Location: localhost
  • OS: Windows 7 / 10.8 / Ubuntu Server
  • Phone: Nexus 5 PA 4.4.2 / iPhone 5

Posted 11 July 2013 - 03:42

What greywold said works too. But you can also use what I said, I did forget to say create a directory to mount the drive to.


^ cifs is for samba shares, isn't it?

 

Yes it is. And im assuming he's using SMB especially being on Windows.
 

I havent found any good NFS support on windows. If you have please share.

i use NFS via Linux and OSX but my windows desktop cant do ###### with it so i have to deal with SMB



#6 Eric

Eric

    Neowinian Senior

  • Tech Issues Solved: 13
  • Joined: 02-August 06
  • Location: Greenville, SC

Posted 11 July 2013 - 03:43

He said it was an external drive. :)



#7 Sikh

Sikh

    Neowin Addict!

  • Tech Issues Solved: 2
  • Joined: 11-March 07
  • Location: localhost
  • OS: Windows 7 / 10.8 / Ubuntu Server
  • Phone: Nexus 5 PA 4.4.2 / iPhone 5

Posted 11 July 2013 - 03:46

He said it was an external drive. :)

 i need to work out how to add it to my directory listings (so I can browse it) !?! any help ? 

 

I interpreted that to be sharing.

Sorry working in IT with people confuses my brain. Everyday someone says "I cant see this in "My Computer" or "Finder" or i cant find my "directories" and its usually some kind of share.

So thats my excuse and im sticking with it!

 



#8 OP Original Poster

Original Poster

    Systems Developer

  • Tech Issues Solved: 1
  • Joined: 15-July 08
  • Location: my room
  • OS: windows 7/8, Kali, ubuntu, OSx 10.9
  • Phone: Android

Posted 13 July 2013 - 01:12

How is it formatted?

 

"mount" should show you all available volumes.

You can use "mount -a" if you have it set up in fstab already, otherwise find the volume with mount then use "mount /dev/<volume> <mountPoint>" for the simplest method.

 

For example:

mount /dev/sda1 /media/usb

Note that you will need to create a directory somewhere to use as a mount point if you haven't already.

 

 

ha cheers! that helped!


 i need to work out how to add it to my directory listings (so I can browse it) !?! any help ? 

 

I interpreted that to be sharing.

Sorry working in IT with people confuses my brain. Everyday someone says "I cant see this in "My Computer" or "Finder" or i cant find my "directories" and its usually some kind of share.

So thats my excuse and im sticking with it!

 

well i suppose i did not explain my self correctly :p i was using a terminal linux (which is acting as a plex media server) and i could not see the drive when i typed "cd /media"  *ls* ... 

I just needed to access it so I could view its contents without having to change drives :p as that would have made it difficult for the media server using the drive xD