This is the third day of my participation in the Gwen Challenge

History of UNIX

  • The first version was implemented in 1969 by Ken Thompson (the father of UNIX) AT& T Bell LABS
  • Ken Thompson and Dennis Ritchie (the fathers of C) reworked and wrote the entire system in C
  • Source code for UNIX is owned by SCO Corporation (AT&T ->Novell ->SCO)
  • UNIX trademarks (AT&T ->Novell ->X/Open)

What is a UNIX

UNIX is a trademark managed by the OPEN GROUP that refers to a collection of computer operating systems that follow a specific specification. This Specification is called SUS (Single UNIX Specification)

Unix-like systems

  • A variety of traditional UNIX systems and a variety of traditional UNIx-like systems (following the POSIX Portable Operating system Interface specification).
  • ISO C is a POSIX subset
  • POSIX is a subset of SUS
  • Purebred Unix is mostly commercial, such as SCO’s Unixware, IBM’s AIX, HP’s HP-UX, and Sun’s Solaris
  • Free ones are FreeBSD and Linux

What is a Linux

Is a freely distributed implementation of a Unix-like kernel, the underlying core (kernel) of an operating system. Users can obtain the kernel source code, compile and install it, and then obtain and install many other freely distributed software to create a complete Linux, often referred to as a Linux system

The history of Linux

  • The new version of Unix(SystemV7) is restricted by copyright and the source code is not public, can not be used for teaching and research
  • In order to get rid of these limitations, Professor Andrew S. Tanenbaum developed the Minix operating system, which opened the full source code to university teaching and research work

Linus Torvalds is a computer science student at the University of Helsinki in Finland. During his college years, he came into contact with the Unix system of the university. However, the Unix system at that time only had one host and corresponded to multiple terminals, which had some unpleasant problems such as long operation waiting time. So he came up with the idea of developing a Unix of his own. He installed Minix on his I386 PC as an object of study. Linus read the source code of Minix system, from which he learned a lot of important system core programming concepts and design ideas, thus gradually began the design and development of the prototype of Linux system. In August 1991, computer science students at the University of Helsinki in Finland posted the following message on the comp.os.minix newsgroup: “Hello to all of you using Minix – I’m working on a free operating system for 386 (486) AT (just for hobby) that won’t be as big or professional as GNU.”

Linux Kernel Version

  1. Linux version 0.02 was released in October 1991
  2. Linux0.99 was released in 1993
  3. March 1994 Linux version 1.0,GPL
  4. He joined the GNU in 1994
  5. The latest stable kernel release for 2021 is: 5.11.2 (February 26, 21) -www.kernel.org

The characteristics of the Linux

  • Openness (standards-compliant)
  • Many users
  • multitasking
  • Good user interface
  • Device independence (treating peripheral devices as files)
  • Rich network functions
  • Reliable system security
  • Good portability

Introduction to Free Software

The GNU project

In 1983 Richard Stallman(the spiritual godfather of the free software industry) founded the GNU(GNU’s not Unix) project. Started in 1984 to build a fully free and portable Unix-like operating system

  • www.gnu.org/

Free Software Foundation

  • Sponsors of the GNU project
  • The Free Software Foundation (FSF) advocates Free Software
  • FSF freedom of use has three meanings:
  1. Copy GNU software freely
  2. Free to modify the source code
  3. The modified source code may be freely distributed, but no copyright fee may be charged

GNU General Public License GNU General Public License

  • Official translation: Free file license
  • Copyleft (the opposite of copyright, preventing anyone from placing restrictions on the use of free software)

GPL core ideas:

  • Guarantee the freedom of anyone to share, modify, and distribute free software
  • Derivative works of free software must be redistributed under the GPL license
  • Allow companies to sell free software and provide source code

Major GNU project software distributed under the TERMS of the GPL

  • GCC
  • G++
  • GDB
  • make
  • Bash
  • Emacs
  • Gawk

Linux version

Kernel version

Linux operating system (Kernel + Utilities) : For experts

Kernel version number: defined and maintained by Linus et al., universal

Kernel version number format: x. zz, where x is the major version number, Y is the minor version number, and zz is the minor version number.

The even-numbered versions are stable (the kernel features are fixed, the code runs reliably, no new features are added, and improvements are only errors), and the odd-numbered versions are development (old rules, up to 2.6).

Linux kernel 2.6+, the second number no longer indicates whether a kernel is stable or development, all official releases are stable

Release version

Linux Distribution: More software packages available for general users

Release number: the release number of each company or organization is determined by itself. The release number of different companies is not comparable

  • RedHat Linux
  • Fedora
  • CentOS
  • Debian GNU/Linux
  • Ubuntu
  • Gentoo Linux
  • SuSE Linux
  • Arch Linux
  • Kali Linux
  • Linpus Linux
  • Red Flag Linux

The Linux directory

The Linux directory structure organizes and manages all the files on the system as directories. Starting with the root directory /, all other directories are derived from the root directory

  • /bin: directory for common system programs
  • /boot: Boot setting directory, which is also where the core vmlinuz is placed
  • /dev: directory for storing device files
  • /etc/system configuration file, especially passwd, shadow
  • /etc/rc.d/init.d: the location where the scripts of the service are loaded when the system starts up
  • /home: indicates the directory of the system user
  • /lib: Linux executor-compiler function library directory
  • / MNT: mount the FDD and CD/DVD drive
  • /proc: Some information about the system core and executing programs
  • /root: system administrator directory
  • /usr/bin, /bin: stores common execution files
  • /usr/sbin, /sbin: common commands used by system administrators
  • /var: store system log files
  • /lost+fount: Display fragments that were lost when the system was not working properly

Linux Run Level

  1. Shutdown level.
  2. Single-user run level to run scripts in the rc.sysinit and rc1.
  3. Multi-user, but the System does not enable Network File System (NFS), character mode, in some Linux systems, level 2 is the default mode, with Network functions, such as Ubuntu and Debian.
  4. Multi-user, character mode, system startup with network capabilities, common runlevel.
  5. User-defined level.
  6. Graphical interface mode, common runlevel.
  7. Restart level.

Change the system runtime level

  • temporary
  1. Init n or telinit n —–n indicates the level number, root permission
  2. Startx —– Start the graphical environment (graphical interface is required)
  • For a long time
  1. Modify the configuration file /etc/inittab(old)
  2. systemctl set-default *.target

shutdown

halt

init

poweroff

reboot