How Do I Know the Device Path to an Usb-Stick?
I Have a Usb-Stick (Used as an Installation Medium). Now I Need to Install a Driver from a Restricted Folder on That Device). but How Do I Get the Device Path...
I have a USB-stick (used as an installation medium). Now I need to install a driver from a restricted folder on that device). But how do I get the device path to my USB-stick (e.g. /dev/sda3 so I can mount it using the mount command?
I have read the answer to but fdisk -l shows nothing to me.
6 Answers
First plug in your USB-Stick.
Then type:
lsblk
Your output should look something like this
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465,8G 0 disk
├─sda1 8:1 0 74,5G 0 part /
├─sda2 8:2 0 390,2G 0 part /home
├─sda3 8:3 0 1K 0 part
└─sda5 8:5 0 1G 0 part [SWAP]
Now you can use the size to determine which one is your usb stick . To mount it somewhere in your home folder for example just type:
mkdir ~/UsbStick
sudo mount /dev/PATH_TO_YOUR_STICK ~/UsbStick
obviously replacing PATH_TO_YOUR_STICK with the right /dev/sdX path and ~/UsbStick with the directory you created using the mkdir command
find device path, LABEL, UUID and TYPE of block devices with help of command
sudo blkid
result will be like
/dev/sda1: UUID="XXXX" TYPE="ntfs"
/dev/sda5: UUID="XXXX-XXXX" TYPE="ext4"
/dev/sda6: UUID="XXXX-XXXX" TYPE="swap"
/dev/sda7: UUID="XXXX-XXXX" TYPE="ext4"
/dev/sda8: UUID="XXXX-XXXX" TYPE="ext4"
/dev/sdb1: LABEL="p" UUID="XXXX-XXXX" TYPE="vfat"
get your device path and fire mount command for usb-stick.
Device names of flash drives
A flash drive can be connected
via USB (typically a USB stick or a memory card via a USB adapter)
the device name is the same as for SATA drives,
/dev/sdxand partitions are named
/dev/sdxn
where x is the device letter and n the partition number, for example /dev/sda1
via PCI (typically a memory card in a built-in slot in a laptop)
the device name is
/dev/mmcblkmand partitions are named
/dev/mmcblkmpn
where m is the device number and n the partition number, for example /dev/mmcblk0p1