Book Image

Linux Essentials - Second Edition

By : Christine Bresnahan, Richard Blum
Book Image

Linux Essentials - Second Edition

By: Christine Bresnahan, Richard Blum

Overview of this book

Linux Essentials, Second Edition provides a solid foundation of knowledge for anyone considering a career in information technology, for anyone new to the Linux operating system, and for anyone who is preparing to sit for the Linux Essentials Exam. Through this engaging resource, you can access key information in a learning-by-doing style. Hands-on tutorials and end-of-chapter exercises and review questions lead you in both learning and applying new information—information that will help you achieve your goals! With the experience provided in this compelling reference, you can sit down for the Linux Essentials Exam with confidence. An open-source operating system, Linux is a UNIX-based platform that is freely updated by developers. The nature of its development means that Linux is a low-cost and secure alternative to other operating systems, and is used in many different IT environments. Passing the Linux Essentials Exam prepares you to apply your knowledge regarding this operating system within the workforce.
Table of Contents (19 chapters)
17
EULA

Editing Files with vi

images

vi was the first full-screen text editor written for Unix. It was designed to be small enough to fit on the old-fashioned, tiny, floppy-based emergency boot systems. When the GNU Project developed an open source replacement for the vi editor, they added several improvements to it and called it “vi improved,” or vim. Even though most Linux distributions ship with vim, it is still often referred to as the vi editor. vim is upward compatible with the vi editor, and the command to launch vim is typically vi—though some distributions have a vim command instead. The information presented in this chapter applies to both vi and vim.

Although the vi editor is useful for editing configuration files, it really shines in editing program files, such as shell scripts. Thus you will benefit from learning the vi editor, though it is considered by many to be the most complicated text editor to use.

Understanding vi Modes

To use vi, you should first understand...