9、Linux常用命令-网络配置管理

ifconfig ‐a //查ip信息
ping ‐C 4 192.168.xxx.xxx //ping4次
setup //配置ip、防火墙、服务等,需要root用户执行
ifconfig eth0 192.168.1.100 netmask 255.255.255.0 //临时设置ip
vi /etc/sysconfig/network‐scrippts/ifcfg‐eth0 //永久设置ip
dhclient eth0 //启用dhcp模式
service network restart //重启网络服务[stop、start]
service iptables stop //关闭防火墙,[start]开启,[status]查看状态
hostname //查看主机名
netstat ‐an //查看所有端口
lsof ‐i :8080 //查看具体端口号运行的程序12.
nmap 10.1.252.121 //扫描端口

猜你喜欢

转载自www.cnblogs.com/zengfh/p/12286541.html