LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-24-2016, 10:05 PM   #1
kb2tfa
Member
 
Registered: Oct 2006
Location: Philadelphia PA
Posts: 151

Rep: Reputation: 16
find USB in dev


When I plug in a USB, is there an easy way to identify it in the dev directory? I want to play with fdisk and I don't want to damage something.
 
Old 02-24-2016, 10:56 PM   #2
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian
Posts: 1,054

Rep: Reputation: 276Reputation: 276Reputation: 276
In a terminal, use lsblk. That's the quickest way. You can also use fdisk -l or blkid as root, for more detailed information.
 
Old 02-24-2016, 11:06 PM   #3
tomwest
Member
 
Registered: Aug 2013
Posts: 57

Rep: Reputation: Disabled
Code:
lsblk --f
should make things pretty clear as to which device name the usb takes. It will give the label of the usb device as well if there is one, which there usually is, which may help to differentiate the usb device decisively.
 
1 members found this post helpful.
Old 02-25-2016, 03:21 AM   #4
kb2tfa
Member
 
Registered: Oct 2006
Location: Philadelphia PA
Posts: 151

Original Poster
Rep: Reputation: 16
that worked great thank you
 
Old 02-26-2016, 08:50 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,601

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Quote:
Originally Posted by kb2tfa View Post
When I plug in a USB, is there an easy way to identify it in the dev directory? I want to play with fdisk and I don't want to damage something.
Easiest is to look in /dev/disk/by-id. USB devices show up as /dev/disk/by-id/usb-xxxxxxxxx.

The file name is composed of the vendor/model/serial number of the device plugged in, and the file itself
is a symbolic link to the /dev/sd<whatever> that got assigned when it was plugged in.
 
Old 02-26-2016, 04:47 PM   #6
kb2tfa
Member
 
Registered: Oct 2006
Location: Philadelphia PA
Posts: 151

Original Poster
Rep: Reputation: 16
Thank you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't find /dev/usb/hiddev. How to open HID device? SeaZone Linux - Hardware 5 04-24-2013 03:44 AM
I cannot find the usb in /dev ShadowReaper Linux - Hardware 2 07-03-2010 05:43 AM
[SOLVED] need help find my usb device in /dev gvaught Ubuntu 5 06-22-2010 06:01 PM
Try to mount USB drive: Computer can't find /dev/sda1 gameboypckt Linux - Newbie 5 02-07-2007 10:05 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 08:16 AM


All times are GMT -5. The time now is 08:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration