Home
Username:
Password:
Red Hat Certified Technician Tutorials

Prerequisite Skills / Running a Terminal-based Text Editor

Subtitles of the Movie

Now it's time to cover the next prerequisite skill, the use of a terminal base editor such as VI to edit text files. When you administer Linux never use a binary editor such as Microsoft Word or even open office dot org writer to edit a text file especially a Linux configuration file. If you save one of these files in binary format Linux won't be able to read the file and that may render your system unbootable. You really need to know at least one major terminal based text editor. If you ever have to go into rescue mode you probably won't be able to get to the GUI. Three of the major terminal based text editors are VI, EMACS and JOVE. IF you already know how to use one of these editors or anything thing else that works at the command line, stop right here you're ready for the next lesson. Unfortunately there's no way I can show you everything about text editors in a single tutorial. So we'll just go through a very basic over view of VI, the version included with modern Linux distributions is actually known as VIM which is short for VI improved. We'll test it out on the standard password database file, but before we edit the file let's back it up in the home directory. Now we can open the password file on the local home directory without fear of accidentally editing it and making the system unbootable. Navigation is intuitive, in the current version of VI you can use the arrow keys to navigate right, left, up, and down. You can use the page up and page down keys to navigate, page down, page up. You can even use the delete key to remove characters. And use the insert key to enter insert mode and then you can add the information you need. To get out of the insert mode press the escape key. If I make more mistakes with out saving I can quit with the cue command but that doesn't quite work cause I've already made changes. To really quit with out saving type colon Q, exclamation point. Other key commands include colon WQ with quits and saves, colon W which write files, colon q which quits. There are a lot more things you can do with the VI editor but those are the basics. I urge you to learn more but that's all I have time to cover this tutorial. Thank you and on to the next movie.

Tutorial Information

Course: Red Hat Certified Technician
Author: Michael Jang
SKU: 33785
ISBN: 1-933736-97-6
Release Date: 2007-07-24
Duration: 7 hrs / 103 lessons
Captions: For Online University members only
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 81,350 Video Tutorials (20,800 free)
  • Video Available as Flash or QuickTime
  • Over 782 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available