首页 > 编程语言 >raspberry pi mount a usb drive tutorial

raspberry pi mount a usb drive tutorial

时间:2022-09-18 14:56:27浏览次数:115  
标签:raspberry usb mount sudo drive Pi disk

# fdisk is a tool to manage disks on Linux
# this will display all disks
# At the end of the displaying lines, you will see your usb drive, check the filesystem, device name, and the size
sudo fdisk -l

# df stands for “disk-free”, and is typically used to show the available disk space for file systems, but it also displays the name of the filesystem
sudo df -h

# check where your drive has been mounted
# Any USB drives are typically at the bottom of the output
sudo cat /proc/mounts

# When you format a disk, the system assign an ID to the disk
# We call this the UUID. This allows us to know this a known drive and do something specific when you plug it on your Raspberry Pi
# To get this UUID, run this command:
sudo ls -l /dev/disk/by-uuid/

# Run the following command to retrieve information about your drive
sudo blkid /dev/sda1

# Now since the Pi will likely have automatically mounted the drive, we will need to unmount the drive
sudo umount /dev/sda1

# Once the drive has been umounted, we can now go ahead and mount it again
sudo mount /dev/sda1 /mnt/usb

# check it
ls -al /mnt/usb

How to mount a USB drive on the Raspberry Pi?
Raspberry Pi Mount a USB Drive Tutorial


EOF

标签:raspberry,usb,mount,sudo,drive,Pi,disk
From: https://www.cnblogs.com/hangj/p/16704787.html

相关文章