How to configure the IP address of the CentOS system
Method 1: Use the network manager
Method 2: Using the command line
Use the following command to get the list of current network interfaces:
<code>nmcli device status</code>
Configure the IP address using the following command:
<code>nmcli con mod enp0s3 ipv4.addresses 192.168.1.10/24 gw4 192.168.1.1</code>
Where:
Other options
Check the IP address: Check the assigned IP address using the following command:
<code>ip a</code>
Apply changes: After configuring the IP address, you need to apply the changes using the following command:
<code>nmcli con up enp0s3</code>
The above is the detailed content of How to configure ip in centos. For more information, please follow other related articles on the PHP Chinese website!