Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to modify the configuration of network card in centos8

Shulou Source: shulou.com Published: 2022-06-01 18:35:06 10月02日 Update

How to modify the network card configuration in centos8, in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.

Centos8 modifies the configuration of network card and its application

Configure centos8 based on NAT network

Default network card configuration file: / etc/sysconfig/network-scripts/ifcfg-ens33 [root@A8 ~] # vim / etc/sysconfig/network-scripts/ifcfg-ens33BOOTPROTO=staticNAME=eth0DEVICE=eth0ONBOOT=yesIPADDR=10.0.0.8GATEWAY=10.0.0.2PREFIX=24DNS1=114.114.114.114DNS2=8.8.8.8

After configuring the network card file, we can use the nmcli command to restart the network card to make it take effect.

[root@A8 ~] # nmcli c load / etc/sysconfig/network-scripts/ifcfg-ens33nmcli command interpretation

Nacli uses:

Usage: nmcli [option] OBJECT

Options:

-o [verview] Overview mode (hides default values)

-t [erse] concise output

-p [retty] neat output

-m [ode] tabular | multiline output mode

-c [olors] auto | yes | whether no uses colors in the output

-e [scape] yes | no escapes column delimiters in values

-a [sk] asks for missing parameters

-s [how-secrets] allows password to be displayed

-w [ait] sets the timeout wait time for completed operations

-v [ersion] display program version

-h [elp] output this help

Object:

G [eneral] General status and operation of the Network Manager (NetworkManager)

N [etworking] integrated networked control

R [adio] Network Manager Radio switch

C [onnection] connection to the network manager

D [evice] Devices managed by the network manager

A [gent] the secret agent or polkit agent of the network manager

M [onitor] monitors network manager changes

Generally use c:

[root@localhost network-scripts] # nmcli c-- help # option to view help

COMMAND: = {show | up | down | add | modify | clone | edit | delete | monitor | reload | load | import | export}

This is the answer to the question about how to modify the configuration of the network card in centos8. 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 for more related knowledge.

Tags: Network management network card configuration network management output help questions commands files more modes agents solutions easy concise simple content delimiters parameters Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi macOS vpn Shulou Tech Info Microsoft