Creating a mount point is a necessary step to enable the operating system to access and manage the file system of an external storage device safely and efficiently.
lsblk is an abbreviation for “list block devices”
Identify the Device:
lsblk
My USB is called sdb1
Create a Mount Point:
sudo mkdir -p /mnt/usb
Mounting the Device:
sudo mount /dev/xxxx /mnt/usb
in my case:
sudo mount /dev/sdb1 /mnt/usb
Access the Archives:
ls /mnt/usb
Disassemble the Device:
sudo umount /mnt/usb
if it is an iso:
sudo mkdir -p /mnt/iso
The directory itself is not removed when unmounting a device; it is simply emptied of the mounted contents.
The -p option used with the mkdir command is optional and is used to create all necessary parent directories if they do not exist. It is not a device-specific option, but rather an option to mkdir to create directories in a more flexible manner.
You can mount a device on any empty directory:
- Existing Directory: If the directory already exists, you do not need to use mkdir -p. Simply mount the device in the existing directory.
- Permissions: Make sure you have the necessary permissions to mount and unmount devices and to create directories in the desired location.
The file system on the USB does not need to match the operating system’s file system. Linux is capable of handling multiple file systems, allowing for great flexibility when working with external storage devices. Make sure you have the necessary drivers installed (such as ntfs-3g for NTFS and exfat-utils for exFAT) to mount and work with these file systems.
Common File Systems:
- FAT32
- exFAT
- NTFS
- EXT4
Mount a USB with exFAT:
sudo mount -t exfat /dev/xxxx /mnt/usb
You can mount an iso image to see its contents with ls
in a directory such as /mnt/iso
2oeh2z