LinuxÏÂÓÀ¾ÃÐÞ¸ÄMACµØÖ·ºÍifconfigÃüÁî×ܽá(ת)
1. ¹Ì¶¨Ò»¸öMACµØÖ·£¬ÌرðÊÇÔÚʹÓöà¸öÐéÄâ»úµÄʱºò
linux»·¾³ÏÂ:
ÓÃrootÉí·ÝµÇ¼£¬ÔÚ/etc/rc.d/rc.localÀï¼ÓÉÏÕâÈý¾ä
ifconfig eth0 down
ifconfig eth0 hw ether 00:0C:18:EF:FF:ED
ifconfig eth0 up
ÕâÑùÖØÐÂrebootºó¾Í²»ÅÂMAC¸´ÔÁË¡£
2. ifconfigÃüÁתÔØhttp://www.cnblogs.com/taobataoma/archive/2007/12/27/1016689.html
£©
ifconfig [Interface]
InterfaceÊÇ¿ÉÑ¡ÏÈç¹û²»¼Ó´ËÏÔòÏÔʾϵͳÖÐËùÓÐÍø¿¨µÄÐÅÏ¢¡£Èç¹ûÌí¼Ó´ËÑ¡ÏîÔòÏÔʾËùÖ¸¶¨µÄÍø¿¨ÐÅÏ¢
ÀýÈ磺ifconfig eth0
eth0 Link encap:Ethernet
HWaddr 00:0C:29:F3:3B:F2
inet addr:192.168.0.10 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:78 errors:0 dropped:0 overruns:0 frame:0
TX packets:104 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:11679 (11.4 Kb)
TX bytes:14077 (13.7 Kb)
Interrupt:10 Base address:0x1080
ÎÒÃÇ¿ÉÒÔ¿´µ½
µÚÒ»ÐУºÁ¬½ÓÀàÐÍ£ºEthernet£¨ÒÔÌ«Íø£©HWaddr£¨Ó²¼þmacµØÖ·£©
µÚ¶þÐУºÍø¿¨µÄIPµØÖ·¡¢×ÓÍø¡¢ÑÚÂë
µÚÈýÐУºUP£¨´ú±íÍø¿¨¿ªÆô״̬£©RUNNING£¨´ú±íÍø¿¨µÄÍøÏß±»½ÓÉÏ£©MULTICAST£¨Ö§³Ö×é²¥£©MTU:1500£¨×î´ó´«Êäµ¥Ôª£©£º1500×Ö½Ú
µÚËÄ¡¢ÎåÐУº½ÓÊÕ¡¢·¢ËÍÊý¾Ý°üÇé¿öͳ¼Æ
µÚÆßÐУº½ÓÊÕ¡¢·¢ËÍÊý¾Ý×Ö½ÚÊýͳ¼ÆÐÅÏ¢¡£
2¡¢ifconfig ÅäÖÃÍø¿¨
ÅäÖÃÍø¿¨µÄIPµØÖ·
ifconfig eth0 192.168.0.1 netmask 255.255.255.0
ÔÚeth0ÉÏÅäÖÃÉÏ192.168.0.1 µÄIPµØÖ·¼°24λÑÚÂë¡£ÈôÏëÔÙÔÚeth0ÉÏÔÚÅäÖÃÒ»¸ö192.168.1.1/24 µÄIPµØÖ·Ôõô°ì£¿ÓÃÏÂÃæµÄÃüÁî
ifconfig eth0:0 192.168.1.1 netmask 255.255.255.0
ÕâʱÔÙÓÃifconifgÃüÁî²é¿´£¬¾Í¿ÉÒÔ¿´µ½Á½¸öÍø¿¨µÄÐÅÏ¢ÁË£¬·Ö±ðΪ£ºeth0ºÍeth0:0¡£Èô»¹ÏëÔÙÔö¼ÓIP£¬ÄÇÍø¿¨µÄÃüÃû¾Í½Ó×ÅÊÇ£ºeth0:1¡¢eth0:2...ÏëÒª¼¸¸ö¾ÍÌ¸ö¡£ok£¡
ÅäÖÃÍø¿¨µÄÓ²¼þµØÖ·
ifconfig eth0 hw ether xx£ºxx£ºxx£ºxx£ºxx£ºxx
¾Í½«Íø¿¨µÄÓ²¼þµØÖ·¸ü¸ÄÁË£¬´ËʱÄã¾Í¿ÉÒÔƹý¾ÖÓòÍøÄÚµÄIPµØÖ·°î¶¨ÁË¡£
½«Íø¿¨½ûÓÃ
ifconfig eth0 down
½«Íø¿¨ÆôÓÃ
ifconfig eth0 up
ת×Ôhttp://hi.baidu.com/
Ïà¹ØÎĵµ£º
LinuxÌṩÁË´óÁ¿µÄÃüÁÀûÓÃËü¿ÉÒÔÓÐЧµØÍê³É´óÁ¿µÄ¹¤×÷£¬Èç´ÅÅ̲Ù×÷¡¢Îļþ´æÈ¡¡¢Ä¿Â¼²Ù×÷¡¢½ø³Ì¹ÜÀí¡¢ÎļþȨÏÞÉ趨µÈ¡£ËùÒÔ£¬ÔÚLinuxϵͳÉϹ¤×÷Àë²»¿ªÊ¹ÓÃϵͳÌṩµÄÃüÁî¡£ÒªÏëÕæÕýÀí½âLinuxϵͳ£¬¾Í±ØÐë´ÓLinuxÃüÁîѧÆð£¬Í¨¹ý»ù´¡µÄÃüÁîѧϰ¿ÉÒÔ½øÒ»²½Àí½âLinuxϵͳ¡£
²»Í¬Linux·¢ÐаæµÄÃüÁîÊýÁ¿²»Ò»Ñù£¬µ«Linux·¢ÐÐ°æ± ......
ÔÚwindowsÉϳ¢ÊÔcentosºóÎÒÖ±½Ó¸ø¸ñʽ»¯µôcentos£¬Æô¶¯ÏµÍ³³öÏÖgrubµÄÆô¶¯»Ã棬ÓÐ2¸ö½â¾ö·½°¸
1£ºÔÚdos»·¾³ÏÂÓÃfdisk /mbr ¼¶¿ÉÒÔÐÞ¸´mbr¼´¿É
2£ºÈç¹ûûdosÅÌÔòÓÃÏÂÃæÃüÁ
1£©rootnoverify (hd0,0) //»Ø³µ£¬¼ÇµÃrootnoverifyºóÃæÓиö¿Õ¸ñ
2£©chainloader (hd0,0)+1 // ¼ÇµÃ»¹ÊÇÓпոñ
3 ......
/*
socket selectÄ£ÐÍ£¬·þÎñ¶Ë
¾ø´ó¶àÊý×¢ÊÍ×Ô¼ºÐ´µÄ£¬²Î¿¼man
*/
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/un.h>
#include &l ......
×ölinux cÓïÑÔ¿ª·¢ÓÐһСÕó×ÓÁË£¬ÔÚÕâ±ß×Ô¼º×ܽáÁËЩÐĵã¬ÏàÐÅÄÜÈò»¶®µÃLinux±à³ÌµÄÈËÂýÂý²½ÈëLinuxµîÌá£ÓÐÈκβ»¶Ô»ò²»×¼È·Ö®´¦»¶ÓÌÖÂÛ¡£
1. °²×° linux ²Ù×÷ϵͳ
¼ÈȻҪѧϰlinuxϵÄcÓïÑÔ¿ª·¢£¬ÄÇô°²×°¸ölinux²Ù×÷ϵͳÊDZØÐëµÄ¡£½¨Òé°²×°Ubuntu£¬ÕâÊÇÎÒÄ¿Ç°¼û¹ý½çÃæ×îÓѺõÄlinux²Ù×÷ϵͳÁË¡£¹ØÓÚÈçºÎʹÓÃUbuntuÒ ......