Thursday, March 9, 2017

[Linux] How to check and Set ip in Linux

* Check interface 
# ifconfig –a


To elaborate on the connections here:
- lo – this is a loopback connection, a virtual connection used to connect to the machine (itself) only
- eth0 – an ethernet interface (wired port)
- wlan0 – a wireless interface (device)

* Check IP
#ifconfig -a

* Set IP

#nano /etc/sysconfig/network-scripts/ifcfg-eth7
detail ..
DEVICE=eth7
BOOTPROTO=static
HWADDR=00:0C:29:A0:BF:43
IPADDR=10.149.247.147
NETMASK=255.0.0.0
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes

* Restart again Service network 
#service network restart 







0 nhận xét:

Post a Comment