CSC 140: Introduction to IT

Slides:



Advertisements
Similar presentations
Introduction to the bash Shell (Bourne-Again SHell)
Advertisements

Chapter 9: The TC Shell Everything you thought you knew is now wrong.
Lecture 2 Shell environment I: - command line interface & basic commands; - directories & files; - standard I/O & file descriptors; CSE4251 The Unix Programming.
Shells and Processes Bryce Boe 2012/08/08 CS32, Summer 2012 B.
NETW-240 Shells Last Update Copyright Kenneth M. Chipps Ph.D. 1.
Linux+ Guide to Linux Certification, Second Edition
Shell Basics CS465 - Unix. Shell Basics Shells provide: –Command interpretation –Multiple commands on a single line –Expansion of wildcard filenames –Redirection.
UNIX chapter 04 UNIX Shells Mr. Mohammad Smirat. Introduction The shell is the software that listens to commands typed in at the terminal and translates.
The UNIX Shells 1. What is a Unix shell? 2. A few common shells in the Unix & Linux. A. Bourne shell B. Korn shell C. C shell D. Bash-the default shell.
Guide To UNIX Using Linux Third Edition
Guide To UNIX Using Linux Third Edition
Introduction to Unix (CA263) Introduction to Shell Script Programming By Tariq Ibn Aziz.
Shell Script Examples.
Using the Bash Shell. Linux Shell Options Linux provides a range of options for shells. bash –The GNU Bourne Again Shell (bash) bsh – The Bourne Shell.
Shell - Introduction & Commands Chapter III / Part II.
Introduction to Linux Operating System Tutorial 1
Introduction to Shell Script Programming
Week 7 Working with the BASH Shell. Objectives  Redirect the input and output of a command  Identify and manipulate common shell environment variables.
Second edition Your UNIX: The Ultimate Guide Das © 2006 The McGraw-Hill Companies, Inc. All rights reserved. UNIX – The Shell The Shell The agency that.
Introduction to Computer Organization & Systems Topics: Intro to UNIX COMP John Barr.
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.
Shell Features CSCI N321 – System and Network Administration Copyright © 2000, 2005 by Scott Orr and the Trustees of Indiana University.
Introduction to Unix – CS 21 Lecture 9. Lecture Overview Shell description Shell choices History Aliases Topic review.
CS 6560 Operating System Design Lecture 3:Tour of GNU/Linux.
The Shell Chapter 7. Overview The Command Line Standard IO Redirection Pipes Running a Program in the Background Killing (a process!)
Workbook 6 – Part 1 The Bash Shell
UNIX/LINUX Shells Shell is an UNIX/LINUX command interpreter. Shell command can be internal or external. The code to execute an internal command is part.
Linux+ Guide to Linux Certification, Third Edition
Basic Shell Scripting - Part 1 Objective - Learn to: Read Start-up Files Edit Start-up Files Modify Your User Environment Communicate with Users Write.
UNIX Shell Script (1) Dr. Tran, Van Hoai Faculty of Computer Science and Engineering HCMC Uni. of Technology
Linux+ Guide to Linux Certification Chapter Eight Working with the BASH Shell.
CSC 382: Computer SecuritySlide #1 CSC 382: Computer Security Introduction to UNIX Programming.
Lesson 2 1.Commands 2.Filename Substitution 3.I/O Redirection 4.Command Grouping 5.Shell Responisibilites Review of the Basics.
Shell Advanced Features. Module 8 Shell Advanced Features ♦ Introduction In Linux systems, the shells are often referred to as command line interfaces.
Chapter 4 LINUX Shells. Table 4.1 Shell Locations and Program Names.
UNIX shell environments CS 2204 Class meeting 6 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
UNIX shell environments CS 2204 Class meeting 4 Created by Doug Bowman, 2001 Modified by Mir Farooq Ali, 2002.
1 Day 18 Bash and the.files. 2 The.files ls shows you the files in your directory –Or at least most of them. –Some files are hidden. Try: ls –a –This.
CSCI 330 UNIX and Network Programming Unit IV Shell, Part 2.
CSCI 330 UNIX and Network Programming Unit III Shell, Part 1.
Jozef Goetz, expanded by Jozef Goetz, 2006 Credits: Parts of the slides are based on slides created by textbook authors, Syed M. Sarwar, Robert.
Linux+ Guide to Linux Certification, Second Edition
Introduction to Bash Shell. What is Shell? The shell is a command interpreter. It is the layer between the operating system kernel and the user.
EMT 2390L Lecture 3 Dr. Reyes Reference: The Linux Command Line, W.E. Shotts.
Class Introduction. Agenda Syllabus Topics Text etc.
Linux Administration Working with the BASH Shell.
Agenda Customizing a Unix/Linux account Environment Introduction to Start-up Files (.bash_profile,.bashrc,.profile,.kshrc) Safe Methods for Changing Start-up.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
Introduction to the bash Shell (Bourne-Again SHell)
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.
SUSE Linux Enterprise Desktop Administration
Introduction to Shells
Shell Features CSCI N321 – System and Network Administration
System Programming and administration CS 308
The Command Prompt Commands are the way to “do things” in Unix
Shell Environments.
CSE 303 Concepts and Tools for Software Development
UNIX and Shell Programming (06CS36)
Operating Systems and Using Linux
John Carelli, Instructor Kutztown University
Introduction to Computer Organization & Systems
Operating Systems and Using Linux
Linux Shell Script Programming
CSE 303 Concepts and Tools for Software Development
Module 4 Command Line Skills
What is Unix? A multi-user networked operating system
Operating Systems and Using Linux
Introduction to Unix Shell & Scripting with csh/tcsh
Chapter 3 The UNIX Shells
Introduction to Bash Programming, part 3
Presentation transcript:

CSC 140: Introduction to IT UNIX Shells CIT 140: Introduction to IT

CIT 140: Introduction to IT Objectives To describe what a UNIX shell is. To describe briefly some commonly used shells CIT 140: Introduction to IT

CIT 140: Introduction to IT What is a shell? A command interpreter. Runs external commands like cp and rm. Built-in commands change shell environment: cd – change directory VAR=value I/O redirection. cat /etc/shells >shells Ease of use Command line editing, tab completion, history. Programming Conditionals, loops, etc. CIT 140: Introduction to IT

Environment Variables CIT 140: Introduction to IT

Shell Initialization Files Configure shell settings at login. Create aliases. Set environment variables. bash initialization files /etc/profile System-wide for sh and bash. /etc/bashrc System-wide for bash. ~/.bashrc User startup file. CIT 140: Introduction to IT

CIT 140: Introduction to IT sh/csh Differences CIT 140: Introduction to IT

Which Shell Suits Your Needs? CIT 140: Introduction to IT

CIT 140: Introduction to IT sh/csh Similarities CIT 140: Introduction to IT

How to change your shell? Change your login shell. > chsh zsh Run the other shell directly > echo $SHELL /bin/bash > zsh % CIT 140: Introduction to IT

CIT 140: Introduction to IT Shell Metacharacters Non-alphanumeric characters that have special meaning to the shell. They cannot be used in shell commands. Allow you to specify multiple files in multiple directories in one command line. CIT 140: Introduction to IT

CIT 140: Introduction to IT

CIT 140: Introduction to IT

CIT 140: Introduction to IT Globbing ?  Matches any one character. *  Matches zero or more characters. []  Matches list of characters inside brackets. CIT 140: Introduction to IT

CIT 140: Introduction to IT Globbing > ls *html announce.html guidelines.html readings.html sites.html assignments.html index.html schedule.html > cd assignments > ls a[2-3]?html a2.html a3.html CIT 140: Introduction to IT

CIT 140: Introduction to IT Command History Up-arrow Previous command Down-arrow Next command history List old commands !! Previous command !# Command # !$ Last arg of previous command CIT 140: Introduction to IT

CIT 140: Introduction to IT Command line editing Ctrl-a Beginning of line Ctrl-e End of line Left-arrow Move back one character Right-arrow Move forward one character Ctrl-u Erase line CIT 140: Introduction to IT

CIT 140: Introduction to IT Filename completion TAB Completes filename TAB-TAB Show list of possible completions. CIT 140: Introduction to IT