You are on page 1of 5

Operating Systems

CSCI03I04 Lab 1

Windows vs. UNIX:

People select windows over UNIX because they know nothing about it and cannot support or maintain it. UNIX costs less legally becauseit's an open source. Microsoft support is in addition to the software, therefore costs extra. UNIXs almost absolute use of a command line prompt means that anything you do on a UNIX prompt you can automate just as you do it manually.
Security - Linux is Open Source Software, while Windows is not. The simplest benefits of Open Source Code to demonstrate are: Increased security, reliability and functionality; Because users of Open Source are readily able to identify and correct problems with the programs and to submit their own enhancements for incorporation into the program. Closed Source systems enjoy none of those benefits. Reliability - The architecture of Linux is superior to Windows because critical operation system functions are implemented in such a way that buggy programs can't cause the computer to become unstable and crash. Support - For persons not familiar with the Open Source Community, the quality of free technical support on the internet may come as a shock. Sometimes knowing enough to ask the right questions can be a problem, but overall the best is there to assist you at no charge when you run into problems that can't be solved by reading the documentation included with Linux. With Windows or other commercial software, your manufacturer support is only free for a limited time and is often of little value anyways. Not Single Source Software - Linux is distributed by several companies, giving consumers to pick and choose the flavor that best suits their needs. Windows is the product of a single company, Microsoft Corporation. Windows users have no choice but to accept what Microsoft offers.

PS: Linux is an open source, free to use operating system widely used for computer hardware and software, game development, tablet PCS, mainframes etc. UNIX is an operating system commonly used in internet servers. (Like Windows 7 and Windows server 2000)

OS shell:
An operating system shell is a software component that presents a user interface to various operating system functions and services. The shell is so called because it is an outer layer of interface between the user and the operating system (the kernel)

On Unix-based or Linux-based operating systems, a shell can be invoked through the shell command in the command line interface (CLI), allowing users to direct operations through computer commands, text or script. Your interface to the operating system is called a shell. The UNIX shell program translates user commands, which are either directly entered by the user, or which can be read from a file called the shell script or shell program. Shell scripts are interpreted (translated), not compiled. The shell reads commands from the script line per line and searches for those commands on the system, while a compiler converts a program into machine readable form, an executable file - which may then be used in a shell script. Apart from passing commands to the kernel, the main task of a shell is providing a user environment.

UNIX system will usually offer a variety of shell types:

sh or Bourne Shell:
The original shell still used on UNIX systems and in UNIX-related environments. This is the basic shell, a small program with few features. While this is not the standard shell, it is still available on every Linux system for compatibility with UNIX programs.

bash or Bourne Again shell:


The standard shell, intuitive and flexible. Probably most advisable for beginning users while being at the same time a powerful tool for the advanced and professional user.commands that work in sh, also work in bash. However, the reverse is not always the case

csh or C shell:
The syntax of this shell resembles that of the C programming language. Sometimes asked for by programmers.

tcsh or TENEX C shell:


A superset of the common C shell, enhancing user-friendliness and speed. That is why some also call it the Turbo C shell.

ksh or the Korn shell:


Sometimes appreciated by people with a UNIX background. A superset of the Bourne shell; with standard configuration a nightmare for beginning users.

Difference between GUI and CLUI: GUI:


They're easier to use A picture is worth a thousand words

Command-line user interfaces (CLUIs):


Still have their place Easier to build a simple CLUI than a simple GUI Higher action-to-keystroke ratio Once you're over the learning curve Easier to see and understand what the computer is doing on your behalfwhich is part of what this course is about. Most important: it's easier to combine CLUI tools than GUI tools Small tools, combined in many ways, can be very powerful. Manages a user's interactions with the operating system by: Reading commands from the keyboard Executing those commands... ...or running another program Displaying the output

Example: Type pwd (short for "print working directory") to find out where you are. most Unix commands have equally cryptic names

$ pwd/home/hpotter/swc Thentype ls (for "listing") to see what's in the current directory $ lsLICENSE.txtconf data docs index.swclicense.swc print.css swc.css testsMakefile config.mk depend.mk imglec press sites swc.dtd util

When you type a command like ls, the OS: Reads characters from the keyboard. Passes them to the shell (because it's the currently active window). The shell: Breaks the line of text it receives into words Looks for a program with the same name as the first word See in a moment how the shell knows where to look Runs that program That program's output goes back to the shell... ...which gives it to the OS... ...which displays it on the screen (Actually, the OS hands it to the window manager, which takes care of the display)

All well-designed software systems work this way: Break the task down into pieces. Write a tool that solves each sub-problem. Hook them up. Allows you to: Develop and test components independently Replace or re-use components incrementally Add new components as you go along

Here are some commands in UNIX:

^h, backspace ^q ^c

erase previously typed character continue writing to terminal kill currently running program and allow clean-up before exiting

^u erase entire line of input so far typed ^z suspend currently running job; ^\ emergency kill of currently running program with no chance of cleanup

man cat cd clear cp date diff echo grep head ls

Documentation for commands. Concatenate and display text files. Change working directory. Clear the screen. Copy files and directories. Display the current date and time. Show differences between two text files. Print arguments. Print lines matching a pattern. Display the first few lines of a file. List files and directories.

mkdir more mv od pwd rm rmdir sort tail uniq wc

Make directories. Page through a text file. Move (rename) files and directories. Display the bytes in a file. Print current working directory. Remove files. Remove directories. Sort lines. Display the last few lines of a file. Remove adjacent duplicate lines. Count lines, words, and characters in a file.

You might also like