Basic knowledge notes on file systems

1.What is a file system

  • General knowledge: root directory under Linux
  • A file system is a method used by the operating system to identify files on a storage device (commonly a disk, but also a NAND Flash-based solid state drive) or partition, that is, a method of organizing files on a storage device . This so-called method is file management. System (program), referred to as file system

2. Classification of file systems (methods of managing files)

ext2: File system commonly used in early Linux
ext3: Upgraded version of ext2, with log function
ext4: Disk-based (storage root directory partition)
NFS: Network file system, invented by SUN, mainly used for remote file sharing
NTFS: Windows NT/ File system used by XP operating system

XFS: Advanced log file system developed by SGI, supporting ultra-large capacity files
ISO9660: File system used by most optical discs
SMBFS: Shared file system of Samba service
tmpfs: Temporary file system (memory file system)

  • Under windows:

Insert image description here

  • Under Linux:
    Insert image description here

vfat: stores boot (bootloader, kernel)
ext4: root directory
tmpfs: memory file system

3.What is partition

  • windows: optional (for ordinary user PCs), the directory is the partition
    C drive (the location where the system is installed), and you can also store files on the C drive and
    D drive (users can use it as they wish)
    Insert image description here
  • Linux: Partition according to function. Each partition strictly stores files (developers). Directories are not partitions, which is different from windows.
    Embedded systems can be divided into 4 areas, namely
    bootloader: startup code
    para: startup code passes parameters to the kernel. Location
    kernel: Kernel partition,
    root partition, etc.: File system structure
    Insert image description here

4. What is the file system directory structure
reference article
1)

  • Windows: Organize files C:\ D:\ in a multi-root manner
  • Linux: Organize files as a single root /
  • In the Linux system, all content is saved and managed in the form of files, that is, "everything is a file." Ordinary files are files, directories (called folders in Windows) are files, hardware devices (keyboards, monitors, hard disks, printers) are files, and even resources such as sockets and network communications are also files.
  • Linux has only one root directory, and files and directories are organized into a single-root inverted tree structure. The top level of this structure is the root directory, represented by "/"
  • Root file system (rootfs): root filesystem standard Linux file system (such as: ext4)
  • As shown below:
  • Insert image description here
    Insert image description here
    2) Description of directory function
  • / The root directory of the entire file system, the source of the directory
  • /bin stores Linux binary files and commands (can be executed by ordinary users and super users)
  • /sbin stores Linux binary files (commands that only super administrators can execute)
  • /boot stores the boot files for system startup
  • /etc stores all configuration files of the system
  • /home The home directory of ordinary users
  • /root root user’s home directory
  • /run stores files related to running programs within the system
  • /dev stores device files
  • /tmp is used to store various temporary files and is a public temporary file storage point.
  • /usr stores third-party software
  • /var stores files that need to change data when the system is running (system logs, etc.)
  • /lib directory where library files are stored (32-bit)
  • /lib64 directory where library files are stored (64-bit)
  • /opt stores software installed by third parties
  • /mnt Temporarily mounted file directory. For example, cdrom, USB disk, etc. cannot be used if they are directly inserted into the optical drive. They must be mounted first and then used.
  • /srv Site-specific data, provided by the system
  • /media stores multimedia files
  • /proc virtual file system stores the pid number of the process in the form of a directory (system information is stored in this directory)
  • /sys stores system-related files directory

I will add more later when I learn something relevant.

5.What is Virtual File SystemVirtual File System

  • Virtual File System: vfs is an abstraction of various file systems. It provides a common interface for various file systems.
    Insert image description here

  • The role of the virtual file system is
    to simplify the development of applications. No matter what the file type is, whether the file is a disk or a device, only open read and write can be used for unified operations.

Guess you like

Origin blog.csdn.net/m0_68038554/article/details/132017642