|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
Linux的常用命令find,察看man文档,初学者一定会觉得太复杂而不原意用,但是你一旦学会就爱不释手。
次要用处:
1、检察收集接口设置:ifconfigCa或ifconfig收集接口Ca
2、收集设置ifconfig收集接口[add/del]IP地点netmask子网掩码例:ifocnfigeth010.2.3.4[netmask255.255.255.0]
3、收集接口的激活/封闭格局:ifconfig收集接口up/down
设置dns
创建/etc/resolv.conf文件,在内里写进DNS服务器地点
设置主机名
设置/etc/sysconfig/network文件,同时利用hostname修正主机名
利用例子:
.代码以下:
[root@twin0898sysconfig]#catnetwork
networknetworking/network-scripts/
[root@twin0898sysconfig]#catnetwork
NETWORKING=yes
GATEWAY=125.39.149.1
HOSTNAME=twin0898
NETWORKING_IPV6=no
通用格局:
1、到收集的网关routeadd/delete-net方针收集netmask掩码gw网关地点[dev收集接口]
2、到单一主机的网关routeadd/delete-host方针主机gw网关地点[dev收集接口]
3、增加默许网关:routeadddefaultgw网关地点反省主机路由表:route,netstat-nr
//总结以下:
1、收集设置反省:ifconfig-a
2、连通性反省:ping、traceroute
3、路由表反省:route或netstatCnr
4、DNS客户端运转形态反省:nslookup
//利用例子以下
//ifconfig-a
.代码以下:
root@CinemaTest2:/usr/local/jdk#ifconfig-a
eth0Linkencap:EthernetHWaddrb8:ac:6f:38:10:c6
inetaddr:192.168.232.127Bcast:192.168.232.255Mask:255.255.255.0
inet6addr:fe80::baac:6fff:fe38:10c6/64Scope:Link
UPBROADCASTRUNNINGMULTICASTMTU:1500Metric:1
RXpackets:42918159errors:0dropped:0overruns:0frame:0
TXpackets:40893832errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:1000
RXbytes:30644395811(30.6GB)TXbytes:30932951131(30.9GB)
Interrupt:16
loLinkencap:LocalLoopback
inetaddr:127.0.0.1Mask:255.0.0.0
inet6addr:::1/128Scope:Host
UPLOOPBACKRUNNINGMTU:65536Metric:1
RXpackets:917errors:0dropped:0overruns:0frame:0
TXpackets:917errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:0
RXbytes:81417(81.4KB)TXbytes:81417(81.4KB)
//pingvip.jb51.net
.代码以下:
PINGmovie.kankan.co.sandai.net(114.80.189.60)56(84)bytesofdata.
64bytesfrom114.80.189.60:icmp_seq=1ttl=54time=31.2ms
64bytesfrom114.80.189.60:icmp_seq=2ttl=54time=29.9ms
64bytesfrom114.80.189.60:icmp_seq=3ttl=54time=31.1ms
64bytesfrom114.80.189.60:icmp_seq=4ttl=54time=30.5ms
64bytesfrom114.80.189.60:icmp_seq=5ttl=54time=31.4ms
64bytesfrom114.80.189.60:icmp_seq=6ttl=54time=32.6ms
64bytesfrom114.80.189.60:icmp_seq=7ttl=54time=30.8ms
64bytesfrom114.80.189.60:icmp_seq=8ttl=54time=30.9ms
64bytesfrom114.80.189.60:icmp_seq=9ttl=54time=32.0ms
64bytesfrom114.80.189.60:icmp_seq=10ttl=54time=31.3ms
64bytesfrom114.80.189.60:icmp_seq=11ttl=54time=31.3ms
64bytesfrom114.80.189.60:icmp_seq=12ttl=54time=30.3ms
---movie.kankan.co.sandai.netpingstatistics---
12packetstransmitted,12received,0%packetloss,time11004ms
rttmin/avg/max/mdev=29.954/31.148/32.608/0.704ms
//netstat-nr
.代码以下:
root@CinemaTest2:/usr/local/jdk#netstat-nr
KernelIProutingtable
DestinationGatewayGenmaskFlagsMSSWindowirttIface
0.0.0.0192.168.232.20.0.0.0UG000eth0
192.168.232.00.0.0.0255.255.255.0U000eth0
//nslookupvip.jb51.net
.代码以下:
root@CinemaTest2:/etc#nslookupvip.jb51.net
Server:192.168.8.150
Address:192.168.8.150#53
Non-authoritativeanswer:
vip.jb51.netcanonicalname=movie.jb51.net.
movie.jb51.netcanonicalname=movie.kankan.co.sandai.net.
Name:movie.kankan.co.sandai.net
Address:114.80.189.60
Name:movie.kankan.co.sandai.net
Address:119.147.41.209
给你装的系统里为ubuntu12.04,它已经封装的很臃肿了,但是考虑到你没有很多时间投入其中,所以给你装了它,但是怎么用它提高开发效率,需要你在学习的过程中不断总结; |
|