What’s the difference between UNIX and Linux? And what is a kernel?

970 viewsOtherTechnology

I know Linux is an operating system but I see memes and posts about people arguing whether UNIX is an operating system or a kernel and stuff like that. So what separates the two? And what exactly is a kernel?

In: Technology

16 Answers

Anonymous 0 Comments

Unix is an older operating system dating back into the 1970s. This was back when 1 computer was highly expensive, and having many people able to use it was a valuable thing. It was imitated by many different other operating systems, and Linux is a member of that family of imitators.

“Linux”, as a proper name specifically, only refers to the kernel, which is the software that runs the system as a whole. Your CPU has 2 main modes of operation: Operating System, and Application (to over-simplify a bit). Only the kernel’s code runs on the CPU in Operating System mode, and all programs/apps run under it in Application mode. Direct access to the hardware, like sending commands to a hard drive, isn’t possible in Application mode, and it’s up to the kernel to handle those things for the apps, doing both the execution of the commands on behalf of the apps, but also enforcing rules like if a user doesn’t want their files read by other users, then Linux won’t allow it (administrator user excepted). The kernel does all the multi-tasking, app separation, memory allocation, files and directory management, crashing misbehaving apps, etc.

The meme you might have heard about is the GNU/Linux debate. If Linux is *just* the kernel, then what apps does it run? The traditional answer is GNU project apps, from the Free Software Foundation. These finish up the Unix look-alike goal that Linux provides with the common processing, mostly command-line apps that go with Linux. Now it doesn’t have to be GNU apps specifically, but overhauling the operating system’s fundamental apps is a huge undertaking.

So now you have a full blown operating system, starting up, detecting hardware, and running the first apps that provide you with a Login screen, etc.

Anonymous 0 Comments

The kernel is the bit of software that talks to the hardware. Then everything else talks to the kernel.

“Linux” is technically a kernel, and a “linux distribution” is Linux plus enough stuff to make a usable OS. Most distributions are based around the “GNU” project, which stands for “GNU’s Not Unix”. It’s a project to recreate the function and style of unix, but as it’s own thing.

“UNIX” is a family of operating systems that all (I think) originate from the same codebase, and also are certified to call themselves “Unix”. Linux and GNU neither have the same original code, nor has anyone (afaik) attempted Unix certification (if it’s even possible on such a separate code base)

Fun fact: macos is a certified Unix.

Anonymous 0 Comments

The kernel and the operating system are both somewhat vague terms, there’s no hard and fast exact meaning. It’s sort of like the difference between a town and a city – there are some people that will give you very specific and precise definitions, and also other people that will give you a mutually exclusive other specific and precise definition.

But broadly:

An kernel is the software the organizes all the hardware and provides a single platform for everything on else on the computer to work with so other software can all work together. You might have a web browser connecting to websites, simultaneously steam is downloading a game, also you’re playing some online game that’s also reaching out to the internet. The kernel is what figures out how to get all these things coordinated so all the programs get time on the CPU to actually execute, none of them are using RAM the others are using at the same time, and they can all share one radio antenna that’s doing the wifi signalling.

An operating system includes a kernel, and usually a lot of extra things too and it’s the baseline software meant for making the system actually usable to humans. For example: the MacOS operating system includes a whole graphical desktop environment, it includes Finder, and a lot of other things. The MacOS graphical desktop isn’t in the kernel – the kernel is just for managing the hardware and coordinating things between it – but it is software bundle with the system meant to enable a human user to actually use the thing.

UNIX was an operating system made at Bell Labs decades ago, but today UNIX is more of a “flavour” for other operating systems. Basically: UNIX was so popular a load of people copied it, and the original UNIX is basically dead, so today “UNIX” just means an operating system that fully embraces a lot of how UNIX originally worked. Often it means a system is [POSIX](https://en.wikipedia.org/wiki/POSIX) compliant – POSIX was basically an effort to make an official standard based off of UNIX so that all these many operating systems that were aping UNIX could all agree on some baseline features so that software written for one UNIX-flavour OS can generally work on any other.

Linux is technically not an operating system, it’s just a kernel. It’s routinely bundled with other software like [the GNU toolchain](https://en.wikipedia.org/wiki/GNU_toolchain) in to so called “Linux distributions” that are a full-fledged operating system.

Anonymous 0 Comments

UNIX is a generally family of operating systems that are built on the same assumptions, but not necessarily the same code.
This is things like Linux, BSD, OS X, etc. If something is programmed for one Unix system, you can probably compile it for another Unix system with minimal modifications. This is not the case for porting to a DOS system like Windows.

Linux is a specific class of Unix which is basically “Linus’s Unix”, it is a open source Unix system who’s development is lead by Linus Torvalds.

At the core of Linux, is the Kernel, this is the core of the OS. If it is built on the Kernel, it IS Linux, but the Kernel is basically the MINIMUM you can have an OS be, it does not include things people want like a desktop interface. So ontop of the Kernel people build linux Flavors that do include these. Most of which are built on GNU, a minimum usable os.

If a program is written for one flavor of GNU/Linux, it will probably run on another, but getting it to actually work might be tricky as many flavors of linux use different programs and file arrangements.

Anonymous 0 Comments

Linux is a modern operating system. Unix was a precursor operating system (and for bonus points Multics was the precursor to Unix). Both Multics and Unix were made by companies and sold with their hardware, as was the norm for operating systems in the previous century. Only MacOS, another successor from Unix, is still sold under that business model.

In the 1990s, a new business model surfaced, where hardware companies made hardware and operating system software companies made software, Unix was at the forefront of this change. Increasingly, the operating system software market moved to “open source”, where much of the operating system code is widely available for all. This allows many “forks” in the Linux family tree, as specific distributions were tailored to specific users but share the basic core infrastructure.

One part of that core infrastructure is the kernel, the code that provides the services used by the other parts of the operating system. Perhaps file I/O and network I/O need common control blocks to conduct their I/O operations and signal to the scheduler when a process blocked for I/O is ready to run; the kernel provides that control block functionality.

Operating systems have kernels, and other things as well. It’s unlikely that you’d ever want to use just the kernel, and write all the other code yourself, that would not be cost effective. The whole point of open source is to only write the code that’s your unique secret sauce, and share all the other generic code to reduce the maintenance cost.

Anonymous 0 Comments

I would say that Linux is one flavor of Unix, specifically an open source flavor. More technical people will no doubt respond.

Both Unix and Linux have a kernel, which is the lowest level operating system interaction with computer hardware.

Anonymous 0 Comments

Linux is an open source copy of the original Unix. Unix still exists and is what underlies MacOS. Unix is owned by a company. Linux is an open source project that’s freely available to everyone.

Anonymous 0 Comments

UNIX is a category of operating systems, more like a set of standards for those operating systems to meet to be nominally interoperable. Linux is a UNIX operating system. A kernel is the core of the operating system that talks to the hardware.

Anonymous 0 Comments

A lot of talk about GNU and it has its place. UNIX was kernel and software. GNU had a kernel – GNU Mach micro kernel, which is very interesting if your so inclined.

Gnu also had a lot of good user land apps. So good that back in the day if you were a Sun Microsystems admin the first thing you did was install gnu apps because Unix apps lacked features or were non existent.

Or Try HPUX sometime.. ugg.

In short Unix gave you what they thought you wanted, linux/gnu gave you freedom

Now OpenStep from Next (Steve Jobs post apple venture) was more BSD than unix. It became apples os of choice.

BeOS was a true modern OS, but Openstep (macos) killed it. It lives on as HaikuOS.

Anonymous 0 Comments

Building on top of what everyone else has said, for a long time there were two kinds of UNIX: sysv5 which grew out of the original UNIX developed by Bell labs, and BSD which grew out of Berkeley.

Your big commercial unixes like SunOS and Irix were based on sysv5. There were smaller commercial offerings like BSD/OS from BSD that had a much nicer userland.

Linux more closely followed the sysv5 model, but the gnu user land had a lot of the niceties of BSD.

There is also something called POSIX which is a set of standards that describe what it means to be UNIX. While UNIX is a specific commercial code base that licenses out its code to other companies to build whole OSes, POSIX publishes specification for developers to follow.

Happy hacking!