UNIX Assignment
UNIX Assignment
UNIX Assignment
Questions
Q - 1) List and explain features of UNIX.
Answer:
1. Multiuser system:
Unix provides multiple programs to run and compete for the attention of the
CPU.
This happens in 2 ways:
➢ Multiple users running multiple jobs
➢ Single user running multiple jobs
In UNIX, resources are actually shared between all the users, so-called a
multi-user system. For doing so, computer give a time slice (breaking unit of
time into several segments) to each user.
So, at any instant of time, only one user is served but the switching is so fast
that it gives an illusion that all the users are served simultaneously.
2. Multitask system:
A single user may run multiple tasks concurrently.
Example: Editing a file, printing another on the printer & sending email to a
person, and browsing the net too at the same time.
The Kernel is designed to handle user’s multiple needs.
The important thing here is that only one job can be seen running in the
foreground, the rest all seems to run in the background.
Users can switch between them, terminate/suspend any of the jobs.
3. Open source:
UNIX operating system is open source it means it is freely available to all and
is a community-based development project.
4. Portable:
This feature makes the UNIX work on different machines and platforms with
the easy transfer of code to any computer system.
5. Unix tools and utilities:
Unix has a kernel but the kernel alone can’t do much that could help the user.
So, we need to use the host of applications that usually come along with the
UNIX systems. The applications are quite diversified.
General-purpose tools, text manipulation utilities (called filters), compilers
and interpreters, networked programs, and system administration tools are all
included.
6. Command structure:
UNIX commands are easy to understand and simple to use. Example: "cp",
mv etc.
UNIX commands are case-sensitive and are entered in lower case.
7. File security and protection:
UNIX has different levels of security using assigning username and password
to individual users ensuring the authentication, at the level providing file
access permission like read, write and execute and lastly file encryption to
change the file into an unreadable format.
Layer-1: Hardware
This layer of UNIX consists of all hardware-related information in the UNIX
environment.
Layer-2: Kernel
The core of the operating system that's liable for maintaining the full functionality
is named the kernel. The kernel of UNIX runs on the particular machine hardware
and interacts with the hardware effectively.
It also works as a device manager and performs valuable functions for the
processes which require access to the peripheral devices connected to the
computer. The kernel controls these devices through device drivers.
The kernel also manages the memory. Processes are executed programs that have
owner's humans or systems who initiate their execution.
Layer-3: The Shell
The Shell is an interpreter that interprets the command submitted by the user at
the terminal, and calls the program you simply want.
It also keeps a history of the list of the commands you have typed in. If you need
to repeat a command you typed it, use the cursor keys to scroll up and down the
list or type history for a list of previous commands.
There are various commands like cat, mv, cat, grep, id, wc, and many more.
Layer-4: Application Programs Layer
It is the outermost layer that executes the given external applications. UNIX
distributions typically come with several useful applications programs as
standard.
For Example: emacs editor, Star Office, xv image viewer, g++ compiler etc.
Root ( / ):
The top of the directory structure is called root. It is also called parent directory
as it contains all the subdirectories of the UNIX file system. It is represented by
using slash symbol in UNIX system.
/lib:
This directory contains all the information of system libraries functions and some
critical files such as kernel modules or device drivers. It also contains the system
calls that the compiler can include in a program.
/bin:
This directory contains the system's binary files and certain fundamental utilities.
It is the directory for admin-level commands such as ls or cp. The path (var)
always shows this directory in the list.
/dev:
It stands for "devices" and contains all the information about the device files used
in the UNIX system. These files do not occupy any space on the disk. It contains
al; information about hard disks, file representations of peripheral devices, floppy
disks, device information, and pseudo-devices.
/etc:
This directory and its subdirectories contain many of the UNIX configuration
files and system databases. These files have many text files that can be changed
according to the system's functionality. It also contains the information of your
login name and password.
/home:
This directory contains all the information of home directories for the users.
Whenever a user log in to the system, the UNIX system automatically places you
in a home directory.
/tmp:
This directory contains the information of all the temporary files created by UNIX
or by the user in the UNIX system.
/var:
The variable directory of a UNIX file system contains all the information of print
jobs and outgoing and incoming emails. The variable part of a file system may be
placed for files as database storage.
/usr:
This directory contains all the information related to the users in a UNIX system.
It means it contains all the user account such as user1, user2, and so on.