Linux Command Line ½âÎö
0
´¦Àí
Ä£ÐÍ
Linux kernel
µÄÆô¶¯°ü
À¨ºÜ¶à×é¼þµÄ³õʼ»¯ºÍÏà¹ØÅäÖã¬ÕâЩÅäÖòÎÊýÒ»°ãÊÇͨ¹ýcommand line
½ø
ÐÐÅäÖõġ£ÔÚ½øÐкóÐø·ÖÎö֮ǰ£¬ÏÈÀ´Àí½âÒ»ÏÂcommand line
µÄ´¦Àí
Ä£ÐÍ£º
Òª´¦ÀíµÄ¶ÔÏóÊÇÒ»¸ö×Ö·û´®£¬ÆäÖаüº¬Á˸÷ÖÖÅäÖÃÐÅÏ¢£¬Í¨³£¸÷¸öÅäÖÃÖ®¼äͨ¹ý¿Õ¸ñ½øÐзÖÀ룬ÿ¸öÅäÖõıí´ïÐÎʽÊÇ
È磺param=value1,value2
»òÕߺܼòµ¥¾ÍÊÇÒ»¸örw
¡£
ÄÇôkernel
¾ÍÐèÒªÌṩ¶ÔÕâЩ
²ÎÊý½øÐд¦ÀíµÄ´¦Àíº¯ÊýÁÐ±í¡£¸ù¾Ý²ÎÊýµÄ×÷ÓÃÒÔ¼°Ö´ÐÐÆÚµÄÏȺó²»Í¬£¬ÕâЩ´¦Àíº¯Êý±»¶¨Òåµ½²»Í¬µÄ¶ÎÖС£Õë¶Ôÿһ¸ö²ÎÊý£¬Kernel
¶¼»áµ½ÏàÓ¦µÄ¶ÎÖвéÕÒÏàÓ¦µÄ´¦Àíº¯Êý£¬×îÖÕ½øÐи÷¸ö×é¼þµÄÅäÖá£
1
ÅäÖÃ
¸ñʽ
³£¼ûµÄÅäÖøñʽÈ磺
console=ttySAC0,115200 root=nfs nfsroot=192.168.1.9:/source/rootfs
initrd=0x10800000,0x14af47
2
ÅäÖÃ
·½Ê½
2.1 Bootloader
¶¯
̬ÅäÖÃ
ÓÉbootloader
½øÐвÎÊýÅä
Öã¬command line
½«×öΪatag_list
µÄÒ»¸ö½Úµã´«µÝµ½Kernel
¡£
2.2 Kernel
¾²Ì¬ÅäÖÃ
ͨ¹ýmake menuconfig
½ø
ÐÐÅäÖãºÔËÐкóÅäÖÃboot options->Default kernel
command string
¡£¸ÃÅäÖý«±»¾²Ì¬±àÒëµ½Kernel
ÖУ¬
ͨ¹ý±äÁ¿default_command_line
·ÃÎÊ¡£
3
½â
ÎöÅäÖÃ
3.1
Ïà¹Ø¶¨Òå
¸ù¾ÝÖ´ÐеÄÏȺó˳Ðò£¬¿ÉÒÔ½«´¦Àíº¯Êý·ÖΪÈý¸ö´óÀ࣬ËûÃÇ·Ö±ð´æÔÚÓÚÏÂÃæÈý¸ö¶ÎÖУ¨²Î¿¼top/arch/arm/kernel/vmlinux.lds
£©:
__setup_start = .; *(.init.setup) __setup_end = .;
__early_begin = .; *(.early_param.init) __early_end = .;
__start___param = .; *(__param) __stop___param = .;
Õâ
Èý¸ö¶ÎÄÚ´æ´¢µÄ²»ÊDzÎÊý£¬¶øÊÇcommand line
²ÎÊýËùÐèÒªµÄ´¦Àíº¯
Êý¡£
3.1.1
.early_param.init
¶Î
“.early_param.init
”
Ëù¶¨ÒåµÄ´¦ÀíÏà¶Ô¿¿Ç°Ò»Ð©£¬ËüËù´¦ÀíµÄ²ÎÊýÀýÈ磺initrd=
£¬cachepolicy=
£¬nocache
£¬ nowb
£¬ ecc=
£¬ vmalloc=
£¬
mem=
£¬µÈµÈ¡£
ÕâЩ´¦Àíº¯ÊýÊÇͨ¹ý__early_param
ºê
À´¶¨ÒåµÄ£¬ÀýÈ磺
static void __init early_initrd(char **p)
{
…… }
__early_param("initrd=", early_initrd);
¶ÔÓÚºê__early_param
£¬
¿ÉÒÔÔÚtop/arch/arm/include/asm/Setup.h
ÖÐ
ÕÒµ½Èç϶¨Ò壺
struct early_params {
const char
*arg;
&n
Ïà¹ØÎĵµ£º
²éÕÒĿ¼£ºfind /£¨²éÕÒ·¶Î§£© -name '²éÕҹؼü×Ö' -type d
²éÕÒÎļþ£ºfind /£¨²éÕÒ·¶Î§£© -name ²éÕҹؼü×Ö -print
Èç¹ûÐèÒª¸ü½øÒ»²½µÄÁ˽⣬¿ÉÒԲο´LinuxµÄÃüÁîÏê½â¡£
ÕâÀïÕª³ÈçÏ£º
·find path -option [ -print ] [ -exec -ok command ] {} \;
#-print ½«²éÕÒµ½µÄÎļþÊä³öµ½±ê×¼Êä³ö
#-exec command { ......
http://hugege.com/2009/06/24/linux-ssh/
Linux SSHÃüÁî´óÈ«
rm
-rf mydir /* ɾ³ýmydirĿ¼ */
cd mydir /* ½øÈëmydirĿ¼ */
cd – /*
»ØÉÏÒ»¼¶Ä¿Â¼ */
cd ~ /* »Ø¸ùĿ¼ */
mv tools tool /* °ÑtoolsĿ¼¸ÄÃûΪtool */
ln -s tool bac
/*
¸øtoolĿ¼´´½¨ÃûΪbacµÄ·ûºÅÁ´½Ó,×îÊìϤµÄÓ¦¸Ã¾ÍÊÇFTP ......
²Ù×÷ϵͳÊÇÒ»¸ö·Ç³£¸´ÔÓµÄÈí¼þ,Éè¼ÆºÍʵÏÖÒ»¸ö²Ù×÷ϵͳÐèÒª¾ßÓо«ÉîµÄÀíÂÛ֪ʶºÍ¸ß³¬µÄʵ¼ùÄÜÁ¦.´«Í³µÄ²Ù×÷ϵͳÉè¼Æ¿Î³Ì,¹ýÓÚÆ«ÖØÀíÂÛµÄѧϰ,ȱ·¦¶Ôʵ¼ùµÄÖ¸µ¼¡£Ï£ÍûÉîÈëѧϰ²Ù×÷ϵͳµÄÉè¼Æ£¬×îºÃµÄ·½·¨¾ÍÊÇÕÒÒ»¸ö²Ù×÷ϵͳÀ´×Ô¼ºÊµ¼ù£¬ÔÚʵ¼ùÖÐѧϰ£¬¿ÉÒÔ´´Ôì³öÆæ¼£¡£
......
aep1000
Ö§³Ö¿ìËÙ¼ÓÃÜ´¦Àí¿¨ÒÔ¼ÓËÙ°²È«Ì×½Ó×ֲ㣨SSL£©¼ÓÃÜ£¬ÔÚ±¾ÊéÖв»ÓÃÓÚ½¨Á¢¼¯Èº¡£
anacron
ÓëcronºÍatÀàËÆ£¬¶¼ÊÇÔÚÌض¨Ê±¼ä¡¢ÉõÖÁÔÚϵͳûÓÐÁ¬ÐøÔËÐÐʱÆô¶¯ÃüÁîµÄ£¬ÔÚRed HatÉÏ£¬/etc/anacrontabÎļþÁгöÁËÿÌìÖ´ÐеÄcron×÷ÒµµÄÑ»·³£¹æÈÕÖ¾£¬Èç¹ûÄã½ûÓÃÁËËü£¬Ä㽫²»ÄÜÔÙÖ´ÐÐÈÕ־ѻ·£¬ÄãµÄϵͳ´ÅÅÌ×îºó½«±»ÌîÂú£¬Ô ......
1¡¢°²×°°ü£º
ÏÂÔØÍøÖ·£ºhttp://java.sun.com/javase/downloads/index.jsp
jdk-6u12-linux-i586-rpm£¨°æ±¾£º1.6.0_12£©
2¡¢Ö´Ðа²×°
chmod 777 jdk-6u12-linux-i586-rpm.bin
./ jdk-6u12-linux-i586-rpm.bin
½ÓÊÜÐÒ飬°´enter¼´¿É»Ø¸´yes
3¡¢¸Ä±ä°²×°Ä¿Â¼£º
mv /usr/java/jdk1.6.0_12 /usr/local/java
4¡¢×îºóÉèÖà ......