CentOS7 command

# Check the service status 
systemctl Status NetworkManager / Network 
# stop service 
systemctl STOP NetworkManager 
# start the service 
systemctl Start NetworkManager 
# prohibit service boot 
systemctl disable NetworkManager 
# Set the service start-up 
systemctl enable NetworkManager 

# view network information 
ip addr 
# view a specific card information 
LS eno16777736 addr ip 

# stop network card 
ip Link Down the SET eno16777736 
# interface up 
ip Link up the SET eno16777736 

# modify ip address 
ip addr del 192.168.80.134/24 dev eno16777736 
ip addr the Add 192.168.80.136/24 dev eno16777736 

# Display route 
ip route Show 
# to add a route 
via ip route add default 192.168.80.2 dev br0
 
# ifconfig command to install
NET-Tools -y install yum 


# modify the host name 
hostnamectl the SET-hostname the Node-1 




# firewall configuration: After upgrading to Centos 7, found it impossible to use the Linux iptables control port, after the discovery google Centos 7 firewalld use instead of the original iptables. Here's how to record using firewalld open Linux port: 

# Enable the firewall 
systemctl Start firewalld 

# Enable port 
firewall-cmd --zone = public --add- port = 08 / tcp --permanent 
 
Command Meaning: 
--zone # scope 
--add -port = 80 / tcp # Add port, the format is: port / protocol 
--permanent # permanent failure Without this parameter after the restart 

# reload firewall configuration 
firewall-cmd --reload
 

  

Guess you like

Origin www.cnblogs.com/JBLi/p/11402989.html