The procedure on how to mount USB drive on Kali Linux is no different from any other Linux distribution. Kali Linux was used by this guide to provide you with simple to follow steps on how to mount USB drive on Linux.
Operating System and Software Versions
- Operating System: - Kali Linux
Privileged access to your Kali Linux system will be required.
- # - requires given linux commands to be executed with root privileges either directly as a root user or by use of
- $ - requires given linux commands to be executed as a regular non-privileged user
SUBSCRIBE TO NEWSLETTER
Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.
USB Block Device Name
Given you have already inserted your USB drive into your computer, we first need to determine a block device name of your USB partitions. The easiest way to approach this is by executing
command to list all drives and their associated partitions.
# fdisk -l
Disk /dev/sdc: 1.9 GiB, 2064646144 bytes, 4032512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0c56e3d1
Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 4032511 4030464 1.9G b W95 FAT32
Scan through the output of the above
command and find partition block name. In the example above it is
Create Mount Point
Next, create a mount point to serve as a destination target directory for USB partition mount. This directory will after we mount the above USB partition contain all files stored your USB drive. Choose any name for your USB mount point directory, e.g.,
# mkdir /media/usb-drive
Mount USB drive
At this stage, we are ready to mount our USB drive partition. Execute, the below mount command while replacing the block device path ( /dev/sdc1 ) with the one you took a note about previously.
# mount /dev/sdc1 /media/usb-drive/
Access Your USB drive
Optionally check to see whether your USB drive has been mounted correctly using the following linux command
# mount | grep sdc1
/dev/sdc1 on /media/usb-drive type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)
Access your files on your USB drive by navigating to the previously created mount point directory
# cd /media/usb-drive
Do not remove your USB drive before you do not perform a proper umount otherwise your risk losing your data:
# umount /media/usb-drive
In case you need to mount your USB drive permanently after reboot first you need to determine the UUID belonging to USB partition you wish to mount:
# ls -l /dev/disk/by-uuid/*
Create a new
# echo "/dev/disk/by-uuid/1D83-5BFF /media/usb-drive vfat 0 0" >> /etc/fstab
Your USB drive will now mount automatically after reboot. Please, note that the UUID uniqueness is not guaranteed. It is recommended to use partition tags instead, but that is a tale for another time.