introduction to linux david e. douglas university professor—information systems walton college of...

27
Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business [email protected]

Post on 20-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

Introduction to Linux

David E. DouglasUniversity Professor—Information Systems

Walton College of [email protected]

Page 2: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

Reading assignments Mainframe SOA

Cloud, SOA, Integration

Sanity Check, Take Heart, Tainted Ones

Carico—most cost effective platform

Ageless Mainframes Support Multiple Antares Missions

Insurance, CICS/DB2, mainframe hosting

Examining the Usefulness of zIIP and zAAP

z Integrated Information Processor

z Application Assist Processor

Page 3: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

Linux and Open Source Linux-Who & When

Linus Torvalds, graduate Student; Helsinki, Finland

Free Software Foundation- Who, What, WhenLarry Stallman, 1985, source code free

Open Source Initiative-Who, What, When

Jon Hall and others, 1998; used Open instead of Free

GNU General Public License

copyleft—requires derived works to be open

Linus Torvalds used this License for Linux

Page 4: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

Using LINUX: A Beginner’s Guide

By David Douglas and Peggy L. Lane

Page 5: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu
Page 6: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

The major operating system services provide mechanisms for…

Execution of a program,

Input and output operations performed by programs,

Communication between processes,

Error detection and reporting, and

Manipulation of all types of files.

Page 7: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

Features of the Linux OS

Multiuser capability

Portability

Multitasking

Ability to use multiple processors

Multiple modes of operation

Page 8: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

Multiuser Capability

Linux handles multiple requests by a number of users.

Many companies run Linux as their main OS for their business for this reason.

Page 9: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

Portability

Portability means Linux can run on numerous hardware systems.

Can run on either CISC or RISC processors:– CISC – Complex instruction set computer– RISC – Reduced instruction set computer

(reduced number of instructions because the hardware performs tasks not in the instruction set)

Page 10: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

Multitasking

When an OS handles multiple jobs at seemingly the same time.Linux uses preemptive multitasking– The OS has the ability to take control of the

system from an application– Other method is cooperative multitasking –

the application takes control of the system resource.

– Which one can crash the whole system if the application crashes???

Page 11: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

Ability to Use Multiple Processors

Linux can accommodate up to 32 processors.

Also uses multithreading– Allows for a program to be split across several

processors – with each processor working on a different

piece of the program at the same time.

Page 12: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

Multiple Modes of Operation

Graphical User Interface (GUI)

Text – commands are used to navigate the Linux system and write shell scripts.

Access text mode in the Linux OS via a shell (must follow its syntax or rules):– sh: the original shell(Bourne Shell by Steven Bourne)– bash: default shell (usually) ba = Bourne again shell– csh: C-shell that uses a C-like syntax.– ksh: Publicly licensed Korn shell by David Korn.

Page 13: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

Layered View

Users

AUI – Application user’s interface – (LINUX shell, commands, and application

programs)

API – Application Programmer’s Interface– language libraries and system call interface

Operating system kernel – core of the OS

Computer hardware

Page 14: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

October, 1991

Posted on a newsgroup:– “I’m doing a (free) operating system (just a

hobby, won’t be big and professional like GNU) for 386 (486) clones.”

– Linus Torvalds, 21 year old student at the University of Helsinki, Finland

Page 15: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

A few things to remember

LINUX was designed to be a command line user interface.

Everything in LINUX is a file.– Even devices (hard drives, floppy drives, etc.)

LINUX is case sensitive. – The file name “resume” is NOT the same file

name as “Resume” or “RESUME”.– Linux commands are all lower case and

environment variables are all upper case

Page 16: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

LINUX System File Structure

Root directory (/) – At the top of the file system hierarchy.– Denoted by /– Can be thought of as the master cabinet that

contains all drawers - folders, and files.

Page 17: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

LINUX System File Structure

/bin (binary)– contains executables for every user

/boot– contains the kernel image, system map, bootstrap,

etc.

/dev– contains special files that represent hardware devices

/etc– contains configuration files

/home – contains users’ home directories

Page 18: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

LINUX System File Structure

/lib– contains libraries

/media/mnt– contains mount points for other file systems

/opt– used to install add-on software packages

/proc– virtual file system (in memory) contains kernel & process info

/root– home directory for root user. – Protected from normal users.

/sbin– contains system admin executables (super user bin)

Page 19: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

LINUX System File Structure

/srv– Services

/subdomain/sys/tmp– temporary storage space

/usr– UNIX System Resources - contains all nonessential programs

and libraries, which can be either NFS mount or read only.– Contains numerous subdirectories. One of which is bin.

/var – contains log & spool files, temp storage space (other than /tmp)

Page 20: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

The /bin folder

Page 21: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

/bin

Contains general-purpose commands such as:cat – concatenates or displays fileschmod – changes security mode of a file or directorydate – displays the system date.echo – displays a messagekill – ends a processmail – read mail or send mail to usersmore – browse or page through a text file one page at a time (use spacebar to advance by page)ps – shows processes on a system

Page 22: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

/bin

mkdir – create one or more directories under a parent directory.cp – copies files from one directory to anothermv – moves files from one directory to anotherpwd – displays your current pathls – List contents of a directory. – -l option lists file in long format – -r option lists in reverse alphabetical order.

rm – removes a file – -r option deletes a specified directory and its contents.

rmdir – removes a directory (must be empty)

Page 23: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

What is my “default” directory?

/home/userid

All of your files should be placed in or under this directory.

Looks like this: userid@elinux:~>

To get to your “home” no matter where you are, type:– cd ~ (and press the enter key) – be sure to

leave a space between cd and ~!

Page 24: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

A detailed Command Reference Guide

http://www.perpetualpc.net/srtd_commands_rev.html

Page 25: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

Other Commands

cal – displays calendarpasswd – allows you to change your password.cd .. – goes “up” a level in the structurecd / - goes to the root directory (if access is granted)echo $HOME – displays your home directorytree – lists the structure (folders and files)

Page 26: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

Editors

There are many editors for the Linux environment—some are listed below– vi (visual editor) is the most popular editor– emacs– pico– joe– jpico; the simple editor used for this class

Page 27: Introduction to Linux David E. Douglas University Professor—Information Systems Walton College of Business ddouglas@walton.uark.edu

Tree Commandpllane@elinux:~> tree.|-- china| |-- clothing| | |-- clothing| | `-- clothinginIndia| |-- food| | `-- foodinIndia| `-- sports| `-- sportsinChina`-- india |-- food | `-- foodinIndia `-- sports

7 directories, 5 filespllane@elinux:~>