In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to modify the gateway in linux". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to modify the gateway by linux.
In linux, you can modify the gateway by modifying the contents of the "GATEWAY" entry in the "/ etc/sysconfig/network" file with the syntax "sudo nano / etc/network/interfaces".
The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
How to modify the Gateway by linux
Open the terminal. You can open the terminal program from the sidebar or press the Ctrl+Alt+T key combination to open it.
2. Browse the current default gateway information. You can type route and press Enter to view the current default gateway settings. The address next to "default" displays the current default gateway address, and the interface to which it is assigned is displayed on the right side of the desktop.
3. Delete the current default gateway. If you have multiple default gateways, you will encounter connection conflicts. If you want to change it, please delete the existing default gateway. Enter sudo route delete default gw IP Address Adapter. For example, if you want to delete the default gateway 10.0.2.2 on the eth0 adapter, enter sudo route delete default gw 10.0.2.2 eth0.
4. Enter .sudo route add default gw IP Address Adapter. For example, if you want the default gateway for the eth0 adapter to be changed to 192.168.1.254, you can type sudo route add default gw 192.168.1.254 eth0. You need to enter the user's password to complete the command.
Edit configuration file
1. Open the configuration file in the editor. Type sudo nano / etc/network/interfaces in the Nano editor to open the file. Editing the configuration file will allow the system to retain your changes each time the system is rebooted.
2. Find the right part. Locate the adapter section where you need to change the default gateway settings. For wired network connections, it is usually eth0.
3. Add .gateway IP Address to this section. For example, enter gateway 192.168.1.254 to make the default gateway 192.168.1.254.
4. Save your changes and exit. Press Ctrl+X, then press Y to save the changes and exit.
5. Restart the network. Enter sudo / etc/init.d/networking restart to restart the network.
At this point, I believe you have a deeper understanding of "how to modify the gateway in linux". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.