Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open...

55
Chapter 4 Open Source Linux

Transcript of Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open...

Page 1: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Chapter 4

Open Source

Linux

Page 2: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

MODULE OVERVIEW

Part 1

What is Linux?

Part 2

Linux Community & Open Source

Part 3

Overview of Linux Features

Part 4

Linux Command Line & File Structure

Page 3: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Part 1

What is Linux?

Page 4: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

History of Linux

• In order to understand the history of Linux, we need to travel back in time, about 40 years ago…Imagine computers as big as houses, even stadiums.

• While the sizes of those computers posed substantial problems, there was one thing that made this even worse: every computer had a different operating system.

• Software was always customized to serve a specific purpose, and software for one given system didn't run on another system.

Page 5: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

5

What is an Operating System?

• Computers are really dumb and don't think. They blindly follow whatever instructions they are given.

• That said, the operating system is a program that exists to control access to hardware and software resources like your memory (RAM), hard-drives, network, display, keyboard, mouse and so on.

• The operating system (OS) is the program which starts up when you turn on your computer and runs underneath all other programs - without it nothing would happen at all.

• In simple terms, an operating system is a manager. It manages all the available resources on a computer, from the CPU, to memory, to hard disk accesses.

Page 6: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

6

What is an Operating System?

– Thus, a program like OpenOffice needs to ask the OS which keys were pressed on the keyboard.

– OpenOffice also needs to ask the operation system to draw letters on the screen.

– OpenOffice also needs to ask the operating system to allocate memory, load and save information to the hard disk, and send printing instructions to your printer.

Page 7: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Linux History

• Being able to work with one system didn't automatically mean that you could work with another. It was difficult, both for the users and the system administrators.

• 1969, a team of developers in the Bell Labs laboratories started working on a solution for the software problem, to address these compatibility issues. It was named as Unix.

Page 8: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Linux History

• Unix was originally free, and source code were available

• By late 1980s, it became commercial, expensive and non-available source code

• Then Minix enters the scene created by Prof.Andrew Tanenbaum

• Minix is an education resource not a usable system.

Page 9: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Linux

• In 1991, Linus Benedict Torvalds created Linux. He is a 2nd year Computer Science Student at University of Helsinki, Finland.

• Features of Linux includes:– Open Source and Free– Community development and Internet Release– Monolithic architecture, uses GNU – POSIX and UNIX compatible

Page 10: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

10

History of Linux

Page 11: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

11

History of Linux

Page 12: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Linux and Other OS

Page 13: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Linux Distribution

• Provides a complete usable system

• It includes:– One version of kernel– An install system, device drivers, ultilities, and

networking– A software package system, selection, and

update mechanism.

Page 14: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

14

Parts of Linux

The Kernel - handles memory management, input and output requests, and program scheduling. Technically speaking, the kernel is the OS. It provides the basic software connection to the hardware.

• Most applications communicates to the operating system using services or APIs (Application Programming Interface).

In turn, the operating system will rely on a 'kernel' to translate the service request to commands that the specific hardware of your machine can understand.

Page 15: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

15

What is a Kernel?

It is the fundamental piece of code that controls the resources on your machine. ◦ Windows has a kernel. ◦ Mac OS X has a kernel. ◦ Pretty much every operating system has a kernel.

Page 16: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Linux Distribution

Page 17: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Linux Distribution

• RedHat – the most popular Linux. • Slackware – the first Linux distribution• Mandrake – Competitiors to RedHat• Lindows – it has most Linux and Windows

capabilities• SuSE, Debian, Fedora, Knoppix, Ubuntu,

etc.

Page 18: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

18

Linux Distribution

Page 19: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

19

Linux Distribution

Page 20: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

20

Linux Distribution

Page 21: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

21

Using Linux on Windows Using Linux on Windows

◦ The machines in our lab use Windows. ◦ In order to use Linux in this kind of environment, we need

to install multiple OS in a single computer. This has been done in the lab in 2 ways:- By using partitioning and a dual boot system

Linux distribution used is Mint Linux. Kernel version is 3.8 By running Linux in a virtual machine (using VMWare

Player/VirtualBox) on a Windows system.

Page 22: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

22

Linux GUIs

When you logon locally, you are presented with graphical environment.

You start at a graphical login screen. You must enter your username and password. You also the have the option to choose from a couple session types. Mainly you have the choice between Gnome and KDE.

Once you enter in your username and password, you are then presented with a graphical environment that looks like one of the following...

Page 23: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

23

Linux GUIs

Page 24: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

24

Linux GUIs

Page 25: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

25

Linux Applications

Page 26: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

26

Linux Applications

Page 27: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Part 2

Linux Community

Page 28: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Linux Community

• Linux by its nature is a community.• The OS and applications only move forward by

the help by many in the community.• Applications include OpenOffice which is an

alternative apart from Microsoft Office.• The idea behind Open Source software is rather

simple: when programmers can read, distribute and change code, the code will mature.

Page 29: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Linux Community

• People can adapt it, fix it, debug it, and they can do it at a speed that dwarfs the performance of software developers at conventional companies.

• This software will be more flexible and of a better quality than software that has been developed using the conventional channels, because more people have tested it in more different conditions than the closed software developer ever can.

Page 30: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Linux Community

• The Open Source initiative started to make this clear to the commercial world, and very slowly, commercial vendors are starting to see the point.

• While lots of academics and technical people have already been convinced for 20 years now that this is the way to go, commercial vendors needed applications like the Internet to make them realize they can profit from Open Source.

Page 31: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Linux Community• Now Linux provides more than the operating

system: there is an entire infrastructure supporting the chain of effort of creating an operating system, of making and testing programs for it, of bringing everything to the users, of supplying maintenance, updates and support and customizations, etcetera.

• Today, Linux is ready to accept the challenge o a fast-changing world.

Page 32: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Linux Today

• Linux is well-known as a stable and reliable platform, providing database and trading services for companies like Amazon, the well-known online bookshop, US Post Office, the German army and many others.

• Especially Internet providers and Internet service providers have grown fond of Linux as firewall, proxy- and web server, and you will find a Linux box within reach of every UNIX system administrator who appreciates a comfortable management station.

Page 33: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Linux Today• Clusters of Linux machines are used in the

creation of movies such as "Titanic", "Shrek" and others.

• In post offices, they are the nerve centers that route mail and in large search engine, clusters are used to perform internet searches.

• These are only a few of the thousands of heavy-duty jobs that Linux is performing day-to-day across the world.

Page 34: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.
Page 35: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.
Page 36: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.
Page 37: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Part 3

Overview of Linux Features

Page 38: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Multitasking OS

• Every application has their own memory space so,– Things that die don’t take other programs with

it– Can’t hog the memory unless instructed to do

so

• The kernel monitors everything

Page 39: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Multi-user

• One computer can serve the needs of many users at once

• Each user can have different settings for the same application

• Standard Unix/Linux concept

Page 40: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Linux File System

• Many different types of file systems can be used

• Automatic defragmentation

• Can read other, non-Linux, file systems (FAT and NTFS for starters)

Page 41: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Stability

• Because everything is separated, a reboot or a freeze caused by a program is almost non-existant

• Linux computers have uptimes that stretch many months and even years!

Page 42: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Programmable shells

• Linux is the most flexible operating system available whereby programmers can write their own programs inside Linux shells

• Linux is device independence as well as Unix

• Programmers around the world developed the drivers of many hardware available for Linux.

Page 43: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Part 4

Linux Command Line & File Structure

Page 44: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Linux command

• Linux is case sensitive i.e. WHO is not same as who

• Linux shell is a command program to communicate with a computer

• Shell interprets the command that you enter on keyboards

• Shell commands can be used to automate various programming tasks

Page 45: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Linux command

• Usually short and cryptic like– vi or rm

• Commands may also have modifiers for advance options like:– “ls –l” and “mv –R” are different that “ls” or

“mv” respectively

Page 46: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Some Linux commands

• ls, Give a listing of the current directory. Try also ls -l

• cp, Copy file from source to destination

• mv, Move file from source to destination. If both are the same directory, the file is renamed

• vi, Edit a file. vi is one of the most powerful text editors

• chmod, Change file permissions

• mkdir, rmdir Make/Remove a directory

• cd, Change directory

• rm, Remove a file. Can also remove directory tree

• man ls, Get help for ls. All commands have help

Page 47: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

ls

Page 48: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

cp

Page 49: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

mv

Page 50: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

rm AND mkdir

Page 51: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Linux Users

Page 52: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

Basic File Structure

Page 53: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

File Permission

Page 54: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

File Permission

Page 55: Chapter 4 Open Source Linux. MODULE OVERVIEW Part 1 What is Linux? Part 2 Linux Community & Open Source Part 3 Overview of Linux Features Part 4 Linux.

chmod