How to mount and unmount drives on Linux
Answered
15
I connected a new drive. How do I mount it and access the files?
C
Asked by
cloud_arch
Platinum
•
776 rep
1 Answer
22
# List available drives
lsblk
fdisk -l
# Create mount point
sudo mkdir /mnt/mydrive
# Mount drive
sudo mount /dev/sdb1 /mnt/mydrive
# Unmount
sudo umount /mnt/mydrive
# Auto-mount on boot (add to /etc/fstab)
/dev/sdb1 /mnt/mydrive ext4 defaults 0 2
A
Platinum
•
151 rep
Your Answer
You need to be logged in to answer questions.
Log In to Answer