Analysis of differences between Unix and Linux operating systems

  


: Difference analysis between Unix and Linux operating systems, is Unix and Linux operating system the same operating system? Yes, no. Perhaps this answer has contradictory points, but it is a more reasonable answer. In the following articles, the author will analyze the differences between the two operating systems of Unix and Linux. If you are interested in this topic, please pay attention to the author's follow-up article.


First, the source code of Unix and Linux operating systems is different.

Although there are quite a few commands on the Unix and Linux operating systems, their source code is different. That is to say, in the development process of the Linux operating system, many Unix system design concepts are adopted, and the POSIX specification of the Unix operating system is followed. However, it does not use the source code of the Unix operating system, and does not use the Unix operating system. From this point of view, the two are different operating systems.

Now the Unix operating system is commercialized and its source code is protected. This means that no social group or individual can plagiarize or arbitrarily modify the source code of the Unix operating system. In the concept of developing a car, the source code is rewritten, so there is no copyright restriction. Whether it is an individual or a business group, you can change or copy the source code of Linux as long as you follow certain specifications. There is no copyright issue involved. Therefore, the Linux operating system is a true open source operating system.

Second, Unix and Linux use the same system call for this is the same operating system.

Unix has evolved to the present, and there are many versions. Such as BSD or HP-Uinx operating system and so on. They are all Unix operating systems. Why do you say this? It is not that the origin of their source code is the same, but that they all use the same system call. In the Unix operating system, the most outstanding feature is the completion of related operations through commands. On Unix systems, there are more than 1000 commands. But what's amazing is that so many commands communicate with the system kernel through a few function calls, which are called system calls.

This is like an office building, and its doors may only have two front and back. But there are hundreds of roads leading to these two gates. Then each application only needs to follow the communication rules of these two doors, and can communicate with the internal staff of the office. For example, if there is a Write function in the Unix kernel, it is mainly to save relevant information to the file. Many applications need to save information to files on the hard disk, such as text processing files, database systems, and so on. However, these application systems will eventually call the Write function to save information to the file, so these application developers only need to understand the Write function, you can successfully save the file to the hard disk. It can be seen that because everyone uses the same system call, the application can be successfully ported in different Unix versions.

The Linux system uses the same system calls as the Unix operating system and follows the POSIX specification. From this point of view, the Linux operating system is the Unix operating system, but their developers are different. For this reason their source code is different, but it does not affect this qualitative. Since the two operating systems use the same system call, the application software developed on the Unix operating system can be easily ported to another Linux operating system.

So, the Unix operating system and the Linux operating system are the same operating system (the same system calls), and not the same operating system (source code is different). This answer seems contradictory, but it really reflects the relationship between the two operating systems.

Third, the kernel file is different from the shell.

Whether it is a Unix operating system or a Linux operating system, it basically consists of a kernel, a shell, and an application. Needless to say, the kernel is the most important part of the operating system, dealing directly with computer hardware. Responsible for the exchange of information between the enclosure and the system hardware. To this end, some experts say that the kernel is a real operating system.

The Unix operating system is different from the Linux operating system kernel file. For example, the Unix operating system's kernel program corresponds to the /stand/unix file; in the SUNOS Unix operating system, it corresponds to /kernel./genuix. The operating system loads the kernel into system memory at boot time. The kernel program of the Linux operating system is quite different from the Unix operating system. The kernel file used by the Linux operating system is /boot/vlinuz. Whether it is a system engineer or a programmer must know the most basic difference. For example, when upgrading the system kernel, you need to know the kernel file used.

The Unix operating system and the Linux operating system are not only different from the kernel files, but the shells used are different. So far, the Unix operating system mainly supports four shells, namely SH, CSH, KSH and BASH. When the user logs in to the operating system, a shell is launched. Normally, only one shell can be started at the same time. The system engineer communicates with the system core and hardware through the shell. The Linux operating system has only supported three shells so far, which are BASH (the default shell), CSH, and KSH, which are one less than the Unix operating system. This difference may have no effect on the average user. But for system engineers to do some specific work, it may bring a lot of inconvenience.

Fourth, the command parameters are expressed in different ways.

Most of the commands on the Unix operating system and the Linux operating system are the same. However, there are differences in the representation of some parameters. For example, the ls command is used to view information about files and subdirectories in the current directory. This command uses the most frequently used commands in both operating systems with more parameters. However, there will be differences in the specific expression of some parameters.

If you can add a special type of parameter after the command in these two operating systems, you can have optional parameters. In the Unix system, a single crossbar is used to represent an English letter. Such as ls – l and so on. This option is also a parameter in Unix commands. These parameters are often pre-defined in the system to achieve some special features. Usually, 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 run in multiple ways. Another problem to be aware of is that in general, there must be spaces between commands and parameters to distinguish them. If there are multiple spaces between the command and the argument, there is a tool called the command interpreter in the shell that compresses it, leaving only one space left. Of course, in some cases, the system engineer may not like the system's "self-smart" approach, but there are some measures to prevent the operating system from doing so.

While the Linux operating system can also support options, the methods it represents are different. In the Unix operating system, the option parameters are mainly represented by a single crossbar. However, in the Linux operating system, the options are not uniform. Some require a single crossbar, while others require a double crossbar to indicate that this parameter is an optional parameter. In addition, in the Unix operating system, these optional parameters are single English letters; in the Linux operating system, it may use English words with certain meanings, such as ls -all and so on. Due to this inconsistency in the Linux operating system, the command memory is more than the Unix operating system. Especially like the author, it is necessary to be responsible for the maintenance of the Unxi system. When it is necessary to participate in Linux-related projects, this is especially easy to confuse. So sometimes you have to check the online help of the system to determine the correct format of the command.

Fortunately, both operating systems have an online help file. For example, in the Unix operating system and the Red Hat 9 operating system, you can use the man command to view the help description of the command. For example, the man ls system will display the help of the ls command, and will bring out all the available parameters under the command. Includes optional parameters. In fact, whether a single crossbar or a double crossbar will be specified. So many system engineers like the author would like to thank this online help document, so that we can be qualified for the maintenance and development of the Unix operating system and Linux operating system. Although there are some differences in formatting between commands, most of the commands have the same name. So with the support of this online help documentation, this difference can be confirmed in the shortest amount of time.

These differences are just some of the differences between the Unix operating system and the Linux operating system. The author will gradually sort out the differences in this regard in the future. As mentioned above, Unix and Linux are actually the same operating system. For this reason, as long as the system engineers master these differences, they must be able to work for both Linux and Unix operating systems. I hope that the author's summary of these differences can help you in this area, so that you can become a qualified Linux engineer while managing the Unix operating system.

Copyright © Windows knowledge All Rights Reserved