You are on page 1of 18

1

Unit - I
An operating system (OS) is a collection of software that manages computer hardware resources and provides
common services for computer programs. The operating system is a vital component of the system software
in a computer system. This tutorial will take you through step by step approach while learning Operating
System concepts.

Operating System
An Operating System (OS) is an interface between a computer user and computer hardware. An operating
system is a software which performs all the basic tasks like file management, memory management, process
management, handling input and output, and controlling peripheral devices such as disk drives and printers.
Some popular Operating Systems include Linux Operating System, Windows Operating System, VMS,
OS/400, AIX, z/OS, etc.
Following are some of important functions of an operating System.
 Memory Management
 Processor Management
 Device Management
 File Management
 Security
 Control over system performance
 Job accounting
 Error detecting aids
 Coordination between other software and users

Applications of Operating System


Following are some of the important activities that an Operating System performs −
 Security − By means of password and similar other techniques, it prevents unauthorized access to
programs and data.
 Control over system performance − Recording delays between request for a service and response
from the system.
 Job accounting − Keeping track of time and resources used by various jobs and users.
 Error detecting aids − Production of dumps, traces, error messages, and other debugging and error
detecting aids.
 Coordination between other softwares and users − Coordination and assignment of compilers,
interpreters, assemblers and other software to the various users of the computer systems.
2

 Kernel − Kernel is the core part of Linux. It is responsible for all major activities of this operating
system. It consists of various modules and it interacts directly with the underlying hardware. Kernel
provides the required abstraction to hide low level hardware details to system or application programs.
Architecture
The following illustration shows the architecture of a Linux system −

The architecture of a Linux System consists of the following layers −


 Hardware layer − Hardware consists of all peripheral devices (RAM/ HDD/ CPU etc).
 Kernel − It is the core component of Operating System, interacts directly with hardware, provides
low level services to upper layer components.
 Shell − An interface to kernel, hiding complexity of kernel's functions from users. The shell takes
commands from the user and executes kernel's functions.
 Utilities − Utility programs that provide the user most of the functionalities of an operating systems.

Linux is one of popular version of UNIX operating System. It is open source as its source code is freely
available. It is free to use. Linux was designed considering UNIX compatibility. Its functionality list is quite
similar to that of UNIX.
Components of Linux System
Linux Operating System has primarily three components
 Kernel − Kernel is the core part of Linux. It is responsible for all major activities of this operating
system. It consists of various modules and it interacts directly with the underlying hardware. Kernel
provides the required abstraction to hide low level hardware details to system or application programs.
 System Library − System libraries are special functions or programs using which application
programs or system utilities accesses Kernel's features. These libraries implement most of the
functionalities of the operating system and do not requires kernel module's code access rights.
3

 System Utility − System Utility programs are responsible to do specialized, individual level tasks.

Kernel Mode vs User Moe


Kernel component code executes in a special privileged mode called kernel mode with full access to all
resources of the computer. This code represents a single process, executes in single address space and do not
require any context switch and hence is very efficient and fast. Kernel runs each processes and provides
system services to processes, provides protected access to hardware to processes.
Support code which is not required to run in kernel mode is in System Library. User programs and other
system programs works in User Mode which has no access to system hardware and kernel code. User
programs/ utilities use System libraries to access Kernel functions to get system's low level tasks.
Basic Features
 Portable − Portability means software can works on different types of hardware in same way. Linux
kernel and application programs supports their installation on any kind of hardware platform.
 Open Source − Linux source code is freely available and it is community based development project.
Multiple teams work in collaboration to enhance the capability of Linux operating system and it is
continuously evolving.
 Multi-User − Linux is a multiuser system means multiple users can access system resources like
memory/ ram/ application programs at same time.
 Multiprogramming − Linux is a multiprogramming system means multiple applications can run at
same time.
 Hierarchical File System − Linux provides a standard file structure in which system files/ user files
are arranged.
 Shell − Linux provides a special interpreter program which can be used to execute commands of the
operating system. It can be used to do various types of operations, call application programs. etc.
 Security − Linux provides user security using authentication features like password protection/
controlled access to specific files/ encryption of data.
4

Advantages of Linux Os
1. Open Source
As it is open-source, its source code is easily available. Anyone having programming knowledge can
customize the operating system. One can contribute, modify, distribute, and enhance the code for any purpose.
2. Security
The Linux security feature is the main reason that it is the most favorable option for developers. It is not
completely safe, but it is less vulnerable than others. Each application needs to authorize by the admin user.
The virus is not executed until the administrator provides the access password. Linux systems do not require
any antivirus program.
3. Free
Certainly, the biggest advantage of the Linux system is that it is free to use. We can easily download it, and
there is no need to buy the license for it. It is distributed under GNU GPL (General Public License).
Comparatively, we have to pay a huge amount for the license of the other operating systems.
4. Lightweight
Linux is lightweight. The requirements for running Linux are much less than other operating systems. In
Linux, the memory footprint and disk space are also lower. Generally, most of the Linux distributions required
as little as 128MB of RAM around the same amount for disk space.
5. Stability
Linux is more stable than other operating systems. Linux does not require to reboot the system to maintain
performance levels. It rarely hangs up or slow down. It has big up-times.
6. Performance
Linux system provides high performance over different networks. It is capable of handling a large number of
users simultaneously.
7. Flexibility
Linux operating system is very flexible. It can be used for desktop applications, embedded systems, and server
applications too. It also provides various restriction options for specific computers. We can install only
necessary components for a system.
8. Software Updates
In Linux, the software updates are in user control. We can select the required updates. There a large number
of system updates are available. These updates are much faster than other operating systems. So, the system
updates can be installed easily without facing any issue.
9. Distributions/ Distros
There are many Linux distributions available in the market. It provides various options and flavors of Linux
to the users. We can choose any distros according to our needs. Some popular distros are Ubuntu, Fedora,
Debian, Linux Mint, Arch Linux, and many more.
5

10. Live CD/USB


Almost all Linux distributions have a Live CD/USB option. It allows us to try or run the Linux operating
system without installing it.
11. Graphical User Interface
Linux is a command-line based OS but, it provides an interactive user interface like Windows.
12. Suitable for programmers
It supports almost all of the most used programming languages such as C/C++, Java, Python, Ruby, and more.
Further, it offers a vast range of useful applications for development.
13. Community Support
Linux provides large community support. We can find support from various sources. There are many forums
available on the web to assist users. Further, developers from the various opensource communities are ready
to help us.
14. Privacy
Linux always takes care of user privacy as it never takes much private data from the user. Comparatively,
other operating systems ask for the user's private data.
15. Networking
Linux facilitates with powerful support for networking. The client-server systems can be easily set to a Linux
system. It provides various command-line tools such as ssh, ip, mail, telnet, and more for connectivity with
the other systems and servers. Tasks such as network backup are much faster than others.
16. Compatibility
Linux is compatible with a large number of file formats as it supports almost all file formats.
17. Installation
Linux installation process takes less time than other operating systems such as Windows. Further, its
installation process is much easy as it requires less user input. It does not require much more system
configuration even it can be easily installed on old machines having less configuration.
18. Multiple Desktop Support
Linux system provides multiple desktop environment support for its enhanced use. The desktop environment
option can be selected during installation. We can select any desktop environment such as GNOME (GNU
Network Object Model Environment) or KDE (K Desktop Environment) as both have their specific
environment.
19. Multitasking
It is a multitasking operating system as it can run multiple tasks simultaneously without affecting the system
speed.
6

20. Heavily Documented for beginners


There are many command-line options that provide documentation on commands, libraries, standards such as
manual pages and info pages. Also, there are plenty of documents available on the internet in different
formats,.
Fedora Operating System
Fedora operating system is an open-source operating system that is based on the Linux OS kernel architecture.
A group of developers was developed the Fedora operating system under the Fedora Project. It is sponsored
by Red Hat. It is designed as a secure operating system for the general-purpose. Fedora operating system offers
a suite of virus protection, system tools, office productivity services, media playback, and other desktop
application.
According to the Fedora Project, it is always free to use, modify, and distribute. Fedora OS is integrated with
applications and packaged software. This operating system enhances the abilities of the software. It offers the
same consistency, procedures, and functionality as a traditional OS. Fedora operating system is the second
most commonly used distribution of Linux after Ubuntu.
There are over 100 distributions based on the Fedora operating system, including the XO operating system of
Red Hat Enterprise Linux.
Features of Fedora Operating System
List of the Fedora OS features:
o Fedora OS offers many architectures.
o Fedora OS is a very reliable and stable operating system.
o It provides unique security features.
o Fedora OS provides a very powerful firewall.
o Fedora OS is very easy to use.
o It supports a large community.
o Fedora OS is actively developed.
o Fedora OS is an open-source OS.
o The interface of Fedora OS is very attractive.
o This operating system offers live mode tools.
o This operating system enhances internet speed.

Fedora OS comes with many pre-installed applications and tools, such as Internet Browser, PDF and Word
files Viewer, Pre-installed Games, Libre Office Suite, Programming language Support, etc.
Fedora is a very stable, secure, and light-weight operating system. It supports different types of architectures,
such as IBM Z, AMD x86-x64, Intel i686, IBM Power64le, ARM-hfp, MIPS-64el, ARM AArch64, IBM
Power64, etc. Usually, it also works on the latest Linux kernel
7

Fedora Server
Fedora Server is a very flexible and powerful OS. It keeps all your infrastructure and services under your
control. Fedora operating system offers the latest data center technologies.
Advantages of Fedora Operating System
1. Fedora OS is a very reliable and stable operating system.
2. It enhances the security in this operating system.
3. It offers many graphical tools.
4. This operating system updates automatically.
5. This OS supports many file formats.
6. It also offers many education software.
7. It supports a large community.
8. It provides unique security features.
Disadvantages of Fedora Operating System
1. It requires a long time to set up.
2. It requires additional software tools for the server.
3. It does not provide any standard model for multi-file objects.
4. Fedora has its own server, so we can't work on another server in real-time.

Installing Fedora:
Step:1) Download Fedora 30 Workstation ISO File
Download the Fedora 30 Workstation ISO file on your system from its Official Web Site
https://getfedora.org/en/workstation/download/
Once the ISO file is downloaded, then burn it either in USB drive or DVD and make it bootable.
Step:2) Boot Your Target System with Bootable media (USB Drive or DVD)
Reboot your target machine (i.e. machine where you want to install Fedora 30), Set the boot medium as USB
or DVD from Bios settings so system boots up with bootable media.
Step:3) Choose Start Fedora-Workstation-30 Live
When the system boots up with bootable media then we will get the following screen, to begin with installation
on your system’s hard disk, choose “Start Fedora-Workstation-30 Live“,
8

Step:4) Select Install to Hard Drive Option


Select “Install to Hard Drive” option to install Fedora 30 on your system’s hard disk, you can also try Fedora
on your system without installing it, for that select “Try Fedora” Option

Step:5) Choose appropriate language for your Fedora 30 Installation


In this step choose your language which will be used during Fedora 30 Installation,
Click on Continue

Step:6) Choose Installation destination and partition Scheme


In the next window we will be present the following screen, here we will choose our installation destination,
means on which hard disk we will do installation
9

In the next screen we will see the local available hard disk, select the disk that suits your installation and then
choose how you want to create partitions on it from storage configuration tab.
If you choose “Automatic” partition scheme, then installer will create the necessary partition for your system
automatically but if you want to create your own customize partition scheme then choose “Custom” option,

Click on Done
In this article I will demonstrate how to create LVM based custom partitions, in my case I have around 40 GB
unallocated hard drive, so I will be creating following partitions on it,
o /boot = 2 GB (ext4 file system)
o /home = 15 GB (ext4 file system)
o /var = 10 GB (ext4 file system)
o / = 10 GB (ext4 file system)
o Swap = 2 GB
10

Select “LVM” as partitioning scheme and then click on plus (+) symbol,
Specify the mount point as /boot and partition size as 2 GB and then click on “Add mount point”

Now create next partition as /home of size 15 GB, Click on + symbol


11

Click on “Add mount point”

If you might have noticed, /home partition is created as LVM partition under default Volume Group, if you
wish to change default Volume Group name then click on “Modify” option from Volume Group Tab,
Mention the Volume Group name you want to set and then click on Save. Now onward all the LVM partition
will be part of fedora30 volume group.

Similarly create the next two partitions /var and / of size 10 GB respectively,
/var partition:

/ (slash) partition:
12

Now create the last partition as swap of size 2 GB,

In the next window, click on Done

In the next screen, choose “Accept Changes”

Now we will get Installation Summary window, here you can also change the time zone that suits to your
installation and then click on “Begin Installation”
13

Step:7) Fedora 30 Installation started


In this step we can see Fedora 30 Installation has been started and it is in progress,

Once the Installation is completed, you will be prompted to restart your system

Click on Quit and reboot your system.


Don’t forget the Change boot medium from Bios settings so your system boots up with hard disk.
Step:8) Welcome message and login Screen after reboot
When we first time reboot Fedora 30 system after the successful installation, we will get below welcome
screen,

Click on Next
In the next screen you can Sync your online accounts or else you can skip,
14

In the next window you will be required to specify the local account (user name) and its password, later this
account will be used to login to the system

Click on Next
And finally, we will get below screen which confirms that we are ready to use Fedora 30,

Click on “Start Using Fedora”


15

CentOS vs. RHEL

CentOS Red Hat Enterprise Linux (RHEL)

License FOSS – GPL and others Commercial – RedHat EULA


Branding CentOS Red Hat
Security SELinux, NSS, Linux PAM, firewalld SELinux, NSS, Linux PAM, firewalld
Patches/fixes SLA through OpenLogic SLA through Red Hat
Commercial support 24x7 support through OpenLogic 24x7 support through Red Hat
Package management Yum Yum
Installer ISO / LiveCD ISO
Enterprise package
Spacewalk / Katello Red Hat Satellite 5 / Satellite 6
management
Clustering Linux-HA Red Hat Cluster Suite (RHCS)
Bootloader GRUB 2 GRUB 2
Graphical user interface
GNOME 3 / KDE SC 4.10 GNOME 3 / KDE SC 4.10
(GUI)
Service management System System
Storage management LVM / SSM LVM / SSM
Default file system XFS XFS
Current kernel
3.10.0-957.1.3.el7.x86_64.rpm 3.10.0-957.1.3.el7.x86_64.rpm
(11/2018)
Virtualization oVirt / KVM Red Hat Virtualization Manager / KVM
Containerization Docker, Kubernetes Red Hat OpenShif
Virtual device interface
SPICE SPICE
(VDI)
Cloud images: Azure Azure by OpenLogic Azure by Red Hat
AWS standard and security hardened by
Cloud images: AWS AWS by Red Hat
OpenLogic
Cloud images: Google Google Cloud by CentOS.org Google Cloud by Red Hat

Linux Directory Commands


1. pwd Command
16

The pwd command is used to display the location of the current working directory.
Syntax:
1. pwd
Output:

2. mkdir Command
The mkdir command is used to create a new directory under any directory.
Syntax:
1. mkdir <directory name>
Output:

3. rmdir Command
The rmdir command is used to delete a directory.
Syntax:
1. rmdir <directory name>
Output:

4. ls Command
The ls command is used to display a list of content of a directory.
Syntax:
1. ls
Output:

5. cd Command
The cd command is used to change the current directory.
Syntax:
1. cd <directory name>
Output:
17

Linux File commands


6. touch Command
The touch command is used to create empty files. We can create multiple empty files by executing it once.
Syntax:
1. touch <file name>
2. touch <file1> <file2> ....
Output:

7. cat Command
The cat command is a multi-purpose utility in the Linux system. It can be used to create a file, display content
of the file, copy the content of one file to another file, and more.
Syntax:
1. cat [OPTION]... [FILE]..
To create a file, execute it as follows:
1. cat > <file name>
2. // Enter file content
Press "CTRL+ D" keys to save the file. To display the content of the file, execute it as follows:
1. cat <file name>
Output:

8. rm Command
The rm command is used to remove a file.
Syntax:
rm <file name>
Output:

9. cp Command
The cp command is used to copy a file or directory.
Syntax:
To copy in the same directory:
1. cp <existing file name> <new file name>
To copy in a different directory:
18

10. mv Command
The mv command is used to move a file or a directory form one location to another location.
Syntax:
1. mv <file name> <directory path>
Output:

11. rename Command


The rename command is used to rename files. It is useful for renaming a large group of files.
Syntax:
1. rename 's/old-name/new-name/' files
For example, to convert all the text files into pdf files, execute the below command:
1. rename 's/\.txt$/\.pdf/' *.txt

Linux File Content Commands


12. head Command
The head command is used to display the content of a file. It displays the first 10 lines of a file.
Syntax:
1. head <file name>
Output:

13. tail Command


The tail command is similar to the head command. The difference between both commands is that it displays
the last ten lines of the file content. It is useful for reading the error message.
Syntax:
1. tail <file name>

You might also like