In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
How to connect the linux system to the Internet? In view of this problem, this article introduces the corresponding analysis and answers in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.
1. Log in to the Linux system. First, log in to the linux interface with your root account and password (Note: it must be an administrator user or permission). If other users log in, use the su command to switch users and enter the password. The result is as follows:
2. Modify the Linux ip address. Use the command vi / etc/sysconfig/network-scripts/ifcfg-eth0 to change the ip address of the Linux system to the network segment allowed by the router or network switch, add a command DNS = 8.8.8.8, press the keyboard ESC key after modification, and type wq to save and exit, as shown in the following figure:
3. Verify whether Linux is connected to the Internet. Use the ping command to directly ping a website. If the host cannot be identified, it indicates that it is not connected to the network. The ping Baidu of this department takes Baidu as an example. The result shows that it is not online as shown in the following figure:
4. Linux networking. The command vi / etc/resolv.conf writes nameserver 8.8.8.8 in the open text, and the result is shown in the figure:
5. Restart the ENI: use the command: service network restart to restart, and the result is as follows:
6. Verification. Use the ping Baidu command to check whether there is a reply. If so, the network is successful. The result is shown below:
Note:
The set IP must be able to connect to the external network, that is, it can pass through switching devices such as routers.
After the configuration is completed, some of the systems do not take effect. You need to restart the network card service.
This is the answer to the question about how to connect the linux system. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.