Debian.5.0.6---->7.3/ 网络连接终端配置
修改网络配置文件 : 修改 /etc/network/interfaces
C#代码
- # The primary network interface
 - auto eth0
 - iface eth0 inet static
 - address 192.168.1.252
 - netmask 255.255.255.0
 - gateway 192.168.1.1
 
----------k----------
H <--- 点 ---> L
----------J---------
VI 删除 配合方向坐位标,如删除右边一个字符是:dL
Debian 重启网络命令: /etc/init.d/networking restart
######################################################################
CentOS-6.5 网络连接终端配置
修改网络配置文件 : 修改 /etc/sysconfig/network-scripts/ifcfg-eth0
Python代码
- ONBOOT=yes
 - BOOTPROTO=static
 - IPADDR=192.168.1.10
 - NETMASK=255.255.255.0
 - GATEWAY=192.168.1.1
 - DNS1=192.168.1.1
 - BOOTPROTO=dhcp (这里是原来的设置,就是自动获取IP)
 
========================================
重新导入ifcfg-eth0网络配置文件
[root@localhost ~]# /etc/init.d/network reload
网卡接口关闭与激活
[root@localhost ~]# ifdown eth0 #关闭网络
[root@localhost ~]# ifup eth0 #启动网络网络服务启动与关闭
方法一:
[root@localhost ~]# service network stop #关闭网络服务
[root@localhost ~]# service network start #启动网络服务
[root@localhost ~]# service network restart #重启网络服务
方法二:
[root@localhost ~]# /etc/init.d/network stop
[root@localhost ~]# /etc/init.d/network start
[root@localhost ~]# /etc/init.d/network restart网卡状态查询
[root@localhost ~]# service network status
Configured devices:
lo eth0
Currently active devices:
lo eth0
ssh-sftp 连接远
查看Linux发行版本
 

 2014/01/07 02:21 | by 
  
 
 
 
 
 


