01 getting started with Linux and 01linux
I. Introduction to Linux
Penguin (English name: Tux). Origin: Torvalds was bitten by penguins when I was a child, so I was very impressed.
Early StageThe computer architecture is still very difficult to use. In addition to the slow command cycle, the operation interface is also very troublesome! At that time, the input device only had a card reader and a printer, and the user could not interact with the operating system (Multi-Channel batch processing operating system ). Later, with improvements in hardware and operating systems, you can use a keyboard to input information.
Early 1960Developed by MIT (MIT)CTSSIt allows multiple terminals to connect to the host and use the resources of the host for calculation. However, advanced hosts provide up to 30 terminals (only input and output functions)
Around 1965Bell Labs, MIT, and GE jointly launchedMultics ProjectThe purpose is to allow large hosts to connect more than 300 terminals. Complete Historical description can be referred to: http://www.multicians.org/
Around 1969Project Progress lags behind, capital shortage, and Bell lab exited.
1969, Ken Thompson (Multics project participant) wrote a set of kernel programs, kernel tool programs, and a small File System in Assembler Language four weeks. It was dubbedUnicsAnd the system is a prototype of Unix.
1973, Ken Thompson and Dennis Ritchie (father of C language) work together to write Unics in high-level languages (due to the uniqueness of the assembly language, and at that time the computer machine architecture was not the same, so every time you install it on a different machine, you have to re-compile the Assembly Language). At that time, there was a ready-made high-order programming language with B Language. However, the core efficiency compiled by language B is not very good. Later, Dennis Ritchie changed the B language to the C language, re-rewritten and compiled the core of Unics in the C language, and finally releasedOfficial Unix version!
After January 1, 1973The Bell lab (affiliated to AT&T us telecommunications company) is working with the University of Berkeley, California. Bill Joy from the University of Berkeley modified the original Unix code,PortIt is suitable for your own machine and has developed a lot of tool software and compilation programs.
1977, Unix BranchBSD(Berkeley Software Distribution) was born. Bill Joy was later founded by Sun. Sun developed its commercial Unix version at the core of BSD.
After January 1, 1977Major commercial companies have begun the development of Unix operating systems. For example, AT&T's own System V, IBM's AIX, HP, DEC, and other companies have launched their own host with their own Unix operating systems. At that time, Unix had not been transplanted to personal computers, because the CPU in the early 286 PC architecture was not capable of multi-task jobs, while Unix emphasized that there were many tasks, so no one was interested in Porting Unix to a PC.
1979,Launched by AT&TSystem V version 7 UnixThe biggest feature of this version is that it supports personal computers with x86 architecture. AT&T withdrew Unix copyrights due to commercial issues.
1984Professor Andrew Tanenbaum (TAN ningbang) began to write the original Unix code by himself, because the core original code of System V version 7 was not open.MinixThis Unix Like core program is transplanted to x86.
1986, X86 architectureMinix Operating SystemBorn.
1984Richard Mathew StallmanGNU * programThis plan aims to build a Free and open Unix operating system (Free Unix ). However, I was a little weak, so I first wrote some small programs that could run under Unix, so the GNU program gradually became known. But the visibility was not enough. Later I wrote another software that everyone needed (any software must be compiled into a binary file before it can be executed), so he began to write a C language compilation program, that is now the well-known gnu c Compiler (gcc )! In addition, he has written more program C library and the basic interface BASH shell for operating the kernel!Several important software developed by GNU, such:
Emacs
Gnu c (GCC)
Gnu c Library (glibc)
Bash shell
In order to avoid the risk of self-developed Open source software, Stallman also developed the GNU non-FSF software, are all copyrighted by GPL (General Public License ~ The core concept of FSF copyright is "the copyright system is a means to promote social development, and copyright itself is not a natural power .』 For the second FSF, please refer to the Chaoyang University of Science and Technology, Professor Hong chaogui, Lu website http://people.ofset.org /~ Ckhung/a/c_83.php, quit go directly to GNU: http://www.gnu.org has a more in-depth view said!
Why is GUN * called GNU? In fact, GNU is short for GNU's Not Unix environment.
1988Graphical User Interface (GUI) has an increasing demand. It was first published by MIT and other third parties in 1984.X Window SystemAnd a non-profit vivo XFree86 organization was established.
1991Linus Torvalds, University of Helsinki in Finland, posted a message on BBS, claiming that he wrote a small core program using bash, gcc, and other tools, this core program can run on Intel's 386 host, which is of great interest to many people! Since thenLinuxAn extraordinary journey!
- Background: At that time, the University of Helsinki had only one of the latest Unix systems and provided only 16 knitting machines (terminal ). At that time, only the host had the computing function, and terminal was only responsible for providing Input/Output. In this situation, it is really difficult to meet the needs of towaz, so I want to build a Unix computer to play. Later, he knew that there was a Unix-like kernel system that was fully compatible with Unix and could run on Intel 386, which we mentioned earlier, professor Tan ningbang's Minix System for educational purposes! He immediately installed the Minix operating system after purchasing the latest Intel 386 laptop. In addition, the Minix operating system is attached with the original code scheme, so tovas also learned a lot about the design concept of the kernel core program design from this primitive code!
- Start-up: in my early days, owazz was playing with the compilation query engine. The compilation query engine was very close to other hardware systems ,. First, he wrote three small programs. One program will continuously Output A, one will continuously output B, and the last one will switch the two programs. He executed the three programs at the same time. As a result, he saw that the screen was very smooth. He was always there, ABABAB... he knew that he was successful!
Linux core official version! Version 1.0. This version also supports X Window System.
1996, CompletedLinux 2.0
Popular Science expansion:<Computer development history>
<Silicon Valley Computer History Museum>
Ii. Basic knowledge about Linux 1. Linux core version number
-
- 2.6.18-92. el5 main version. Next version. Release Version-Modify version
- The primary and secondary versions are odd: development versions, such as 2.5.xx, are mainly used to test new features, so these versions are usually used only by the core development engineer.
- Primary and secondary versions are even: stable versions (such as 2.6.xx) will be added to these stable versions when their core functions are developed and used in general home computers and enterprise versions. Focuses on providing users with a relatively stable running Linux job environment platform.
- Release of the version is a new release of the core version of the release after the master and secondary version architecture changes.
- If you have modified some of the ghost program code for the core of a specific version, you can add the so-called ghost modified version to the new ghost core version.
2. Linux core version and distribution version
- Linux is actually the underlying kernel of an operating system and provides kernel core tools. It is the gnu gpl authorization mode, so anyone can obtain the original code and cannot execute this core program and can modify it. In addition, because Linux is compatible with the binary Unix operating system according to the POSIX model, the kernel can also be called Unix Like kernel.
- Many NLP commercial companies, rather than non-profit groups, integrate Linux Kernel (including tools) with runtime software, and add their own creative runtime tool programs, this tool allows users to directly install/manage Linux systems on a CD/DVD or through the network. This "Kernel + Softwares + Tools plugin can be fully installed" is called Linux distribution. It is generally translated into a package that can be fully installed, or a Linux publisher package.
- All the kernel used by Linux distributions is implemented by the http://www.kernel.org, and these developers are developed according to standards such as Linux Standard Base (LSB) and directory architecture File system Hierarchy Standard (FHS. The only difference may be the management tools developed by developers themselves and the different suite management modes.
FHS: http://www.pathname.com/fhs/
LSB: http://www.linuxbase.org/
- Mainly published Linux distributions web site:
Red Hat: http://www.redhat.com
Fedora: http://fedoraproject.org/
Mandriva: http://www.mandriva.com
Novell SuSE: http://www.novell.com/linux/
Debian: http://www.debian.org/
Slackware: http://www.slackware.com/
Gentoo: http://www.gentoo.org/
Ubuntu: http://www.ubuntu.com/
CentOS: http://www.centos.org/
- Chinese Linux kernel extension plan: CLE this suite, http://cle.linux.org.tw/developed a lot of Chinese kits and translated a lot of English files, so that we can currently use Chinese Linux
- Well-known trusted Open Source authorized webpage:
GNU General Public License: http://www.gnu.org/licenses/licenses.html#GPL
GPL version 2 Simplified Chinese text, http://linux.vbird.org/linux_basic/1010appendix_A.php
Berkeley Software Distribution (BSD): http://en.wikipedia.org/wiki/BSD_license
Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
Iii. Preliminary understanding of Linux 1. Tips
- Login username root, equivalent to Administrator in windows
- Go to the graphic interface # startx (the graphic interface consumes memory. Generally, servers are not installed)
- Shutdown command # shutdown-h now shutdown immediately
- Restart command # shutdown-r-now restart immediately or # reboot
- User logout command # logout
- Switch to the Administrator Account # su-root (use the root account as little as possible)
- Vi Editor
- Switch directory command # cd directory name (cd ~ Switch to the home Directory, switch cd .. to the parent directory, and switch cd/to the root directory)
- Show file directory # ls-l (list)-a (hidden)
- Show the current path # pwd
2. File directory in Linux
- The Linux File System adopts a hierarchical tree structure.
/
Root home bin sbin mnt etc var boot
Root: stores related files of the root user.
Home: stores files of common users.
Bin: stores Common commands
Sbin: commands that can be used only when you have certain permissions.
Mnt: default directory for mounting the optical drive and soft drive
Boot: stores the boot file (start the system)
Etc: stores configuration-related files (environment variables, etc)
Var: stores constantly changing files
Usr: Default Folder for storing installed software
3. User Management in Linux
In Linux machines, file attributes can be divided into "readable, writable, executable" and other parameters to define the applicability of a file. In addition, these attributes can be divided into three types, they are the "ARCHIVE owner, the archive owner group, and other non-owner and group owner 』. This provides good system confidentiality for project or other program developers.
Add a user (root permission) # useradd xiaoming
Set Password # passwd xiaoming (add a password to the current user without adding a user)
Delete user # userdel xiaoming (User deleted, but the file is still in)
Permanently delete users and file directories # user-r xiaoming
Add group # groupadd group name
Assign a user to a group # useradd-g group name Username
Delete Group # groupdel group name
Change User Group # usermod-g Username
Change the initial directory for user login # usermod-d directory name Username
View all groups in Linux # cat/etc/group | more (group ID)
View all user information in Linux # cat/etc/passwd Note: fields are separated:
User Password user ID group ID comment user main directory parser bash
Test x 505 505 null/home/test/bin/bash
4. Linux File Permissions
- Criterion 1: in Linux, each user must belong to a group and cannot exist independently.
- Criterion 2: one user can be in multiple groups, whichever has the highest Permissions
- Criterion 3: After a user creates a file, the file group is the user group.
- Criterion 4: Except for the owner of the file and the outdoor users in the group, other users of the system are all other groups of files.
The file has three permissions: r-readable 4, w-writable 2, and x-executable 1.
-Rw-r -- except for the first-, the remaining three are a group.
The first-indicates the file type (-indicates a common file, d indicates a directory, and l indicates a link file)
Group 1 rw-: permission granted by the file owner to the file 7 = 4 + 2 + 1
Group 2 r --: permission of the file Team 4 = 4 + 0 + 0
Group 3 r --: permissions of users in other groups on the file 4 = 4 + 0 + 0
# Ls-ahl view all file groups
# Chagrp
To change the permissions of all files in the entire directory, run the command # chmod-R 744 directory name
Note: The Documents directory contains two directories: Files aa and bb in the 123 and 456,456 directories, which have only the read and write permissions (rw-) under the root user, in this case, all the files in the 456 directory are changed to readable and writable executable (rwx)
4. Common commands for getting started with Linux
References: laruence private dish