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 linux a profile

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

Share

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

Today, the editor shares with you how to linux configuration file, this article picture and text combination of the overall is relatively simple, easy to learn, very suitable for beginners. Let's try it together.

Linux Network Profil

1. System network device configuration file / etc/sysconfig/network-scripts

] # vim / etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0 / / indicates the name of the physical device of the network card

BOOTPROTO=dhcp / / indicates whether the Nic is configured with a static or dynamic IP address (none: does not need to start the protocol; bootp: indicates the use of BOOTP protocol

Dhcp: use dhcp protocol to obtain ip address dynamically; static: means to set static IP address manually)

ONBOOT=yes / / indicates whether the network card is activated when the system is started. If yes is activated, no is not activated.

TYPE=Ethernet / / Network Typ

USERCTL=yes

PEERDNS=yes

IPV6INIT=no

PERSISTENT_DHCLIENT=1

HWADDR= / / indicates the MAC address of the network card

GATEWAY = / / indicates the gateway address

NETMASK / / indicates the subnet mask

IPADDR= / / indicates IP address

] # systemctl restart network (restart the service)

2. / etc/resolv.conf domain name resolution configuration file

Nameserver: indicates that the host specified by the resolution domain name using this IP address is the domain name server

Search: indicates the DNS search path

3. / etc/hosts hostname matches IP address

4. / etc/networks the mapping relationship between network name and network address

] # vim / etc/networks

Default 0.0.0.0

Loopback 127.0.0.0

Link-local 169.254.0.0

5. / etc/protocols defines the protocol used by the host, and the protocol number of each protocol and other related information

] # vim / etc/protocols

6. / etc/services defines the name, protocol type, service port number and other information of all services in the system. This file is a database file corresponding to the service name and service port number.

] # vim / etc/services

There are a large number of free Linux tutorials, welcome to learn!

The above is a brief introduction of how to linux configuration file, the details of the use also need to be used before you understand. If you want to know more, 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.

Share To

Servers

Wechat

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

12
Report