On UNIX, disks are mounted as directories, or filesystems.
On UNIX, we tend to think of files as residing in directories, and we think of those directories as branches of a single system directory tree. What UNIX keeps hidden from users is that the directory tree is composed of several different hard disks, which are just patched together by the operating system to look like a cohesive whole.
For example, you may be used to having files in your home directory, and also in another directory (for example, /projects). Files in /home might be stored on a different hard disk than files in /projects, but since you can move between the two directories easily, and move or copy files between them easily, you don’t think about them as being on separate disks.
In UNIX jargon, each of the directory trees corresponding to a different disk is called a filesystem. So you would say that moving a file from the /home filesystem to the /projects filesystem moves the file from one disk to another. (Technically, the one-to-one correspondence described here is a little simplistic: some sites might be set up with more than one filesystem on a single disk, or with a filesystem distributed across several different disks for maximum performance.)
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access