The Linux Operating System



Similar documents
Cisco Networking Academy Program Curriculum Scope & Sequence. Fundamentals of UNIX version 2.0 (July, 2002)

HP-UX Essentials and Shell Programming Course Summary

Beginners Shell Scripting for Batch Jobs

A Brief Introduction to the Use of Shell Variables

A Crash Course on UNIX

CSE 265: System and Network Administration

Command Line - Part 1

LSN 10 Linux Overview

Linux System Administration on Red Hat

System Administration and your Bio-Linux Machine

Tutorial 0A Programming on the command line

Basic C Shell. helpdesk@stat.rice.edu. 11th August 2003

Unix Shell Scripts. Contents. 1 Introduction. Norman Matloff. July 30, Introduction 1. 2 Invoking Shell Scripts 2

Introduction to the UNIX Operating System and Open Windows Desktop Environment

Unix the Bare Minimum

Unix Sampler. PEOPLE whoami id who

The Linux Operating System and Linux-Related Issues

LECTURE-7. Introduction to DOS. Introduction to UNIX/LINUX OS. Introduction to Windows. Topics:

Introduction to Linux and Cluster Basics for the CCR General Computing Cluster

CS 103 Lab Linux and Virtual Machines

Linux command line. An introduction to the Linux command line for genomics. Susan Fairley

CSE 265: System and Network Administration. CSE 265: System and Network Administration

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

CSE 265: System and Network Administration. CSE 265: System and Network Administration

Operating Systems. Study this screen display and answer these questions.

SSH Connections MACs the MAC XTerm application can be used to create an ssh connection, no utility is needed.

Unix Guide. Logo Reproduction. School of Computing & Information Systems. Colours red and black on white backgroun

Thirty Useful Unix Commands

Fred Hantelmann LINUX. Start-up Guide. A self-contained introduction. With 57 Figures. Springer

PrimeRail Installation Notes Version A June 9,

13. Configuring FTP Services in Knoppix

OPERATING SYSTEM SERVICES

User Manual of the Pre-built Ubuntu 9 Virutal Machine

Bash Guide for Beginners

UNIX / Linux commands Basic level. Magali COTTEVIEILLE - September 2009

Tutorial Guide to the IS Unix Service

Secure File Transfer Installation. Sender Recipient Attached FIles Pages Date. Development Internal/External None 11 6/23/08

University of Toronto

Introduction to the UNIX Operating System on IT Systems

SSH and Basic Commands

Outline. Unix shells Bourne-again Shell (bash) Interacting with bash Basic scripting References

Wolfr am Lightweight Grid M TM anager USER GUIDE

Linux Crontab: 15 Awesome Cron Job Examples

AN INTRODUCTION TO UNIX

Construction of a Web Server with a Database Facility Using Open Source Software

Chapter 10 Case Study 1: LINUX

CS 2112 Lab: Version Control

Introduction to Operating Systems

UNIX, Shell Scripting and Perl Introduction

CPSC2800: Linux Hands-on Lab #3 Explore Linux file system and file security. Project 3-1

Kernel. What is an Operating System? Systems Software and Application Software. The core of an OS is called kernel, which. Module 9: Operating Systems

Unit 10 : An Introduction to Linux OS

Linux Overview. Local facilities. Linux commands. The vi (gvim) editor

IT6204 Systems & Network Administration. (Optional)

AXIS 70U - Using Scan-to-File

Unix Scripts and Job Scheduling

Introduction to Running Hadoop on the High Performance Clusters at the Center for Computational Research

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines

Extending Remote Desktop for Large Installations. Distributed Package Installs

GeBro-BACKUP. Die Online-Datensicherung. Manual Pro Backup Client on a NAS

24/08/2004. Introductory User Guide

Security Tools - A Try Before You Buy Web-Based Approach

Lecture 1: Introduction to UNIX

L01 Introduction to the Unix OS

IBM WebSphere Application Server Version 7.0

1 Basic commands. 2 Terminology. CS61B, Fall 2009 Simple UNIX Commands P. N. Hilfinger

An Introduction to the Linux Command Shell For Beginners

Red Hat Linux Administration II Installation, Configuration, Software and Troubleshooting

Installing Sun's VirtualBox on Windows XP and setting up an Ubuntu VM

Outline: Operating Systems

There s a variety of software that can be used, but the approach described here uses freely available Cygwin software: (1) Cygwin/X (2) Cygwin/openssh

SAMBA SERVER (PDC) Samba is comprised of a suite of RPMs that come on the RHEL/Fedora CDs. The files are named:

Tour of the Terminal: Using Unix or Mac OS X Command-Line

The Einstein Depot server

USEFUL UNIX COMMANDS

Setting up PostgreSQL

Using Internet or Windows Explorer to Upload Your Site

Operating System Structure

An Embedded Wireless Mini-Server with Database Support

HARFORD COMMUNITY COLLEGE 401 Thomas Run Road Bel Air, MD Course Outline CIS INTRODUCTION TO UNIX

Installing F-Secure Anti-Virus (FSAV) Table of Contents. FSAV 8.x and FSLS 7.x End of Life. FSAV 9.x and FSLS 9.x End of Life

Installation Guide Mac OS X Operating Systems

Linux für bwgrid. Sabine Richling, Heinz Kredel. Universitätsrechenzentrum Heidelberg Rechenzentrum Universität Mannheim. 27.

SUSE Manager in the Public Cloud. SUSE Manager Server in the Public Cloud

Streamline Computing Linux Cluster User Training. ( Nottingham University)

SWsoft Plesk 8.3 for Linux/Unix Backup and Restore Utilities

Ubuntu Linux Reza Ghaffaripour May 2008

PKZIP 6.0 Command Line Getting Started Manual

Programming for GCSE Topic H: Operating Systems

Linux Development Environment Description Based on VirtualBox Structure

Installing a Symantec Backup Exec Agent on a SnapScale Cluster X2 Node or SnapServer DX1 or DX2. Summary

SAMBA VI: As a Domain Controller

Lab 1: Introduction to the network lab

Using Keil software with Linux via VirtualBox

CLC Server Command Line Tools USER MANUAL

Functions of NOS Overview of NOS Characteristics Differences Between PC and a NOS Multiuser, Multitasking, and Multiprocessor Systems NOS Server

Steps for running C-program

Transcription:

The Linux Operating System Charles Abzug, Ph.D. Department of Computer Science James Madison University Harrisonburg, VA 22807 Voice Phone: 540-568-8746; Cell Phone: 443-956-9424 E-mail: abzugcx@jmu.edu OR CharlesAbzug@ACM.org Home Page: https://users.cs.jmu.edu/abzugcx 2005 Charles Abzug

Linux 1. Brief History of Linux a) Multics Assembly-Language Unics (DEC PDP-7) B-language Unix C-language Unix AT&T SVR4 BSD Unix 2. Open Software Federation 3. GNU: "GNU is Not Unix." 4. The true Linux component consists principally of the kernel; remainder is GNU utilities and system software. 5. Portability: multiple platforms (Wintel, Sun SPARC, DEC Alpha, Motorola/IBM/Apple PowerPC, others) 20-Ocy-2005 2005 Charles Abzug 2

Value of Linux 1. RELATIVE Smallness 2. RELATIVE Simplicity 3. Robustness and Stability: rareness of system crashes 4. Availability of Source Code: no hassle 5. Modifiability 6. Speed, Responsiveness 7. Security 8. Immunity to PC viruses 9. Dedicated volunteer support team 20-Ocy-2005 2005 Charles Abzug 3

1. No centrality of concept Deficiencies of Linux 2. No centrality of implementation 3. Hacker culture 4. Arcaneness 20-Ocy-2005 2005 Charles Abzug 4

Command Line Interpreters ("Shells") 1. Original Unix command line interpreter: the Bourne shell (Stephen Bourne, 1979: AT&T) a) Based on Algol b) Intended to automate system admin tasks c) Concise d) Compact e) Fast f) Default prompt: $ 20-Ocy-2005 2005 Charles Abzug 5

Command Line Interpreters ("Shells") (continued) 2. The C shell (primary developer: Bill Joy, 1986: University of California at Berkeley) a) Based on the language C b) Contained enhancements for interactive use: i. command-line history ii. iii. iv. aliases built-in arithmetic filename completion v. job control c) More Complex d) More Capable e) Slower f) Default Prompt: % 20-Ocy-2005 2005 Charles Abzug 6

Command Line Interpreters ("Shells") (continued) 3. The Korn shell (David Korn, 1986: AT&T) a) Contained enhancements for interactive use: i. editable command-line history ii. aliases iii. built-in arithmetic iv. functions v. regular-expression wildcards vi. coprocessing vii. spepcial debugging features viii. job control b) Most Bourne shell scripts will run in Korn shell c) Not so complex, not so slow as the C shell d) Runs not only on Unix, but also on OS/2, VMS, and DOS. e) Default Prompt: % 4. Public Domain Korn Shell: free, portable, POSIX-compliant; pdksh 20-Ocy-2005 2005 Charles Abzug 7

Command Line Interpreters ("Shells") (continued) 5. The TC shell: an expanded version of the C shell, with additional features: tcsh 6. The Z shell: a Korn shell clone, enhanced with many TC features (Paul Falsted) 7. The Bourne Again Shell: Brian Fox, "Free Software Foundation"): bash a) Runs Bourne shell scripts unmodified. b) Adds the most useful features of the C shell. c) Adds the most useful features of the Korn shell To find out what shells are available on the machine to which you are logged in: $ cat /etc/shells To select a shell (example): $ chsh 20-Ocy-2005 2005 Charles Abzug 8

Uses of a Command Line Interpreter ("Shell") 1. Interprets commands entered interactively at the command prompt. a) Searches for the file implementing the command. b) Spawns a subprocess to execute it. 2. Interprets and runs Command Procedures (called "Shell Scripts" in UnixSpeak) a) Runs through the Command Procedure line by line. b) Executes the command of each line in turn as if it had been entered on the keyboard at the command-line prompt (shell prompt). 3. Customizes the user's environment, e.g., by setting variables that: a) define the search path. b) set default permissions. c) set the command-line prompt. d) set the terminal type. e) set the values of variables required for specific applications: i. windows. ii. text-processing programs. iii. filename and command completion. iv. spell checking. f) define aliases. 20-Ocy-2005 2005 Charles Abzug 9

The file /etc/passwd The file contains environmental variables for each user: HOME SHELL USER home directory login shell login name LOGNAME login name PATH an ordered list separated by colons indicating the order in which various directories are to be searched for the presence of a file which the user may select later to run last entry in a line of the file: the name of the program to run at the conclusion of the login procedure (normally this would be a shell program) 20-Ocy-2005 2005 Charles Abzug 10

Executing a Command-Line Interpreter ("Shell") To find out what Command-Line Interpreters ("shells") are available on the system: Results on "helium": $ cat /etc/shells /usr/bin/sh /usr/bin/csh /usr/bin/ksh /usr/bin/jsh /bin/bash /bin/sh /bin/ash /bin/bsh /bin/csh /bin/tcsh /bin/ksh /bin/jsh /sbin/sh /sbin/jsh /aux/bin/bash /bin/rbash 20-Ocy-2005 2005 Charles Abzug 11

Types of Commands for Bourne, Bash, and Korn Shells NOTE: These are executed in the order of preference specified below: 1. Aliases: nicknames defined either by the user or system-wide for specific commands. 2. Keywords: meanings defined within the command-line interpreter (shell). 3. Functions: groups of commands organized as separate routines and stored within the memory of the command-line interpreter (shell). 4. Built-In Commands: commands whose execution is defined within the command-line interpreter (shell). 5. Executable Programs: resident on disk and located in one of the directories specified in the user's PATH. THUS, for example, if the user types the command $ foo the command-line interpreter will first check to see whether "foo" has been defined as an alias. If not, then it will search its list of keywords. If not present here, then it will search its list of functions. If still not present, it will search for it as an internal command within the command-line interpreter. Finally, it will search in order the directories on the PATH for an executable file of that name. 20-Ocy-2005 2005 Charles Abzug 12

Some Useful Commands 1. ps au displays a list of all process running on the system by all users. 2. pstree displays all processes running in the form of a tree whose root is the process init, the first process that runs on boot-up. 3. chsh changes the user's command-line interpreter to be run immediately following login. 4. ls provides a listing of the contents of the current working directory. 5. ls l provides a much more informative ("long" format) directory listing. 6. pwd prints the name of the current working directory. 7. cp file1 file2copies the contents of the file file1 to a file file2. 8. chmod changes permissions on files and directories. 9. umask changes the default permissions of all subsequently created files and directories. 10. passwd changes the user's password. 20-Ocy-2005 2005 Charles Abzug 13

Entering, Compiling, and Running a Program 1. Use a text editor, such as vi, to create your source code file. Name your source file either program1.c or program2.c, as appropriate to the assignment. 2. Compile using the GNU C compiler, as follows: gcc gcc o program1 program1.c o program2 program2.c 3. Run your program: program1 program2 program2 s program2-1 10 50 20-Ocy-2005 2005 Charles Abzug 14

Instruction Manual for the Use of the vi Editor Please see the following URL: http://www.eng.hawaii.edu/tutor/vi.html 20-Ocy-2005 2005 Charles Abzug 15

END 20-Ocy-2005 2005 Charles Abzug 16