How to mount and unmount disks in Ubuntu?

Mount disk:

  1. Firstly, insert the disk into the computer and wait for the system to automatically detect the disk.
  2. Open the terminal and run the following command to view the disks detected by the system:
lsblk
  1. The second storage device.
  2. Create a new directory to serve as a mount point:
sudo mkdir /mnt/mydisk
  1. Mount the disk to the newly created directory using the following command.
sudo mount /dev/sdb /mnt/mydisk

This successfully mounts the disk to the specified directory.

Unmount disk drive.

  1. Ensure that no files or directories are currently being used on the disk.
  2. Execute the following command in the terminal to uninstall the disk:
sudo umount /mnt/mydisk

This successfully uninstalls the disk.

bannerAds