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

linuxÉèÖû·¾³±äÁ¿

1¡¢ÒýÑÔ
    ÔÚlinuxϵͳÏ£¬Èç¹ûÄãÏÂÔØ²¢°²×°ÁËÓ¦ÓóÌÐò£¬ºÜÓпÉÄÜÔÚ¼üÈëËüµÄÃû³ÆÊ±³öÏÖ“command not found”µÄÌáʾÄÚÈÝ¡£Èç¹ûÿ´Î¶¼µ½°²×°Ä¿±êÎļþ¼ÐÄÚ£¬ÕÒµ½¿ÉÖ´ÐÐÎļþÀ´½øÐвÙ×÷¾ÍÌ«·±ËöÁË¡£ÕâÉæ¼°µ½»·¾³±äÁ¿PATHµÄÉèÖÃÎÊÌ⣬¶øPATHµÄÉèÖÃÒ²ÊÇÔÚlinux϶¨ÖÆ»·¾³±äÁ¿µÄÒ»¸ö×é³É²¿·Ö¡£±¾ÎÄ»ùÓÚRedHat 9.0£¬Ïêϸ½²½âÁË»·¾³±äÁ¿¶¨ÖƵÄÎÊÌâ¡£
2¡¢±äÁ¿¼ò½é
LinuxÊÇÒ»¸ö¶àÓû§µÄ²Ù×÷ϵͳ¡£Ã¿¸öÓû§µÇ¼ϵͳºó£¬¶¼»áÓÐÒ»¸öרÓõÄÔËÐл·¾³¡£Í¨³£Ã¿¸öÓû§Ä¬ÈϵĻ·¾³¶¼ÊÇÏàͬµÄ£¬Õâ¸öĬÈÏ»·¾³Êµ¼ÊÉϾÍÊÇÒ»×é»·¾³±äÁ¿µÄ¶¨Òå¡£Óû§¿ÉÒÔ¶Ô×Ô¼ºµÄÔËÐл·¾³½øÐж¨ÖÆ£¬Æä·½·¨¾ÍÊÇÐÞ¸ÄÏàÓ¦µÄϵͳ»·¾³±äÁ¿¡£
3¡¢¶¨ÖÆ»·¾³±äÁ¿
    »·¾³±äÁ¿ÊǺÍShell½ôÃÜÏà¹ØµÄ£¬Óû§µÇ¼ϵͳºó¾ÍÆô¶¯ÁËÒ»¸öShell¡£¶ÔÓÚLinuxÀ´ËµÒ»°ãÊÇbash£¬µ«Ò²¿ÉÒÔÖØÐÂÉ趨»òÇл»µ½ÆäËüµÄShell¡£¸ù¾Ý·¢Ðа汾µÄÇé¿ö£¬bashÓÐÁ½¸ö»ù±¾µÄϵͳ¼¶ÅäÖÃÎļþ£º/etc/bashrcºÍ/etc/profile¡£ÕâЩÅäÖÃÎļþ°üº¬Á½×鲻ͬµÄ±äÁ¿£ºshell±äÁ¿ºÍ»·¾³±äÁ¿¡£Ç°ÕßÖ»ÊÇÔÚÌØ¶¨µÄshellÖй̶¨£¨Èçbash£©£¬ºóÕßÔÚ²»Í¬shellÖй̶¨¡£ºÜÃ÷ÏÔ£¬shell±äÁ¿ÊǾֲ¿µÄ£¬¶ø»·¾³±äÁ¿ÊÇÈ«¾ÖµÄ¡£»·¾³±äÁ¿ÊÇͨ¹ýShellÃüÁîÀ´ÉèÖõģ¬ÉèÖúõĻ·¾³±äÁ¿ÓÖ¿ÉÒÔ±»ËùÓе±Ç°Óû§ËùÔËÐеijÌÐòËùʹÓ᣶ÔÓÚbashÕâ¸öShell³ÌÐòÀ´Ëµ£¬¿ÉÒÔͨ¹ý±äÁ¿ÃûÀ´·ÃÎÊÏàÓ¦µÄ»·¾³±äÁ¿£¬Í¨¹ýexportÀ´ÉèÖû·¾³±äÁ¿¡£ÏÂÃæÍ¨¹ý¼¸¸öʵÀýÀ´ËµÃ÷¡£
3.1 ʹÓÃÃüÁîechoÏÔʾ»·¾³±äÁ¿
 
#±¾ÀýʹÓÃechoÏÔʾ³£¼ûµÄ±äÁ¿HOME
$ echo $HOME  
/home/lqm
 
3.2 ÉèÖÃÒ»¸öÐµĻ·¾³±äÁ¿
$ export HELLO=”Hello!”
$ echo $HELLO
Hello!
 
3.3 ʹÓÃenvÃüÁîÏÔʾËùÓеĻ·¾³±äÁ¿
 
$ env
SSH_AGENT_PID=1875
HOSTNAME=lqm
SHELL=/bin/bash
TERM=xterm
HISTSIZE=1000
……
 
3.4 ʹÓÃsetÃüÁîÏÔʾËùÓб¾µØ¶¨ÒåµÄShell±äÁ¿
 
$ set
BASH=/bin/bash
……
 
3.5 ʹÓÃunsetÃüÁîÀ´Çå³ý»·¾³±äÁ¿
 
$ export TEST=”test”     #Ôö¼ÓÒ»¸ö»·¾³±äÁ¿TEST
$ env | grep TEST          #´ËÃüÁîÓÐÊä³ö£¬Ö¤Ã÷»·¾³±äÁ¿TESTÒѾ­´æÔÚÁË
TEST=test
$ unset $TEST                #ɾ


Ïà¹ØÎĵµ£º

Linux»ñÈ¡±¾»úIP¡¢MACʾÀý³ÌÐò

#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <stdio.h>
#include <string>
#include <iostream>
#include <cstring>
using namespace std;
void peek_interfaces(int ......

ÈÃSolarisºÍLinuxÒ»Ñù¶à²Ê


ÔÚSolarisÉÏÃæ¹¤×÷Óм¸¸ö²»·½±ãµØ·½:
Ò»¸öÊÇls²»Äܰ´ÕÕÎļþÀàÐÍÏÔʾÑÕÉ«;
ÁíÒ»¸öÊÇVIÒ²²»ÄÜÏÔÏÖÓ﷨ɫ²Ê;
ÕâÀï¾ÍÀ´ËµÃ÷ÈçºÎ½â¾öÕâÁ½¸öÎÊÌâ:
ÆäʵÕâÁ½¸öÎÊÌâ¶¼ÊÇSolaris×ÔÉíËù´øµÄlsºÍvi°æ±¾µÄÎÊÌâ;
ËùÒÔ½â¾ö°ì·¨¾ÍÊÇÏÂÔØ×îеÄlsºÍvimÔ´Îļþ°üÖØÐ±àÒë½øÐа²×°,¿´ÉÏÈ¥ºÃÏñͦÂé·³,Æäʵ¾Í¼¸²½,ºÜ¼òµ¥µÄ:
×îеÄlsÊÇÔÚ ......

Linux²é¿´È«²¿½ø³ÌµÄÃüÁî

ÔÚ³¬¼¶Óû§ÏÂÏÔʾLinuxϵͳÖÐÕýÔÚÔËÐеÄÈ«²¿½ø³Ì£¬Ó¦Ê¹ÓõÄÃüÁî¼°²ÎÊýÊÇ ps -aux ¡£
Linux psÃüÁîÏê½â£º
    1)ps a ÏÔʾÏÖÐÐÖÕ¶Ë»úϵÄËùÓгÌÐò,°üÀ¨ÆäËûÓû§µÄ³ÌÐò.
    2)ps -A ÏÔʾËùÓгÌÐò.
    3)ps c Áгö³ÌÐòʱ,ÏÔʾÿ¸ö³ÌÐòÕæÕýµÄÖ¸ÁîÃû³Æ,¶ø²»°üº¬Â·¾¶,²ÎÊý»ò³ ......

LinuxÔ´ÂëÖеÄmktimeËã·¨½âÎö

  ÎÒÃÇÖªµÀ£¬´ÓCMOSÖжÁ³öÀ´µÄϵͳʱ¼ä²¢²»ÊÇtime_tÀàÐÍ£¬¶øÊÇÀàËÆÓÚstruct tmÄÇÑù£¬ÄêÔÂÈÕʱ·ÖÃëÊÇ·Ö¿ª´æ´¢µÄ¡£
    ÄÇô£¬Òª°ÑËüת»¯ÎªÏµÍ³±ãÓÚ´¦ÀíµÄtime_tÀàÐÍ£¬¾ÍÐèÒªËã·¨½øÐÐת»»¡£
    ÎÒÃǶ¼ÖªµÀÎÒÃǵĹ«Àú»¹ÊDZȽϸ´Ôӵģ¬ÓдóÔÂСÔ£¬ÓÐÈòÄê·ÇÈòÄ꣬´¦ÀíÆðÀ´»áºÜÂé·³¡£
&n ......

fedora/linux yumÔ´ÏêϸÉèÖÃ(Ç¿ÁÒÍÆ¼ö)

¾­¹ý¼è¿àµÄ·Ü¶·£¬ÖÕÓڸ㶨ÁËfedoraϵͳ´Ó°²×°µ½3DÌØÐ§(±¾È˰²×°µÄÊÇfedora
11)£¬ÎªÁË·½±ãºóÀ´µÄlinuxer£¬ÌØÁôϱ¾È˵ÄÈ«¹ý³ÌÒÔ¹©²Î¿¼¡£ÒÔϲ½ÖèÓеÄÀ´×ÔÓÚgoogleËÑË÷£¬Óв¿·ÖÀ´×ÔÓÚ¼ÎÓÓÖÐÎIJ©¿Í
£¨http://www.my-guides.net/en/content/view/164/26/£©£¬²¢¸Ðл¸÷·½Ç°±²µÄ±Ê¼£¡£
1.Ìí¼Órpm fusionÔ´
rpm -ivh
http://do ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ