Linux for Developers
/Advanced
mount
Definition
A command used to attach a physical storage device (like a USB drive or a second hard drive) to a specific directory in the Linux file system tree.
Explain Like I'm New
Plugging the hard drive into the tree. On Windows, a USB drive magically becomes `E:\\`. On Linux, you must manually 'mount' (glue) the USB drive to an empty folder like `/mnt/usb` so you can look inside it.
Real World Example
You attach a massive 5TB Amazon EBS Volume to your server. It does nothing until you type `mount /dev/xvdf /data`. Now, any file you save into the `/data` folder is actually being saved on the 5TB drive.
Common Use Cases
- •Adding storage volumes
- •Network File Systems (NFS)
Interview Questions
basic
- If you restart the server, does a hard drive stay mounted automatically?
intermediate
- What is the `/etc/fstab` file?