home » articles » Difference Between Unix and Windows Shell

Difference Between Unix and Windows Shell

change text size: A A A

12/26/2008 by vivek_iit

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!

To rate this article please register or login

Author

vivek_iit vivek_iit (Member since:11/27/2008)
I am one of the administrators at CodeAsp.Net and I love programming, architecting solutions, code reviews, teaching and writing about ASP.NET.

Comments (no comments yet)

Post a comment

Comment (No HTML)  

Type the characters:
 *
 
   

Related articles

  • Story of two Textboxes
    This story tells the reader the difference between different types of controls and the importance of Viewstate; Author: Vivek Thakur; Section: ASP.NET;

Join CodeAsp.Net for FREE Today!

It's fast, easy and free! Submit articles, get your own blog, ask questions & give answers in the forums, and become a better developer, faster.

enter your email address:

Latest Articles RSS Feed

Latest Articles

  • Hi Friends, Many times we came cross the requirement when we need to access the dropdownlist's selectedindexchanged event inside the gridview, like in a shopping cart changing the item's quantity or binding the other dropdown based on the first dropdown.
  • This is the approach that I have adopted to develop Expandable / Collapsible Panel Control through JavaScript. Please report bugs, errors and suggestions to improve this control.
  • This is my approach to develop custom JavaScript ListBox control. Although it is only a subset of existing HTML ListBox element, it is more user friendly than the existing one. It can be further customized for different requirements. Please let me know about bugs and/or errors & give suggestions to improve this ListBox control.
  • I have tried my best to make this user control code error free. I will most welcome suggestions for further improvement in this user control. I have tested this user control on various browsers and it works fine.
  • So, this is my approach to implement an ASP.NET slide show using the DataList. I have tried my best to keep it bug free. I will most welcome suggestions and criticism for further improvements of this user control. I have tested this user control on various browsers and it works fine.
  • As we all knows that Repeater and DataList does not have auto paging support technique like Gridview or Datagrid, but we can achieve this through PagedDataSource. By using PagedDataSource we can implement paging in Repeater or DataList. Now in our mind there is question arise what is PagedDataSource. PagedDataSource is a class which encapsulates
  • So this is my approach. I was working for a long time to create C# like event handlers for JavaScript classes and finally, I’ve done it. Please let me know of any bugs and suggestions to improve this context menu control.
  • So this is my solution. If you have some other ideas about this functionality, please share them with me.
  • I have tried my best to make this code error free. Suggestions and criticism for further improvements of this code are most welcome.
  • So this is the approach that I've adopted to solve the Hover Delay problem. Although originally I developed Hover Delay to deactivate the click event for 1 second on a GridView row, later I also used Hover Delay to deactivate Drag n Drop of GridView rows. Kindly let me know if any one has some other better or different solution.
  • In this article I will explain how to import data from EXCEL to SQL in ASP.NET . In many situations we have data in the form of excel sheet but we have the requirement to have that data in SQL SERVER DB. I have explained importing data both from Excel 97-2003 as well as Excel 2007 format.
  • The source code shows how to use Regular Expressions in C#. The code Functions written for Validation Alphabet, AlphaNumeric, Integer, Postive Integer, Floating point numbers. You just cut copy these functions and use in any program.
  • That’s all about this technique. Just download the sample application and happy CSS! I have tested this application on various browsers and it worked fine.
  • This script is cross-browser compatible and fast as it iterates elements of a specific tag inside a target element [GridView] rather than iterating in a whole form. It searches the elements of a specific type in a particular column of the target element [GridView].
  • This Article is used to insert a numeric value on the sever control(text box) This is a java script code for the the client side validation. On Page Load Event You can change the events in txtNoOfQuestion.Attributes.Add("onkeypress", "return numericOnly(this);"); like onfocus events like other according to needs.
  • I have toggled visibility of all TD elements of a GridView column in order to create an illusion of smooth dynamic effect with the help of setTimeout method through recursion. Different browsers have different effects of Expanding / Collapsing GridView Columns. In Internet Explorer 7/8, Safari, Google Chrome and Opera, it seems that columns are Exp
  • In this article, I've used the setTimeout method in order to achieve a smooth expand/collapse functionality.
  • Introduction I am going to present here a functionality that selects / deselects all checkboxes of a particular column inside a GridView control, provided the header checkbox of that column is checked or unchecked using JavaScript. This functionality also has a feature that when all checkboxes of a particular column inside the GridView are check
  • This article describes how to toggle the states of all CheckBoxes inside a particular DataGridView column.
  • This article describes how to apply client-side mouse over & mouse out effects on the GridView’s rows.