DEV Community

Cover image for UNIX and Linux
Istiak Islam
Istiak Islam

Posted on

UNIX and Linux

Linux is not UNIX, although it is clearly UNIX-like.

Technically, Linux is only the kernel; everything else that makes up the full operating system is drawn from a number of sources. The full content depends on the particular Linux distribution being used.

UNIX and Linux have had very different evolutions. UNIX may have had humble beginnings, but from the very outset it was designed to be a serious enterprise operating system. It grew up largely outside of the Intel family of CPUs, although it was later ported to it. Linux, on the other hand, began as a toy operating system only on the x86 architecture. It is doubtful anyone had any idea of how robust it would become or how many architectures it would wind up supporting.

The first versions of UNIX were developed about 1969, by Ken Thompson, Rudd Canaday, and Dennis Ritchie. By the time Linux first appeared in 1991, UNIX had already become quite fractured. There were many varieties, grouped in two major families: System V arising from the original code at Bell Labs, and BSD arising from the University of California at Berkeley.

Sorting out the fractious history and differences among the different UNIXs would be a lengthy task (as well as an unnecessary one for our present purpose). But, by 1991, there were many variants, often tied to a specific hardware platform and vendor. For instance, SGI had IRIX, Sun had SunOS and Solaris, IBM had AIX, Hewlett Packard had HPUX, Cray had UNICOS, DEC had Ultrix. Each one of these manufactures often had several varieties running even on its own universe of hardware. SCO was one of the only variants not arising from a hardware company.

While there were various efforts to achieve some standardization, most vendors had strong self-interest in keeping things proprietary. At a minimum, there were always two major flavors to be considered, System V and BSD, and their behavior could be quite different even on quite basic matters such as signal handling. Thus, application developers interested in portability had to resort to the use of ugly #ifdef statements.

Even where the APIs were not that different, the actual implementation could be radically different from platform to platform. Basic kernel architectures also differed. Furthermore, each platform had its own set of basic file utilities, shells, etc.

The Free Software Foundation's (FSF's) GNU (GNU's not UNIX) project developed freely-distributable versions of many basic utilities, such as tar, ls, grep, etc., and even more important, the gcc compiler and the basic C-library, libc.

Linux could not have been born or grown without the availability of tools from the GNU project. There is no way to overemphasize this. We will stay out of the arguments about whether Linux should properly be called GNU/Linux or something similar, but just note that what is often loosely called Linux in fact contains many GNU components; properly speaking, Linux is only the kernel.

While UNIX and Linux are not the same thing, Linux has always borrowed heavily from UNIX. Most basic components of Linux, such as an inode-based filesystem, accessing hardware through device nodes, multi-process scheduling, process creation and destruction, are completely rooted in UNIX.

This is because the developers of Linux have always had a good footing in the UNIX world, and because of the availability of the UNIX tools from GNU and other non-GNU open-source projects.

Whenever possible, Linux has tried to accommodate both major variants of UNIX as far as the API is concerned; striving for POSIX type behavior is above that level. As such, it has never been very difficult to port UNIX applications to Linux, unless the application has relied very heavily on certain idiosyncrasies of a particular UNIX implementation.

The open nature of the Linux development model has thus far avoided the serious fracturing that took place in UNIX. It is perhaps ironic that the easily legal possibility of having Linux fork into competing versions at any time is perhaps what has prevented it.

Many hardware vendors now seriously support Linux on their hardware and the long range future of their own versions of UNIX is often in doubt. It could well be that the Linux plan for world domination is inevitable; at least as far as killing off other UNIX-like operating systems.

Top comments (0)