Linux file system has a hierarchical tree structure. Unlike OS like Windows(which has multiple root folders), Linux has only one root folder.
In Linux, we have one root folder just like the root of a tree then inside the root folder there are a couple of different folders, each having its own purpose and further the folders can have different folders and files inside them.
Some of the folders that reside inside the root folder are:
/home: Every Linux user gets their own space inside the home directory. It contains home directories of all non-root users.
/bin: bin stands for binaries. All the basic commands that we use on Linux have separate binary files and all those files are located inside /bin folder.
/sbin: sbin stands for system binaries. Like /bin folder this folder also contains the binary files but the difference is that the commands in this folder are system-relevant. These commands need a super user's permission to execute them. It contains commands like adduser( to add user), chpasswd( to change password ) etc.
/lib: lib stands for library. It holds the libraries for those binary files or the commands.
/usr: usr stands for user. It is located just before the home directory for different users.
/opt: It is another folder where the third-party applications/programs that we install reside. The difference between usr/local and /opt is that there are some applications that we want to install that cannot be splitted and stored in different directories such applications reside in /opt folder.
/boot: It is basically for booting the system. It contains the files required for booting. This is a folder in which we as users do nothing.
All the folders up to now are READ ONLY FOLDERS!
/etc: It is a location in the root where system configuration is stored, this could be network interface configuration, or Linux user's data password meaning things that are not only readable but also writeable.
/dev: dev stands for devices. It is the location of device files like webcam, keyboard, hard drive etc. App and Drivers will access this folder, not the users. It contains the files that the system needs to interact with the device.
/var: var stands for variable. When the OS starts, it logs some data and these logs are stored in a folder called /var inside /log folder. Generally, this folder stores the logs from different operations that are running on the computer.
/tmp: tmp stands for temporary. It stores temporary resources required for some processes kept here temporarily.
/media: This folder contains subdirectories, where removable media devices inserted into the computer are mounted. For example, when you insert a CD. A directory will automatically be created and you can access the contents of the CD inside the directory.
/mnt: This folder is used to store temporary resources while mounting manually. For example, we can mount a file system to the OS manually.
Hidden files:
Hidden files are primarily used to prevent important data from being accidentally deleted. They are automatically generated by programs or operating systems. The name of these files starts with a dot and that's why in UNIX they are also called "dot files". We can also create hidden files or folders by starting it's name with a dot.