Linux Operations and Administration

Slides:



Advertisements
Similar presentations
CS 497C – Introduction to UNIX Lecture 8: The vi/vim Editor Chin-Chih Chang
Advertisements

A Guide to Unix Using Linux Fourth Edition
Introduction to the gedit editor. gedit: the Gnome editor Gnome: Gnome is a freely available (i.e., no cost) desktop environment for the UNIX system The.
Editing with vi Or more fun than you thought you’d have without a mouse Prof. Chris GauthierDickey.
VIM: The basics Tang Wai-Chung, Matthew (MaFai) 29/12/2006.
Vi Editor TA for ITIS3100: Xu Fei
Linux+ Guide to Linux Certification, Second Edition
Chapter 5 Editing Text Files
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.
Guide to Linux Installation and Administration, 2e1 Chapter 6 Using the Shell and Text Files.
Chapter 2: Exploring the Desktop The Complete Guide to Linux System Administration.
Editing Java programs with the BlueJ IDE. Working environments to develop (= write) programs There are 2 ways to develop (write) computer programs: 1.Using.
CSCI 330 T HE UNIX S YSTEM Editing files. E DITOR C ONCEPTS Editing a file is to modify the content of a file Text editor: Enter and modify text in a.
Using Linux Text Editors. Use Non-Graphical Linux Text Editors Graphical Text Editor.
Chapter 3 Mastering Editors
CENT 305 Information Systems Security Linux Introduction.
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
Linux+ Guide to Linux Certification Chapter Four Exploring Linux Filesystems.
Linux+ Guide to Linux Certification, Third Edition
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 7 Editing.
Introduction to Vim Robbie CSCI2100 Data Structures Tutorial 3.
Productivity Programs Common Features and Commands.
Week 3 Exploring Linux Filesystems. Objectives  Understand and navigate the Linux directory structure using relative and absolute pathnames  Describe.
Linux Operations and Administration
Chapter 5 Editing Text Files. Basic Concept A text editor works on a file buffer that is a memory copy of a disk file The disk file is not updated until.
Text editors Why should I use an editor ? It is very important to able to use at least one text mode editor a text mode editor is so useful on remote machines.
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.
VI EDITOR University of Mississippi. Vi Editor What is Vi ? ▫Vi is a screen based editor. ▫The screen of your terminal will act as a window into the file.
Chapter 9 Using Text Editors. vi Editor visual Editor, ASCII text editor, no formatting capabilities almost as powerful as MS Word, has 26 clipboards.
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.
Week 8: Linux / ubuntu Dr. I. H. Shah. / CSCS 301 Fall 2009.
Chapter Three The UNIX Editors.
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
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
Vi editor Pronounced: `vee eye‘’. Agenda Describe the background of vi Editor Use vi editor to: create text files edit text files Our Goal is to create.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop III - Part A Shell Commands Professional Training.
1 Lecture 3 More on editors: emacs and vi COP 3344 Introduction to UNIX.
Lesson 6: Working with Word Basics. 2 Learning Objectives After studying this lesson, you will be able to:  Use and customize the Ribbon  Use the Quick.
Linux+ Guide to Linux Certification, Second Edition Chapter 4 Exploring Linux Filesystems.
BIF703 FTP (File Transfer Protocol) Utility vi editor Utility.
CS:414 introduction to Unix and Linux
Chapter 3: Mastering Editors Chapter 3 Mastering Editors (Emacs)
SUSE Linux Enterprise Desktop Administration
Vim basics Vi IMproved.
Guide To UNIX Using Linux Third Edition
Vi Editor.
Vim.
Vi Introduction Tony Kombol.
Linux 104 Training Module File Editing.
Lecture 3 More on editors: emacs and vi COP 3344 Introduction to UNIX.
IT244 - Introduction to Linux / Unix Instructor: Bo Sheng
Linux System Administration Editors
GETTING TO KNOW YOUR KEYBOARD
Text Editors Vim (Chapter 6) Emacs (Chapter 7)
The Linux Command Line Chapter 12
Lesson 21 Getting Started with PowerPoint Essentials
vim Basics Understanding And Using the vim Text Editor
Emacs CSC 135.
Key Applications Module Lesson 12 — Word Essentials
Run Java file with Window cmd
Introduction to HTML Simple facts yet crucial to beginning of study in fundamentals of web page design!
Chapter 2 Basic vi Editor.
The Emacs Editor Read: Forouzan, Appendix C
Key Applications Module Lesson 12 — Word Essentials
CSCI The UNIX System Editing files
Day 5 Emacs Editor David A. Gaitros Department of Computer Science
The Linux Command Line Chapter 12
Presentation transcript:

Linux Operations and Administration Professor Sabol

Objectives Describe key features of GUI and command-line text editors available in Linux Use the vim editor to create and edit text files

Text Editors in Linux Text editor Shell script Program used to create and edit plain text files Not same as word processor Main purpose: to create a file to be used by another program, for example: Hypertext Markup Language (HTML) for a Web browser Source code that a compiler can process Shell script Text file containing a sequence of commands

Text Editors in Linux (cont’d.) Two types of text editors: Command-line editors GUI editors

GUI Text Editors in Linux Linux GUI text editors Similar to Notepad in Windows Advantage: Select and edit text quickly with the mouse Widely used GUI text editors: KWrite Gedit

KWrite: A GUI Text Editor for KDE Also called programmer’s editor for the K Desktop Environment To start: Type kwrite at a command prompt Opens a new empty file in Kwrite Use Kickoff Application Launcher button Advanced features: Syntax highlighting to display text in different colors and fonts for programming languages Bookmarks are markers placed on certain lines to help navigate through a text file

KWrite: A GUI Text Editor for KDE (cont’d.) Figure 4-1 KDE’s KWrite text editor

KWrite: A GUI Text Editor for KDE (cont’d.) Activity 4-1: Exploring the KWrite Text Editor Explore features of the KWrite text editor

Gedit: A GUI Text Editor for GNOME GUI text editor included with GNOME To start Open a terminal window, type gedit, and press Enter Syntax highlighting options Plain text Sources Scripts Others Markup Scientific

Gedit: A GUI Text Editor for GNOME (cont’d.) Figure 4-2 GNOME’s gedit text editor

Gedit: A GUI Text Editor for GNOME (cont’d.) Activity 4-2: Exploring the Gedit Text Editor Learn features of the Gedit text editor

Getting Started with the Vim Editor vi command-line text editor Included with most versions of UNIX and Linux Learning curve Knowing how to use it is crucial vi has evolved into many different forms vim Stands for “vi improved” vi command is now linked to the vim command

Getting Started with the Vim Editor (cont’d.) Modular editor Runs in different operational modes Command mode Use key combinations as commands instead of typing text Insert mode Typed text is displayed onscreen Extend mode Used for more advanced commands, such as saving files, exiting vim, or searching and replacing text

Starting Vim Type vim and press Enter Type vim filename and press Enter If the file doesn’t exist, vim creates an empty file with this filename Figure 4-3 Window displayed after you start vim Tilde (~) Represents blank or empty lines in the file

Starting Vim (cont’d.) The vim text editor

Command Mode Command mode Table 4-1 Chosen automatically when starting vim Table 4-1 Advanced navigational commands in vim

Table 4-1 Advanced vim navigational commands Linux Operations and Administration

Table 4-1 Advanced vim navigational commands (continued ) Linux Operations and Administration 18

Command Mode (cont’d.) Activity 4-3: Using Vim in Command Mode Use navigational commands in vim

Insert Mode Must be in insert mode to type text Change to insert mode with one of the commands in Table 4-2 vim editor displays -- INSERT -- at the lower left To indicate insert mode Press the Esc key to change back to command mode

Insert Mode (cont’d.) Table 4-2 Commands for entering insert mode

Insert Mode (cont’d.) Figure 4-4 The vim editor in insert mode

Modifying Text Modify text using the keyboard instead of the mouse Table 4-3 Commands for modifying text in vim Must be in command mode Activity 4-4: Using Vim in Insert Mode Change to insert mode and modify text in vim

Modifying Text (cont’d.) Table 4-3 Commands for modifying text

Deleting Text Table 4-4 Lists commands for deleting text in vim

Deleting Text (cont’d.) Table 4-4 Commands for deleting text

Cut, Yank, and Paste Cut text Paste text Yank (copy) text Table 4-5 Store text in a buffer Paste text Move from buffer to cursor location Yank (copy) text Keep in current location and copy to buffer Table 4-5 Commands used to yank and paste text in vim

Cut, Yank, and Paste (cont’d.) Table 4-5 Commands for yanking and pasting text

Undo Commands Undo changes Activity 4-5: Modifying Text in Vim Type u Keep typing u until you have reached your oldest change Activity 4-5: Modifying Text in Vim Delete, cut, copy, and paste text in vim

Extended Mode Offers advanced features Enter extended mode Table 4-6 Save and quit Search and replace Customization options Enter extended mode Type the : symbol Table 4-6 Describes commands for saving files and exiting vim

Extended Mode (cont’d.) Table 4-6 Extended mode commands for saving and exiting

Extended Mode (cont’d.) Table 4-7 Extended mode commands to search for and replace text

Useful Commands Table 4-8 Activity 4-6: Using Vim in Extended Mode Commands for extended mode Activity 4-6: Using Vim in Extended Mode Use vim commands in extended mode

Useful Commands (cont’d.) Table 4-8 Additional extended mode commands

Summary Linux GUI text editors vim text editor Easy to use Comparable with Windows Notepad vim text editor Available with every major distribution of UNIX and Linux Operates in several different modes Insert mode Command mode Extended mode

Summary (cont’d.) Command-line text editor Use a variety of keys and key combinations in vim to perform operations