No, the title does not include a typographical error. I really DO mean “the power and the gory“. Gory as in “horrific”. So…yeah. This post is about the decided ambivalence of a basic decision about Unix architecture that has dogged me (and, it must be assumed), many others, my entire life. But first let’s define what we’re talking about. For this, I will rely on this site (and refer to the image):
The main concept that unites all versions of UNIX is the following four basics:
Kernel: The kernel is the heart of the operating system. It interacts with hardware and most of the tasks like memory management, tash scheduling and file management.
Shell: The shell is the utility that processes your requests. When you type in a command at your terminal, the shell interprets the command and calls the program that you want. The shell uses standard syntax for all commands. C Shell, Bourne Shell and Korn Shell are most famous shells which are available with most of the Unix variants.
Commands and Utilities: There are various command and utilities which you would use in your day to day activities. cp, mv, cat and grep etc. are few examples of commands and utilities. There are over 250 standard commands plus numerous others provided through 3rd party software. All the commands come along with various optional options.
Files and Directories: All data in UNIX is organized into files. All files are organized into directories. These directories are organized into a tree-like structure called the filesystem.
Clearly the shell is essential, as it is what you interact with directly to get work done. And yet you have a plethora of choices. And therein lies both the power and the gory. Let me break it down for you:
Well, OK, I admit that I’m drawing blanks here. I don’t quite get why you would want a shell that has fewer features than some other shell. Really I don’t. So, why shouldn’t there be one definitive shell that has all the possible features you might want? I really don’t know. So if you do, please enlighten me in the comments section below. I would appreciate it. Really I would.
I can’t remember exactly when I got my first Unix account, but it was likely in 1986, when I started at UC Berkeley for my library degree. I had completed a minor in Computer Science at Humboldt State University in 1985, but most of that work was in Pascal and FORTRAN on various operating systems such as Harris. By the time I first made the acquaintance of Unix, I was in the basement of a monstrous building on the UC Berkeley campus called Evans Hall. After logging in to my first Unix account, I discovered I couldn’t log out.
I got a message that was something like “Not in login shell.” I can remember to this day my dismay and confusion. What was a shell? Why couldn’t I log out? At the time you were charged for your login time, so my fear was getting charged for login time after I was long gone. Desperate to logout, eventually I kept trying and that (of course) did the trick. But back then it was all a mystery. To some degree, it still is. What is a shell and why do I need to choose? Why would I want one shell over another?
I started in c shell (csh), but over time migrated to bash. And of course, how one accomplishes certain things are just slightly different, but different enough to make you stumble and fall. Thank you, Unix. Is this really necessary?
So here is one comparison of shells and what they support:
Now I’m wondering if I shouldn’t switch to z shell (zsh) since it appears to support the most options of them all. But…why? Unix, how many ways can you be arcane?