Introductory Lecture

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Introduction to Linux:

• Linux is an Operating System


• Operating System is a software layer between your Hardware and software that we actually
use
• OS is what allows Software to talk to Hardware
• In windows we use like MS Office, Adobe Photoshop but in Linux environment it normally
runs servers like Apache, Web Server, Or a database server
• Linux was created between 1991 to 1994 by Linus Torvalds he started Linux as a hobby to
develop an alternative to UNIX. As he wanted to create Open-Source OS
• UNIX is totally different OS and LINUX is different so Linux is not a version of UNIX
• So, Linux is OS separated from UNIX, Windows is different and so MAC
• So, Linus the person made Linux Open-Source so people around the world started creating
their own versions of Linux that’s what we call DISTROS or Distributions.
• Now we have RedHat Linux, Ubuntu, Google Android is also a version of Linux it is based on
Linux kernel
• With Linux every distribution is build to do things in a certain way
• If you have computer want to use apps, surf the WEB then we use UBUNTU the desktop
version of Linux, If want more secure distribution go for Qubes OS (trustix was earlier the
most secure version but no longer used), If you want something with enterprise level
support then use REDHAT linux
• So before Linux its imp to decide for what purpose you wan t to use Linux
• Let’s say you installed Ubuntu in all your systems but when you need support you call to
REDHAT Linux people then won’t be supporting you.

OPEN -SOURCE:

• Open Source software’s are not all free


• Open source means that the programmer can see the code how a particular software was
made
• But how do the people giving open source earns
o Like MYSQL is 100% free but while using if you need support from MYSQL people
then you pay a hefty amount for it
So, the vendors giving Open- Source products they do get paid for the support they
provide to different clients
o Sometime for open-source products vendors say that you can use the product for
Personal or Non-Commercial use, as soon as you use it for commercial use then pay
the money
o Third way vendors just ask you to pay for licencing like for Windows but still no going
to tell you how the code was written
o In Linux also you can download the Distribution for free but to get support you need
to pay reoccurring amount
o Now in your company if you install the Linux distribution without understanding the
licencing that may lead you to a catastrophic problem

The SHELL:
• Shell in Operating system is a screen that you use to interact with the Operating system
• In windows we have GUI to interact, but in Linux we use Line -User-Interface
• In Line-User-Interface you need to have idea of commands in order to work with it

ROOT:

• Root user(Highest -level user) in Linux is similar to administrator in Windows


• Like C: drive is Root of OS, similarly users have HOME folder/directory in Linux

Capitalization:
• In windows HOME/Home/home all are same, but in Linux it has used ASCII text that says H
and h is different
• So, in Linux Capitalization matters

Server/Desktop:
• For distributions you will see two versions of it SERVER/DESKTOP
• SERVER: Server distributions are designed to serve as the foundation for server
environments. They prioritize stability, security, and performance to ensure reliable and
efficient operation for services and applications.
o Server distributions come with packages and software geared toward server tasks.
These may include web servers (e.g., Apache, Nginx), database servers (e.g.,
MySQL, PostgreSQL), container orchestration tools (e.g., DOCKERS)
• DESKTOP: Desktop distributions are designed for end-user systems, such as personal
computers and workstations. They provide a complete and user-friendly environment for
everyday computing tasks.
o Desktop distributions come with a wide range of software for productivity,
multimedia, web browsing, and more. They often include office suites, web
browsers, media players, and graphic editing tools.

Why Linux:
• When we use Linux as desktop its bad but once you use Linux as Server it works very fast
• In windows when its new it works well but after 2 years it gets multiple updates that makes
the system slow but that’s not the case with Linux
About Linux:
• Linux OS = Linux Kernel + Collection of software’s
• In Windows if virus enters the system it spread through all the system with time but in Linux
if virus came then it stays in that particular folder and doesn’t move to any other file
• 1 Gb of Linux equals to 50GB of Windows
In Windows

Here in core, we have


Hardware- OS- Shell- User : Users gives req to shell, Shell sends that req to OS and then OS
interacts with Hardware

In Linux

Here in core, we have


Hardware- kernel- Shell- User: User sends req to Shell, further shell req to kernel, and at the
end Kernel interacts with Hardware

• In Linux we work on Terminal by using direct commands that makes it fats because here in
Linux we don’t have the layer of GUI
• In windows we say we have FOLDER, but in Linux we have DIRECTORIES
• In windows we have ADMINISTRATOR, but in Windows we have ROOT USER.
• In windows when have SOFTWARES, but in Linux we say we have PACKAGES

File System Hierarchy:


• In Windows when we install it in system by default it came with C: Drive
• C: Drive contains all Primary files of installed Softwares
• In Windows we always use Backward Slach (\)
• In Windows

C:

Programs Users Programs(x86) Proflogs

• In Linux we have always Forward Slash (/)


• In Linux / is Top Level Root Directory.
• In Linux
/

/root /home /boot /etc /usr /bin


• /root : It is the home directory for Root User
• /home: It is the home directory for other users

/home

User1 User2

• /boot: it contains bootable files for Linux


o POST: Power on self-test
o While booting it check all the system and get primary file in active state while
Turning-on the system

• /etc: It contains all configuration file


o All file related to machine
• /usr: By default software’s are installed in this directory
• /bin (binary): It contains all commands used by all users + Root User
• /sbin (system-binary): It contains all the commands that are used by only ROOT users.
• /opt (optional): it stores optional applications software packages
• /dev: Contains devices file or files of device which is connected to system

Shell:
The shell refers to a program that interprets user commands. It's the interface that allows
users to interact with the operating system by typing commands in a text-based interface.
Types of Shells:
1. Bash (Bourne Again Shell): One of the most popular and default shells in many Linux
distributions. It's a powerful and versatile shell, offering scripting capabilities,
command-line editing, and more.

2. Zsh (Z Shell): Known for its extended features over Bash, such as powerful tab-
completion, themes, and plugins, making it highly customizable.

3. Fish (Friendly Interactive Shell): Designed to be user-friendly with features like


syntax highlighting, auto-suggestions, and an emphasis on simplicity.

4. Ksh (Korn Shell): A powerful shell with a rich set of programming features.

Package Managers:
package managers are integral to the operating system and various distributions. They help users
maintain their systems by handling software installation, dependencies, and updates.

Common Package Managers in Linux:


• APT (Advanced Package Tool): Used primarily in Debian-based distributions such as Debian,
Ubuntu, and derivatives. Tools like apt-get and aptitude are commonly used with APT.
• YUM (Yellowdog Updater, Modified): Initially developed for Red Hat Linux, YUM is used in
Red Hat Enterprise Linux (RHEL), CentOS, and Fedora. yum and dnf (Dandified YUM) are
popular tools.

• Pacman: The package manager used in Arch Linux and its derivatives. It's known for
simplicity and efficiency.

• ZYpp (ZENworks Package Management): Found in SUSE Linux Enterprise, openSUSE, and
other SUSE-based distributions.

• Portage: The package manager in Gentoo Linux, which compiles software from source.

You might also like