List the Linux releases in series and describe the connections and differences between the different releases.
In the general direction, as shown in the following figure, the distribution is divided into several categories: Debian,RedHat,Arch,SUSE, and others
Based on these categories, there will be many different distribution versions for different areas, each with its own advantages and disadvantages.
Below is a list of the most popular releases from the last 12 months to the last month
Here is an overview of the features of the different releases:
--- redhat Red Hat Enterprise Linux (RHEL) The most popular commercial supported Linux distribution. Because of its dedicated support services and updates, it is often used as a server platform by enterprise organizations. Subscription fees required, software installation management using RPM and YUM, acquired by IBM in July 2019
--- CentOS CentOS Linux is a derivation of RHEL. It uses all RHEL source code No additional subscription fees need to be paid for support. To get support, you must rely on the developer community of CentOS, and many other distributions originate from RHEL, such as Scientific Linux and Oracle Linux. Unlike entOS, these distributions are not copies of RHEL. These distributions use RHEL's source code as the underlying platform and build their distributions.
--- Fedora The Fedora project is sponsored by RHEL. Red Hat uses Fedora as a test site to test its new capabilities. Many of the features introduced in Fedora typically enter new versions of RHEL. Red Hat does not provide any support for Fedora Linux. To get support, you have to rely on the volunteer community Since Fedora is a test platform, it should not be used commercially
--- SUSE Linux After Red Hat Enterprise Linux, SUSE is the next stable and popular enterprise Linux for servers and mainframes. SUSE is developed and maintained by SUSE Software Solutions (Germany). You do not have to pay SUSE to install, test, and use SUSE Linux. However, if you need support and updates, you must purchase a paid subscription. SUSE Linux for enterprise-sized networks
--- Debian Debian Linux is a free community-based Linux distribution. It is developed, managed, distributed and updated by the largest volunteer community. This project was started in 1993 and the dpkg packaging system is used for software installation and management. Debian Linux is a good choice if you want a completely free Linux. The Debian release is free, open and focused on delivering what users want. Several popular Linux distributions are derived from Debian Linux. Another major reason to choose this release is that it has the largest collection of packages in its pool. It contains over 59000 software packages, and the precompiled software is bundled together in a good format for easy installation on your machine.
--- Ubuntu Ubuntu has changed this trend by providing a Windows-like GUI environment and tools. Soon after its release, Ubuntu became the most popular and used Linux distribution. If you're looking for easy-to-use, free Linux, Ubuntu should be your first choice.
- gentoo linux It is also a community-based Linux release. The main feature of this distribution is that it allows us to compile the entire Linux from the source code on our computer. We can customize every option and application that fits our hardware platform and meets our requirements. If you are a Linux developer or advanced user and need a Linux that only contains what you want, this is the perfect choice.
--- Arch Linux is a lightweight and flexible distribution. This release only contains basic and stable versions of the software. If you have an old system and need a lightweight Linux distribution, this is the perfect choice
--- Kali Linux is also based on Debian Linux. This Linux is primarily tailored to test the security of networks and systems. This release comes with many tools for hacking, cracking, and testing network and Web applications.
Which distribution should you choose?
There are no predefined rules for selecting a specific distribution. You should choose a distribution that meets your requirements, skills, and budget. However, my broad recommendation is that you choose a Red Hat-derived distribution for enterprise-sized networks or large networks, and a Ubuntu-derived distribution for personal use or for small and medium-sized networks.
Install the Centos7.9 and ubuntu operating systems, create a username with your own name, and log in normally. Take a screenshot of the main steps.
Configure environment variables so you can see when the command is executed when executing history
export HISTTIMEFORMAT="%F %T "
Summarize the philosophy of Linux.
Everything is a file (including hardware)
Small, single-purpose program
Link programs to accomplish complex tasks together
Avoid confusing user interfaces
Configuration data is stored in text
Summarizes common command formats used on Linux and illustrates them with examples. Commands such as echo, screen, date, ifconfig, export, and so on
Echo (option) (parameter)
- n No Line Break Display
[root@localhost ~]# echo -n 123
[root@localhost ~]# echo \\test \test
[root@localhost ~]# echo -e "ab\bc" ac
\c produce no further output
[root@localhost ~]# echo -e "ab\ccdec" ab
ab[root@localhost ~]# echo -e "ab\ecdef" ab def
\f form feed
[root@localhost ~]# echo -e "12\f345" 12 345
\n new line
[root@localhost ~]# echo -e "12\n345" 12 345
\r carriage return
[root@localhost ~]# echo -e "12\r345" 345
\t horizontal tab
[root@localhost ~]# echo -e "12\t345" 12 345
\v vertical tab
[root@localhost ~]# echo -e "12\v345" 12 345
screen [ -options ] [ cmd [ args ] ]
screen -r [[pid.]tty[.host]]
screen -r sessionowner/[[pid.]tty[.host]]
[root@localhost ~]# date Mon Oct 25 00:46:17 +08 2021
[root@localhost ~]# date -u Sun Oct 24 16:46:48 UTC 2021
[root@localhost ~]# date +%d 25 [root@localhost ~]# date +%a Mon [root@localhost ~]# date +%A Monday [root@localhost ~]# date +%h Oct [root@localhost ~]# date +%b Oct [root@localhost ~]# date +%B October [root@localhost ~]# date +%m 10 [root@localhost ~]# date +%y 21 [root@localhost ~]# date +%Y 2021 [root@localhost ~]# date +%T 00:48:43 [root@localhost ~]# date +%H 00 [root@localhost ~]# date +%M 48 [root@localhost ~]# date +%S 55 [root@localhost ~]#
date --date="past or future"
[root@localhost ~]# date --date="-5year" Tue Oct 25 00:51:36 +08 2016 [root@localhost ~]# date --date="+1 year" Tue Oct 25 00:51:45 +08 2022 [root@localhost ~]# date --date="+20 minute" Mon Oct 25 01:12:09 +08 2021 [root@localhost ~]# date --date="tomorrow" Tue Oct 26 00:52:23 +08 2021 [root@localhost ~]#
[root@localhost ~]# date --set "10/27/1988 12:30:00" Thu Oct 27 12:30:00 +08 1988
-a View all interfaces
[root@localhost ~]# ifconfig -a ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.18.102.3 netmask 255.255.254.0 broadcast 172.18.103.255 inet6 fe80::88fa:3ca9:8d8a:21b prefixlen 64 scopeid 0x20<link> ether 00:0c:29:75:7e:aa txqueuelen 1000 (Ethernet) RX packets 17806 bytes 21070483 (20.0 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 3731 bytes 360797 (352.3 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@localhost ~]#ifconfig ens33 up
[root@localhost ~]#ifconfig ens33 down
"ip address" set ip address broadcast set gateway netmask set subnet mask
[root@localhost ~]#ifconfig ens33 10.10.10.2 netmask 255.255.255.0 broadcast 10.10.10.1
Export (option) (parameter)
-f: stands for the name of the function in [variable name]; -n: Deletes the specified variable. The variable is not actually deleted, but is not exported to the execution environment of subsequent instructions; -p: Lists all environment variables that the shell assigns to the program.
6. Describe the system catalog naming rules for Linux distribution and their uses.
[root@localhost /]# tree -d -L 1 . ├── bin -> usr/bin ├── boot ├── data ├── dev ├── etc ├── home ├── lib -> usr/lib ├── lib64 -> usr/lib64 ├── media ├── mnt ├── opt ├── proc ├── root ├── run ├── sbin -> usr/sbin ├── srv ├── sys ├── tmp ├── usr └── var
Binary is an abbreviation for Binaries, which stores the most frequently used commands.
Here are some of the core files used to start Linux, including some connection files and mirror files.
dev is an abbreviation for Device, which stores external devices on Linux in the same way that devices are accessed and files are accessed on Linux.
etc is an abbreviation for Etcetera (and so on), which is used to store all the configuration files and subdirectories needed for system administration.
The user's home directory. On Linux, each user has his or her own directory, which is usually named after the user's account, such as alice, bob, and eve in the figure above.
lib is the abbreviation of Library. This directory contains the most basic dynamic connection shared libraries of the system, which act like DLL files in Windows. These shared libraries are required by almost all applications.
This directory is normally empty, and when the system is illegally shut down, some files are stored there.
The Linux system automatically recognizes some devices, such as U disk, CD-ROM, etc. When it recognizes them, Linux will mount the recognized devices into this directory.
This directory is provided to allow users to temporarily mount other file systems. We can mount the CD-ROM on/mnt/and then enter the directory to view the contents of the CD-ROM.
Opti is the abbreviation opt ional, which is the directory where additional software is installed for the host. For example, if you install an ORACLE database, you can place it in this directory. The default is empty.
Proc is the abbreviation of Processes, /proc is a pseudo file system (also called virtual file system), which stores a series of special files in the current state of the kernel. This directory is a virtual directory, which is a map of the system memory, and we can get system information by accessing it directly.
The contents of this directory are not on the hard disk but in memory. We can also modify some files directly inside, for example, by blocking the ping command of the host computer with the following commands, so that no one else can ping your machine:
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
This directory is the system administrator, also known as the user home directory of the super privileger.
s is the abbreviation for Superuser Binaries, which stores the hypervisor used by the system administrator.
This directory is unique to Redhat/CentOS. Selinux is a security mechanism, similar to the firewall of windows, but it is a more complex mechanism, which stores selinux-related files.
This directory holds some data that needs to be extracted after the service starts.
This is a big change in the Linux 2.6 kernel. A new file system in the 2.6 kernel is installed in this directory sysfs .
The sysfs file system integrates information from three file systems: the proc file system for process information, the devfs file system for devices, and the devpts file system for pseudo-terminals.
This file system is an intuitive reflection of the kernel device tree.
When a kernel object is created, corresponding files and directories are also created in the kernel object subsystem.
tmp is short for temporary. This directory is used to store temporary files.
usr is the abbreviation of UNIX shared resources, which is a very important directory in which many applications and files of users are placed, similar to the program files directory under windows.
Applications used by system users.
Super users use more advanced managers and system daemons.
The default drop directory for kernel source code.
var is the abbreviation of variable. This directory contains things that are expanding. We are used to keeping directories that are frequently modified in this directory. Includes various log files.
Is a temporary file system that stores information since the system was started. When the system restarts, files in this directory should be deleted or cleared. If you have a / var/run directory on your system, you should make it point to run.
In Linux systems, it is important to have several directories. In general, you need to be careful not to delete or change internal files by mistake.
/etc: As mentioned above, this is a configuration file in the system. If you change a file in this directory, the system may not start.
/bin, /sbin, /usr/bin, /usr/sbin: This is the system's default directory for executing files, such as LS It is at / bin/ls Under the directory.
It is worth mentioning, /bin, /usr/bin Is a command for system users (except root), and/sbin, /usr/sbin Is the instruction for root.
/var: This is a very important directory, there are many programs running on the system, so each program will have its own log generated, and these logs are recorded in this directory, specifically in / var/log In the directory, the default placement of mail s is also here.