June 1, 1999UNIX - Basic Environment1 Introduction to UNIX A. Basic Environment.

Slides:



Advertisements
Similar presentations
Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Advertisements

Jump to first page Unix Commands Monica Stoica Jump to first page Introduction to Unix n Unix was born in 1969 at Bell Laboratories, a research subdivision.
Chapter One The Essence of UNIX.
1 Introduction to UNIX Ke Liu
NETW-240 Shells Last Update Copyright Kenneth M. Chipps Ph.D. 1.
CS 497C – Introduction to UNIX Lecture 26: - The Process Chin-Chih Chang
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
Lesson 22 – Introduction to Linux Systems Administration.
More Shell Basics CS465 - Unix. Unix shells User’s default shell - specified in /etc/passwd file To show which shell you are currently using: $ echo $SHELL.
UNIX Chapter 00 A “ Quick Start ” into UNIX Operating System Mr. Mohammad Smirat.
Guide To UNIX Using Linux Third Edition
Guide to Linux Installation and Administration, 2e1 Chapter 6 Using the Shell and Text Files.
Lecture 01CS311 – Operating Systems 1 1 CS311 – Lecture 01 Outline Course introduction Setting up your system Logging onto the servers at OSU with ssh.
CMPE 151: Network Administration Spring Class Description Focus: system and network administration. Sequence of exercises. E.g., installing/configuring.
UNIX Utilities Learning Objectives: 1. To understand the some basic utilities of UNIX File 2. To compare UNIX shell and popular shell 3. To learn Input/Output.
1 Some basic Unix commands u Understand the concept of loggin into and out of a Unix shell u Interact with the system in a basic way through keyboard and.
7/17/2009 rwjBROOKDALE COMMUNITY COLLEGE1 Unix Comp-145 C HAPTER 2.
Linux Shell. 2 Linux Command-Line Interface ■ Linux shells: A shell is a command interpreter that allows you to type commands from the keyboard to interact.
Linux Commands LINUX COMMANDS.
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
Welcome to CSE  Name: Di Cao   Classroom: DL357  Class Time: T 8:30am - 9:18am  Office.
Overview of Linux CS3530 Spring 2014 Dr. José M. Garrido Department of Computer Science.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Chapter 9 Part II Linux Command Line Access to Linux Authenticated login using a Linux account is required to access a Linux system. The Linux prompt will.
Introduction to Unix/Linux Chapter One The Essence of UNIX.
UNIX Unbounded 5th Edition Amir Afzal Chapter 3 Getting Started
Agenda User Profile File (.profile) –Keyword Shell Variables Linux (Unix) filters –Purpose –Commands: grep, sort, awk cut, tr, wc, spell.
Cmsc 312 Operating Systems. UNIX? DOS – PC? VAX/VMS - mainframe Unix – PC, workstation, mainframe 1970 bell Lab For computer scientist? Why popular? Free.
Chapter 2: Getting Started Logon to Logout. In this chapter … Logging on The Shell Superuser Getting Help Logging off.
UNIX and Shell Programming (06CS36) Unit 1 Continued… Shrinivas R. Mangalwede Department of Computer Science and Engineering K.L.S. Gogte Institute of.
CS240 Computer Science II Introduction the Unix File System and File Related Utilities Based on “UNIX for Programmers and Users” by G.Class and K. Ables.
System Administration Introduction to Unix Session 2 – Fri 02 Nov 2007 Reference:  chapter 1, The Unix Programming Environment, Kernighan & Pike, ISBN.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
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.
Introduction to Unix (CA263) Getting Started By Tariq Ibn Aziz.
Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command.
Chapter 0 A “Quick-Start” into the UNIX Operating System.
Operating System What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. An operating.
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.
Lesson 2-Touring Essential Programs. Overview Development of UNIX and Linux. Commands to execute utilities. Communicating instructions to the shell. Navigating.
Introduction to UNIX Road Map: 1. UNIX Structure 2. Components of UNIX 3. Process Structure 4. Shell & Utility Programs 5. Using Files & Directories 6.
BIF713 Basic Unix/Linux Commands Getting Help with Commands.
ITR3 lecture 6: intoduction to UNIX Thomas Krichel
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands: whereis, which, whoami, finger, passwd, cal, date Working with Files: cat, more, less.
June 1, 1999Customizing the UNIX Environment1 Introduction to UNIX G. Customizing the UNIX Environment.
Λειτουργικά Συστήματα - Lab1 Γιάννης Πετράκης. The Operating System  Unix is a layered operating system  The innermost layer is the hardware that provides.
Introduction to Programming Using C An Introduction to Operating Systems.
UNIX History - joint venture between MIT and Bell Labs (originally called Multics) – Ken Thompson (AT&T) created an operating system to run Space.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands: which, passwd, date, ps / kill Working with Files: file, touch, cat, more, less, grep,
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
Module 1 - Introduction to Linux. Users must log-in Linux is case sensitive File and Directories naming conventions (No spaces!) Files and Directories.
1 © 2001 John Urrutia. All rights reserved. Chapter 2 Getting Started.
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
BIF713 Introduction to Linux. Agenda Getting Started: Using Linux Unix and Linux - Structure / Features Elements of the Linux Philosophy Linux Command.
Linux Tutorial Lesson Two *Getting Help in Linux *Data movement and manipulation *Relative and Absolute path *Processes Note: see chapter 1,2,3 from Linux.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
Getting Started with Linux
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
A “Quick-Start” into the UNIX Operating System
Introduction to UNIX.
Andy Wang Object Oriented Programming in C++ COP 3330
Some Linux Commands.
Tools of Web Development 1: Module C: Using Unix
Unix : Introduction and Commands
Andy Wang Object Oriented Programming in C++ COP 3330
Linux Shell Script Programming
Module 5 Getting Help.
Presentation transcript:

June 1, 1999UNIX - Basic Environment1 Introduction to UNIX A. Basic Environment

June 1, 1999UNIX - Basic Environment2 Performance Objectives Capabilities you should be able to perform following this module. 1. Describe the four functional parts of UNIX. 2. List three primary functions of the C Shell. 3. Log ON/OFF, view MOTD (logout, exit, sync). 4. Identify basic UNIX Prompts (% $ #). 5. Parse a UNIX command line. 6. Erase typing errors (stty erase). 7. Change passwords, (passwd). 8. Use Online Documentation (man, which, whereis, whatis). 9. Identify system users (who, finger). 10. Change shells (csh, sh)

June 1, 1999UNIX - Basic Environment3 Workstation Components l Hardware n Monitor n CPU n Keyboard n Mouse / pad n File Server

June 1, 1999UNIX - Basic Environment4 Network Environment l Typical Network l Types of Networks è Local Area Network - LAN è Campus è Wide Area LAN WS Router Backbone Other LANs Gateway Internet

June 1, 1999UNIX - Basic Environment5 UNIX - Software l Multi-tasking l Multi-user l UNIX Flavors è Berkeley (BSD) è AT&T (System V)

June 1, 1999UNIX - Basic Environment6 Structure of UNIX l Hardware l Kernel l Utilities l Shell Hardware Kernel Utilities Shell

June 1, 1999UNIX - Basic Environment7 Logging On l Every user has a unique name associated with a password: host login: dhk Password: (password not echoed) host% l Message of the Day displayed

June 1, 1999UNIX - Basic Environment8 Message of the Day - MOTD l Advise users of important activities regarding the computing environment. è /etc/motd l Must be kept current or users start ignoring.

June 1, 1999UNIX - Basic Environment9 Log Off l Either ^d or the command logout if: n set ignoreeof n is defined in.cshrc file l Problems logging out: n There are stopped jobs (Interrupted jobs) n Not login shell (type exit then logout)

June 1, 1999UNIX - Basic Environment10 The UNIX Shell l Command Interpreter - identifies the program to run and data streams to connect to it (file expansion). host% cd host% (successful) host% cxmod cxmod: command not found (unsuccessful)

June 1, 1999UNIX - Basic Environment11 The UNIX Shell l Programming - Shell Scripts l Files containing commands: #!/bin/sh echo -n "Enter desired root = " read root ls -l $root/* > x sort +5n -r x | more -10

June 1, 1999UNIX - Basic Environment12 The UNIX Shell l Customize Sessions & Environments l Establish "dot" files" n.cshrc n.login n.profile

June 1, 1999UNIX - Basic Environment13 Different Shells l The C-Shell (%) provides for good interactive control through History and Job Control. l The Bourne Shell ($) has some attributes that make it well suited for scripts. l The Korn Shell ($) is fully compatible with the Bourne shell and has several added features that emulate the C-Shell.

June 1, 1999UNIX - Basic Environment14 Changing Shells l Change to another shell interactively with the shell commands: è sh changes to the Bourne shell è csh changes to the C shell è tcshchanges to the T shell è bash changes to the Bourne Again shell è exit reverts to the previous shell (or logs out if in the login shell)

June 1, 1999UNIX - Basic Environment15 UNIX Prompts l Identifies the "shell" you are operating in: n % C-Shell or T-Shell n $ Bourne Shell n # Root (super user) l System checks the /etc/passwd file to determine default shell: ths:K/zY94QSf:1059:8010:ted smith,081347:/u3/ths:/bin/tcsh

June 1, 1999UNIX - Basic Environment16 UNIX Prompts l Host name prefixed to prompt to identify "current" host: è host% è mode:~>

June 1, 1999UNIX - Basic Environment17 UNIX Command Line l Syntax command [options] filename... cp -i /etc/passwd passwd l lowercase l options preceded with a - (minus) l spaces are important

June 1, 1999UNIX - Basic Environment18 UNIX Command Line l To continue a command on next line use a backslash (\) grep "ldf -e rgb" /usr/tmp/ths/sub1 | sort +4 >\ ~abc/doc/for.team5 l Commands on same line separated by semicolon (;) mv passwd file.b ; cp file.b file.d

June 1, 1999UNIX - Basic Environment19 Special Keyboard Characters l (completes a command line) l ^H l ^? l (^c ^z ^d) l (or as defined by specific utility) l

June 1, 1999UNIX - Basic Environment20 Changing The Backspace l The delete key was established as the backspace/erase function by the.login file. l It can be changed interactively with the stty command: è stty erase [shift-backspace] l Displays as: è stty erase ^H l Effective only for the current session.

June 1, 1999UNIX - Basic Environment21 Changing Passwords l Change yearly l Ground Rules

June 1, 1999UNIX - Basic Environment22 Network Information Services l NIS host% passwd Changing passwd for userid Old password: New password: Retype new password: NIS passwd changed on fileserver host% l Changes /etc/passwd file

June 1, 1999UNIX - Basic Environment23 The Password File l Lists all users of the system and attributes l Available on some systems from the path: /etc/passwd l Execute the following to bring a copy into your home directory and view it: cp ~chidhkra/passwd. cat passwd

June 1, 1999UNIX - Basic Environment24 Sample passwd File: sunclass1% more passwd root:5I2ESdPMj6rhc:0:1:Operator:/:/bin/csh daemon:*:1:1::/: sys:*:2:2::/:/bin/csh bin:*:3:3::/bin: uucp:*:4:8::/var/spool/uucppublic: sysdiag:*:0:1:Old System Diagnostic:/usr/diag/sysdiag:/usr/diag/sysdiag/sysdiag sundiag:*:0:1:System Diagnostic:/usr/diag/sundiag:/usr/diag/sundiag/sundiag nobody:NoLoginAllowed:-2:-2:Account with no privelege:/tmp:/bin/csh dao:dn2dbqtIcZ/9I:323:8006:Debbie Ortiz, :/home/sunclass1/dao:/bin/csh psn:1z.sMh0vow65w:7500:8008:Paul Norris, c-8, :/home/sunclass1/psn:/bin/csh pam:*:1016:8008:Pat Max:/home/sunclass1/pam:/bin/csh pav:B7SdcWEcSeKSU:1002:8006:Pat Vucenic:/home/sunclass1/pav:/bin/csh ths: 6q3y/n8TQ :1059:8006:Ted Spitzmiller,081347,8006x33d:/home/sunclass1/ths:/bin/csh

June 1, 1999UNIX - Basic Environment25 Learning More About UNIX l UNIX Reference Manual - URM l Print and Online Consists of sections: 1 Commands 2 System Calls 3 Library Routines 4 Special Files and Devices 5 File Formats Macros & Misc. Tables 6 Games & Demos 7 Troff 8 System Maintenance

June 1, 1999UNIX - Basic Environment26 User Reference Manual l Each entry consists of the following elements: *NAME *SYNOPSIS *DESCRIPTION SYSTEM V SYNOPSIS OPTIONS *present for all commands SYSTEM V OPTIONS FILES SEE ALSO DIAGNOSTICS BUGS

June 1, 1999UNIX - Basic Environment27 On-line Documentation l Example - What information is there for rm? host% man rm NAME rm, rmdir - remove (unlink) files or directories SYNOPSIS rm [-] [-fir] filename... rmdir directory... DESCRIPTION rm removes (directory entries for) one... rmdir removes each named directory... OPTIONS ln(1), su(1)...

June 1, 1999UNIX - Basic Environment28 On-line Documentation l MAN -K KEYWORD prints one-line summaries of all commands whose table of content entries contain any of the keywords. host% man -k password passwd (1)- change user password passwd (5)- password file vipw (8)- edit the password file getpass (3)- read a password yppasswd (1)- change login password in yellow pages host% man 5 passwd

June 1, 1999UNIX - Basic Environment29 Identifying Which Command l Using which host% which passwd /usr/local/bin/passwd host% which lo lo:aliased to exit host% which xyz xyz:Command not found.

June 1, 1999UNIX - Basic Environment30 Which Path? l Whereis will show the locations of the utility l Use full pathname l Change the order of directories in path l echo $PATH l Whatis gives quick description

June 1, 1999UNIX - Basic Environment31 Identifying UNIX Users l The finger command gives the ability to view detailed information about other users: host% finger spitzmiller Login name: ths In real life: Ted Spitzmiller Directory: /scc/users/ths Shell: /usr/bin/tcsh On since Apr 11 10:33:53 on pts/15 from pcted.lanl.gov

June 1, 1999UNIX - Basic Environment32 Identifying UNIX Users l The who command identifies current users who are logged on: host% who rbarrettttyp0 Apr 03 13:46 (spam.lanl.gov) ahgttyp1 Apr 02 08:27 (penning.lanl.gov) jbpttyp2 Apr 02 08:58 (telemachus.lanl.) jimmttyp3 Apr 02 08:52 (ts800-1-tig.lanl) operatorttyp6 Apr 02 09:20 (ibm-op) cadamsttyp7 Apr 15 10:28 (maccda2.mst.lanl)

June 1, 1999UNIX - Basic Environment33 End of Module Complete Getting Logged on to Unix