CS 6560 Operating System Design Lecture 3:Tour of GNU/Linux.

Slides:



Advertisements
Similar presentations
UNIX Overview. 2 UNIX UNIX is a multi-user and multi-tasking operating system. Multi-tasking: Multiple processes can run concurrently. Example: different.
Advertisements

Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
EMT 2390L Lecture 4 Dr. Reyes Reference: The Linux Command Line, W.E. Shotts.
Unix. Outline Commands Environment Variables Basic Commands CommandMeaning lslist files and directories ls -alist all files and directories mkdirmake.
NETW-240 Shells Last Update Copyright Kenneth M. Chipps Ph.D. 1.
CS 497C – Introduction to UNIX Lecture 22: - The Shell Chin-Chih Chang
CS Lecture 03 Outline Sed and awk from previous lecture Writing simple bash script Assignment 1 discussion 1CS 311 Operating SystemsLecture 03.
UNIX Overview. 2 UNIX UNIX is a multi-user and multi-tasking operating system. Multi-tasking: Multiple processes can run concurrently. Multi-user: different.
1 UNIX essentials (hands-on) the directory tree running programs the shell (using the T-shell) → command line processing → special characters → command.
Shell Script Examples.
Linux Commands LINUX COMMANDS.
CS 141 Labs are mandatory. Attendance will be taken in each lab. Make account on moodle. Projects will be submitted via moodle.
Introduction to Linux Operating System Tutorial 1
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
Introduction to Shell Script Programming
1 Operating Systems Lecture 3 Shell Scripts. 2 Brief review of unix1.txt n Glob Construct (metacharacters) and other special characters F ?, *, [] F Ex.
An Introduction to Unix Shell Scripting
Introduction to Computer Organization & Systems Topics: Intro to UNIX COMP John Barr.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1 © Copyright IBM Corporation 2008 Unit 8 Shell.
The UNIX Shell. The Shell Program that constantly runs at terminal after a user has logged in. Prompts the user and waits for user input. Interprets command.
Introduction to Unix – CS 21 Lecture 9. Lecture Overview Shell description Shell choices History Aliases Topic review.
1 UNIX essentials (hands-on) the directory tree running programs the shell → command line processing → special characters → command types → shell variables.
System Administration Introduction to Unix Session 2 – Fri 02 Nov 2007 Reference:  chapter 1, The Unix Programming Environment, Kernighan & Pike, ISBN.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
Introduction to Linux OS (IV) AUBG ICoSCIS Team Prof. Volin Karagiozov March, 09 – 10, 2013 SWU, Blagoevgrad.
UNIX Shell Script (1) Dr. Tran, Van Hoai Faculty of Computer Science and Engineering HCMC Uni. of Technology
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
1 System Administration Introduction to Scripting, Perl Session 3 – Sat 10 Nov 2007 References:  chapter 1, The Unix Programming Environment, Kernighan.
1 Operating Systems Lecture 2 UNIX and Shell Scripts.
Unix/Linux cs3353. The Shell The shell is a program that acts as the interface between the user and the kernel. –The shell is fully programmable and will.
L&T Infotech1 UNIX – Getting Started - Aneesh Ramani.
Shell Advanced Features. Module 8 Shell Advanced Features ♦ Introduction In Linux systems, the shells are often referred to as command line interfaces.
UNIX An Introduction. Brief History UNIX UNIX Created at Bell Labs, 1969 Created at Bell Labs, 1969 BSD during mid 70s BSD during mid 70s AT&T began offering.
CSC414 “Introduction to UNIX/ Linux” Lecture 5. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
CS252: Systems Programming Ninghui Li Slides by Prof. Gustavo Rodriguez-Rivera Topic 7: Unix Tools and Shell Scripts.
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Linux Commands C151 Multi-User Operating Systems.
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
A Brief Overview of Unix Brandon Bohrer. Topics What is Unix? – Quick introduction Documentation – Where to get it, how to use it Text Editors – Know.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
Lecture 1: Introduction, Basic UNIX Advanced Programming Techniques.
CS 403: Programming Languages Lecture 20 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
Learning Unix/Linux Based on slides from: Eric Bishop.
Introduction to Scripting Workshop February 23, 2016.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
Bash Scripting CIRC Summer School 2016 Baowei Liu CIRC Summer School 2016 Baowei Liu.
Tutorial of Unix Command & shell scriptS 5027
CIRC Winter Boot Camp 2017 Baowei Liu
The UNIX Shell Learning Objectives:
Part 1: Basic Commands/Utilities
Some Linux Commands.
C151 Multi-User Operating Systems
The Linux Operating System
Shell Script Assignment 1.
CSE 303 Concepts and Tools for Software Development
Tutorial of Unix Command & shell scriptS 5027
Basic UNIX OLC Training.
Introduction to UNIX.
Tutorial of Unix Command & shell scriptS 5027
CS 60 Discussion Review.
John Carelli, Instructor Kutztown University
Tutorial of Unix Command & shell scriptS 5027
Linux Shell Script Programming
CSE 303 Concepts and Tools for Software Development
Linux Commands LINUX COMMANDS.
Introduction to Linux Commands
LPI Linux Certification
Presentation transcript:

CS 6560 Operating System Design Lecture 3:Tour of GNU/Linux

More on Kernel Compiling Configuration: –make defconfig –make menuconf –Looking at.conf Making the initrd –Documentation on initrd and mkinitrd –Dealing with incompatibilities

Some references An introduction to Linux: – An introduction to the Bash shell – Guide/html/index.htmlhttp://tldp.org/LDP/Bash-Beginners- Guide/html/index.html

Tour of Linux Accounts Logging in and out Getting help Shells: bash Common commands Editors Compiler: gcc Make Services

Getting Help man info Documents directory of the source google

Shells Why have shells? –Giving commands (requests) to the system What is a shell? –Command interpreter –Basic commands: internal and external Internal: –Control structures (if, while, for, break, continue, exit) –Job control (fg, jobs) –Current status (cd, pwd, ) –I/O (read, echo, printf) External – loaded into new process What shells are available? –sh, csh, tcsh, zsh, bash, rc, etc.

Bash Shell Syntax See “info bash” Everything is broken into words first Shell variables –variables are stored as strings –variables can be assigned values –use of $ to get value –export: shell -> environmental variable Parameters –$1, $2, $* –set, unset, shift Quoting and expanding –Several types of expansions: Brace Expansion: Expansion of expressions within braces. Tilde Expansion: Expansion of the ~ character. Shell Parameter Expansion: Expansion of variables to their values. Command Substitution: Using the output of a command as an argument. Arithmetic Expansion: Using arithmetic in shell expansions. Filename Expansion: wild cards and square brackets –single and double quotes, escaping with backslash Pipes, filters, redirection to form pipelines –| > > Control structures: while, for, until

The Shell as a programming environment Creating a script #! notation Executing the script –sourcing with. or source –invoking by name (must set the permissions)

External Commands File and directory manipulation –cp, rm, chmod, mkdir, rmdir, ls Filters –grep, sort, cat, head, tail, cut, paste, od, tr, pr, wc Program development –Gcc, make Text processing System administration

Some Common External Commands: file and directory manipulation lsList directory entries cdChange directory pwdPrint path of current directory chmodChange permissions mkdirCreate a new directory rmdirRemove a directory mvMove a directory entry rmRemove a directory entry

Some Common External Commands: text manipulation (filters) catConcatenate multiple files to standard output morePaged output to standard output lessFancier version of more headShow the first few lines of a file tailShow the last few lines of a file grepSearch files for a pattern cutCut columns of text from a file odOctal dump a file (also: hex,char,binary) sortSort a file trTranslate a file character by character prFormat a file for printing wcCount words, lines, characters

Unix Permissions Each file and directory has an owner and a group membership Permissions are organized by user (owner), group, and others –u = user, g = group, o = others Permissions consists of read, write, and execute for each type of user –r = read, w = write, x = execute Permissions can be viewed with the ls command and changed with the chmod command. Permissions meanings are different for regular files than for directories (see man page for ls and chmod). Examples in class

Editors vi (now vim) emacs pico

Getting Organized Use permissions for privacy Organize your work in directories

Program Development Shells Perl C: gcc Use of make (see info make)

The proc file system Shows a view of the kernel in terms of files For details see – man proc –/usr/src/linux/Documentation/filesystems/proc.txt Assignment #2 - using proc to get information about a machine

Services Many processes run in the background taking care of things such as printing and logging people in. Vmware-tools is an example service. Centos has a GUI interface to its service through the system configuration menu. Services can be controlled directly from command lines and scripts located in /etc/init.d and referenced from /etc/rc.d according to runtime level. - see the scripts for vmware-tools