You are on page 1of 5

Authors: Amandeep Singh Kochhar & Nakul Goyal What Is UNIX Operating system? What Is UNIX?

In the narrowest senses UNIX is a time-sharing operating system kernel: a program that controls the resources of a computer and allocates them among its users. It lets users run their programs; it controls the peripheral devices and it provides the file system that manages the long-term storage of information. In the broader sense, it is often taken to include not only the kernel but also essential programs like compilers, editors, command languages etc. Still more broadly, it may even include programs developed by you and other users. The UNIX system is full duplex system: the characters that you type on the keyboard are sent to the system which sends them back to the terminal to be printed on the screen. The UNIX system primarily contains three components: 1.) The user. 2.) The Shell. 3.) The kernel. The user means you who is using the operating system to fulfill the needs. The shell means the interface between the user and the kernel. A user never directly talks to the kernel because it is pretty difficult to do that. Of course you would never like to talk to the kernel in assembly language or so making your job harder and time consuming. The shell does this job for you i.e. it interacts with the kernel. Introduction To Redhat Linux Linux an Nix operating system has all its inherent properties from open UNIX projects. Like all other UNIX like systems it is a flavor of UNIX system and is most widely accepted worldwide at present. In only less than a decade of its development it has gained worldwide recognition in all phases of this Industry. Linus Torvalds of the University of Helsinki in Finland originally created Linux. In the year 1991 Linux was made public. Linus made the source code freely available and encourage others to freely develop it further. The current stable version of Linux is 2.2.515. Much of the software is developed by Free Software Foundations GNU project. It is therefore free.

Amandeep Singh Kochhar Nakul Goyal

: kochhar77@yahoo.com : nakul@cwsteam.com

Authors: Amandeep Singh Kochhar & Nakul Goyal Advantages Of Linux The Linux have following advantages over UNIX: 1.) Linux is free. 2.) Linux can run on as little as 150Mb of space and can run on as little as 2 Mb of Ram. 3.) Full Multitasking OS. 4.) A portion of the hard disk can be used as the Ram thus creating room for virtual Ram. 5.) It have got windows like X-Windows system. 6.) It uses standard TCP/IP protocols. 7.) The source code is freely available. Why To Use Redhat Linux There are several reasons to use Redhat Linux: 1.) It is based on current stable Kernel version. 2.) It has got great documentation to work on. 3.) Redhat package manager is included to update the utilities or to delete the utilities. 4.) Source Code is Included. 5.) Red Hat is considered as the most secure Operating System The File System Interestingly everything in UNIX is a file whether it be your keyboard, your terminal, your hard disk or your Ram. Here we will cover most of the details of using the file system- what files are, how they are represented, directories and file system hierarchy, permissions inodes and device files. Basically a file is a sequence of bytes. Magnetic tapes, mail messages, characters typed on the keyboard, line printer output, data flowing in the pipes each of these is just a sequence of bytes as far as the system and the programs in it are concerned. The best way to know about files is to create a one by yourself. There are several editors in Linux which you can use to create or to edit the files. The most commonly used are PICO and VI. We will be working with the file systems in our next lecture. Logging On to a system: You can log onto a Linux system providing it your credentials. The credentials are your username and your password. When you log onto the system your working directory becomes /home/$Username where $Username is your user. You can work around with your files and directories in your working directory. Working in your directory does not Amandeep Singh Kochhar Nakul Goyal : kochhar77@yahoo.com : nakul@cwsteam.com

Authors: Amandeep Singh Kochhar & Nakul Goyal hinder the functionality of the system so you can play around with the system as and when you want. Permissions: Every file has a set of permissions associated with it, which determines what one can do with the file. But there is a user superuser who can do everything with any file. There are three types of file permissions a file can have: 1.) Read permissions. (Denoted by r, numeric value=4) 2.) Write Permissions. (Denoted by w, numeric value = 2) 3.) Executable Permissions. (Denoted by x, numeric value = 1) Let us take an example of a file: -rwxrw-r-test day testing

The above string rw-rw-r- -indicates the permissions. You must note that there are 10 bits representing the permissions. The first bit tells that whether it is a file or a directory. If the fist bit is d, it denotes a directory. In the above case testing is a file. The second, third and the fourth bit denotes that there are read,write and executable permissions to the owner of the file which in this case is test. The fifth and sixth bit denotes that there are only read and write permissions to the group to which this file belongs to which in this case is day. The eighth bit denotes that others have only read permissions to the file. Make sure that only the owner of the file can change the permissions of the file and no one else. So, the file is denoted by Permissions string The Directory hierarchy: The directory hierarchy in an orderly way starting from the top: / bin boot dev etc lib tmp unix usr Amandeep Singh Kochhar Nakul Goyal : kochhar77@yahoo.com : nakul@cwsteam.com Owner group Filename.

Authors: Amandeep Singh Kochhar & Nakul Goyal These are the main directories that are in the unix system. Bin: (binaries) It is the basic directory where the basic binary programs such as who and ed resides. Dev: (devices) It is the directory where the device files such as printers, harddisks etc are placed. Etc: (etcetera): It contains various administrative files such as the password files. Lib: (library) It contains the parts and libraries of the C compiler. Tmp: (temporaries): It is a repository for short-lived files created during execution of the program. Usr: (user): It is called the user File system. Using the Shell: The Shell- the programs that interprets your requests to run programs- is the most important program for most UNIX users. There are mainly the following shells: ash ash.static bash bash2 bsh csh ksh pdksh rsh sh zsh /bin/sh /bin/ash.static /bin/bash /bin/bash2 /bin/bsh /bin/csh /bin/ksh /usr/bin/pdksh /usr/bin/rsh /bin/sh /bin/zsh

Introduction to Some Commands: Some commands with which you will feel working with the UNIX system are as under: These are the very basic implementation of the commands for more options of the commands Ls: List the files and the directory. Who: displays who is logged in to the machine. Date : Specifies the system date. Amandeep Singh Kochhar Nakul Goyal : kochhar77@yahoo.com : nakul@cwsteam.com

Authors: Amandeep Singh Kochhar & Nakul Goyal Echo: echoes the typed matter onto the terminal. Mail: sends mail to the specified sender. telnet: telnets you onto the specified machine. Cat: reads and displays the file output. Wc; word count. Chmod: change Mode Chown : Change ownership. Mv: move or rename the file. Cp : copy the file. Vi: the text editor. Cd : Change directory. Pwd: Present working directory. Mkdir: Make directory. Touch: Creates the file with zero bytes. Grep: finds a pattern in a particular file. Find: finds a file or a directory in the unix system hierarchy. Diff: finds the difference between files.

Amandeep Singh Kochhar Nakul Goyal

: kochhar77@yahoo.com : nakul@cwsteam.com

You might also like