0
0
Linux CLIscripting~15 mins

mount and umount in Linux CLI - Mini Project: Build & Apply

Choose your learning style9 modes available
Mount and Umount Drives Using Linux CLI
📖 Scenario: You have a USB drive that you want to access on your Linux system. To use it, you need to mount it to a folder. After using it, you will unmount it safely.
🎯 Goal: Learn how to mount a USB drive to a folder and then unmount it using Linux command line commands.
📋 What You'll Learn
Create a directory to use as a mount point
Use the mount command to mount the USB drive
Use the umount command to unmount the USB drive
Display the mount points before and after unmounting
💡 Why This Matters
🌍 Real World
Mounting and unmounting drives is a common task when using external storage devices like USB drives or external hard disks on Linux systems.
💼 Career
System administrators and developers often need to manage storage devices safely and efficiently using these commands.
Progress0 / 4 steps
1
Create a mount point directory
Create a directory called /mnt/usbdrive to use as the mount point for the USB drive.
Linux CLI
Need a hint?

Use the mkdir command with the -p option to create the directory.

2
Mount the USB drive
Mount the USB drive device /dev/sdb1 to the directory /mnt/usbdrive using the mount command.
Linux CLI
Need a hint?

Use mount /dev/sdb1 /mnt/usbdrive to mount the drive.

3
Check mounted drives
Use the mount command without arguments to list all mounted drives and verify that /dev/sdb1 is mounted on /mnt/usbdrive.
Linux CLI
Need a hint?

Simply run mount to see all mounted drives.

4
Unmount the USB drive and verify
Use the umount command to unmount the USB drive from /mnt/usbdrive. Then run mount again to confirm it is no longer mounted.
Linux CLI
Need a hint?

Use umount /mnt/usbdrive to unmount, then mount to check.