Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the modes of the vi editor

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces what modes of the vi editor, has a certain reference value, friends in need can refer to. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

The vi editor is the original editor of the Unix system. It uses console graphics mode to simulate the text editing window, allowing you to view lines in the file, move through the file, insert, edit, and replace text.

Vi is divided into three modes: command mode, edit mode, and last line mode.

(1) Command mode

The command mode is the initial mode of vi. Type "$vi file name" under normal permissions or type "# vi file name" (for example: root@XXX-virtualBox:/ect# vi vsftpd.conf) under a temporary root user to initially enter vi command mode. Press esc in edit mode to enter command mode. Many people on the Internet write in the last line mode and press esc to enter the command mode. After my computer enters the last line mode, almost all the keys are input, and the input esc displays "^ [" instead of returning to the command mode. So if you have the same situation as me, if you can't switch to the last line mode, don't press enter randomly.

In command mode:

ZZ: exit vi

H or

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report