How to mount and unmount disks in Ubuntu?
Mount disk:
- Firstly, insert the disk into the computer and wait for the system to automatically detect the disk.
- Open the terminal and run the following command to view the disks detected by the system:
lsblk
- The second storage device.
- Create a new directory to serve as a mount point:
sudo mkdir /mnt/mydisk
- 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.
- Ensure that no files or directories are currently being used on the disk.
- Execute the following command in the terminal to uninstall the disk:
sudo umount /mnt/mydisk
This successfully uninstalls the disk.