Home > Article > Operation and Maintenance > What is the command to save files in Linux?
#What is the command to save files in Linux?
The Linux file saving command is w
There are many commands related to saving files in Linux, such as:
1. wq saves the file and exits vi
2. w file saves the modifications to file without exiting vi
3. q does not save the file and exits vi
Just press Enter
Extended information
Exit Vi When you finish editing the file and prepare to exit Vi and return to the shell, you can use the following One of several methods: Click the capital letter Z twice in command mode. If the file currently being edited has been modified, Vi will save the file and exit and return to the shell.
If the currently edited file has not been modified, Vi will exit directly and return to the shell. Enter the command in the last line mode: w. Vi saves the currently edited file but does not exit but continues to wait for the user to enter the command before using w. You can give the edited file a new file name when issuing the command.
Linux is a free-to-use and freely disseminated Unix-like operating system. It is a multi-user, multi-task, multi-thread and multi-CPU operating system based on POSIX and UNIX. It can run major UNIX software tools, applications and network protocols. It supports 32-bit and 64-bit hardware. Linux inherits the network-centric design philosophy of Unix 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 are accustomed to using Linux to describe the entire operating system based on the Linux kernel and using various tools and databases of the GNU Project.
Recommended tutorial: "linux tutorial"
The above is the detailed content of What is the command to save files in Linux?. For more information, please follow other related articles on the PHP Chinese website!