Introduction To Linux Operating System: Nabajyoti Goswami
Introduction To Linux Operating System: Nabajyoti Goswami
Nabajyoti Goswami
National Institute of Electronics & Information Technology, Guwahati
Ministry of Electronics and Information Technology, Government of India
Different Operating Systems
Microsoft Windows
(1985)
Introduction Linux is a family of open-source
Unix-like operating systems based on
the Linux kernel.
Distros or Distributions
Bell Telephone
Company, 1875
In 1977, the Berkeley Software Distribution (BSD) was developed by the Computer
Systems Research Group (CSRG) from UC Berkeley, based on the 6th edition of Unix
from AT&T.
In 1983, Richard Stallman started the GNU project with the goal of creating
a free UNIX-like operating system. As part of this work, he wrote the GNU
General Public License (GPL).
In 1985, Intel released the 80386, the first x86 microprocessor with a 32-bit instruction set and a memory
management unit with paging.
In 1986, Maurice J. Bach, of AT&T Bell Labs, published “The Design of the UNIX Operating System.”
In 1987, MINIX, a Unix-like system intended for academic use, was released by
Andrew S. Tanenbaum to exemplify the principles conveyed in his textbook,
MINIX3 “Operating Systems: Design and Implementation.”
History of Linux (contd...)
The origin of Linux
• MINIX's 16-bit design was not well adapted to the 32-bit features of the increasingly
cheap and popular Intel 386 architecture for personal computers. In the early nineties
a commercial UNIX operating system for Intel 386 PCs was too expensive for private
users.
● Core hardware
● Core Kernel
● Shells & commands
● Applications & utilities
● Users
A shell is a computer program which exposes
Basics of Shell an operating system's services to a human
user or other program.
Software application
Hardware: CPU, memory &
devices
Basics of Kernel
Top Operations Performed by a Kernel
Resource management: Kernel decides which process gets a resource for an
operation
Memory management: Kernel has complete access to system memory and must
efficiently manage it and allow memory access to processes.
Device management: Kernel detects the connected devices, e.g., printer, usb
drive, etc. and helps the system to establish connection with the peripherals.
System calls: This is an interface between a process and the OS. When the
process does not have permissions to access a resource, a system call provides
it without the process accessing the resource directly.
Types of operating system Kernels
System
Operating system
Windows vs. Linux
Windows Linux
iPOD running
µClinux
KDE Plasma
x11
XFCE
Servers, mainframes and supercomputers
supercomputers run on Linux
Linux is everywhere
Installation Prerequisites
Linux partitions
● Hard disk devices are named /dev/hdx or /dev/sdx with x depending on the hardware configuration.
● Next is the partition number, starting with the count 1. Hence the four (possible) primary partitions
are numbered 1 to 4. Logical partition counting always starts at 5. Thus /dev/hda2 is the second
partition on the first ATA hard disk device, and /dev/hdb5 is the first logical partition on the second
ATA hard disk device. Same for SCSI, /dev/sdb3 is the third partition on the second SCSI disk.
Partition Device
/dev/hda1 first primary partition on /dev/hda
/dev/hda2 second primary or extended partition on /dev/hda
/dev/sda5 first logical drive on /dev/sda
/dev/sdb6 second logical on /dev/sdb
Recommended Partitioning Scheme during Installation
● Linux file system is responsible for sorting information on disk and retrieving
and updating this information.
● Windows file systems are generally New Technology File System (NTFS) and
File Allocation Table (FAT16, FAT32) or extended FAT (exFAT)
● NFS, like many other protocols, builds on the Open Network Computing Remote
Procedure Call (ONC RPC) system.
● All paths start at '/' called root, no C: or D: like in Windows. Similar to other Unix-like
systems such as Mac OS.
● Users home folders under '/home', i.e., /home/users
User 1
User 2
User 3
Perceptions for A path identifies uniquely a file or directory in the file
system.
Linux installation
The character '/' is used to concatenate directories.
There are two types of paths:
Absolute: Always start with '/' which is the root
directory. For example:
Path and variables
ls /home/users/Desktop
Relative: All paths not beginning with '/' but with a
file o directory name. For example:
ls Desktop
Tab' key is your friend, auto-completes the paths for
you if you press twice.
Understanding $PATH variable
o A $PATH is an environment variable that list all directories in the system with
binaries (executable programs)
o In a command line a PATH usually can be set by any of the following ways:
1. $PATH=/file/location/in/this/syntax
2. export PATH =/file/location/in/this/syntax
o PATH can be again recalled by the following command syntax:
echo $PATH (return)
/file/location/in/this/syntax will be displayed
o All binaries in one of these directories can be executed automatically in the shell,
no absolute path is needed
Some basic commands
Commands are binary files kept under specific directory.
Single user
chmod u+r filename
The above command grants permission to a single user to
read the file.
Multiuser
chmod u+rw , g = x ,o –w filename
The above command grants permissions to multiple users.
Octal Notation
chmod 761 filename
chmod u = rwx, g = rw,o = x filename
The above commands are equivalent to each other.
Understanding octal values
Using symbolic notations
Overriding permissions: chown, chgrp
chown command
chgrp command