LearnWithShobhan

A short history of Unix, Linux and Bash: why developers use them (and not Command Prompt)

Shobhan Biswas··5 min read
>_From the course CLI Mastery: 57 lessons, lifetime access.

"Why do developers prefer Mac and Linux?" and "why does this tutorial use Bash and not PowerShell?" have the same answer, and it starts in a lab in the 1960s. Knowing the family tree explains why commands, file paths and shells look the way they do, and why a server you rent tomorrow will feel familiar.

Before Unix: every machine had its own system

In the 1950s computers were room-sized, and programs went in on punch cards. (The punch card era and the invention of the terminal are told in Terminal vs shell.) An important problem was that the operating system was written for one specific machine. A program written for one vendor's computer could not run on another's, and each new machine meant starting again.

1969: Unix

In 1969, at Bell Labs, Ken Thompson and Dennis Ritchie created Unix. The idea was a generalised, portable operating system. In the early 1970s it was rewritten in C, the programming language Ritchie created, which made it possible to move Unix to different hardware by compiling it, instead of rewriting it. That decision changed computing: C is still everywhere, and Unix's design ideas shaped almost everything after.

Some of those ideas are exactly what you meet in the terminal:

The 1980s: personal computers and two families

In the 1980s computers moved to homes and offices. MS-DOS (1981) was Microsoft's operating system for the IBM PC. It was also text-based, with a terminal and a command shell, but much simpler than Unix. Windows (1985) put a graphical interface on top of it, and Microsoft went on to dominate the desktop. The commands, the C:\ drive letters and the backslash paths all come from the DOS side.

Apple took a different route. Macs got a graphical interface in 1984, and in the 2000s macOS was rebuilt on a Unix foundation derived from BSD Unix (through NeXT, the company Apple bought). That is why a Mac Terminal feels like a Linux one.

So two families formed:

Unix familyMS-DOS family
Linux, AndroidWindows
macOSCommand Prompt and PowerShell
Shells: Bash, ZshDifferent commands and paths
Made for programmers and serversMade for desktops and office software

1991: Linux

Unix was a commercial product, and it was expensive. In 1991 a Finnish student, Linus Torvalds, started writing his own Unix-like kernel, from scratch, and released it for free. Developers around the world started contributing. That kernel is Linux. (Strictly, Linux is the kernel, and distributions such as Ubuntu or Debian bundle it with other software.)

Because it was free and open, it spread: to web servers, to the cloud, to phones (Android uses the Linux kernel), to routers, to cars. When you launch a server on AWS, most of the time it runs Linux.

Bash: the shell that came with it

A shell is the program that reads the commands you type (the shell and terminal difference is in this post). The original Unix shell was the Bourne shell (sh). In 1989, for the GNU project, Brian Fox wrote a free replacement and named it Bash, "Bourne Again SHell". It became the default on Linux, and it is what most scripts, tutorials and cloud documentation assume.

Today:

  • Linux: Bash is the usual default.
  • macOS: Zsh has been the default since 2019 (Catalina). It is very close to Bash for everyday use, which is why this site's tutorials work in both.
  • Windows: Command Prompt and PowerShell are different languages. You can get Bash on Windows with WSL (Windows Subsystem for Linux) or Git Bash.

So why do developers use Mac and Linux?

You can build software on any system, and many developers use Windows. But if you do cloud, backend or DevOps work, the Unix family has real advantages:

  • Your servers run Linux. The commands you use on your laptop are the commands you use on the machine you deploy to.
  • Tools assume it. Docker, Git, Node, Python, the AWS CLI and most guides are written with Bash in mind.
  • Everything can be scripted. Because small tools combine, a repeated job becomes a script.
  • Transparency. You can see and change how the system is configured, with text files.

If you are on Windows, you do not have to switch: install WSL, and you get a real Linux shell next to your Windows apps.

What to take from it

You do not need to memorise the dates. Remember the shape: Unix gave us the design, Linux made it free and everywhere, macOS built on it, and Bash is the shell that came with that world. When something in the terminal looks odd, it is usually an idea from 1969 that still earns its place.

Key takeaways

  • ✓Unix (1969, Bell Labs) was written to be portable, and rewritten in C in the early 1970s.
  • ✓Linux (1991) is a free Unix-like kernel. macOS is built on BSD Unix. Windows comes from the MS-DOS family.
  • ✓Bash (1989) is the GNU replacement for the Bourne shell. macOS now defaults to Zsh, which behaves much the same.
  • ✓Servers and the cloud run mostly Linux, so Unix-family tools match what you deploy to.
  • ✓On Windows, use WSL to get a real Linux shell.

Learn the shell that runs the cloud

CLI Mastery teaches the Unix command line from the ground up: files, permissions, processes, pipes, scripting, and a real Linux server on AWS that you log in to over SSH. 57 lessons, lifetime access. You can start with the free lesson on terminals and shells.

Free download

Linux command line cheat sheet

One printable page: navigation, files, permissions, pipes, processes, scripts and SSH.

Occasional emails with new tutorials and courses. Unsubscribe any time.

Keep reading