linux下配置计算机网络IP地址

网络接口的查看:ifconfig

网络接口的配置:

ip地址 ===》实现计算机之间的互联互通。

ip地址的配置:

方式0、图形化配置界面,redhat右上角的图形界面

  nm-connection-editor

方式1、执行setup

方式2、临时命令配置:

  ifconfig

  格式: ifconfig 接口名称 ip地址/掩码位数 状态

  eg: ifconfig eth0 192.168.1.100/24 up

方式3、永久配置

  cd /etc/sysconfig/network-scripts

  vim ifcfg-eth0 之后保存退出

  ifconfig eth1 down/ifdown eth1

  ifconfig eth1 up/ifup eth1

  service network restart

  ifconfig ===>查看接口信息

 

  ping 192.168.1.199 ===>ttl=64 time=xxx 通了

  mount 192.168.1.199:/mnt/nfs /root/jsj

  cp /root/jsj/160229/linux/02 /xxxx

  umount /root/jsj

 

方式4、

脚本配置网络:

posted @ 2017-06-06 21:47  bkycrmn  阅读(229)  评论(0)    收藏  举报