Linux study notes series (1)

It is said that linux is very powerful;

First, the development history of Linux.

To understand something, you must first understand its history, emmmm, to understand, but you don't have to remember it, so I just know a rough idea, so I went to someone else's blog to copy his history and put it here.

 

Unix

The Unix operating system is a powerful multi-user, multi-tasking operating system that supports multiple processor architectures. According to the classification of operating systems, it is a time-sharing operating system. It was first introduced by Ken Thompson, Dennis Ritchie and Douglas McIlroy in 1969 at AT&T Bell. Laboratory development. At present, its trademark rights are owned by the International Open Standards Organization. Only Unix systems that conform to a single Unix specification can use the name Unix, otherwise they can only be called Unix-like (Unix-like).

 

GNU

GNU is a software system based entirely on free software organized and developed by Richard Stallman, the father of free software, in 1984. Correspondingly, there is a General Public License (GPL for short). Linux and a lot of software related to it are developed and released under the promotion of GPL.

The father of free software - Richard Stallman, like a solemn preacher, preached the gospel of free software everywhere, explaining his dream of founding GNU: "free ideas, not free lunches". The "top priest" of free software has devoted most of his life to his dream. He has not only created many free software, such as GCC, and GDB, but also under his advocacy, some familiar software such as BIND. , Perl, Apache, TCP/IP, etc. have become classics of free software.

If Richard Stallman founded and promoted the development of free software, then Linus Torvalds did not hesitate to dedicate to GNU Linux, which brought the development of free software to a whole new level.

 

BSD

386BSD could not be released until 1992 due to legal issues. NetBSD and FreeBSD are descendants of 386BSD, earlier than Linux. Linus Torvalds said that if there had been a free 386-based Unix-like operating system at the time, he probably wouldn't have created Linux. Although it is impossible to predict what kind of impact this will have on the software industry in the future (if there is no such legal dispute, it is very likely that there will be no revolutionary Linux today), but one thing is certain, Linux has enriched this soil.

 

Minix

Minix is ​​a Unix-like computer operating system based on the microkernel architecture, invented by Andrew S. Tanenbaum. Originally released in 1987, Minix is ​​fully open sourced to university teaching and research. In 2000, it was re-licensed to BSD and became free and open source software.

Because of AT&T's policy change, after the release of Version 7 Unix, new terms of use were issued to privatize the Unix source code, which can no longer be used in universities. In order to teach students the practical details of the operation of the operating system in the classroom, the professor decided to develop a Unix-compatible operating system without using any AT&T source code to avoid copyright disputes. He referred to it as Minix, meaning mini-Unix.

Minix does not copy any code from Unix, so there is no inheritance relationship between them. After Minix was put on the Internet as the first open source operating system in history at that time, it developed rapidly in a short period of time, and a large number of people downloaded and studied.

Since Minix was written by one professor, there are some loopholes. At this time, some users found that there were loopholes, and thought about downloading some patches or writing some patches to fix these loopholes. After patching, they found that the effect was good, and then suggested that the professor use these patches to improve Minix. As a result, the professor was stubborn, meaning That said: in order to maintain the purity of Minix, no foreign code is required. That said, it wasn't intended to be a commercial distribution at all, so Minux stayed true to its originality.

 

Linux

In the following years, due to the strong operation of the computer hardware industry, the personal computer with the Intel-dominated x86 system architecture became popular, so the personal computer was regarded as a very popular machine. But at this time, most people still use the DOS operating system. At this time, a student named Linus Torvalds at the University of Helsinki in Finland did something unusual. He happened to have a 386 computer at the time, and because he didn't like the DOS system on his computer, he thought: Since Minix is ​​so good and stable, why don't I port it to a personal computer (fortunately, because of the Open Source advocated by Stallman) concept, he was able to get in touch with some Source Code, and through such an idea, O(∩_∩)O~ he read the Unix core very carefully, and removed the more complicated core program and rewritten it to be applicable For general personal computers; on the x86 system of the computer).

In 1991, he finally put the 0.02 version of the source code hobby on the Internet for everyone to download, because hobby was affirmed by everyone, quite a lot of friends put into this work together. Finally in 1994, the first full core Version 1.0 was released, and it caused the current pandemic. . . Since the development of the Linux kernel is achieved by a virtual team, everyone obtains the core source code of Linux through the network, and then passes it back to the Linux community after careful transformation, and then develops a complete Linux system step by step. As for Linus Torvalds is the initiator in this group. Because of this collective effort, Linus Torvalds has set Linux as the GNU licensing model that also benefits everyone!

Linux was made by Linus Torvalds influenced by Minix. But in terms of design philosophy, Linux is very different from Minix. Minix adopts the principle of microkernel in kernel design, but Linux adopts the same concept of macrokernel as the original Unix. At the beginning of Linux development, the two sides also had a wonderful idea debate on newsgroups in 1992. The authors and proponents of Minix see Linux's single-kernel architecture as a "great throwback to the 1970s", while Linux proponents see Minix as unusable by itself.

      

Emmmmm, that's all, copied, and then there is another one, which is the penguin icon of linux, why use penguin, I began to think it has something to do with qq,,, hahahahaha, naive myself. copy another paragraph

When the official Linux core 1.0 was released in 1994, everyone asked Linus Torvalds to think of a mascot. He remembered that he was bitten by a penguin in a zoo in Australia, so he decided to use the penguin as the mascot!

It is more acceptable to say that penguins represent Antarctica, and Antarctica is a piece of land shared by the whole world and does not belong to any country. That is to say, Linux does not belong to any commercial company, and it is a technological achievement that everyone of all mankind can share.

 

To sum up, linux is good, and it is definitely right to learn it;

Second, Linux directory introduction.

Well, the next step is what I learned, various screenshots; open the terminal and start;

1) Here we have to talk about the basic commands first.

1) The ls command to view the display file can also be modified by alias.

 

2) Then talk about the difference between ~ and /

 

Obviously, ~ is the path of the current user, / is the root directory, and for the root user, /~ is a place. pwd shows the name of the current path.

2) / The following directory is introduced.

 

This is the directory under the linux root. The first is bin. Haha then let's talk about this bin.

1) bin directory.

 

After entering, I saw a few words on the way that we Hui (si) often (hu) familiar (jian) learned (guo) some words, bah, orders. Yes, the commands below the bin are the commands used by our users. I have also done one thing, that is, I want to open a command file and see how it is written. Pfft, don't laugh when you look at the picture. Well, yes that's it.

 

 

2) sbin directory.

Speaking of bin, of course, the next one is sbin. It is directly pointed out that sbin is the execution command of the system. User rights can only watch, not play. Look at the picture. Look at the picture.

 

 

I'm not familiar with any of them anyway.

3) usr directory.

At a glance, isn't this usr simply written by the user? Well, this is not usr, but the abbreviation of "Unix Software Resource" (pay attention to the sentence pattern, don't be detoured), it is said that many software resource commands are placed here, emmm, this is not accurate, it should be many systems The installed software is placed here, well, it should be a little more accurate to say this.

 

 

I haven't installed the software, I just learned it, and I can't see it. Next.

3.1) /usr/bin directory.

Through the above understanding, it must be a stored command here! So what is the order?

 

 

These, I don't understand, no matter, anyway, it is to store the command, I will reverse it again (by drawing inferences from one case), usr/bin is also the same, the command! This is based on the previous forcibly understand, and will understand later.

3.2) usr/sbin directory.

To look good ^_<

4) /boot directory

Well, boot, what is there, looking at the picture, I definitely don't know what it is. Take a look and see what he looks like. Hey, don't you really understand, haha, according to what the big guy said, the startup directory of this system saves the startup files of the system, and the startup files of those systems are on the way. Yes, I saw it, grub is a folder, he is not a folder, hum, then he is the startup folder of the system. I understand that first. love what.

 

 

5) /dev directory

How to explain it? Look at the picture.

 

 

It is said that there are some device files here. I tried to open it with a text file. After vi, he said that it is not a file, that is, it is not a text file. Later, I asked for advice, and then with my strong understanding ability, I understood it, here The device files are placed, that is, some interface files. For example, if we want to read the information returned by the camera, how do we read it? Of course, it is the interface file to go here. If he has a camera, then what he reads is the image information returned by the camera. Emmmm, I'm so sleepy, let's understand this first.

6) /etc directory.

 

 

This folder saves the configuration files of those programs installed by default in the system, and all the configuration files installed by default are installed here.

7) /home directory

As the name suggests, this is the meaning of home, the account stored in this directory. As shown below

 

 

My computer was secretly transferred to save me an account, so I only have one account saved here. If I press one more account, then there will be multiple accounts.

8) /lib directory

In a certain document, a sentence description is used to save the function library of the system call. Look at the picture first.

 

 

I can't understand the picture. I just checked it, and it is said on the Internet that it roughly stores some library functions that need to be called by the commands below bin. Emmmm, I also saw a chestnut that is said to be inappropriate but very vivid, and there is a system32 under Windows, which is similar to this folder.

9) /media directory

The directory where the media is mounted. I don't take a screenshot of this, there is nothing in it, what is mount? For example, after we insert a U disk, the computer will automatically generate a folder called disk, in which we can see the files in the U disk. Then this disk folder is the mount directory of the u disk. So what is the media? I will go to Baidu and come back to say, (after 1 minute), Baidu has a very good understanding, what I want to say is that removable devices such as DVDs will mount a directory under this folder, waiting for you to take it. Gone will disappear.

10) /mut directory

This directory is used to mount U disk, mobile hard disk, etc. (System suggestion, of course, you can not hang here)

11) /misc directory

This directory system is recommended to mount the NFS service. (NFS is a remote file system, through which you can access remote files.)

12) /opt directory

This is where the third-party installed software is saved.

13) /proc directory

Virtual file system, the data in this directory is not stored on the hard disk, but the data stored in the memory. Well, there is something in this directory, then we will show it:

 

 

what are these?

14) /sys directory

This directory, like the porc above, stores virtual files in memory, but this one stores kernel information.

 

 

15) /root directory

Emmm, I still can't enter this directory, I cut the root to see (after 20s) there is nothing in it, I actually enter the ~ directory. under Root.

16) /srv directory

This directory will save some service data, that is to say, some systems will save related data in this directory after startup. As for what service is, I'm so sleepy, I don't want to explain it, it's service.

17) /tmp temporary directory

I know this, I don't need to look at it, I know that tmp is the temp temporary folder (take a peek), and all users under this file can write things.

18) /var directory

The folder where the dynamic data is saved, as long as the software is running, logs and other files are stored.

       It's definitely not something that can be recited. I knocked it over and over again, and I still didn't write it down. Therefore, this can be used as a temporary manual or something, of course, it is not a comprehensive collection, just remember the role of ctrl + f.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325158775&siteId=291194637