Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to use external storage devices such as USB flash drive in linux

Shulou Source: shulou.com Published: 2022-06-02 05:35:12 10月03日 Update

This article introduces the relevant knowledge of "how to use USB disk and other external storage devices in linux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

How to use external storage devices such as USB flash drive in linux

1. Insert a flash drive

two。 View

Lsblk # View all block devices

Mine is the 256MB flash drive, which is the sdb device shown in the picture. Mountpoint is empty because it has not been mounted yet. The path corresponding to sdb should be / dev/sdb (you can check it with fdisk-l) 3. Mounting

Mkdir / mnt/usb # create a new directory to mount the flash drive mount / dev/sdb / mnt/usb # mount the flash drive to / mnt/usblsblk # check it out

The mountpoint of sdb is no longer empty, but the mount point / mnt/usb

Congratulations! You can browse the contents of the flash drive under / mnt/usb.

After using 4.umount, execute it first.

Umount / dev/sdb / mnt/usb # Uninstall lsblk # first check

Mountpoint is empty again. But you use fdisk-l to check (shows that the flash drive is still there), then you need to turn off the drive.

5. Safely shut down the drive

Udisksctl power-off-b / dev/sdb # safely shut down the drive fdisk-l # View

Now the flash drive is gone (popped up) Note: if prompted

The program 'udisksctl' is currently not installed. You can install it by typing:apt install udisks2

Install udisks2 and try again

Apt install udisks2 # install udisks2

6. Unplug the flash drive

This is the end of the introduction of "how to use external storage devices such as flash drives in linux". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Devices content drivers drivers security more knowledge practicality learning and then dilemmas reality that is situations articles cases directories tapes websites but Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Apple macOS Linux Redmi