Thursday, April 16, 2015

about Shell

The shell is a user program or it is an environment provided for user interaction. It is a command language interpreter that executes commands read from the standard input device such as keyboard or from a file. The shell gets started when you log in or open a console (terminal). it's a quick and dirty way to execute utilities. The shell is not part of system kernel, but uses the system kernel to execute programs, create files etc.

Several shells are available for Linux including:
  • BASH ( Bourne-Again SHell ) - Most common shell in Linux. It's Open Source.
  • CSH (C SHell) - The C shell's syntax and usage are very similar to the C programming language.
  • KSH (Korn SHell) - Created by David Korn at AT & T Bell Labs. The Korn Shell also was the base for the POSIX Shell standard specifications.
  • TCSH - It is an enhanced but completely compatible version of the Berkeley UNIX C shell (CSH).
Please note that each shell does the same job, but each understands different command syntax and provides different built-in functions.

Shell Prompt
There are various ways to get shell access:
  • Terminal - Linux desktop provide a GUI based login system. Once logged in you can gain access to a shell by running X Terminal (XTerm), Gnome Terminal (GTerm), or KDE Terminal (KTerm) application.
  • Connect via secure shell (SSH) - You will get a shell prompt as soon as you log in into remote server or workstation.
  • Use the console - A few Linux systems also provides a text-based login system. Generally you get a shell prompt as soon as you log in to the system.

Linux distributions

Ubuntu is probably the most well-known Linux distribution. Ubuntu is based on Debian, but it has its own software repositories. Much of the software in these repositories is synced from Debian’s repositories. The Ubuntu project has a focus on providing a solid desktop (and server) experience, and it isn’t afraid to build its own custom technology to do it. Ubuntu used to use the GNOME 2 desktop environment, but it now uses its own Unity desktop environment. It offers releases every six months, with a more stable LTS (long term support) release every two years.

Mint is a Linux distribution built on top of Ubuntu. It uses Ubuntu’s software repositories, so the same packages are available on both. Originally, Mint was an alternative distribution loved mainly because it included media codecs and proprietary software that Ubuntu didn’t include by default. This distribution now has its own identity. You won’t find Ubuntu’s own Unity desktop here — instead, you get a more traditional Cinnamon or MATE desktop. Mint takes a more relaxed approach to software updates and won’t automatically install critical software updates. 

Debian is an operating system composed only of free, open-source software. The Debian project has been operating since 1993 — over 20 years ago! This widely respected project is still releasing new versions of Debian, but it’s known for moving much more slowly than distributions like Ubuntu or Linux Mint. This can make it more stable and conservative, which is ideal for some systems. Ubuntu was originally founded to take the core bits of stable Debian and improve on them more quickly, packaging the software together into a user-friendly system that’s more frequently updated.

Fedora is a project with a strong focus on free software — you won’t find an easy way to install proprietary graphics drivers here, although third-party repositories are available. Fedora is bleeding edge and contains the latest versions of software.
Unlike Ubuntu, Fedora doesn’t make its own desktop environment or other software. Instead, the Fedora project uses “upstream” software, providing a platform that integrates all this upstream software without adding their own custom tools or patching it too much. Fedora comes with the GNOME 3 desktop environment by default, although you can also get “spins” that come with other desktop environments. Fedora is sponsored by Red Hat, and is the foundation for the commercial Red Hat Enterprise Linux project. Unlike RHEL, Fedora is bleeding edge and not supported for long. If you want a more stable release that’s supported for longer, Red Hat would prefer you use their Enterprise product.

Red Hat Enterprise Linux is a commercial Linux distribution intended for servers and workstations. It’s based on the open-source Fedora project, but is designed to be a stable platform with long-term support. Red Hat uses trademark law to prevent their official Red Hat Enterprise Linux software from being redistributed. However, the core software is free and open-source. CentOS is a community project that takes the Red Hat Enterprise Linux code, removes all Red Hat’s trademarks, and makes it available for free use and distribution. It’s a free version of RHEL, so it’s good if you want a stable platform that will be supported for a long time. CentOS and Red Hat recently announced they’re collaborating, so CentOS is now part of Red Hat itself.

openSUSE is a community-created Linux distribution sponsored by Novell. Novell purchased SuSE Linux in 2003, and they still create an enterprise Linux project known as SUSE Linux Enterprise. Where Red Hat has the Fedora project that feeds into Red Hat Enterprise Linux, Novell has the openSUSE project that feeds into SUSE Linux Enterprise. Like Fedora, openSUSE is a more bleeding edge version of Linux. SUSE was once one of the great user-friendly desktop Linux distributions, but Ubuntu eventually took that crown.


Architecture

Linux Operating System Architecture
Linux System Architecture is consists of following layers
  • Hardware layer - Hardware consists of all peripheral devices (RAM/ HDD/ CPU etc).
  • Kernel - Core component of Operating System, interacts directly with hardware, provides low level services to upper layer components.
  • Shell - An interface to kernel, hiding complexity of kernel's functions from users. Takes commands from user and executes kernel's functions.
  • Utilities - Utility programs giving user most of the functionalities of an operating systems.

Components of Linux System

Linux Operating System has primarily three components
  • Kernel - Kernel is the core part of Linux. It is responsible for all major activities of this operating system. It is consists of various modules and it interacts directly with the underlying hardware. Kernel provides the required abstraction to hide low level hardware details to system or application programs.
  • System Library - System libraries are special functions or programs using which application programs or system utilities accesses Kernel's features. These libraries implements most of the functionalities of the operating system and do not requires kernel module's code access rights.
  • System Utility - System Utility programs are responsible to do specialized, individual level tasks.
Linux Operating System

Important features of Linux

Following are some of the important features of Linux Operating System.
  • Portable - Portability means softwares can works on different types of hardwares in same way.Linux kernel and application programs supports their installation on any kind of hardware platform.
  • Open Source - Linux source code is freely available and it is community based development project. Multiple teams works in collaboration to enhance the capability of Linux operating system and it is continuously evolving.
  • Multi-User - Linux is a multiuser system means multiple users can access system resources like memory/ ram/ application programs at same time.
  • Multiprogramming - Linux is a multiprogramming system means multiple applications can run at same time.
  • Hierarchical File System - Linux provides a standard file structure in which system files/ user files are arranged.
  • Shell - Linux provides a special interpreter program which can be used to execute commands of the operating system. It can be used to do various types of operations, call application programs etc.
  • Security - Linux provides user security using authentication features like password protection/ controlled access to specific files/ encryption of data.

History in brief

We could say that the history of Linux originates in 1991 and has started with the work of Linus Torvalds. He  started work on Linux while he was a student at the University of Helsinki, Finland. He wanted to create a UNIX-like kernel so that he could use the same kind of operating system on his home PC that he used at school.  Linus managed to combine everything that he had learnt from the previous landmark systems into a kernel that has managed to impress the entire world.  He managed to give birth to a free terminal emulator that relied on MINIX and based on UNIX. On 25 August, he posted his famous message on the MINIX Newsgroup.
Although Torvalds stated that Linux was written for the 386 processor and probably wasn’t portable, others persisted in encouraging (and contributing to) a more portable approach in the early versions of Linux. By October 5, Linux 0.02 was released with much of the original assembly code rewritten in the C programming language, which made it possible to start porting it to other machines.
The Linux kernel was the last — and the most important — piece of code that was needed to complete a whole UNIX-like operating system under the GPL. So, when people started putting together distributions, the name Linux and not GNU is what stuck.

The non-profi t Open Source Development Labs, renamed the Linux Foundation after merging with the Free Standards Group (http://www.linuxfoundation.org), which employs Linus Torvalds, manages the direction today of Linux development efforts. Its sponsors list is like a Who’s Who of commercial Linux system and application vendors, including IBM, Red Hat, SUSE, Oracle, HP, Dell, Computer Associates, Intel, Cisco Systems, and others. The Linux Foundation’s primary charter is to protect and accelerate the growth of Linux by providing legal protection and software development standards for Linux developers.

Why Linux?

  • Firstly Linux is affordable, often it’s completely free.
  • The best feature of Linux operating systems is its low susceptibility to virus and malware infestation. The system is very difficult for viruses to get through. You also don’t need to constantly do updates to the virus program or scan your computer regularly; the system filters them out on its own without any effort from yourself.
  • Linux is an open source platforms with plenty of developers working on applications, functions, features and add-ons that are guaranteed to improve your user experience.
  • The biggest advantage about Linux is how versatile it is. You can customize it to suit your needs. There are developers around the world that are constantly working on improving the system, so you can download add-ons and updates when you want to. Another thing that Linux has going for it is the speed. It’s faster to boot up and run than any of the other operating systems available. It’s fast to open programs and boot up, making it a firm favorite for many PC users.
  • There are lots of open source programs to work with Linux, which are free. They have their own word processing package, spreadsheet package and internet browser software. This means you can have all the benefits you would get with any of the other operating systems completely free.