Here is the video version, if you prefer it:
Let’s clear out one more conceptual thing before we jump into other things – how are files and directories represented internally.
See, a usual filesystem you will find on Linux consists of a pool of data blocks where you can store data and a database system that manages the data pool. The database contains entries which describe the file type, file permissions and where the file is stored in the data pool. (Ward, 2014) These database entries are called inodes. Interestingly, the inodes don’t store the file name. (“Where are filenames stored on a filesystem?,” n.d.)
Files and directories are represented as inodes. This is imporant to keep in mind as we progress, although in my explanations I try to review some key concepts before explaining new ones.
Hope you learned something new!
Ward, B. (2014). How Linux Works: What Every Superuser Should Know (2nd ed.). No Starch Press. Page 87
Where are filenames stored on a filesystem? (n.d.). Retrieved February 29, 2020, from https://unix.stackexchange.com/questions/117325/where-are-filenames-stored-on-a-filesystem