Loading ...

This article aims to discuss the true meaning of a shell in both Unix and Windows | CodeAsp.Net

Difference Between Unix and Windows Shell

  • 0
    /5
    Avg: 0/5: (0votes)
  • (0)
  • (54795)
Published: 12/26/2008 by Vivek Thakur

Introduction

I was giving a technical lecture to some of my students and explaining them the differences between Unix/Linux (*nix in general) and MS Windows. One of the most common queries/misunderstanding among students and new developers alike is the meaning of word “shell”.

 

So I thought of writing this article to share with people what I think shell is and in case I am wrong, my fellow peers can correct me and this article can become the source of a sensible debate too.

 

I have worked on various versions of both *nix and Windows. Let me start with *nix first.

 

A Unix OS can be said of being composed of 3 broad layers:

 

  1. Kernel can be said as the core of the system, which is wrapping the hardware.
  2. Then there are lot of command line programs, which can be used by external users for varios day to day functions like making a directory (mkdir), copying files (cp),  networking utilities (traceroute) etc. These are also known as system calls.
  3. Now, how do the users use utilities in #2? From where do they access and run them? This is where the “shell” comes into picture.

Shell

 

Shell, as a noun in English, means some outer covering. Basically shell can be said as an outer surface covering/hiding something.

 

Coming back to its technical definition:

 

The shell in unix is “hiding” the complex enitities Kernel and command line utilities. It basically gives the end user an environment to run and execute the system methods, accept input and show the output.

 

Also, when I think of a shell, I think of command line only. Shell is empty, just an environment, nothing more, no GUI. A *nix shell is very powerful and has its own scripting language (shell scripts). Unlike DOS, it has supports advance features like pipes, multi-users etc.

 

Now let’s come to Windows. We don’t have shell in Windows as the OS was developed with heavy stress on GUI. Though one can say that the GUI of windows itself acts like a shell, but the very nature of a Unix shell makes it difficult to club windows GUI “shell” on the same lines. Initially, Windows did not have much command line equivalents of its GUI tools (such as Computer Manager etc). Lately in Windows 2003 many such tools are being provided. But strictly speaking, the word shell is not the OS.

 

What Unix has are system calls, but Windows have only library calls (wrapped by the API), though I have read somewhere that Win NT has a secret native API also, which is undocumented. system calls are different from library calls as in system calls interact directly with the kernel whereas library calls are simply wrappers around such system calls. This is also a very important difference between Windows and *nix systems.


MS has blurred the line b/w the end user applications and the OS.

An Operating system’s main function is to abstract the hardware. In windows OS the distinction between the OS, utilities and the shell is blurred, with the GUI tools functioning both “as a shell” and a utility combined. DOS is similar to a shell but is much “weaker” (single user, single thread).

 

So IMHO, if someone says that a Windows Shell and a Unix shell have almost the same functions, or are similar in approach, I think he/she is conceptually wrong. We cannot compare the tyre pressure of a Car with that of a steam engine (since it does not exist!).

 

This is why with Windows Vista, MS is introducing a full fledged shell, the PowerShell (code named monad).

 

Summary

 

A Unix shell is an environment where users can run various command line utilities and interact with the OS. But Windows has no shell at all. For the purpose of interacting with OS, it has an interactive GUI. Shell originated with Unix, and we should not try to mix it with Windows GUI.

 

Let me know various views on this!

 

Comments (no comments yet)

Top articles

Related articles

Quick Vote

What kind of email newsletter would you prefer to receive from CodeAsp.Net?