linux tools shell script.. computer science

Singpran
Chapter01_linux_basics32.ppt

Introduction
to
Unix and Linux

*

What is an Operating System?

  • 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.
  • Tasks the operating system must perform:
  • Control Hardware - The operating system controls all the parts of the computer and attempts to get everything working together.
  • Run Applications - Another job the OS does is run application software. This would include word processors, web browsers, games, etc...
  • Manage Data and Files - The OS makes it easy for you to organize your computer. Through the OS you are able to do a number of things to data, including copy, move, delete, and rename it. This makes it much easier to find and organize what you have.

*

*

*

Operating System Functions

  • Initialize computer hardware
  • Allocate system resources to programs
  • Keep track of multiple programs running at same time
  • Provide organized method for all programs to use system devices

UNIX Structure

Introduction to Linux

*

*

Structure

*

Parts of the UNIX OS

  • 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.
  • The Shell and Graphical User Interfaces (GUIs) - basic UNIX shells provides a “command line” interface which allows the user to type in commands. These commands are translated by the shell into something the kernel can comprehend, and then executed by the kernel.
  • The Built-in System Utilities - are programs that allow a user to perform tasks which involve complex actions. Utilities provide user interface functions that are basic to an operating system, but which are too complex to be built into the shell. Examples of utilities are programs that let us see the contents of a directory, move & copy files, remove files, etc...
  • Application Software & Utilities – these are not part of the operating system, per se. They are additional programs that are bundled with the OS distribution, or available separately. These can range from additional or different versions of basic utilities, to full scale commercial applications.

*

*

UNIX

Unix is a multi-user, multi-tasking operating system.

You can have many users logged into a system simultaneously, each running many programs.

It's the kernel's job to keep each process and user separate and to regulate access to system hardware, including cpu, memory, disk and other I/O devices.

*

*

General Characteristics of UNIX as an Operating System (OS)

  • Multi-user & Multi-tasking - most versions of UNIX are capable of allowing multiple users to log onto the system, and have each run multiple tasks. This is standard for most modern OSs.
  • Over 40 Years Old - UNIX is over 40 years old and it's popularity and use is still high. Over these years, many variations have spawned off and many have died off, but most modern UNIX systems can be traced back to the original versions. It has endured the test of time. For reference, Windows at best is half as old (Windows 1.0 was released in the mid 80s, but it was not stable or very complete until the 3.x family, which was released in the early 90s).
  • Large Number of Applications – there are an enormous amount of applications available for UNIX operating systems. They range from commercial applications such as CAD, Maya, WordPerfect, to many free applications.
  • Free Applications and Even a Free Operating System - of all of the applications available under UNIX, many of them are free. The compilers and interpreters that we use in most of the programming can be downloaded free of charge.
  • Less Resource Intensive - in general, most UNIX installations tend to be much less demanding on system resources. In many cases, the old family computer that can barely run Windows is more than sufficient to run the latest version of Linux.
  • Internet Development - Much of the backbone of the Internet is run by UNIX servers. Many of the more general web servers run UNIX with the Apache web server - another free application.

*

*

History of UNIX

First Version was created in Bell Labs in 1969.

Some of the Bell Labs programmers who had worked on this project, Ken Thompson, Dennis Ritchie, Rudd Canaday, and Doug McIlroy designed and implemented the first version of the Unix File System on a PDP-7 along with a few utilities. It was given the name UNIX by Brian Kernighan.

00:00:00 Hours, Jan 1, 1970 is time zero for UNIX. It is also called as epoch.

*

*

History of UNIX

1973 Unix is re-written mostly in C, a new language developed by Dennis Ritchie.

Being written in this high-level language greatly decreased the effort needed to port it to new machines.

*

*

History of UNIX

Introduction to Linux

1977 There were about 500 Unix sites world-wide.

1980 BSD 4.1 (Berkeley Software Development)

1983 SunOS, BSD 4.2, System V

1988 AT&T and Sun Microsystems jointly develop System V Release 4 (SVR4). This later developed into UnixWare and Solaris 2.

1991 Linux was originated.

An interesting and rather up-to-date timeline of these variations of UNIX can be found at http://www.levenez.com/unix/history.html.

*

*

Flavors of UNIX

  • These can be grouped into two categories: Open Source and Trademarked
  • Trademarked : (redistribution and modification prohibited or restricted; not free)
  • Solaris .
  • IRIX
  • Mac OS X .
  • and many others...
  • Open Source: (source code is readily available and free to modify)
  • FreeBSD
  • Linux Distributions:
  • RedHat and the Fedora Project (maintained by RedHat)
  • Mandrake
  • Debian
  • SuSE
  • Slackware
  • Ubuntu
  • and many others...
  • As a side note, Linux is a open source UNIX-based OS that was originally developed in 1991 by Linus Torvalds, a Finnish undergraduate student.

*

*

What is Linux?

  • A clone of Unix
  • Developed in 1991 by Linus Torvalds, a Finnish graduate student
  • Inspired by and replacement of Minix

Minix was a mini-OS originally developed by Andrew Tanenbaum to teach of the fundamentals of operating system design 

  • Linus' Minix became Linux
  • Consist of
  • Linux Kernel
  • GNU (GNU is Not Unix) Software

differs from Unix by being free software and containing no Unix code.

  • Software Package management

*

The GNU Linux project was created for the development of a Unix-like operating system that comes with source code that can be copied, modified, and redistributed

What is LINUX

Introduction to Linux

Linux is a free Unix-type operating system originally created by Linus Torvalds with the assistance of developers around the world.

The Kernel version 1.0 was released in 1994 and today the most recent stable version is 2.6.9

Developed under the GNU General Public License , the source code for Linux is freely available to everyone.

*

*

What is Linux?

  • Originally developed for 32-bit x86-based PC
  • Ported to other architectures, eg.
  • Alpha, VAX, PowerPC, IBM S/390, MIPS, IA-64
  • PS2, TiVo, cellphones, watches, Nokia N810, NDS, routers, NAS, GPS, …

*

Which Linux Distribution is better?

  • > 300 Linux Distributions
  • Slackware (one of the oldest, simple and stable distro.)
  • Redhat
  • RHEL (commercially support)
  • Fedora (free)
  • CentOS (free RHEL, based in England)
  • SuSe ( based in German)
  • Gentoo (Source code based)
  • Debian (one of the few called GNU/Linux)
  • Ubuntu (based in South Africa)
  • Knoppix (first LiveCD distro.)

*

*

The Free Software Foundation
and the GNU Project

  • Free software foundation (FSF)
  • Software itself should not be restricted in distribution by standard commercial license agreement
  • GNU project
  • Completely free version of UNIX
  • Written from scratch

*

The Free Software Foundation and the GNU Project (continued)

  • Software license
  • Legal definition of who can use software and how it can be used
  • GNU general public license (GPL)
  • Very different from standard commercial software license
  • Author agrees to give away source code
  • Anyone is licensed to redistribute it in any form

*

Linux Arrives

  • Linus Torvalds
  • Decided to create UNIX-like operating system kernel for IBM-compatible PC
  • Solicited help via Internet
  • Released Linux kernel under GPL
  • Linux development method
  • Person identifies need and begins writing program
  • Developer announces project on Internet

*

Linux Arrives (continued)

  • Linux development method (continued)
  • Others respond and work on different parts of project
  • Person leading project releases software
  • People download source code and try program; send back information about problems
  • Developers fix bugs
  • Forking
  • Creating new project based on existing source code

*

Motivating Free Software Developers

  • Why would so many people devote so much effort to something without expecting any reward?
  • Fills developer’s specific technical need
  • Respect of like-minded professionals
  • Sense of contribution and community
  • Valuable boost to developer’s resume

*

The Strengths Of Linux

  • Stability
  • Security
  • Speed
  • Cost
  • Multiprocessing and other high-end features
  • Applications

*

Hardware Requirements

  • Can run on very minimal hardware
  • Recommend that computer have minimum of:
  • 1 GB of free disk space
  • 64 MB of RAM
  • For Red Hat Enterprise Linux installations:
  • 256 MB of RAM
  • 300 MHZ CPU
  • 800 MB of free disk space

*

Version Numbering

  • Version numbers assigned to:
  • Each release of Linux kernel
  • Each component of Linux distribution
  • Linux distributions
  • Most users select latest available version

*

Linux Certification

  • Industry certification programs
  • Red Hat Certified Technician
  • Red Hat Certified Engineer
  • LPI Certification (Linux Professional Institute)
  • Linux Certified Administrator (LCA) Certification
  • Linux+ Certification
  • Novell Certified Linux Engineer

*

Linux Certification (continued)

  • Red Hat’s certification program
  • Very highly regarded
  • Training program consists of three courses

*

The Work of a System Administrator

  • Linux is increasingly part of information technology infrastructure of large organizations
  • Knowledge of Linux can set you on path to a fulfilling and profitable career

*

Careers in Linux

  • System administrator
  • Network administrator
  • Software engineer
  • Trainer
  • Technical writer
  • Product marketing
  • Business consultant

ECU CS server Unix version

jomer@cs10:~$ cat /etc/os-release

NAME="Ubuntu"

VERSION="18.04.3 LTS (Bionic Beaver)"

ID=ubuntu

ID_LIKE=debian

PRETTY_NAME="Ubuntu 18.04.3 LTS"

VERSION_ID="18.04"

HOME_URL="https://www.ubuntu.com/"

SUPPORT_URL="https://help.ubuntu.com/"

BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"

PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"

VERSION_CODENAME=bionic

UBUNTU_CODENAME=bionic

*