Think of a refrigerator with multiple shelves, which can be used to store a variety of items. These shelves help you organize grocery items by shape, size, type, and more. The same concept applies to a file system, which is the embodiment of a way to store and organize an arbitrary collection of data in a form that can be used by humans.

The different types of file systems supported by Linux:

  • Traditional disk file systems: ext2, ext3, ext4, XFS, Btrfs, JFS, NTFS, etc.
  • Flash file systems: UBIFS, JFFS2, YAFFS, etc.
  • Database file system
  • Special purpose file systems: procfs, sysfs, TMPFS, squashfs, debugfs, etc.

A partition is a physically contiguous part of a disk, or appears to be so in some advanced Settings.

A file system is a method of storing/finding files on a hard disk (usually on a partition).

One can think of a partition as the container in which a file system resides, although in some cases a file system can span multiple partitions if symbolic links are used, as we’ll discuss later.

The following table gives a comparison between file systems in Windows and Linux:

Linux systems store their important files according to a standard layout called the File System Hierarchy Standard (FHS), which is long maintained by the Linux Foundation. For more information, see the documentation “File System Hierarchy Standards” created by the LSB Working Group. Standards are designed to ensure that users, administrators, and developers can move between releases without having to relearn how the system is organized.

Linux uses the “/” character to separate paths (unlike Windows, which uses “\”), and there is no drive letter. Multiple drives and/or partitions are installed as directories in a single file system. For Linux system recently, removable media (e.g., USB drives, CD and DVD) will be displayed as installed under/run/media/yourusername/disklabel, or for older distributions under the/media. For example, if your username is the student, may be in the/run/media/student/FEDORA found with FEDORA USB pen drive, And the files on the cd-rom README. TXT will be located in/run/media/student/FEDORA/README. TXT.

All Linux file system names are case sensitive, so /boot, /boot, and /boot represent three different directories (or folders). Many distributions separate the core utilities required for proper system operation from other programs and place the latter in a directory under /usr (think user). To see how other programs are organized, find the /usr directory in the figure above and compare its subdirectories to those that exist directly under the system root directory (/).

Choosing a Linux Distribution

Suppose you are looking to buy a new car. What factors do you need to consider to make the right choice? Requirements to consider include vehicle size suitable for your family, engine type and fuel economy, your expected budget and available financing options, reliability record and after-sales service.

Similarly, determining which distributions to deploy requires planning. The figure shows some choices, but not all. Note that many embedded Linux systems use custom content, not Android or Yocto.

Some questions to consider before deciding on a release include:

  • What is the main function of the system (server or desktop)?
  • What types of packages are important to an organization? For example, web servers, word processing, and so on.
  • How much disk space is needed and how much is available? For example, when installing Linux on an embedded device, space is often limited.
  • How often is the package updated?
  • How long is the support cycle for each release? For example, the LTS version has long-term support.
  • Do you need vendor or third party kernel customization?
  • What hardware are you running on? For example, it might be X86, ARM, PPC, etc.
  • Do you need long-term stability? Can you accept (or need) a more flexible, cutting-edge system running the latest software?

The partition layout needs to be determined at installation time; It may be hard to change in the future. Although Linux systems handle multiple partitions by mounting them at specific points in the file system, and you can always modify the design later, it’s always easier to try and get started right.

Almost all installers provide a reasonable default layout, with one large partition and one small swap partition dedicated to plain files, or separate partitions for some space-sensitive areas such as /home and /var. If you have special needs, or if you want to use more than one disk, you may need to override the defaults and do something different.

Selection of software

All installations include minimal software to run a Linux distribution.

Most installers also provide the option to add software categories. Common applications (such as the Firefox Web browser and LibreOffice suite), developer tools (such as vi and Emacs text editors), We’ll discuss this later in the course) and other popular services (such as Apache Web server tools or MySQL databases) are usually included. In addition, for any system with a graphical desktop, a selected desktop (such as GNOME or KDE) is installed by default.

All installers have set up some initial safety features on the new system. A basic step includes setting the password for the superuser (root) and setting up the initial user. In some cases (such as Ubuntu), only one initial user is set; Direct root login is not configured. Root access requires you to log in as a normal user and then use sudo, which we will describe later. Some distributions also install more advanced security frameworks, such as SELinux or AppArmor. For example, all Red Hat based systems, including Fedora and CentOS, always use SELinux by default, while Ubuntu comes with AppArmor and runs it.

Installation of software

Like other operating systems, Linux distributions are offered on removable media, such as USB drives and CDs or DVDs. Most Linux distributions also support starting small images and downloading the rest of the system over the network. These small images can be used on media or as network boot images, in which case the installation can be performed without using any local media.

Many installers can perform the installation completely automatically, using configuration files to specify installation options. This file is called a Kickstart file for Red Hat based systems, an AutoYAST configuration file for SUSE based systems, and a Preseed file for Debian-based systems.

Each distribution provides its own documentation and tools to create and manage these files.

The actual installation process for all distributions is very similar.

After booting from the installation media, the installer starts and asks questions about how to set up the system. If an automatic installation file is provided, these issues will be skipped. Then, perform the installation.

Finally, the computer reboots to the newly installed system. On some distributions, the system reboots and asks additional questions.

Most installers have the option of downloading and installing updates as part of the installation process; This requires Internet access. Otherwise, the system will use its normal update mechanism to retrieve these updates after the installation is complete.

More of Jerry’s original articles can be found on “Wang Zixi “: