how to unmount drive in ubuntu 1

how to unmount drive in ubuntu

sudo parted -ls
sudo lsblk -fm
sudo mkdir /mnt/sd1
sudo mount /dev/sdb1 /mnt/sd1
To unmount
sudo umount /mnt/sd1 
or
sudo umount /dev/sdb1

Here is what the above code is Doing:
1. parted -ls lists all the partitions on the SD card.
2. lsblk -fm lists all the block devices on the SD card.
3. mkdir /mnt/sd1 creates a directory called sd1 in the /mnt directory.
4. mount /dev/sdb1 /mnt/sd1 mounts the partition /dev/sdb1 to the directory /mnt/sd1.
5. umount /mnt/sd1 unmounts the partition /dev/sdb1 from the directory /mnt/sd1.

Similar Posts