SlideShare a Scribd company logo
1 of 42
INTRODUCTION TO UNIX
UNIT 1
CONTENTS
INTRODUCTION TO
UNIX:
 History
 Features of UNIX
 UNIX System Architecture
 UNIX Session
 Linux System
 UNIX Command Format
 Types of UNIX Commands
 General Purpose Commands.
WHY TO STUDY THIS SUBJECT ?
 You could be required to learn it as part of a course
requirement. Especially, if you are pursuing a degree in
Computer Science or Information Technology.
 Sometimes UNIX is the only operating system installed in
certain lab computers in universities.
 Other reasons to learn UNIX are to create and store files for
World Wide Web pages.
 For some issues, a UNIX command is much faster and
easier.
 There are a lot of things that a GUI tool does not allow. In
these cases UNIX could be your saviour!.
 Another reason could be the ability to view invisible files
and copying music to your hard drive from a popular mp3
player :-)
 But the most important reason to learn UNIX is the simple
fact that it is a powerful tool!
WHAT IS AN OPERATING SYSTEM?
o The operating system (OS) is the program which starts up when
you turn on your computer and runs underneath all other
programs - without it nothing would happen at all.
 In simple terms, an operating system is a manager. It manages
all the available resources on a computer, from the CPU, to
memory, to hard disk accesses.
 Tasks the operating system must perform:
 Control Hardware - The operating system controls all the parts of the
computer and attempts to get everything working together.
 Run Applications - Another job the OS does is run application
software. This would include word processors, web browsers, games,
etc...
 Manage Data and Files - The OS makes it easy for you to organize
your computer. Through the OS you are able to do a number of things
to data, including copy, move, delete, and rename it. This makes it
much easier to find and organize what you have.
WHAT IS UNIX?
An Operating System (OS)
Mostly coded in C
Machine independence
It provides a number of facilities:
 management of hardware resources
 directory and file system
 loading / execution
1.1 HISTORY
 The UNIX was originated in Bell Laboratory of AT & T in
1969 by Ken Thompson and Dennis Ritchie.
 In 1960, the Massachusetts Institute of Technology, AT &
T Bell Labs, and General Electric company worked on
an experimental Operating system called Multics.
(Multpexed Information and Computing Service). Since
the progress was not sufficient, AT & T pull out of the
Multics project in 1969.
 In 1969, Ken Thompson and Dennis Ritchie developed
an OS called UNICS(Uniplexed Information and
Computing System). Later the name Unics was changed
to UNIX.
• Result- Designed completely in assembly language
• Was not portable.
HISTORY (CONTD…)
 Thompson- implemented-high level language-by B
 Result: was not satisfied.
 Dennis Ritchie developed high level language- “C”
 Both developed a new multi-tasking OS, now known
as UNIX.
 In 1973, unix was rewritten by C Language and
licensed version was made available to Universities
and commercial firms
 In 1980s companies began to offer commerical
versions of UNIX system for their own mini-
computers and workstations.
HISTORY (CONTD…)
 In 1982, Microsoft developed its first UNIX system
for 16-bit microcomputer called Xenix.
 In 1991 the Linux was developed, which was based
on UNIX.
 Linux is an open source program. Its source code
are available freely. Red Hat Linux is one of the
most popular flavors of Linux.
 In 2005, Sun Microsystems released OpenSolaris.
Which is based on UNIX System V.
HISTORY
1.3 UNIX SYSTEM COMPONENTS
 The Three major components of UNIX system is:
1. Kernel
2. Shells and GUIs
3. File Sytem
1.3.1 KERNEL
 Kernel is the Hub of the OS.
 It has complete control over everything that occurs in
the system.
 Interacts directly with the hardware through device
drivers.
 The kernel itself does not interact directly with the user,
but rather interacts with the shell and other programs as
well as with the hardware devices on the system,
including the processor (also called the central
processing unit or CPU), memory and disk drives.
 When the system is booted, the Kernel gets loaded into
memory and communicates directly with the hardware.
1.3.1 KERNEL
The functions of kernel are:
 File management
 Process management
 Memory management
 Converting data from user level to machine level
 CPU scheduling
 Dealing with hardware devices
 Programs interact with the kernel through system calls--
a request for the operating system to do something on
behalf of the user's program. The system calls are
functions used in the kernel itself.
 For example, open system call can open both file and a
device
1.3.2 SHELLS AND GUIS
 The shell acts as an interface between user and the
kernel.
 Even though there’s only one kernel running on the
system, there could be several shells in action-one for
each user who is logged in.
 The shell acts as a command interpreter, which
interprets the user commands and transfer them to the
kernel for execution.
 There are several types of shells available.
The most popular are:
 Bourne shell(sh)
 C shell (csh)
 Korn shell (ksh)
 Bourne Again shell (bash)
Linux supports two forms of command inputs:
1. Through textual command line shells such as Bourne
shell, bash, C shell.
2. Through Graphical User Interface(GUIs)such as the
KDE( K Desktop Environment) and GNOME window
manager.
FEATURES OF UNIX
 Multi-User: more than one user can use the machine at a
time supported via terminals.
There are several terminals that can be connected to the
server:
1)Dumb Terminal:-only keyboard and mouse, no hard disk or
memory.
2)Terminal Emulator:-Consists of own memory, microprocessor
and disk drive.
3) Dial-in Terminal:-connect to server with telephone lines.
 Multi-tasking: more than one program can be run at a time.
 Communication: The communication may be within the
network of a single main computer or between two or more
such computer networks. The users can easily exchange mail,
data programs through such networks. Distance posses no
barrier for passing information or messages to and fro.
FEATURES OF UNIX
 SECURITY: Unix has 3 inherent provisions for
protecting data.
i) Assign passwords and login name to users area.
ii)Provide read, write and execute permission to each
file.
iii)Encrypt files into an unreadable format, and
decrypting the file is also possible.
o PORTABILITY: Unix is a highly portable OS. It can
be ported to a variety of hardware platforms with
little or no modification.
UNIX SYSTEM ARCHITECTURE
UNIX SYSTEM ARCHITECTURE
GRAPHICAL USER INTERFACES (GUIS)
 When you logon locally, you are presented with
graphical environment.
 You start at a graphical login screen. You must
enter your username and password. You also the
have the option to choose from a couple session
types. Mainly you have the choice between Gnome
and KDE.
 Once you enter in your username and password,
you are then presented with a graphical
environment that looks like one of the following...
GNOME
KDE
COMMAND LINE INTERFACE
 You also have access to some UNIX servers as
well.
 You can logon from virtually any computer that has
internet access whether it be Windows, Mac, or UNIX
itself.
 In this case you are communicating through a
local terminal to one of these remote servers.
 All of the commands actually execute on the remote
server.
 It is also possible to open up graphical applications
through this window, but that requires a good bit
more setup and software.
THE TERMINAL
 The Built-in System Utilities - are programs that allow
a user to perform tasks which involve complex actions.
Utilities provide user interface functions that are basic to
an operating system, but which are too complex to be
built into the shell. Examples of utilities are programs
that let us see the contents of a directory, move & copy
files, remove files, etc...
 For example grep command finds the matching text in
files, wc counts the number of words, lines, and bytes
inside a file.
 Application Software & Utilities – these are not part of
the operating system. They are additional programs
that are bundled with the OS distribution, or available
separately like an image viewer, c++ compiler, ms office
package and so on….
1.3.3 FILE SYSTEM
 The UNIX file system is a major components and is
organized in a hierarchical manner.
 In Unix, everything including hardware devices is
treated as a file. It may be a program, a file, a
directory or a sub-directory.
 Unix file system can be local or distributed.
 Local file system can store and manage their data
directly through the system.
1.4 UNIX SESSION
 Unix is security-conscious, and can be used only by
the persons who maintain an account with the
computer system.
 The system administrator is the person who grants
user the authority to use the UNIX by providing
username and password.
 Enter username and password, then your system
will show the $ prompt.
WHEN YOU BOOT THE UNIX MACHINE,
 A background process called init is started along with
other background processes.
 Init, in turn starts another process called getty (get
terminal) for every terminal.
 The getty in turn start the login process and presents
the login prompt on the user terminal.
 Once the user has given the correct username and
password, a program called the shell starts to run at
your terminal and keeps running until you terminate the
session. The shell displays the prompt and accepts all
input from the keyboard.
 When the UNIX session is completed, the user logs
out. The init process, starts a new getty on that
terminal, so that a new user can login into the system.
1..4.1 SHELL PROMPT
 On logging in successfully into a UNIX system, a
prompt called shell prompt appears on the terminal.
The character of the prompt depends on the shell
used.
 $ --- Bourne, Bourne again and Korn shells (sh,
bash, ksh)
 % --- C shell (csh).
 # --- Any shell as root.
1.4.2 LOGGING INTO AND OUT OF UNIX
SYSTEMS
 Text-based(TTY) terminals
When you connect to a UNIX computer remotely
(using telnet): login prompt will be seen:
login:
you should be then prompted for your password.
login: student
password:
Once it is successful, you will be presented with a
shell prompt which looks like: $
To logout, type “exit” or try “logout” or press ctrl-d
 Graphical terminals
1.4.3 CHANGING YOUR PASSWORD
 The UNIX command to change the password is
passwd.
$passwd
 The system will prompt to,
--old password
-- new password
-- reconfirm
 To be Remembered:
1) Avoid character which will not appear on all
keyboard.
2) Avoid dictionary words or words related to personal
details.
3) Make it atleast 7 to 8 character long and try to use a
mix of letters, numbers and punctuation.
1.5 LINUX SYSTEM
 Linux is a free open source UNIX OS that was
developed in 1991 by Linus Torvalds, a Finnish
undergraduate student.
 Open source means that the source code of Kernel
is freely available.
 As linux became popular, different streams have
emerged like Redhat, Fedora, SUSE Linux..
1.6 UNIX COMMAND FORMAT
 A UNIX command line consists of the name of the UNIX
command followed by its arguments.
 $ command -option targets
where,
command – is the name of the built-in shell commands.
option – is a special argument normally preceded by a
minus sign to differentiate it from file names.
targets – are the filenames and/or expressions which are
part of the argument list.
GENRAL FEATURES OF UNIX COMMAND/ RULES APPLIED TO
UNIX COMMAND
1. All unix commands must be entered in lower case letters.
2. Between the command name and options, there must be a space.
However, there should not be a space between – and option.
3. A format specifier can be associated with a unix command by using
the + character.
4. A UNIX command can contain zero, one or more number of
arguments.
5. Most of the UNIX command are short forms. Example:
cat command – concatenation
ls command – listing
6. To abandon a command, press ctrl+D
7. Multiple options can be used with a command, they can be
combined with a single – sign
$ls –l –a –t
$ls -lat
8. When a unix command contains more than 80
characters and overflows to the next line, it is indicated
by a special prompt >, which appears at the beginning of
the next line. This special prompt is known as
secondary prompt.
9. multiple commands can be given on a single line by
separating the commands with semicolon.
EX: $wc note; ls –l note
10. Unix allows users to type a command at any time, even
though the system is already executing an earlier
command in the background.
1.7 TYPES OF UNIX COMMAND
External Command:
 These commands exists independently as a separate file.
 The shell searches for command files using a system variable
called the PATH variable and executes it.
 Most UNIX command are external in nature.
 Example: cat or ls
Internal Command/ Built-in commands:
 These commands do not exists independently. They are part
of another program.
 For example, echo command is an internal command built
into the shell.
1.8 GENERAL PURPOSE COMMANDS
echo:--- To Display A Message
 It is used in shell scripts to display messages on the
terminal or as a message prompt for user input.
 It takes zero, one or more arguments.
 The arguments can be series of individual symbols
or a string within double quotes(“ “).
Command Output Details
$echo Displays a blank line.
$echo $shell /bin/bash Displays the name of
the shell being used
$echo UNIX PROGRAMMIG UNIX
PROGRAMMING
$echo UNIX PROGRAMMING UNIX
PROGRAMMING
$echo ”unix programming” Unix programming
PRINTF – FORMATTED OUTPUT
 Syntax : printf “format_string”
 It is an alternative to echo and used to write
formatted output.
 It is an external command.
 The “format_string” is a combination of textual
message, escape sequence and format
specifications.
 It does not insert a blank line automatically until and
unless the n is used explicitly.
 $printf “Invalid inputn”
 $printf “two separaten linesn”
 $printf “curren shell is %s n”$shell
UNAME
 uname command displays features of the operating
system running on you machine.
 By default, it displays the name of operating
system.
 Syntax: uname [options]
Option Purpose
-m Prints the machine hardware name.
-n It tells hostname
-r Print the operating system release level
-s Print the name of the operating system
-v Print the operating system version
WHO
 Who command provides the login details of all the
current users in 3 column format
 The first column shows the login name.
 The second column shows the device names of the
terminals, and
 The third column shows the login date and time.
CHAPTER 1 INTRODUCTION TO UNIX.pptx

More Related Content

Similar to CHAPTER 1 INTRODUCTION TO UNIX.pptx

Unix seminar
Unix seminarUnix seminar
Unix seminarajeet6742
 
Introduction to unix (1).pptx
Introduction to unix (1).pptxIntroduction to unix (1).pptx
Introduction to unix (1).pptxvirat834293
 
Programming and problem solving 3
Programming and problem solving 3Programming and problem solving 3
Programming and problem solving 3sushruth kamarushi
 
UNIT II-Programming in Linux
UNIT II-Programming in LinuxUNIT II-Programming in Linux
UNIT II-Programming in LinuxDr.YNM
 
Unix Operating System
Unix Operating SystemUnix Operating System
Unix Operating Systemsubhsikha
 
Unix and shell programming | Unix File System | Unix File Permission | Blocks
Unix and shell programming | Unix File System | Unix File Permission | BlocksUnix and shell programming | Unix File System | Unix File Permission | Blocks
Unix and shell programming | Unix File System | Unix File Permission | BlocksLOKESH KUMAR
 
Architecture-of-Linux-operating-system.docx
Architecture-of-Linux-operating-system.docxArchitecture-of-Linux-operating-system.docx
Architecture-of-Linux-operating-system.docxVivekGupta920049
 
LinuxOS-1 (1).ppt
LinuxOS-1 (1).pptLinuxOS-1 (1).ppt
LinuxOS-1 (1).pptSavitha74
 

Similar to CHAPTER 1 INTRODUCTION TO UNIX.pptx (20)

Unix seminar
Unix seminarUnix seminar
Unix seminar
 
Introduction to unix (1).pptx
Introduction to unix (1).pptxIntroduction to unix (1).pptx
Introduction to unix (1).pptx
 
Programming and problem solving 3
Programming and problem solving 3Programming and problem solving 3
Programming and problem solving 3
 
3CS LSP UNIT 1-1.pdf
3CS LSP UNIT 1-1.pdf3CS LSP UNIT 1-1.pdf
3CS LSP UNIT 1-1.pdf
 
Linux Introduction
Linux IntroductionLinux Introduction
Linux Introduction
 
Spsl unit1
Spsl   unit1Spsl   unit1
Spsl unit1
 
Operating systems
Operating systemsOperating systems
Operating systems
 
UNIT II-Programming in Linux
UNIT II-Programming in LinuxUNIT II-Programming in Linux
UNIT II-Programming in Linux
 
Unix Operating System
Unix Operating SystemUnix Operating System
Unix Operating System
 
Presentation1.pdf
Presentation1.pdfPresentation1.pdf
Presentation1.pdf
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 
Unix and shell programming | Unix File System | Unix File Permission | Blocks
Unix and shell programming | Unix File System | Unix File Permission | BlocksUnix and shell programming | Unix File System | Unix File Permission | Blocks
Unix and shell programming | Unix File System | Unix File Permission | Blocks
 
Linux
LinuxLinux
Linux
 
Unix case-study
Unix case-studyUnix case-study
Unix case-study
 
Linux
Linux Linux
Linux
 
Characteristic & Aplication of some popular operating system.
Characteristic & Aplication of some popular operating system.Characteristic & Aplication of some popular operating system.
Characteristic & Aplication of some popular operating system.
 
Architecture-of-Linux-operating-system.docx
Architecture-of-Linux-operating-system.docxArchitecture-of-Linux-operating-system.docx
Architecture-of-Linux-operating-system.docx
 
Introduction to unix
Introduction to unixIntroduction to unix
Introduction to unix
 
LinuxOS-1 (1).ppt
LinuxOS-1 (1).pptLinuxOS-1 (1).ppt
LinuxOS-1 (1).ppt
 
training report
training reporttraining report
training report
 

Recently uploaded

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 

Recently uploaded (20)

Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 

CHAPTER 1 INTRODUCTION TO UNIX.pptx

  • 2. CONTENTS INTRODUCTION TO UNIX:  History  Features of UNIX  UNIX System Architecture  UNIX Session  Linux System  UNIX Command Format  Types of UNIX Commands  General Purpose Commands.
  • 3. WHY TO STUDY THIS SUBJECT ?  You could be required to learn it as part of a course requirement. Especially, if you are pursuing a degree in Computer Science or Information Technology.  Sometimes UNIX is the only operating system installed in certain lab computers in universities.  Other reasons to learn UNIX are to create and store files for World Wide Web pages.  For some issues, a UNIX command is much faster and easier.  There are a lot of things that a GUI tool does not allow. In these cases UNIX could be your saviour!.  Another reason could be the ability to view invisible files and copying music to your hard drive from a popular mp3 player :-)  But the most important reason to learn UNIX is the simple fact that it is a powerful tool!
  • 4. WHAT IS AN OPERATING SYSTEM? o The operating system (OS) is the program which starts up when you turn on your computer and runs underneath all other programs - without it nothing would happen at all.  In simple terms, an operating system is a manager. It manages all the available resources on a computer, from the CPU, to memory, to hard disk accesses.  Tasks the operating system must perform:  Control Hardware - The operating system controls all the parts of the computer and attempts to get everything working together.  Run Applications - Another job the OS does is run application software. This would include word processors, web browsers, games, etc...  Manage Data and Files - The OS makes it easy for you to organize your computer. Through the OS you are able to do a number of things to data, including copy, move, delete, and rename it. This makes it much easier to find and organize what you have.
  • 5. WHAT IS UNIX? An Operating System (OS) Mostly coded in C Machine independence It provides a number of facilities:  management of hardware resources  directory and file system  loading / execution
  • 6. 1.1 HISTORY  The UNIX was originated in Bell Laboratory of AT & T in 1969 by Ken Thompson and Dennis Ritchie.  In 1960, the Massachusetts Institute of Technology, AT & T Bell Labs, and General Electric company worked on an experimental Operating system called Multics. (Multpexed Information and Computing Service). Since the progress was not sufficient, AT & T pull out of the Multics project in 1969.  In 1969, Ken Thompson and Dennis Ritchie developed an OS called UNICS(Uniplexed Information and Computing System). Later the name Unics was changed to UNIX. • Result- Designed completely in assembly language • Was not portable.
  • 7. HISTORY (CONTD…)  Thompson- implemented-high level language-by B  Result: was not satisfied.  Dennis Ritchie developed high level language- “C”  Both developed a new multi-tasking OS, now known as UNIX.  In 1973, unix was rewritten by C Language and licensed version was made available to Universities and commercial firms  In 1980s companies began to offer commerical versions of UNIX system for their own mini- computers and workstations.
  • 8. HISTORY (CONTD…)  In 1982, Microsoft developed its first UNIX system for 16-bit microcomputer called Xenix.  In 1991 the Linux was developed, which was based on UNIX.  Linux is an open source program. Its source code are available freely. Red Hat Linux is one of the most popular flavors of Linux.  In 2005, Sun Microsystems released OpenSolaris. Which is based on UNIX System V.
  • 10.
  • 11. 1.3 UNIX SYSTEM COMPONENTS  The Three major components of UNIX system is: 1. Kernel 2. Shells and GUIs 3. File Sytem
  • 12. 1.3.1 KERNEL  Kernel is the Hub of the OS.  It has complete control over everything that occurs in the system.  Interacts directly with the hardware through device drivers.  The kernel itself does not interact directly with the user, but rather interacts with the shell and other programs as well as with the hardware devices on the system, including the processor (also called the central processing unit or CPU), memory and disk drives.  When the system is booted, the Kernel gets loaded into memory and communicates directly with the hardware.
  • 13. 1.3.1 KERNEL The functions of kernel are:  File management  Process management  Memory management  Converting data from user level to machine level  CPU scheduling  Dealing with hardware devices  Programs interact with the kernel through system calls-- a request for the operating system to do something on behalf of the user's program. The system calls are functions used in the kernel itself.  For example, open system call can open both file and a device
  • 14. 1.3.2 SHELLS AND GUIS  The shell acts as an interface between user and the kernel.  Even though there’s only one kernel running on the system, there could be several shells in action-one for each user who is logged in.  The shell acts as a command interpreter, which interprets the user commands and transfer them to the kernel for execution.  There are several types of shells available. The most popular are:  Bourne shell(sh)  C shell (csh)  Korn shell (ksh)  Bourne Again shell (bash)
  • 15. Linux supports two forms of command inputs: 1. Through textual command line shells such as Bourne shell, bash, C shell. 2. Through Graphical User Interface(GUIs)such as the KDE( K Desktop Environment) and GNOME window manager.
  • 16. FEATURES OF UNIX  Multi-User: more than one user can use the machine at a time supported via terminals. There are several terminals that can be connected to the server: 1)Dumb Terminal:-only keyboard and mouse, no hard disk or memory. 2)Terminal Emulator:-Consists of own memory, microprocessor and disk drive. 3) Dial-in Terminal:-connect to server with telephone lines.  Multi-tasking: more than one program can be run at a time.  Communication: The communication may be within the network of a single main computer or between two or more such computer networks. The users can easily exchange mail, data programs through such networks. Distance posses no barrier for passing information or messages to and fro.
  • 17. FEATURES OF UNIX  SECURITY: Unix has 3 inherent provisions for protecting data. i) Assign passwords and login name to users area. ii)Provide read, write and execute permission to each file. iii)Encrypt files into an unreadable format, and decrypting the file is also possible. o PORTABILITY: Unix is a highly portable OS. It can be ported to a variety of hardware platforms with little or no modification.
  • 20. GRAPHICAL USER INTERFACES (GUIS)  When you logon locally, you are presented with graphical environment.  You start at a graphical login screen. You must enter your username and password. You also the have the option to choose from a couple session types. Mainly you have the choice between Gnome and KDE.  Once you enter in your username and password, you are then presented with a graphical environment that looks like one of the following...
  • 21. GNOME
  • 22. KDE
  • 23. COMMAND LINE INTERFACE  You also have access to some UNIX servers as well.  You can logon from virtually any computer that has internet access whether it be Windows, Mac, or UNIX itself.  In this case you are communicating through a local terminal to one of these remote servers.  All of the commands actually execute on the remote server.  It is also possible to open up graphical applications through this window, but that requires a good bit more setup and software.
  • 25.  The Built-in System Utilities - are programs that allow a user to perform tasks which involve complex actions. Utilities provide user interface functions that are basic to an operating system, but which are too complex to be built into the shell. Examples of utilities are programs that let us see the contents of a directory, move & copy files, remove files, etc...  For example grep command finds the matching text in files, wc counts the number of words, lines, and bytes inside a file.  Application Software & Utilities – these are not part of the operating system. They are additional programs that are bundled with the OS distribution, or available separately like an image viewer, c++ compiler, ms office package and so on….
  • 26. 1.3.3 FILE SYSTEM  The UNIX file system is a major components and is organized in a hierarchical manner.  In Unix, everything including hardware devices is treated as a file. It may be a program, a file, a directory or a sub-directory.  Unix file system can be local or distributed.  Local file system can store and manage their data directly through the system.
  • 27. 1.4 UNIX SESSION  Unix is security-conscious, and can be used only by the persons who maintain an account with the computer system.  The system administrator is the person who grants user the authority to use the UNIX by providing username and password.  Enter username and password, then your system will show the $ prompt.
  • 28. WHEN YOU BOOT THE UNIX MACHINE,  A background process called init is started along with other background processes.  Init, in turn starts another process called getty (get terminal) for every terminal.  The getty in turn start the login process and presents the login prompt on the user terminal.  Once the user has given the correct username and password, a program called the shell starts to run at your terminal and keeps running until you terminate the session. The shell displays the prompt and accepts all input from the keyboard.  When the UNIX session is completed, the user logs out. The init process, starts a new getty on that terminal, so that a new user can login into the system.
  • 29. 1..4.1 SHELL PROMPT  On logging in successfully into a UNIX system, a prompt called shell prompt appears on the terminal. The character of the prompt depends on the shell used.  $ --- Bourne, Bourne again and Korn shells (sh, bash, ksh)  % --- C shell (csh).  # --- Any shell as root.
  • 30. 1.4.2 LOGGING INTO AND OUT OF UNIX SYSTEMS  Text-based(TTY) terminals When you connect to a UNIX computer remotely (using telnet): login prompt will be seen: login: you should be then prompted for your password. login: student password: Once it is successful, you will be presented with a shell prompt which looks like: $ To logout, type “exit” or try “logout” or press ctrl-d  Graphical terminals
  • 31. 1.4.3 CHANGING YOUR PASSWORD  The UNIX command to change the password is passwd. $passwd  The system will prompt to, --old password -- new password -- reconfirm  To be Remembered: 1) Avoid character which will not appear on all keyboard. 2) Avoid dictionary words or words related to personal details. 3) Make it atleast 7 to 8 character long and try to use a mix of letters, numbers and punctuation.
  • 32. 1.5 LINUX SYSTEM  Linux is a free open source UNIX OS that was developed in 1991 by Linus Torvalds, a Finnish undergraduate student.  Open source means that the source code of Kernel is freely available.  As linux became popular, different streams have emerged like Redhat, Fedora, SUSE Linux..
  • 33. 1.6 UNIX COMMAND FORMAT  A UNIX command line consists of the name of the UNIX command followed by its arguments.  $ command -option targets where, command – is the name of the built-in shell commands. option – is a special argument normally preceded by a minus sign to differentiate it from file names. targets – are the filenames and/or expressions which are part of the argument list.
  • 34. GENRAL FEATURES OF UNIX COMMAND/ RULES APPLIED TO UNIX COMMAND 1. All unix commands must be entered in lower case letters. 2. Between the command name and options, there must be a space. However, there should not be a space between – and option. 3. A format specifier can be associated with a unix command by using the + character. 4. A UNIX command can contain zero, one or more number of arguments. 5. Most of the UNIX command are short forms. Example: cat command – concatenation ls command – listing 6. To abandon a command, press ctrl+D 7. Multiple options can be used with a command, they can be combined with a single – sign $ls –l –a –t $ls -lat
  • 35. 8. When a unix command contains more than 80 characters and overflows to the next line, it is indicated by a special prompt >, which appears at the beginning of the next line. This special prompt is known as secondary prompt. 9. multiple commands can be given on a single line by separating the commands with semicolon. EX: $wc note; ls –l note 10. Unix allows users to type a command at any time, even though the system is already executing an earlier command in the background.
  • 36. 1.7 TYPES OF UNIX COMMAND External Command:  These commands exists independently as a separate file.  The shell searches for command files using a system variable called the PATH variable and executes it.  Most UNIX command are external in nature.  Example: cat or ls Internal Command/ Built-in commands:  These commands do not exists independently. They are part of another program.  For example, echo command is an internal command built into the shell.
  • 37. 1.8 GENERAL PURPOSE COMMANDS echo:--- To Display A Message  It is used in shell scripts to display messages on the terminal or as a message prompt for user input.  It takes zero, one or more arguments.  The arguments can be series of individual symbols or a string within double quotes(“ “).
  • 38. Command Output Details $echo Displays a blank line. $echo $shell /bin/bash Displays the name of the shell being used $echo UNIX PROGRAMMIG UNIX PROGRAMMING $echo UNIX PROGRAMMING UNIX PROGRAMMING $echo ”unix programming” Unix programming
  • 39. PRINTF – FORMATTED OUTPUT  Syntax : printf “format_string”  It is an alternative to echo and used to write formatted output.  It is an external command.  The “format_string” is a combination of textual message, escape sequence and format specifications.  It does not insert a blank line automatically until and unless the n is used explicitly.  $printf “Invalid inputn”  $printf “two separaten linesn”  $printf “curren shell is %s n”$shell
  • 40. UNAME  uname command displays features of the operating system running on you machine.  By default, it displays the name of operating system.  Syntax: uname [options] Option Purpose -m Prints the machine hardware name. -n It tells hostname -r Print the operating system release level -s Print the name of the operating system -v Print the operating system version
  • 41. WHO  Who command provides the login details of all the current users in 3 column format  The first column shows the login name.  The second column shows the device names of the terminals, and  The third column shows the login date and time.

Editor's Notes

  1. Multics was an interactive operating system with many new capabilities, like enhanced security.