In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces how to analyze the differences between Unix and Linux operating systems. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.
Is Unix the same operating system as Linux? Yes and no. Perhaps this answer is self-contradictory, but it is a more reasonable answer. In the following articles, the author will analyze the differences between Unix and Linux one after another.
First, the source code of Unix and Linux operating system is different.
Although Unix and Linux operating systems have many commands that are the same, their source code is different. In other words, in the development process of Linux operating system, a lot of design ideas of Unix system are adopted and the POSIX specification of Unix operating system is followed. However, it does not use the source code of the Unix operating system, and does not use the operation mode of the Unix operating system. From this point of view, they are two different operating systems.
Now the Unix operating system is commercial, and its source code is protected. That is to say, no social group or individual can copy or modify the source code of the Unix operating system at will. And Linux in the development process, the source code is rewritten, so there are no copyright restrictions. Whether individuals or business groups, as long as they follow certain specifications, they can change or copy the source code of Linux. Copyright issues will not be involved. Therefore, Linux operating system is a real open source operating system.
Second, Unix and Linux use the same system calls so that they are the same operating system.
From the development to the present, there are many versions of Unix. Such as BSD or HP-Uinx operating system and so on. They are all Unix operating systems. Why do you say that? It's not that the origin of their source code is the same, but that they all use the same system calls. In the Unix operating system, the most outstanding feature is to complete the relevant operations through commands. In a Unix system, there are more than 1000 commands. But surprisingly, so many commands communicate with the system kernel through a few function calls, which are called system calls.
It's like an office building with only two front and rear doors. But there are hundreds of roads leading to these two gates. Then each application only needs to abide by the communication rules of the two doors and can communicate with the people inside the office building. For example, there is a Write function in the Unix kernel, which is mainly used to save relevant information to the file. Many applications need to save information to hard disk files, such as text processing files, database systems, and so on. But these applications will eventually call the Write function to save information to the file, so these application developers only need to know the Write function to save the file to the hard disk smoothly. It can be seen that it is really because everyone uses the same system call that the application can be successfully ported to different versions of Unix.
The system calls used by the Linux operating system are the same as those used by the Unix operating system, and both follow the POSIX specification. At this point, the Linux operating system is the Unix operating system, but their developers are different. For this reason, even if their source code is different, it does not affect this characterization. Because the two operating systems use the same system calls, the application software developed on the Unix operating system can be easily ported to another Linux operating system.
Therefore, Unix operating system and Linux operating system are the same operating system (the same system call), but not the same operating system (different source code). This answer may seem contradictory, but it really reflects the relationship between the two operating systems.
Third, the kernel file is different from the shell.
Whether it is Unix operating system or Linux operating system, it is basically composed of three parts: kernel, shell and application. There is no doubt that the kernel is the most important part of the operating system, which deals directly with computer hardware. Responsible for the information exchange between the shell and the system hardware. For this reason, some experts say that the kernel is the real operating system.
The kernel files of the Unix operating system and the Linux operating system are different. For example, the file corresponding to the kernel program of Unix operating system is often / stand/unix file; in SUNOS's Unix operating system, the corresponding file is / kernel./genuix. The operating system loads the kernel program into the system memory when it starts. However, the kernel program of Linux operating system is quite different from that of Unix operating system. The kernel file used by the Linux operating system is / boot/vlinuz. Both systems engineers and programmers must be aware of this basic difference. For example, when upgrading the kernel of the system, you need to know which kernel file is used.
Unix operating system and Linux operating system not only have different kernel files, but also use different shells. So far, the Unix operating system mainly supports four types of shells, namely SH, CSH, KSH and BASH. When the user logs in to the operating system, a shell is launched. Usually, only one shell can be started at a time. The system engineer communicates with the system kernel and hardware through the shell. So far, the Linux operating system only supports three kinds of shell programs, which are BASH (the default shell), CSH and KSH, which is one less than the Unix operating system. This difference may not have any impact on the average user. However, for system engineers to do some specific work, it may bring greater inconvenience.
Fourth, the expression of command parameters is different.
Most of the commands are the same in the Unix operating system and the Linux operating system. However, there are some differences in the representation of some parameters. For example, the ls command is used to view information about files and subdirectories under the current directory. This command is the frequency of the two operating systems used in the command, with more parameters. However, there will be differences in the specific expressions of some parameters.
For example, a special kind of parameter can be added after the command in these two operating systems, that is, the dispensable parameter. In the Unix system, it is represented by a single crossbar clamp with an English letter. Such as ls-l and so on. This option is also an argument in the Unix command. These parameters are often pre-defined in the system and are used to achieve some special functions. In general, a command can take many types of parameters, such as file name parameters and optional parameters, to improve the flexibility of the command so that the command can be run in multiple ways. Another problem to note is that in general, there must be a space between commands and parameters. If there are multiple spaces between commands and arguments, a tool in the shell called the command interpreter will compress it, leaving only one space. Of course, in some cases, system engineers may not like the "smart" approach of the system, but there are some measures that can be taken to prevent the operating system from doing so.
Options are also supported in the Linux operating system, but they are represented differently. In the Unix operating system, optional parameters are mainly represented by a single crossbar. However, in the Linux operating system, the representation of the options is not uniform, some require a single crossbar, and some commands need to use double crossbars to indicate that this parameter is an optional parameter. In addition, in the Unix operating system, these optional parameters are a single English letter, while in the Linux operating system, they may use English words with certain meaning, such as ls-all and so on. Because of this disunity in the Linux operating system, the memory of its commands is more than that of the Unix operating system. Especially when, like the author, he is responsible for the maintenance of the Unxi system and may have to participate in Linux-related projects, this is particularly easy to get confused. So sometimes you have to check the system's online help to determine the correct format of the command.
Fortunately, there is an online help document in both operating systems. For example, in both the Unix operating system and the Red Hat 9 operating system, you can view the help description of the command through the man command. For example, the man ls system will display the help related to the ls command, and will also bring out all available parameters under this command, including optional parameters. In fact, whether to use a single crossbar or a double crossbar will be specified. So many system engineers like the author should thank this online help document, which makes us competent for the maintenance and development of Unix operating system and Linux operating system at the same time. Although there are some format differences between commands, after all, most commands have the same name. So with the support of this online help document, you can confirm this difference in the shortest possible time.
This is the end of the analysis of the differences between Unix and Linux operating systems. I hope the above content can be of some help and learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.