linux or unix ³£ÓÃÃüÁî
¿ì½Ý¼ü£ºctrl+c ctrl+d
1.shell ·ÖΪͼÐÎshellºÍÃüÁîshell ÃüÁîshell·ÖΪbashºÍcsh£¬Çл»µ½cshÓÃcsh£¬exit·µ»Øbash
2.telnet Ô¶³ÌµÇ½unix
telnet 192.168.0.25
login£ºhz0904 Óû§Ãû
password£ºsd0904 ÃÜÂë¹æÔò£º6-8¸ö×Ö·û£¬ÖÁÉÙ°üº¬×ÖĸÒÔ¼°1¸öÊý×Ö£¬²»ÄÜÓëµÇ¼ÃûÏàͬ
3.passwd£º ÐÞ¸ÄÃÜÂë>ÊäÈëÏÖÓпÚÁî>ÊäÈëпÚÁî>È·ÈÏпÚÁî>
4.clear£º ÇåÀíÆÁÄ» ÔÚbshÖÐÌṩctrl+l¿ì½Ý¼ü
5.pwd£º £¨print working directory£©ÏÔʾµ±Ç°Ä¿Â¼
6.id£º ´òÓ¡Éí·Ý£»
Ó÷¨£ºuid=Óû§id
id Óû§ >²é¿´Ä³Óû§id£¬
id –a²é¿´ËùÓÐÓû§idÐÅÏ¢
7.ls£º ÁгöÎļþ
ls / ¿ÉÒÔÖ±½ÓÁгö¸ùĿ¼ÎļþÐÅÏ¢
ls ~¿ÉÁгöÊôÖ÷Ŀ¼ÏµÄÎļþ
ls –a¿ÉÒÔÁгöÈ«²¿Îļþ°üÀ¨ÒÔµã´òÍ·µÄÒþ²ØÎļþ
ls –R¿ÉÒÔÁгöËùÓÐĿ¼Îļþ µÝ¹é
ls –ta»òÕßls –t ÅÅÁÐÎļþʱºòÒÔʱ¼äÏȺó˳ÐòÅÅÁÐ lsÊÇÒÔÎļþÃû×Öĸ˳ÐòÅÅÁУ¬
ls –FÁгöµ±Ç°ÎļþÀàÐÍ / * @·Ö±ð´ú±í Ŀ¼ ¿ÉÖ´ÐÐÎļþ Á´½ÓÎļþ Îı¾ÎļþÎÞ
ls -ld dir2 ¼ÓÉÏd ´ú±ídir2Ŀ¼±¾ÉíµÄÊôÐÔÐÅÏ¢
ls –l ÁгöÎļþµÄÊôÐÔÐÅÏ¢ ´òÓ¡ÐÅÏ¢ÀàËÆÓÚÏÂ
8.cd£º ½øÈëĿ¼ .´ú±íµ±Ç°Ä¿Â¼ ..´ú±íÉϲãĿ¼ / ´ú±í¸ùĿ¼ ×¢Ò⣺cd ../..´ú±íÉϲãµÄÉϲã
9.mkdir£º ´´½¨Ä¿Â¼
mkdir ~/dir1 ÔÚÊôÖ÷Ŀ¼Ï´´½¨Ò»¸ödir1Ŀ¼
mkdir -p dir1/dir2/dir3 ±íʾ´Ó¸¸Ä¿Â¼¿ªÊ¼´´½¨£¬Èç¹û¸¸Ä¿Â¼²»´æÔÚÔò´´½¨Ò»¸öеÄ
mkdir ../dir1 ±íʾ´Óµ±Ç°Ä¿Â¼µÄÉϼ¶Ä¿Â¼´´½¨dir1
10.cp£º cp file1 file2 Èç¹ûfile2´æÔÚÔò¸²¸Ç£¬Èç¹û²»´æÔÚÔòн¨
cp –i file1 file2 ½»»¥Ê½£¬ÌáʾÊÇ·ñ´æÔÚ
cp f1 f2 f3 f4 dir1 ¿ÉÒÔÒ»´Î¸´Öƶà¸öÎļþ£¬µ«ÊÇ×îºóÒ»¸öÒ»¶¨ÒªÎªÄ¿Â¼
cp –R dir1 dir2 µÝ¹é£¬°Ñdir1ϵÄËùÓÐÎļþ°üÀ¨×ÓĿ¼ȫ²¿¸´ÖÆ£¬1.Èç¹ûdir2´æÔÚÔòÈ«²¿¸´ÖƵ½dir2Ŀ¼Ï£¬Èç¹û²»´æÔÚÔò¸´ÖÆΪdir2
11.chmod£º ¸Ä±äȨÏÞ
Chmod u+x file1 Òâ˼ÊÇ£º¶Ôu£¨ÓµÓÐÕߣ©¸Ä±äfile1µÄȨÏÞÔö¼Óx£¨Ö´ÐÐȨ£©
u£ºÓµÓÐÕß + Ôö¼ÓÒ»¸öȨÏÞ r ¶ÁȨÏÞ
g£º×éÓû§ - ¼õÈ¥Ò»¸öȨÏÞ w дȨÏÞ
a£ºËùÓÐ = Ö»ÓÐijȨÏÞ x Ö´ÐÐ
o£ºother
chmod -R a+r dir1 R±íʾµÝ¹é£¬dir1ÏÂËùÓÐÎļþºÍĿ¼¼ÓÉÏrµÄȨÏÞ
chmod 777 file ÕâÀïÊÇÓöþ½øÖÆÀ´Ð޸ģ¬µÚÒ»¸ö7ÊÇÓµÓÐÕßµÄȨÏÞ µÚ¶þ¸ö7ÊÇ×éµÄȨÏÞ µÚÈý¸öÊÇÆäËû
0-7Ö®¼äµÄÊý×Ö£¬ËùÓÐÇé¿ö£º¼Çס ¶Á д Ö´ÐÐ 4 2 1
rwx 111 »¯³ÉÊ®½øÖÆ=7 -wx 011 »¯³ÉÊ®½øÖÆ=3
rw- 110 »¯³ÉÊ®½øÖÆ=6 -w- 010 »¯³É
Ïà¹ØÎĵµ£º
(1) Linux »ù´¡£º°üÀ¨Linux °æ±¾£¬°²×°£¬ÃüÁîµÈ֪ʶµÄÕÆÎÕ¡£
(2) Linux ϵͳ¿ª·¢£ºÖ÷ÒªÊÇÇý¶¯½Ó¿Ú£¬ÄÚºËÅäÖý»²æ±àÒ룬ÄÚºËÈ¡µã£¬busybox£¬µÈµÈ·½Ãæ¡£
(3)Linux ǶÈëʽӦÓÿª·¢£ºÇ¶ÈëʽLINUXÓ¦ÓóÌÐò¿ª·¢ÊÇÔÚ²Ù×÷ϵͳÉÏ×ö¿ª·¢£¬ÀàËÆWindowsϵÄVC»òJAVA¿ª·¢¡£
(4)Linux ÍøÂç±à³Ì£ººÍÔÚwindowϵÄsocket±à³ÌÀàËÆ£¬°üÀ¨Ì×½ ......
ת×Ôhttp://blog.chinaunix.net/u3/110321/showart.php?id=2159791
²é¿´ Linux Äں˷Óɱí
ʹÓÃÏÂÃæµÄ route ÃüÁî¿ÉÒԲ鿴 Linux Äں˷ÓÉ±í¡£
# route
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 ......
ÏëÒªÔÚÐéÄâ»úϵÄlinuxÓëwindows»¥Áª£¬×î¹Ø¼üµÄÖ»ÐèÒª3²½£º
1.Ò»¶¨ÒªÉèÖÃÐéÄâ»úµÄÍø¿¨ÎªÇŽÓģʽ£¬ÕÒ¸öÒ»¶¨²»ÄÜÍü¡£
2.ÉèÖÃlinuxϵÄipµØÖ·£¬ vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 #ÍøÂçÃû³Æ
BOOTPROTO=static #¾²Ì¬»ñÈ¡ipµØÖ·
IPADD ......
¡¡I2C×ÜÏß¾ßÓнṹ¼òµ¥Ê¹Ó÷½±ãµÄÌص㡣±¾ÎÄÃèÊöÁËlinuxÏÂI2CÇý¶¯µÄ½á¹¹£¬²¢ÔÚ´Ë»ù´¡Éϸø³öÁËI2CÉ豸Çý¶¯ºÍÓ¦ÓõÄʵÏÖ¡£
¡¡¡¡1 ÒýÑÔ
¡¡¡¡I2C (Inter£Integrated Circuit)×ÜÏßÊÇÒ»ÖÖÓÉPHILIPS¹«Ë¾¿ª·¢µÄÁ½Ïßʽ´®ÐÐ×ÜÏߣ¬ÓÃÓÚÁ¬½Ó΢¿ØÖÆÆ÷¼°ÆäÍâΧÉ豸¡£I2C×ÜÏß×îÖ÷ÒªµÄÓŵãÊÇÆä¼òµ¥ÐÔºÍÓÐЧÐÔ¡£ÓÉÓÚ½Ó¿ÚÖ±½ÓÔÚ×é¼þÖ ......
Ê×ÏÈÏÈѧѧ±à¼Æ÷£¬vim, emacsʲôµÄ¶¼ÐС£
È»ºóѧmake fileÎļþ£¬Ö»ÒªÖªµÀÒ»µã¾ÍÐУ¬ÕâÑù¾Í¿ÉÒÔ×¼±¸±à³ÌÐòÁË¡£
È»ºó¿´¿´¡¶C³ÌÐòÉè¼ÆÓïÑÔ¡·K&R£¬ÕâÑùÄØ£¬»ù±¾ÉϾͿÉÒÔ½øÐÐÒ»°ãµÄ±à³ÌÁË£¬Ë³±ãÕÒ±¾Êý¾Ý½á¹¹µÄÊéÀ´¿´¡£
Èç¹ûÏëѧϰUNIX/LINUXµÄ±à³Ì£¬¡¶APUE¡·¾ø¶Ô¾µäµÄ½Ì²Ä£¬¼ÓÉîһϹ¦µ×£¬Ñ§Ï°¡¶UNP¡·µÄµÚ¶þ¾í¡£ÕâÑù»ù ......