知识屋:更实用的电脑技术知识网站
所在位置:首页 > 操作系统 > linux

linux常用命令2

发布时间:2014-09-05 16:52:52作者:知识屋

Sh代码 
Last login: Sat Sep 10 14:57:04 2011 from 192.168.0.142 
[root@oplinux ~]# ifconfig 
eth0      Link encap:Ethernet  HWaddr 00:0C:29:3A:22:CA   
          inet addr:192.168.91.128  Bcast:192.168.91.255  Mask:255.255.255.0 
          inet6 addr: fe80::20c:29ff:fe3a:22ca/64 Scope:Link 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 
          RX packets:221 errors:0 dropped:0 overruns:0 frame:0 
          TX packets:146 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:1000  
          RX bytes:36945 (36.0 KiB)  TX bytes:20636 (20.1 KiB) 
          Interrupt:67 Base address:0x2000  
 
lo        Link encap:Local Loopback   
          inet addr:127.0.0.1  Mask:255.0.0.0 
          inet6 addr: ::1/128 Scope:Host 
          UP LOOPBACK RUNNING  MTU:16436  Metric:1 
          RX packets:2576 errors:0 dropped:0 overruns:0 frame:0 
          TX packets:2576 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:0  
          RX bytes:3710212 (3.5 MiB)  TX bytes:3710212 (3.5 MiB) 
 
[root@oplinux ~]# route 
Kernel IP routing table 
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 
192.168.91.0    *               255.255.255.0   U     0      0        0 eth0 
169.254.0.0     *               255.255.0.0     U     0      0        0 eth0 
default         192.168.91.2    0.0.0.0         UG    0      0        0 eth0 
[root@oplinux ~]# cat /etc/sysconfig/network-scripts/ifcfg- 
ifcfg-eth0  ifcfg-lo     
[root@oplinux ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 
# Advanced Micro Devices [AMD] 80c970 [PCnet32 LANCE] 
DEVICE=eth0 
ONBOOT=yes 
#HWADDR=00:0C:29:3A:22:CA 
#IPV6ADDR= 
#IPV6PREFIX= 
HWADDR=00:0c:29:3a:22:ca 
TYPE=Ethernet 
USERCTL=yes 
IPV6INIT=no 
PEERDNS=yes 
BOOTPROTO=dhcp 
[root@oplinux ~]# cat /etc/resolv.conf 
; generated by /sbin/dhclient-script 
search localdomain 
nameserver 192.168.91.2 
[root@oplinux ~]# cat /etc/host.conf 
order hosts,bind 
[root@oplinux ~]# cat /etc/sysconfig/network 
NETWORKING=yes 
NETWORKING_IPV6=yes 
HOSTNAME=oplinux.hehaibo.com 
[root@oplinux ~]# cat /etc/hosts 
# Do not remove the following line, or various programs 
# that require network functionality will fail. 
127.0.0.1       oplinux.hehaibo.com     oplinux localhost.localdomain   localhost 
::1     localhost6.localdomain6 localhost6 
[root@oplinux ~]# cat /etc/inetd.conf 
cat: /etc/inetd.conf: 没有那个文件或目录 
[root@oplinux ~]# cat /etc/rc.d/rc.local 
#!/bin/sh 

# This script will be executed *after* all the other init scripts. 
# You can put your own initialization stuff in here if you don't 
# want to do the full Sys V style init stuff. 
 
touch /var/lock/subsys/local 
#rotue add -host 192.168.157.128 gw 192.168.157.2 dev eth0 
#route add -net 192.168.157.0 netmask 255.255.255.0 gw 192.168.157.2 dev eth0 
[root@oplinux ~]#  

作者“hehaibo”
 

(免责声明:文章内容如涉及作品内容、版权和其它问题,请及时与我们联系,我们将在第一时间删除内容,文章内容仅供参考)
收藏
  • 人气文章
  • 最新文章
  • 下载排行榜
  • 热门排行榜