In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article shows you how to change the name of linux, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Methods: 1, use the "vim / etc/hostname" command to modify the host name; 2, use the "mv" command to rename the file, the syntax is "mv original file name new file name"; 3, use the "rename original file name new file name" command to rename the file.
The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
How to change the name of linux
1. Modify the host name
Let's enter the command: hostname to view the current hostname: linuxprobe
We can modify the hostname by modifying the etc/hostname file and enter the command: vim / etc/hostname
You can see that the default content in the file is the current hostname: linuxprobe
We enter I or o or a to enter the text content editing state
Enter a new host name, press the ESC key to exit the text editing state, enter the ": wq" command, save and exit the file
When we enter the hostname command again to see the current hostname, we can see that the hostname has become the new hostname: redhat7
2. The mv command modifies the file name
The Linux mv (English spelling: move file) command is used to rename or move a file or directory to another location.
Mv source_file (file) dest_file (file)
Change the source file name source_file to the destination file name dest_file
3 、 rename
The rename command changes the file name in batches with string substitution. Today, I will use an example to specifically write about the problems I have encountered and the examples I have solved. I hope it will be helpful to you all.
The format is as follows:
Rename original string target string file (list)
Original string: the string that the file name needs to be replaced
Target string: replaces the original characters contained in the file name with the target string
File: specifies the list of files whose names you want to change.
For example:
Rename main1.c to main.c
Rename main1.c main.c main1.c what is Linux system Linux is a free to use and freely spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
The above is how to change the name of linux. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.