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

How to save and exit after linux edits the file

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

Share

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

Today, what I want to share with you is how to save and exit the linux file after editing. I believe many people don't know much about it. In order to make you understand better, I summarized the following contents for you. Let's look down together. I'm sure you'll get something.

How do I save and exit after linux edits the file?

The command is wq to save and exit.

First press ESC to enter Command mode, then type ": wq", and enter to save and exit.

Vi has different options for saving files. Corresponding to different commands, you can select a desired input from the following command:

1. Wq saves the file and exits vi

2. W Save the file but do not exit vi

3. W file saves the changes to file and does not exit vi

4. Q quit vi without saving the file

Finally, you can enter the car.

Extended data

Exit Vi when you are ready to exit Vi and return to shell after editing the file, you can use one of the following methods to press the capital letter Z twice in command mode. If the currently edited file has been modified, Vi saves the file and then exits to return to shell.

If the current edited file has not been modified, Vi directly exits and returns to shell to enter the command in the last line mode: W Vi saves the current editing file but does not quit but continues to wait for the user to enter the command to give the editing file a new file name when using the w command.

Linux is a free-to-use and free-spread Unix-like operating system. It is a multi-user, multi-task, multi-threaded and multi-CPU operating system based on POSIX and UNIX. It runs major UNIX tools, applications, and network protocols. It supports 32 bit and 64 bit hardware. Linux inherits the design idea of Unix with network as the core, and is a multi-user network operating system with stable performance.

Strictly speaking, the word Linux itself only refers to the Linux kernel, but in fact people have become accustomed to using Linux to describe the entire Linux kernel and use GNU to project operating systems with various tools and databases.

These are the details of how to save and exit after editing the file in linux. Do you have anything to gain after reading it? If you want to know more about it, welcome to the industry information!

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