Basic Concept of Unix Operating System
Hello Everyone,
Today I will discuss about basic concept of unix and in next blog I will come up with unix commands and basic shell program. Please read this blog carefully to understand about Unix Operating System Basic concept so that it will be easy for you to understand several commands in unix as well as shell program. Let’s understand about Unix operating System and its structure. Unix is the most powerful and popular multi-user and multi-tasking Operating System, Unix is an operating system code is written in C language rather than a assembly language. Unix is Hardware independence as UNIX applications can be easily moved to other UNIX machines. Porting is usually as simple as transfer of the source and a recompile .Unix is a Productive environment for software development and it’s a versatile command language and distributed processing and multi tasking. operating system software can be easily moved from one hardware system to another.
Note : Through Putty or other tools we can simply access the unix server by using IP address or host name.
Through putty we can access the server and can write shell and other programming language and also uses of unix command but first we need to understand the component of Unix. Another tools also available to access Unix through host name or also we can access directly unix operating system by installing it . Several flavors of unix is used nowadays like HP-UX , AIX, Solaris,Linux etc
Components of Unix is as Below:
1. Kernel
Kernel is the core of the UNIX system. kernel of UNIX is the hub of the operating system it allocates time and memory to programs and handles the file store and communications in response to system calls. Manages the entire resources of the system, presenting them to you and every other user as a coherent system. Provides service to user applications such as device management, process scheduling, etc.Functions performed by the kernel are: Managing the machine's memory and allocating it to each process. Scheduling the work done by the CPU so that the work of each user is carried out as efficiently as is possible. Accomplishing the transfer of data from one part of the machine to another. Kernel basically used for interpreting and executing instructions from the shell enforcing file access permissions.
Note: kernel is responsible for memory management, process and task management, and disk management. The kernel connects the system hardware to the application software. Every operating system must have Kernel as it’s a central module of OS (Operating System)
2. Shell
When you login to a Unix system you are placed in a shell program. The shell's prompt is usually visible at the cursor's position on your screen. In Simple word shell acts as an interface between the user and the kernel. When a user logs in, the login program checks the username and password, and then starts another program called the shell .Shell is a command interpreter it takes each command and passes it to the operating system kernel to be acted upon , then it displays the results of this operation on your screen. Shells are usually available on any UNIX system, each with its own strengths and weaknesses.
Different users may use different shells. Admin team will supply a default shell, which can be overridden or changed. The most commonly available shells are Bourne shell (sh),C shell (csh),Korn shell (ksh) etc.
Note: The shell keeps a list of the commands you have typed in. If you need to repeat a command, use the cursor keys to scroll up and down the list or type history for a list of previous commands.
Main features of UNIX are that it includes a variety of small programs to meet various needs. Typically, each of these programs does one thing and does it well. Unix Modular design allows the functionality of small programs to be mixed and matched. When you become more familiar with UNIX, you will find that this design provides you great flexibility and power to accomplish almost any task. Typically these programs operate on top of the shell, but they may also interface directly with the kernel.
3. File : In Unix everything is either files or process . In Simple word file is a collection of data whereas process is an executing program identified by unique id (PID) process identifier. We can check several process running in the system and for each process we will get unique ID that is PID.
Directory Structure in Unix : Here I will discuss only important Directories not full structure
Root : The top of the hierarchy is traditionally called root we can use as cd /. Once we issue this command we will be in root directory .In root directory all the files is contained within this directory.
Bin : Bin stands for “binaries” and contains certain fundamental utilities, which are generally needed by all users .
Boot : Boot mainly contains all the files that are required for successful booting process.
dev : Stands for “devices”. Contains file representations of peripheral devices and pseudo-devices.
etc : It contains system-wide configuration files and system databases.
home : Home directories for all the users.
lib : lib contains system libraries, and some important files such as kernel modules or device drivers.
mnt : Known as “mount”. Contains filesystem mount points. Mainly used for remote (network) filesystems, CD-ROM/DVD drives etc.
root : The home directory for the superuser is “root” – that is administrator. This account’s home directory is usually on the initial filesystem, and not in home directory. In case specific maintenance needs to be performed, during which other file systems are not available.
tmp : Used as temporary files. Systems clear this directory upon startup .In this case its contents do not survive a reboot.
usr : Original directory holding user home directories.Some user accounts may still have a home directory that is a direct subdirectory of usr.
/usr/bin : This directory stores all binary programs distributed with the operating system not residing in /bin etc.
Apart from this several directories you can able to see in directory structure of unix .The UNIX files system contains several different types of files .
You can use cd / command to go and check each directory.
Note : If you login to unix system you have so many commands to check the directories and process. Like ls command for showing all the files , ls –ltr command which will show you all the files and directory with timestamp . In next blog I will discuss about unix command and basic idea about shell script.
Please go through this blog carefully as in next blog I will come up with important commands used in unix and also some basic shell programs which is useful for you if you are preparing for interview and also you can gain hands on experience in Unix . Commands is very similar to other flavors such as Linux , HP-UX , AIX , Solaris etc. If you have any questions on this let me know.
Thanks.
It is very useful for me. Thanks...
ReplyDeleteAzure Data Factory Online Training
Azure Data Factory Live Online Training