Documente Academic
Documente Profesional
Documente Cultură
What is UNIX?
The UNIX OS was developed in the late 1960s. AT&T Bell Labs released
an operating system called Unix written in C, which allows quicker
modification, acceptance, and portability.
The Unix OS works on CLI (Command Line Interface), but recently, there
have been developments for GUI on Unix systems.
Open Source
Open source refers to any program whose source code is made available for
use or modification for users or other developers.
Open source software is usually developed as a public collaboration and
made freely available.
Secure
Windows OS is defenseless to different types of attacks (or hacks).
However, Linux is not as defenseless as Windows.
When you have Windows installed, you need to download/purchase
an Antivirus program to keep your computer safe from hackers and
malware. However, Linux does not require the use of such Anti-Virus
programs.
A couple of software tools still exist to help you keep your system free from
threats
Software Updates
Microsoft pushes a software update when it receives a set of problems or if
something major needs to be fixed. On the other hand, you would observe a
software update to address a little problem.
So, with Linux, you will notice more updates to fix the problems you might
be facing. You will not only encounter a larger number of software updates,
but you will also observe much faster software updates.
Variety of Distributions
There are no flavors of Windows. Yes, you may have different plans &
packages which differ in licensing terms, the period of activation, packaged
features, and price.
In contrast, you will find tons of Linux distribution catered for a different set
of needs. So, you can choose to install any of the available Linux according
to your requirements.
For example, there are Linux distributions for hackers, there are Linux
distributions for programmers, there are Linux distributions for extremely
old computers. There is a Linux for everyone.
Free to Use
Linux is accessible to the public for free! However, that is not the case with
Windows!
Reliability
You will want to re-install Windows after a while when you encounter
crashes or slow downs on your system.
If you are using Linux, you will not have to worry about re-installing it just
to experience a faster and a smoother system. Linux helps your system run
smooth for a longer period.
Also, with Windows, you will have to adapt to a habit where you keep on
rebooting the system for just about everything.
o If you just installed software, reboot!
o If you recently uninstalled software, reboot!
o If you just installed a Windows update, reboot!
o If the system seems to slow down, reboot!
However, in the case of Linux, you will not have to reboot for the situations
mentioned above.
Differences between Linux and Windows
Linux has access to source code and alters the code as per user need whereas
Windows does not have access to source code.
Linux distributions don’t collect user data whereas Windows collect all the
user details which lead to privacy concern.
Linux supports a wide variety of free software’s than windows but windows
have a large collection of video game software.
Linux is highly secure because it’s easy to identify bugs and fix whereas
Windows has a large user base and becomes a target for developers of
viruses and malware.
Linux and windows have same priority over hardware and driver support in
the present situation.
Disadvantages of Linux
1. There’s no standard edition of Linux. Whereas Microsoft offers several
different editions of each version of Windows, there are countless variations
of Linux. For a new user it can be confusing to work out which is best for
you.
2. Linux is not as easy to use as Windows.
3. Linux is neither as popular as Windows, nor a commercial product.
4. Many of the programs you are used to in Windows will only run in Linux
through a complicated emulator.
5. While Linux can be suitable for an individual user, its small market share
means it’s much harder to introduce in a corporate setting. With most office
workers already familiar with Windows and Microsoft programs, there’ll
likely be a notable time cost in converting staff to using a Linux system.
6. Fans of PC gaming may find Linux offers them a much more limited range.
That’s partially because the latest games are nearly always a commercial
operation and much harder to reproduce in Linux.
7. Because Linux is a free, open source system, there are no legal comebacks if
you find software isn’t up to scratch or if it causes a problem.
Architecture of Linux/Unix
Hardware
Hardware layer of the LINUX operating system consists of peripheral devices such
as RAM, HDD, and CPU.
Kernel
The kernel is the core part of the operating system, which is responsible for all the
major activities (like memory management, task scheduling and file management)
of the LINUX operating system. This operating system consists of different
modules and interacts directly with the underlying hardware.
Shell
The shell is an interface between the user and the kernel. It takes commands from
the user and executes kernel’s functions. The Shell is present in different types of
operating systems, which are classified into two types: command line shells and
graphical shells.
The command line shells provide a command line interface, while the graphical
line shells provide a graphical user interface. The graphical user interface shells
perform slower than the command line interface shells. Types of shells are:
Korn shell
Bourne shell
C shell
System library
System libraries are special functions that are used to implement the functionality
of the operating system.
Kernel
It is responsible for interfacing all of your applications that are running in “user
mode” down to the physical hardware, and allowing processes, known as servers,
to get information from each other using inter-process communication (IPC).
Microkernel
Microkernel takes the approach of only managing what it has to: CPU,
memory, and IPC.
Everything else in a computer can be seen as an accessory and can be
handled in user mode.
Microkernel also has a very small footprint for both memory and install
space.
Pros
Portability
Small install footprint
Small memory footprint
Security
Cons
Hardware may react slower because drivers are in user mode
Processes have to wait in a queue to get information
Processes can’t get access to other processes without waiting
Monolithic Kernel
Monolithic kernels are the opposite of microkernel because they cover not only the
CPU, memory, and IPC, but they also include things like device drivers, file
system management, and system server calls.
Pros
Direct access to hardware for programs
Easier for processes to communicate between each other
If your device is supported, it should work with no additional installations
Processes react faster because there isn’t a queue for processor time
Cons
Large install footprint
Large memory footprint
Less secure because everything runs in supervisor mode
Hybrid Kernel
Hybrid kernels have the ability to pick and choose what they want to run in user
mode and what they want to run in supervisor mode.
Things like device drivers and file system I/O are generally run in user mode while
IPC and server calls are run in the supervisor mode.
Pros
Developer can pick and choose what runs in user mode and what runs in
supervisor mode
Smaller install footprint than monolithic kernel
More flexible than other models
Cons
Device drivers need to be managed by user
Types of Shell:
The C Shell –
Denoted as csh
Bill Joy created it at the University of California at Berkeley.
It incorporated features such as aliases and command history.
It includes helpful programming features like built-in arithmetic and C-
like expression syntax.
In C shell:
Command full-path name is /bin/csh,
Non-root user default prompt is %,
Root user default prompt is #.
Bourne-Again Shell –
Denoted as bash
It is compatible to the Bourne shell. It includes features from Korn and
Bourne shell.
For the Bourne-Again shell the:
Command full-path name is /bin/bash,
Default prompt for a non-root user is $
Root user default prompt is #.
Unix / Linux - File System
A file system is a logical collection of files on a partition or disk.
A partition is a container for information and can span an entire hard drive
if desired.
Your hard drive can have various partitions which usually contain only one
file system, such as one file system housing the /file system or another
containing the /home file system.
One file system per partition allows for the logical maintenance and
management of differing file systems.
Everything in Unix is considered to be a file, including physical devices
such as DVD-ROMs, USB devices, and floppy drives.
Directory Structure
Unix uses a hierarchical file system structure, much like an upside-down tree,
with root (/) at the base of the file system and all other directories spreading from
there.
Unix file system is a collection of files and directories that has the following
properties −
It has a root directory (/) that contains other files and directories.
It is self-contained. There are no dependencies between one file system and
another.
The directories have specific purposes and generally hold the same types of
information for easily locating files. Following are the directories that exist on the
major versions of Unix −
Sr.No. Directory & Description
1 /
This is the root directory which should contain only the
directories needed at the top level of the file structure
2 /bin
This is where the executable files are located. These files are
available to all users
3 /dev
These are device drivers
4 /etc
Supervisor directory commands, configuration files, disk
configuration files, valid user lists, groups, ethernet, hosts, where
to send critical messages
5 /lib
Contains shared library files and sometimes other kernel-related
files
6 /boot
Contains files for booting the system
7 /home
Contains the home directory for users and other accounts
8 /mnt
Used to mount other temporary file systems, such
as cdrom and floppy for the CD-ROM drive and floppy diskette
drive, respectively
9 /proc
Contains all processes marked as a file by process number or
other information that is dynamic to the system
10 /tmp
Holds temporary files used between system boots
11 /usr
Used for miscellaneous purposes, and can be used by many users.
Includes administrative commands, shared files, library files, and
others
12 /var
Typically contains variable-length files such as log and print files
and any other type of file that may contain a variable amount of
data
13 /sbin
Contains binary (executable) files, usually for system
administration. For example, fdisk and ifconfig utlities
14 /kernel
Contains kernel files