How to find full path of device I've connected?
I have USB device, which is actually identified as serial device by Ubuntu 10.04. How can I find its full path?
ls -la /dev/
shows a lot of devices. How to choose correct one?
Solution 1:
From a Terminal prompt:
df -h
You should have a screen similiar to the one attached which should give you the mount point of the USB device.
Solution 2:
Probably the simplest thing to do, but not always simple to interpret, is to run dmesg
after inserting the device.
For a flash memory pendrive you can find something like the following
[39653.096626] usb-storage: device scan complete
[39653.097617] scsi 6:0:0:0: Direct-Access Kingston DataTraveler 2.0 1.00 PQ: 0 ANSI: 2
[39653.099860] sd 6:0:0:0: Attached scsi generic sg2 type 0
[39653.101089] sd 6:0:0:0: [sdb] 1994752 512-byte logical blocks: (1.02 GB/974 MiB)
[39653.101588] sd 6:0:0:0: [sdb] Write Protect is off
[39653.101592] sd 6:0:0:0: [sdb] Mode Sense: 23 00 00 00
[39653.101595] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[39653.110832] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[39653.110839] sdb: sdb1 sdb2
[39653.197706] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[39653.197712] sd 6:0:0:0: [sdb] Attached SCSI removable disk
[39653.960873] EXT4-fs (sdb2): warning: maximal mount count reached, running e2fsck is recommended
[39653.962127] EXT4-fs (sdb2): mounted filesystem with ordered data mode
where it is simple to see that two partition /dev/sdb1
and /dev/sdb2
are on the drive.
For a serial device you should find something talking about ttyS0
or similar, corresponding to /dev/ttyS0
.