New Document
Unix first phase

Originally, Unix was meant to be a programmer's workbench to be used for developing software to be run on multiple platforms[5] more than to be used to run application software. The system grew larger as the operating system started spreading in the academic circle, as users added their own tools to the system and shared them with colleagues

Unix was designed to be portable, multi-tasking and multi-user in a time-sharing configuration. Unix systems are characterized by various concepts: the use of plain text for storing data; a hierarchical file system; treating devices and certain types of inter-process communication (IPC) as files; and the use of a large number of software tools, small programs that can be strung together through a command line interpreter using pipes, as opposed to using a single monolithic program that includes all of the same functionality. These concepts are collectively known as the Unix philosophy. Kernighan and Rob Pike summarize this in The Unix Programming Environment as the idea that the power of a system comes more from the relationships among programs than from the programs themselves."

Unix operating systems are widely used in servers, workstations, and mobile devices.The Unix environment and the client-server program model were essential elements in the development of the Internet and the reshaping of computing as centered in networks rather than in individual computers.

  • Unix was originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Douglas McIlroy, and Joe Ossanna.

  • There are various Unix variants available in the market. Solaris Unix, AIX, HP Unix and BSD are few examples. Linux is also a flavour of Unix which is freely available.

  • Several people can use a UNIX computer at the same time; hence UNIX is called a multiuser system.

  • A user can also run multiple programs at the same time; hence UNIX is called multitasking.

Unix Architecture:

Here is a basic block diagram of a UNIX system:

Unix Architecture

The main concept that unites all versions of UNIX is the following four basics:

  • Kernel: Kernel - source code in /usr/sys, composed of several sub-components: conf - configuration and machine-dependent parts, including boot code dev - device drivers for control of hardware (and some pseudo-hardware) sys - operating system "kernel", handling memory management, process scheduling, system calls, etc. h - header files, defining key structures within the system and important system-specific invariables .

  • Shell: The shell is the utility that processes your requests. When you type in a command at your terminal, the shell interprets the command and calls the program that you want. The shell uses standard syntax for all commands. C Shell, Bourne Shell and Korn Shell are most famous shells which are available with most of the Unix variants.

  • Commands and Utilities: There are various command and utilities which you would use in your day to day activities. cp, mv, cat and grep etc. are few examples of commands and utilities. There are over 250 standard commands plus numerous others provided through 3rd party software. All the commands come along with various optional options.

  • Files and Directories: All data in UNIX is organized into files. All files are organized into directories. These directories are organized into a tree-like structure called the filesystem.

System Bootup:

If you have a computer which has UNIX operating system installed on it, then you simply need to turn on its power to make it live.

As soon as you turn on the power, system starts booting up and finally it prompts you to log into the system, which is an activity to log into the system and use it for your day to day activities.

Login Unix:

When you first connect to a UNIX system, you usually see a prompt such as the following:

To log in:
  1. Have your userid (user identification) and password ready. Contact your system administrator if you don't have these yet.

  2. Type your userid at the login prompt, then press ENTER. Your userid is case-sensitive, so be sure you type it exactly as your system administrator instructed.

  3. Type your password at the password prompt, then press ENTER. Your password is also case-sensitive.

  4. If you provided correct userid and password then you would be allowed to enter into the system. Read the information and messages that come up on the screen something as below.

login : amrood
amrood's password:
Last login: Sun Jun 14 09:32:32 2009 from

You would be provided with a command prompt ( sometime called $ prompt ) where you would type your all the commands. For example to check calendar you need to type cal command as follows:

$ cal
	 June 2009
Su Mo Tu We Th Fr Sa
	1  2  3  4  5  6
 7  8  9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

Change Password:

The passwd command in effect on the UNIX systems at the University of Virginia enforces the selection of passwords which are not easily guessed. You must know your current password. To change your password while logged onto a UNIX machine, type: passwd To see the possible command line options, type: man passwd If no options are given, actions are as follows: The name that the user logged in as is determined. If an entry for the user exists in the NIS (Network Information Service) passwd database, the password field in that entry is changed. Online help is displayed if "?" is typed in response to the prompt for a new password. The help file (the file you are now reading) is displayed with "more", unless the user selects another command (and possible options) via the PAGER environment variable.

  1. To start, type passwd at command prompt as shown below.

  2. Enter your old password the one you're currently using.

  3. Type in your new password. Always keep your password complex enough so that no body can guess it. But make sure, you remember it.

  4. You would need to verify the password by typing it again.

Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Note: I have put stars (*) just to show you the location where you would need to enter the current and new passwords otherwise at your system, it would not show you any character when you would type.

Listing Directories and Files:

All data in UNIX is organized into files and, are organized into directories. These directories are organized into a tree-like structure called the filesystem.

You can use ls command to list out all the files or directories available in a directory. Following is the example of using ls command with -l option.

3dtree.jpg         command_memos      mj.ultra           temp
HTMLBgnrGuide.txt  dead.letter        pgpdriver          unpgp
News               dead.letter.bak    pine        
TUTORIAL           info.listserv      pinerc016899    
baen.txt           jim.kirk.letters   print.txt
bin                junk               public_html
calendar           mail               rexx

Output from ls -la Command
total 1600
drwx---s-x  11 picard   STAFF       1536 Jun 26 14:49 .
dr-xr-sr-x1300 bin      bin        20480 Jun 26 12:06 ..
-rw-------   1 picard   STAFF        948 Jun 06 09:46 .addressbook
-rw-------   1 picard   STAFF       3368 Jun 06 09:46
-rw-------   1 picard   STAFF        193 Apr 02 10:06 .article
-rw-------   1 picard   STAFF       1035 May 20 12:30 .bash_history
drwx---S--   2 picard   STAFF        512 Jun 23 13:56 .mailpgp
-rw-------   1 picard   STAFF     128654 Jun 10 19:19 .newsrc
drwx------   4 picard   STAFF        512 May 29 07:01 .pgp
-rw-------   1 picard   STAFF      10196 Jun 26 14:33 .pinerc
-rwxr-xr-x   1 picard   STAFF       1047 May 27 14:15 .plan
-rw-------   1 picard   STAFF         35 Jun 17 09:23 .profile
-rw-------   1 picard   STAFF        371 Sep 08 1995  .signature
-rw-------   1 picard   STAFF      81691 Jun 20 10:34 3dtree.jpg
-rw-------   1 picard   STAFF      31156 Jan 03 10:19 HTMLBgnrGuide.txt
drwx---s-x   2 picard   STAFF        512 Apr 01 13:26 News
-rw-------   1 picard   STAFF      11760 Jul 23 1995  TUTORIAL
-rw-------   1 picard   STAFF        234 Feb 02 08:18 baen.txt
drwx---s-x   2 picard   STAFF        512 Mar 12 06:57 bin
-rw-------   1 picard   STAFF         71 Jul 31 1995  calendar
-rw-------   1 picard   STAFF     338912 May 02 1995  command.memos
-rw-------   1 picard   STAFF        747 Jun 24 13:12 dead.letter
-rw-------   1 picard   STAFF      10506 Jun 01 12:42 info.listserv
-rw-------   1 picard   STAFF     698675 Nov 01 1995  jim.kirk.letters
-rw-------   1 picard   STAFF        122 Jun 24 13:28 junk
drwx------   2 picard   STAFF       1536 Jun 25 12:40 mail
-rw-r-----   1 picard   STAFF       1397 May 28 12:50 mj.ultra
drwx---s-x   2 picard   STAFF        512 May 26 21:09 pine
-rw-------   1 picard   STAFF       1716 Jul 23 1995  print.txt
drwxr-sr-x   6 picard   STAFF       1024 Mar 27 10:54 public_html
drwx---s-x   3 picard   STAFF        512 Mar 31 07:24 rexx
drwx---s-x   2 picard   STAFF        512 Aug 08 1995  temp
-rwx--x--x   1 picard   STAFF        368 May 28 14:10 unpgp

Here enteries starting with d..... represent directories. For example uml, univ and urlspedia are directories and rest of the enteries are files.

Who Are You?

While you're logged in to the system, you might be willing to know : Who am I?

The easiest way to find out "who you are" is to enter the whoami command:

$ whoami


Try it on your system. This command lists the account name associated with the current login. You can try who am i command as well to get information about yourself.

Who is Logged In?

Sometime you might be interested to know who is logged in to the computer at the same time.

There are three commands are available to get you this information, based on how much you'd like to learn about the other users: users, who, and w.

$ users
 amrood bablu qadir

$ who
amrood ttyp0 Oct 8 14:10 (limbo)
bablu  ttyp2 Oct 4 09:08 (calliope)
qadir  ttyp4 Oct 8 12:09 (dent)


Try w command on your system to check the output. This would list down few more information associated with the users logged in the system.

Logging Out:

When you finish your session, you need to log out of the system to ensure that nobody else accesses your files while masquerading as you.

To log out:
  1. Just type logout command at command prompt, and the system will clean up everything and break the connection

Shutdown the machine immediately

way to shut down a Unix system properly is:

# shutdown -h now

Broadcast message from sathiya@sathiya-laptop
	(/dev/pts/1) at 11:28 ...

The system is going down for halt NOW!
haltBrings the system down immediately.
init 0Powers off the system using predefined scripts to synchronize and clean up the system prior to shutdown
init 6Reboots the system by shutting it down completely and then bringing it completely back up
poweroffShuts down the system by powering off.
rebootReboots the system.
shutdownShuts down the system.

You typically need to be the superuser or root (the most privileged account on a Unix system) to shut down the system, but on some standalone or personally owned Unix boxes, an administrative user and sometimes regular users can do so.


Back to Top