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

Example Analysis of Linux system configuration Network

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

Share

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

This article will explain the example analysis of Linux system configuration network for you in detail. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

A brief introduction to the folder of Linux

Bin: store the user's commands

Sbin: storing commands from root users

Etc: the environment configuration file of the current system is stored

Home: storage of users

Root: storage of root users

Opt: can be used to store software

Usr: its subfolder-- > local can also be used to store the software users need.

Tmp: indicates temporary, usually holds log files

Visual configuration of the network

First of all, you have to check whether your Linux system is linked to the network. You can open the terminal of the Linux system to ping the URL of Baidu.

There is a hint like this: the name of the location or service, which means that your system still does not have a network, and you need to configure it yourself.

Configure the network: in fact, all you need is an ip address for the Linux system

First, turn on the cable settings

Then click on the gear.

Check the gears in the details first.

Change the IPv4 Method in IPv4 to manual, then set the DNS address to the commonly used one, that is, 114.114.114.114 or 8.8.8.8, and then modify the address and gateway according to your local information.

Click apply to refresh the network.

Continue to ping Baidu.

The network is successful!

But this way may lead to the disappearance of the network icon and the failure of the network link, which is due to the use of a visual interface.

Configure the network by command

Because there is a NetworkManager service in the visual interface that will cause the network to disappear from time to time, for the convenience of operation in the future, we need to stop this service, which is similar to shutting down the firewall.

Systemctl status NetworkManager: view the service

Systemctl stop NetworkManager: turn off the service

Systemctl disable NetworkManager: turn off the self-boot feature of the service

At this time, the network of the visual interface can no longer be used, so the ifcfg- ens33 can only be modified by command.

Vim / etc/sysconfig/network-scripts/ifcfg-ens33

Then assign the following things to fill in the network address and gateway you originally set.

TYPE=Ethernet

PROXY_METHOD=none

BROWSER_ONLY=no

BOOTPROTO=none

DEFROUTE=yes

IPV4_FAILURE_FATAL=no

NAME=ens33

DEVICE=ens33

ONBOOT=yes

IPADDR=192.168.xxx.xx

NETMASK=255.255.255.0

GATEWAY=192.168.xxx.x

DNS1=114.114.114.114

The next step is to restart the network.

Service network restart

The next step is to check the network.

Service network restart

When you find there is no problem, you can ping Baidu to see if you are connected to the network.

Ping www.baidu.com

This is the end of the article on "sample Analysis of Linux system configuration Network". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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