易截截图软件、单文件、免安装、纯绿色、仅160KB

linux添加路由

linux添加路由
http://baikgd.blog.163.com/blog/static/35402495200972111353827/
服务器ip(eth0)
[root@localhost net]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:E3:9A:15
inet addr:172.18.3.205 Bcast:172.18.3.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fee3:9a15/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4776 errors:0 dropped:0 overruns:0 frame:0
TX packets:3348 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:439384 (429.0 KiB) TX bytes:390425 (381.2 KiB)
Interrupt:11 Base address:0x1400
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:254 errors:0 dropped:0 overruns:0 frame:0
TX packets:254 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22128 (21.6 KiB) TX bytes:22128 (21.6 KiB)
查看原始路由信息
[root@localhost net]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.18.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
==========================================================
添加默认网关
[root@localhost net]# route add default gw 172.18.3.50
[root@localhost net]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.18.3.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default 172.18.3.50 0.0.0.0 UG 0 0 0 eth0
=======================================================
添加一个ip(eth0:1)
[root@localhost net]# ifconfig eth0:1 192.168.168.119 netmask 255.255.255.0 up
[root@localhost net]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:E3:9A:15
inet addr:172.18.3.205 Bcast:172.18.3.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fee3:9a15/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5071 errors:0 dropped:0 overruns:0 frame:0
TX packets:3569 errors:0 dropped:0 overrun


相关文档:

Linux c/c++ 开发工具集锦

我之前是一个C程序员,而且是个Windows的程序员,在windows下使用VC6.0/VS2005等microsoft的傻瓜式工具工作,
对于那个vc 6.0/vs2005的快捷操作,debug操作是那么的熟悉,可以说vc
6.0/vs2005是window下开发c/c++最好用的工具了,可以查看调用堆栈,内存变化情况,变量值,另外安装 visual assist
x后让VC看起来是那么 ......

linux的文件系统认识(1)

1.谈到linux的文件系统,我们必须关注/etc/fstab文件的内容;在linux中的所有挂载分区和设备都在fstab表格中。
/etc/fstab表格中的选择项参数定义如下:
ro or rw
Read only or read write
noauto
Do not respond to mount -a. Used for external devices CDROMs ...
noexec
Executables cannot be started from the ......

我所熟悉的Linux命令

在这里整理一下我所熟悉的linux命令,这些命令应该是使用linux运营一个网站所需的基本命令,供想学习使用linux的同事参考。
大家也可以补充一些在工作中常用到的命令,只列系统命令和基本shell脚本,不涉及apache、tomcat、ftp、mysql管理。 
我只列出命令和常见的参数组合,含义就不解释了,大家问问google都会得到 ......

linux命令行技巧

先写几条,自己常用的,以后再补充:
1. ALT + '.'
前一条命令的最后一个参数。
例如:
第一条命令,ls /usr/loca/;
第二条命令,cd /usr/local;
第二条命令的/usr/local,直接通过ALT+'.'即可输入。
2.CTRL+'r'
在history中寻找命令
3.TAB
补齐文件名或目录名
4.$ find -name '*.[ch]' | xargs grep -E 'expr' ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号