Saturday, August 20, 2011

Basic Linux For Beginners

Overview of UNIX operating system

UNIX is a multi-user, multitasking operating system from AT&T that runs on a wide variety of computer systems. It is relatively simple to use and to administer, and also has a high degree of security. UNIX is written in C programming language, which was also developed at AT&T’s Bell Laboratories.

Popular UNIX systems are

AIX (on IBM), HP-UX (on HP), Linux, OSF/1 (on DEC), Solaris (SUN)
Dennis Ritchie and Thompson developed UNIX operating system in 1973.

GNU (Gnu is not UNIX)

Richard Stallman launched the GNU (Gnu is not UNIX) project, which focused on creating a UNIX like operating system that could be freely distributed. As a vehicle in support of the GNU, Stallman and others created the Free Software foundation (FSF) in 1984

The FSF prompts free software, but free software is not necessarily cost free software. The FSF intends the word free in the sense of freedom. Free software is software with which you can do the following
• Use for any purpose
• Study to learn how it works, and adapt meet your needs
• Copy and redistribute
• Distribute as part of an improved software system

GPL (GNU General Public License)

Perhaps the most significant contribution of the GNU project is a license known as GNU general public license or simply the GNU GPL.

UNIX / LINUX OS STRUCTURE

The UNIX OS consists of three layers. The inner most layer or kernel containing a process scheduler and a mechanism for process to communicate with each other. The middle layer of OS is called the shell, the layer that a use interfaces with. This layer containing the command interpreter which decodes and carrier out user entered commands. The outer most layer containing programming tools such as editors, assemblers, compilers, debuggers etc and application programs such as accounting packages.











Fig 1 (Unix/Linux OS Structure)


KERNEL

The core of the UNIX system is the kernel the operating system program. The kernel controls the computer’s resources allotting them to different users and to different tasks. It interacts directly with the system hardware, thus making the programs easy to write and portable across different platforms of hardware. The kernel does not deal directly with a user. Instead, it starts up a separate, interactive program, called a shell, for each user

• Controls user access by checking every login attempt for a legitimate user ID and password
• Manages program execution allocating memory and CPU time to every process, and assigning to them
• Manages file system
• Runs and manages the shell through which you converse with the OS
• Carries out the exchange of data between memory, processor, and source or destination devices like printers, tapes, and so on

SHELL
Shell is the UNIX system command processor. The shell accepts commands from the user, interprets them, and passes them on to the operating system for processing.

The shell is itself a program, run automatically by the kernel for every user each time he or she logs in. It’s the shell’s job to

• Let you know it’s ready to work, that is to allow you to enter commands
• Accepts commands you type
• Accept what the kernel produces as a result
• Return those results to you
• Let you know that it’s ready to move on to the next command

Types of shells

The shell urns like any other program under the UNIX system.

Bourne shell.

This is the original command processor developed at AT&T and named after its developer. Stephen R. Bourne. This is the official shell that is distributed with UNIX systems. The Bourne shell is the fastest UNIX command processor available and can be used on all UNIX systems. The Bourne shell is the most widely used shell at present. The executable file name is sh.

Bash.
The Bourne-again shell. It is similar to the korn shell

C shell
This is another command processor developed by William joy and others at the University of California at Berkeley, and gets its name from its programming language which resembles the c programming language in syntax. The executable file-name is esh

Korn shell
Developed by David Korn, this combines the best features of both the above shells. The executable file name is ksh

Rc
A small compact shell with a strong C flavour but without a command line editing or job command

Tcsh
An enhanced version of the C shell

Zsh
A large shell that seems to offer all the features present in all the other shells.

Linux Kernel

In the early days of UNIX, universities used UNIX as a vehicle for teaching compute science students about operating systems. When AT&T asserted is proprietary claims to UNIX, university needed a replacement. Andrew Tunnenbaum created a UNIX like operating system called Minix, which became popular as a teaching tool. However, unlike UNIX, Minix was designed primarily as educational tool and performed relatively poorly.
In 1990, Finnish computer science student Linus Torvald began work on a memory manager for Intel architecture PCs. At some point he realized that his work could be extended to operate as a UNIX kernel. In august 1991, he posted his work-in-progress to the internet newsgroup comp.os.minix, inviting others to request features to be considered for implementation.


Torvalds called his operating system kernel Linux, for Linus’s Minix. Unix programmers eagerly offered help in developing Linux. Because Stallman’s GNU project had completed almost all of the components needed for its UNIX like operating system except the kernel, Linux and gnu were a natural marriage. In 1994
about three years after Torvalds posting, Linux 1.0 was released under the terms of GPL.

Linux kernel is numbered using even/odd system. An even number kernel- for example, Linux 2.2-is called stable kernel. Changes are generally made to a stable kernel only to fix bugs and problems. An odd numbered kernel-for example, Linux 2.3 is called a development kernel. Development kenels are works-in-progress and some times contains bugs, some of which are serious. Most Linux users work with stable kernel.

Linux kernel available in http://www.kernel.org/

What is Linux?

Linux is an Operating System, which acts as a communication service between the hardware (or physical equipment of a computer) and the software (or applications which use the hardware) of a computer system.
The Linux Kernel (the core, much like a popcorn kernel) contains all of the features that you would expect in any Operating System. Some of the features included are:
• Multitasking (a technique for sharing a single processor between several independent jobs)
• Virtual Memory (allows repetitive, extended use of the computer's RAM for performance enhancement)
• Fast TCP/IP Drivers (for speedy communication)
• Shared Libraries (enable applications to share common code)
• Multi-user Capability (this means hundreds of people can use the computer at the same time, either over a network, the Internet, or on laptops/computers or terminals connected to the serial ports of those computers).
• Protected Mode (allows programs to access physical memory, and protects stability of the system)
Benefits of Linux

Linux can give you:

 A modern, very stable, multi-user, multitasking environment on your inexpensive PC hardware, at no (or almost no) monetary cost for the software. Linux is a rich and powerful platform--don't think of it as a "poor people" operating system. Out-of-box Linux has as much capability as MS Windows NT with $5000 in


software add-ons, is more stable, and requires less powerful hardware for comparable tasks.

 Unsurpassed computing power, portability, and flexibility. A Linux cluster recently (April 1999) beat a Cray supercomputer in a standard benchmark. Linux is VERY standard--it is essentially a POSIX compliant UNIX. (Yes, Linux is a best-of-the-breed UNIX. The word "UNIX" is not used in conjunction with Linux because "UNIX" is a registered trademark.) Linux is most popular on Intel-based PCs (price), but it runs very well on numerous other hardware platforms, from toy-like to mainframes.

 Connectivity to Microsoft, Novel, and Apple proprietary networking. Reading/writing to your DOS/MS Windows and other disk formats. This includes "transparent" use of data stored on the MS Windows partition of your hard drive(s).

 Dozens of excellent and free, general-interest applications.

 Thousands of free applets, tools, and smaller programs. "Small is beautiful" goes well with Linux philosophy.

 Scores of top-of-the line commercial programs including WordPerfect and all the big databases (e.g., Oracle, Sybase, but no Microsoft's). Many (most?) of these are offered free for developers and for personal use.

 State-of-art development platform with many best-of-the-kind programming languages and tools coming free with the operating system. Access to all the operating system source codes, if you require it, is also free.

 Freedom from viruses, software manufacturer "features", invasion of privacy, forced upgrades, licensing and marketing schemes, high software prices, and pirating. How is this? Linux has no viruses because it is too secure an operating system for the viruses to spread with any degree of efficiency. The rest follows from the open-source and non-commercial nature of Linux.
The operating platform that is guaranteed "here-to-stay". Since Linux is not owned, it cannot possibly be put out of business. The Linux General Public License (GPL) insures that development and support will be provided as long as there are Linux users.

No comments: