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 obtain IP automatically in Linux system

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

The content of this article is mainly about how to obtain IP automatically by Linux system. The content of the article is clear and clear. It is very suitable for beginners to learn and is worth reading. Interested friends can follow the editor to read together. I hope you can get something through this article!

After we have installed the Linux system (Centos system), each login requires our own manual networking, which is more troublesome.

First, after logging in, set the ip to be obtained automatically through the page (the ip obtained is random)

Procedure:

1. Click on the system, preferences, web links

two。 Click to select System eth0 in the real interface, and click Edit

3. Check the automatic link, and then click apply

Restart the system after the setup is complete and you can see the automatic link to ip, but this mode does not apply to the server because the server ip is fixed.

Second, specify a fixed ip address: specify Ip directly by modifying the configuration file, and edit vim / etc/sysconfig/network-scripts/ifcfg-eth0

All the information of our network configuration is in ifcfg-eth0 (0 represents the first network card and ifcfg-eth2 if there is a second one)

Case: configure the ip address to be static and the ip address is 192.168.152.111

1. Enter * * vim / etc/sysconfig/network-scripts/ifcfg-eth0** at the terminal

If the content displayed is not circled on the picture, it needs to be added.

two。 Then change the content as shown in the figure (everyone's ip and gateway may be different. You need to check your own ip before you modify it. )

3. Save the content modified above

4. Enter service network start at the terminal (used to update the network configuration)

5. Finally, enter ifconfig in the terminal to check whether the modification is successful.

What are the versions of Linux? the versions of Linux are Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and so on. Among them, Deepin is one of the best-developed Linux distributions in China; UbuntuKylin is a derivative release based on Ubuntu; Manjaro is a Linux release based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP's easy-to-use; Ubuntu is the Linux operating system based on desktop applications.

Thank you for your reading. I believe you have some understanding of "how to automatically obtain IP in Linux system". Go to practice quickly. If you want to know more about it, you can follow the website! The editor will continue to bring you better articles!

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

Development

Wechat

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

12
Report