Unix Unit 1 Final
Unix Unit 1 Final
UNIT 1
INTRODUCTION OF UNIX
History of Unix:
Unix is actually a very old operating system ,until unix came on the scene,operating systemswere
designed with a particular machine in mind.They were written in lowleval language.Programs designed
for one system simply wouldn’t run on another .so two personsnamed Ken Thompson and Dennis
Ritchie, of AT & T ,in 1969,started to build a flexibleoperating system that would run on any hardware.
they designed and built a elegant file system, command interpreter(shell) and a set of utilities. But this
system was once again hardwaredependent. In 1973, Dennis Ritchie rewrote the entire system in C –a
high level language andit was portable. This was the first version of unix. The University of California
Berkley(UCB),created a unix of its own. They calledit BSD UNIX.(Berkley software distribution).These
versions became quite popular worldwide.BSD Unix had a standard editor of the unix system(vi) and a
popular shell( cshell).Berkley also created a better file system, a more versatile mail feature and a better
methodof linking files. Later they also offered with their standard distribution a networking protocol
software(TCP/IP) that made the internet possible. UNIX Shell Programming Prof, MAMATHA M, Dept.
of CSE, BrCE, Bengaluru Page3Sun used the BSD unix as a foundation for developing their own brand
of unixcalledSunOS. Today their version of UNIX is known as solaries. Others had their own brands
suchas IBM had AIX,HP offered HP-UX. As each vendor modified and enhanced Unix to create their
own versions ,the original unix lost its identity as a separate product. There was no Standard version of
unix. HenceAT& T Released SVR4(system V Release 4), a standard unix. Even before the advent of
SVR4, big things were happening in the U.s DefenseDepartment .They created the first communication
network called ARPANETand it usedTCP/IP protocol and they tried to implement TCP/IP on BSD Unix.
Dept of CSE,BrCE 1
MODULE 1 INTODUCTION OF UNIX
Originally echo was an external command, but now all shells have echo as built in command.
printf Command : printf can be used as alternative command to echo. The difference is echo
command by default inserts ‘\n’ character at the end, but printf does not insert newline at the end.
Syntax : $printf [-v var] format [arguments]
Dept of CSE,BrCE 2
MODULE 1 INTODUCTION OF UNIX
ls –a : displays all files including hidden files, current directory(.) and present directory(..)
Dept of CSE,BrCE 3
MODULE 1 INTODUCTION OF UNIX
ls –d dirname : Searches for directory with name dirname, if found displays it, otherwise produces a
message directory not found.
who command : Unix maintains an account of all users, who logged out to the system. “who”
command displays listing of these users.
Syntax : $who [option][filename]
Dept of CSE,BrCE 4
MODULE 1 INTODUCTION OF UNIX
passwd Command : The passwd command sets and changes passwords for users.Use this command
to change your own password or another user’s password.
cal Command : Using call command it is possible to see the calendar of specific month.
Syntax : $cal [[month]year]
Dept of CSE,BrCE 5
MODULE 1 INTODUCTION OF UNIX
cat command : The cat command is the most universal and powerful tool. It is considered to be one
of the most frequently used commands. It can be used to display the content from one file to another. So
cat command concatenates two files.
Dept of CSE,BrCE 6
MODULE 1 INTODUCTION OF UNIX
tty command : tty command displays information related to the terminal. The tty command of the
terminal basically prints the file name of the terminal connecter to standard input.
Syntax : tty[option]…
Dept of CSE,BrCE 7
MODULE 1 INTODUCTION OF UNIX
stty command : stty command in unix is used to change and print terminal line settings. Basically
this command shows or changes terminal characteristics.
Syntax : $stty[-F DEVICE\--file=DEVICE][SETTING]..
uname Command : The command ‘uname’ displays the information about the system.
Syntax : uname [Option]
Dept of CSE,BrCE 8
MODULE 1 INTODUCTION OF UNIX
uname –a: prints all the system information in the following order. kernal name, network name,
network node, hostname, kernel release date, kernel version.
Syntax: $uname –a
Dept of CSE,BrCE 9
MODULE 1 INTODUCTION OF UNIX
Dept of CSE,BrCE 10