Week 8: Linux / ubuntu Dr. I. H. Shah. / CSCS 301 Fall 2009.

Slides:



Advertisements
Similar presentations
In the last Session… ls -l command seven fields nine permissions of a file ls -ld file ownership file permissions (three-tiered file protection system)
Advertisements

CS 497C – Introduction to UNIX Lecture 8: The vi/vim Editor Chin-Chih Chang
Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
1 Introduction to UNIX Ke Liu
NETW-240 Shells Last Update Copyright Kenneth M. Chipps Ph.D. 1.
Chapter 5 Editing Text Files
UnixUnix Basic. Convention Italic text indicates text displayed by the computer system. For example, login: indicates a login prompt displayed by the.
1 Using Editors Editors let you create and edit ASCII files UNIX normally includes two editors: vi and Emacs Vi and Emacs are screen editors: they display.
Lecture 01CS311 – Operating Systems 1 1 CS311 – Lecture 01 Outline Course introduction Setting up your system Logging onto the servers at OSU with ssh.
Copyrights© 2008 BVU Amplify DITM Basics of OS,UNIX/LINUX and Shell programming Page:1 Lesson 3: Vi- editor By Simi By Simi.
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.
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
CS 141 Labs are mandatory. Attendance will be taken in each lab. Make account on moodle. Projects will be submitted via moodle.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
Brief introduction to UNIX A. Emerson CINECA, High Performance Systems.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
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.
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
Agenda User Profile File (.profile) –Keyword Shell Variables Linux (Unix) filters –Purpose –Commands: grep, sort, awk cut, tr, wc, spell.
CENT 305 Information Systems Security Linux Introduction.
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
The UNIX development environment CS 400/600 – Data Structures.
Working with Linux Lab 1 1. Login and logout Account – username & password – Note: Linux is case-sensitive Administrator: username = root Logout: exit,
©NIIT Collaborate Lesson 1C / Slide 1 of 23 Collaborate Knowledge Byte In this section, you will learn to: Use the cal command Determine the file types.
Interacting with a UNIX computer: Navigating through the directory tree.
Vim Editor and Unix Command gcc compiler Computer Networks.
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.
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.
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.
Getting started: Basics Outline: I.Connecting to cluster: ssh II.Connecting outside UCF firewall: VPN client III.Introduction to Linux IV.Intoduction to.
Lesson 2-Touring Essential Programs. Overview Development of UNIX and Linux. Commands to execute utilities. Communicating instructions to the shell. Navigating.
ITR3 lecture 6: intoduction to UNIX Thomas Krichel
Tony Kombol.  Why text edit?  Many programs and features require configuration ▪ Configuration is kept in files ▪ Usually in the /etc directory  Changes.
Unix Session IV.
Text Editing February 2 nd, 2004 Class Meeting 3.
1 of 47 Chapter 4: The vi Editor – First Look Copyright ©2008 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
Lecture One. Objective: Provide description of the Command-Line Editor of Linux operating system. Enable students to understand the practical side of.
1May 16, 2005 Week 2 Lab Agenda Command Line FTP Commands Review More UNIX commands to learn File name expansion - * Introduction of vi.
Introduction to Unix (CA263) File Editing By Tariq Ibn Aziz.
Lesson 4-Mastering the Visual Editor. Overview Introducing the visual editor. Working in an existing file with vi. Understanding the visual editor. Navigating.
Chapter Three The UNIX Editors.
Linux Class #03. File Access Permissions Types of users in Linux: Local User (u) Group User (g) Other User (o) Each User can have 3 types of permissions:
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
Introduction to Programming Using C An Introduction to Operating Systems.
Agenda Using vi Editor Starting vi Session Command / Input Modes Entering Text Editing Text Saving Edited File Aborting Editing Session.
Agenda Using vi Editor Starting vi Session Command / Input Modes
2.4 vi 에디터. UNIX 표준 에디터 %vi filename 두 개 모드 명령어 모드 (command mode) initial mode, editing commands 텍스트 입력 모드 (text entry mode) enter text you'd like to.
THE C PROGRAMMING ENVIRONMENT. Four parts of C environment  Main menu  Editor status line and edit window  Compiler message window  “Hot Keys” quick.
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
Amir Afzal UNIX Unbounded, 5th Edition Copyright ©2008 Chapter 6: The vi Editor – Last Look 1 of 55 Copyright ©2008 by Pearson Education, Inc. Upper Saddle.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
Learning basic Unix command It 325 operating system.
Shell Script Reference: Linux Shell Scripting Tutorial v1.05r3 A Beginner's handbook
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
Learning Unix/Linux Based on slides from: Eric Bishop.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
CS:414 introduction to Unix and Linux
SUSE Linux Enterprise Desktop Administration
Getting started with CentOS Linux
Some Linux Commands.
Guide To UNIX Using Linux Third Edition
Vi Editor.
Vi Introduction Tony Kombol.
Introduction to UNIX.
John Carelli, Instructor Kutztown University
Getting started with CentOS Linux
Chapter 2 Basic vi Editor.
Module 6 Working with Files and Directories
Linux Operations and Administration
Presentation transcript:

Week 8: Linux / ubuntu Dr. I. H. Shah. / CSCS 301 Fall 2009

Linux – The Shell A shell is an interpreter that provides an interface between users and the O.S. It executes all the commands we enter and hence lets us run programs. Several shells developed in Linux are: –Bourne Again Shell (BASH); this is default shell., –Public Domain Korne shell. –TCSH shell. –Z-shell. The Command Line –It is a single line containing command and its options and arguments. –A command is typed after shell prompt which is usually $ in BASH. –Syntax of a command: command options arguments // comments –An option is a single letter code preceded by a hyphen (-) which modifies the behavior of the command. –Many file management commands take file name (s) as argument (s).

Running Commands / Utilities Command Description pwd Print the path name of the working directory. date Print date and time. ls List (display) the contents of the working directory. ls –l ls –l d1 List detailed contents of the working directory List detailed contents of the directory d1 mkdir d1 Create a directory named d1 rmdir d1 Delete a directory named d1 ( d1 should be empty) cp file1 file2 Copy file1 into file2; if file2 exists, it is overwritten otherwise it is created. rm file1 Delete file1 clear Clears the screen. man command_name Give details of the command To run a utility, type a command and press enter. The following are a few basic commands. Try them.

Creating a file : The vi editor To invoke vi editor type the command: $ vi file_name // the file_name is optional and $ is already there as prompt. A blank screen like the one shown below appears. ~~~~~~~~~~~~~~~~~~

The vi editor The vi editor has two modes: Command mode and the Text Entry mode; the text entry mode being the default mode. Text Entry mode To go from the command mode to the text entry mode use any of the keys given in the following table; each key takes you into text entry mode in a slightly different manner, mentioned against it. keyAction iText is inserted before the cursor. aText is inserted after the cursor. IText is inserted at the beginning of the current line. AText is inserted at the end of the current line. oA new line is created below the current line and text is inserted. OA new line is created above the current line and text is inserted. RText is replaced.

The vi editor (contd.) Command mode: Text can be edited. To go from the text entry mode to the command mode press esc key. the common vi editing features are: oMoving the cursor oDeleing text oReplacing text oPasting text oSearching through text oSaving or loading files oMiscellaneous ( quitting vi, etc.)

The vi editor : Moving the Cursor keyAction jDown one line. kUp one line. lOne character left. hOne character right. ^The start of the current line. $The end of the current line. wForward one word bBack one word HTop of the screen. nn To line nn. Ex. Explore more cursor movement keys.

The vi editor : Saving / Quitting a file Press esc key to go to the command mode, Type : (this will move the cursor to the bottom of the screen) Use the following key combination: keyAction wSave the file (write the file to the disk); if no name has already been given to the file, a file name is required. wqSave the file and quit the editor. q!Quit the editor without saving any changes. qQuit the editor (if no changes have been made to the file.