Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

LinuxÀïÉèÖû·¾³±äÁ¿µÄ·½·¨

ÔÚLinuxÀïÉèÖû·¾³±äÁ¿µÄ·½·¨£¨export PATH£©Ò»°ãÀ´Ëµ£¬ÅäÖý»²æ±àÒ빤¾ßÁ´µÄʱºòÐèÒªÖ¸¶¨±àÒ빤¾ßµÄ·¾¶£¬´Ëʱ¾ÍÐèÒªÉèÖû·¾³±äÁ¿¡£ÀýÈçÎÒµÄmips-linux-gcc±àÒëÆ÷ÔÚ“/opt/au1200_rm/build_tools/bin”Ŀ¼Ï£¬build_tools¾ÍÊÇÎҵıàÒ빤¾ß£¬ÔòÓÐÈçÏÂÈýÖÖ·½·¨À´ÉèÖû·¾³±äÁ¿£º
1¡¢Ö±½ÓÓÃexportÃüÁ
#export PATH=$PATH:/opt/au1200_rm/build_tools/bin
²é¿´ÊÇ·ñÒѾ­ÉèºÃ£¬¿ÉÓÃÃüÁîexport²é¿´£º
[root@localhost bin]# export
declare -x BASH_ENV="/root/.bashrc"
declare -x G_BROKEN_FILENAMES="1"
declare -x HISTSIZE="1000"
declare -x HOME="/root"
declare -x HOSTNAME="localhost.localdomain"
declare -x INPUTRC="/etc/inputrc"
declare -x LANG="zh_CN.GB18030"
declare -x LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
declare -x LESSOPEN="|/usr/bin/lesspipe.sh %s"
declare -x LOGNAME="root"
declare -x LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:"
declare -x MAIL="/var/spool/mail/root"
declare -x OLDPWD="/opt/au1200_rm/build_tools"
declare -x PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/opt/au1200_rm/build_tools/bin"
declare -x PWD="/opt/au1200_rm/build_tools/bin"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x SSH_ASKPASS="/usr/libexec/openssh/gnome-ssh-askpass"
declare -x SSH_AUTH_SOCK="/tmp/ssh-XX3LKWhz/agent.4242"
declare -x SSH_CLIENT="10.3.37.152 2236 22"
declare -x SSH_CONNECTION="10.3.37.152 2236 10.3.37.186 22"
declare -x SSH_TTY="/dev/pts/2"
declare -x TERM="linux"
declare -x USER="root"
declare -x USERNAME="root"
¿ÉÒÔ¿´µ½£¬»·¾³±äÁ¿ÒѾ­ÉèºÃ£¬PATHÀïÃæÒѾ­ÓÐÁËÎÒÒª¼ÓµÄ±àÒëÆ÷µÄ


Ïà¹ØÎĵµ£º

LinuxÐéÄâ»úÎÞ·¨ÁªÍøµÄÖÕ¼«½â¾ö°ì·¨

ÓÐʱÓöµ½ÈçÏÂÎÊÌ⣬Íø¿¨ÉÏÓиö²æ£¬ÈκÎÃüÁÎÞ·¨ÐÞ¸´¡£
·¢ÏÖÍø¿¨ºì²æ֮ǰÊÔ¹ýÏÂÃæÃüÁ¿Ï¶¨¶¼²»Ðеġ£
sudo ifconfig eth0 down
sudo ifconfig eth0 up
sudo /etc/init.d/dhcp3-server restart
sudo /etc/init.d/networking restart
ÎÊÌâ½â¾öºÜ¼òµ¥£¬°ÑÈçϵĸ´Ñ¡¿ò¹´Éϼ´¿É£¬ÐéÄâ»ú¿ª» ......

linuxÆô¶¯¹ý³ÌÏê½â

Ëæ×ÅLinuxµÄÓ¦ÓÃÈÕÒæ¹ã·º£¬ÌرðÊÇÔÚÍøÂçÓ¦Ó÷½Ã棬ÓдóÁ¿µÄÍøÂç·þÎñÆ÷ʹÓÃLinux²Ù×÷ϵͳ¡£ÓÉÓÚLinuxµÄ×ÀÃæÓ¦ÓúÍWindowsÏà±È»¹ÓÐÒ»¶¨µÄ²î¾à£¬ËùÒÔÔÚÆóÒµÓ¦ÓÃÖÐÍùÍùÊÇLinuxºÍWindows²Ù×÷ϵͳ¹²´æÐγÉÒì¹¹ÍøÂç¡£ÔÚ·þÎñÆ÷¶Ë´ó¶àʹÓÃLinuxºÍUnixµÄ£¬Ä¿Ç°LinuxµÄÉó¤Ó¦ÓÃÁìÓòÊǵ¥Ò»Ó¦ÓõĻù´¡·þÎñÆ÷Ó¦Óã¬Æ©ÈçDNSºÍDHCP·þÎñÆ÷¡¢W ......

ÔÚlinuxÏ »ñÈ¡±¾»úMACµØÖ·µÄº¯Êý

//»ñÈ¡±¾»úMACµØÖ·º¯ÊýQString GetLocalMac()
{
int sock_mac;

struct ifreq ifr_mac;
char mac_addr[30];

sock_mac = socket( AF_INET, SOCK_STREAM, 0 );
if( sock_mac == -1)
{
perror("create socket falise...mac\n");
return "";
}

memset(&ifr_mac,0,sizeof(ifr_mac));
......

ÔÚlinuxÏ »ñÈ¡£¬ÐÞ¸Ä×ÓÍøÑÚÂëNETMASKµÄÁ½¸öº¯Êý

//»ñÈ¡×ÓÍøÑÚÂëµÄº¯ÊýQString GetLocalNetMask()
{
int sock_netmask;
char netmask_addr[50];
struct ifreq ifr_mask;
struct sockaddr_in *net_mask;

sock_netmask = socket( AF_INET, SOCK_STREAM, 0 );
if( sock_netmask == -1)
{
perror("create socket failture...GetLocalNetMask\n");
......

LINUXÄÚºËÖÐminºÍmaxºêµÄѧϰ

add linux kernel min, max define:
include/linux/kernel.h
/*
 * min()/max() macros that also do
 * strict type-checking.. See the
 * "unnecessary" pointer comparison.
 */
#define min(x,y) \
(__extension__\
({ \
        typeof( ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ