Linux Mounting and Unmounting a Filesystem

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
to begin interacting with the disk we need to mount the filesystem to a directory you might be thinking why can't we just CD in to slash dev /s DB that's the disk device isn't it it is but if we try to CD in to slash dev slash SD be like this we'd get an error saying the device is not a directory which is true to resolve this we need to create a directory on our computer and then mount the filesystem of our USB Drive to this directory let's pull up where our partition is with sudo parted - L okay I can see the partition that we want to access is slash dev slash SDP one I've created a directory already under root called my USB so let's give this a try so sudo mount dev SD b1 my USB now if we go to my USB we can start reading and writing to the new file system we actually don't need to explicitly mount a file system using the mount command most operating systems actually do this for us automatically when we plug in a device like a USB Drive file systems have to be mounted one way or the other because we need to tell the OS how to interact with the device we can also unmount the filesystem in a similar way using the you mount command unmounting is the opposite of mounting a disk so now let's unmount the filesystem I can either use sudo you mount my USB or sudo you mount dev stb-1 both will work to unmount a filesystem when you shut down your computer disks that were mounted manually are automatically unmounted in some cases like if we were using a USB Drive we just want to unmount the filesystem for the USB Drive without shutting down always be sure to unmount a filesystem of a drive before physically disconnecting the drive in the case of the USB Drive we could run into some interesting file system errors if we don't do this well talk more about this in an upcoming lesson also keep in mind that when we use the mount command to mount a filesystem to directory once we shut off the computer the mount point disappears we can permanently mount a disk though if we need it to automatically load up when the computer boots to do this we need to modify a file called at CFS tab if we open this up now you'll see a list of unique device IDs their mount points what type of file system they are plus a little more information if we want to automatically mount file systems when the computer boots just add an entry similar to what's listed here let's go ahead and do that really quickly the first field that we need to add 4x ZFS tab is the UUID or universally unique ID of our USB Drive to get the UID of our devices we can use this command sudo block ID this will show us the UUID for block device IDs aka storage device IDs and that's it we've covered a lot of essential disk management tasks so far we've partition a disk added a filesystem and mounted it for use if you're curious and want to learn more about the Ed's EFS tab file and its options check out the next supplemental reading otherwise let's move on
Info
Channel: intrigano
Views: 43,436
Rating: undefined out of 5
Keywords: IT, Information Technology, IT Support, windows, Linux, learn IT, IT fundamentals, Basic Commands, certificate, troubleshooting, customer service, networking, operating systems, system administration, automation, security, IT Technical Support, become Specialist, computer hardware, Internet, computer software, and job-related skills, install an operating system, computer, for beginners, Networking, Customer Service, TCP/IP, hubs, switches, routers, servers, subnetting, Routing
Id: Fik4AVZGr1I
Channel Id: undefined
Length: 3min 42sec (222 seconds)
Published: Mon Feb 19 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.