尊龙凯时人生就是博

ÏàʶLinux Bashrc£º¹¦Ð§¡¢ÉèÖÃÓëʹÓÃÒªÁì

ÏàʶLinux Bashrc£º¹¦Ð§¡¢ÉèÖÃÓëʹÓÃÒªÁì

ÔÚLinuxϵͳÖУ¬Bashrc£¨Bourne Again Shell run commands£©ÊÇÒ»¸öºÜÊÇÖ÷ÒªµÄÉèÖÃÎļþ£¬ÆäÖаüÀ¨ÁËϵͳÆô¶¯Ê±×Ô¶¯ÔËÐеÄÖÖÖÖÏÂÁîºÍÉèÖá£BashrcÎļþͨ³£Î»ÓÚÓû§µÄ¼ÒĿ¼Ï£¬ÊÇÒ»¸öÒþ²ØÎļþ£¬ËüµÄ×÷ÓÃÊÇΪÓû§×Ô½ç˵ÉèÖÃBash shellµÄÇéÐΡ£

Ò»¡¢BashrcµÄ¹¦Ð§

ÉèÖÃÇéÐαäÁ¿£ºÍ¨¹ýÔÚBashrcÎļþÖнçÌÖÇéÐαäÁ¿£¬¿ÉÒÔÔÚÿ´Î·­¿ªÖÕ¶Ëʱ×Ô¶¯¼ÓÔØÕâЩ±äÁ¿£¬Àû±ãÓû§ÔÚÖÕ¶ËÖÐʹÓá£

×Ô½ç˵ÓÖÃû£º¿ÉÒÔÔÚBashrcÎļþÖÐÉèÖÃÓÖÃû£¬½«³¤ÊÙÁîת»»³É¼ò¶ÌÒ׼ǵÄÓÖÃû£¬ÔÚÖÕ¶ËÖиüÀû±ãµØŲÓá£

Ìí¼Ó×Ô½ç˵º¯Êý£º¿ÉÒÔÔÚBashrcÎļþÖнç˵×Ô¼ºµÄº¯Êý£¬Àû±ãÔÚÖÕ¶ËÖÐʹÓã¬ÊµÏÖһЩ¶¨ÖÆ»¯µÄ¹¦Ð§¡£

ÐÞ¸ÄÌáÐÑ·û£º¿ÉÒÔÔÚBashrcÎļþÖÐÐÞ¸ÄÌáÐÑ·ûµÄÑùʽºÍÑÕÉ«£¬ÃÀ»¯Öն˽çÃæ¡£

¶þ¡¢ÉèÖÃBashrc

ҪʹÓÃBashrcÎļþ£¬Ê×ÏÈÐèÒª±à¼­¸ÃÎļþ£¬¿ÉÒÔʹÓÃÈκÎÎı¾±à¼­Æ÷·­¿ª¡£³£¼ûµÄ·½·¨ÊÇʹÓÃÏÂÁîÐб༭Æ÷£¬ºÃ±ÈʹÓÃvim»òÕßnano±à¼­Æ÷¡£

vim ~/.bashrc

µÇ¼ºó¸´ÖÆ

±à¼­BashrcÎļþʱ£¬¿ÉÒÔƾ֤ÏÂÃæµÄʾÀý¾ÙÐÐÉèÖãº

ÉèÖÃÇéÐαäÁ¿£º

export PATH=$PATH:/opt/bin
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

µÇ¼ºó¸´ÖÆ

ÉèÖÃÓÖÃû£º

alias ll='ls -alF'

µÇ¼ºó¸´ÖÆ

Ìí¼Ó×Ô½ç˵º¯Êý£º

function greet() {
    echo "Hello, $1!"
}

µÇ¼ºó¸´ÖÆ

ÐÞ¸ÄÌáÐÑ·û£º

PS1="[e[1;33m][u@h W]$ [e[m]"

µÇ¼ºó¸´ÖÆ

±à¼­Íê³Éºó£¬ÉúÑIJ¢Í˳ö±à¼­Æ÷£¬ÖØмÓÔØBashrcÎļþʹÉèÖÃÉúЧ£º

source ~/.bashrc

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

Èý¡¢BashrcµÄʹÓÃÒªÁì

ÏÔʾĿ½ñÓû§µÄBashrcÉèÖÃÐÅÏ¢£º

cat ~/.bashrc

µÇ¼ºó¸´ÖÆ

ÐÞ¸ÄBashrcÎļþºó£¬ÈÃÐÞ¸ÄÁ¬Ã¦ÉúЧ£º

source ~/.bashrc

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

ÔÝʱ×÷·ÏijÌõÉèÖõÄÉúЧ£º

# ×¢Ê͵ôÏìÓ¦µÄÉèÖÃÏî

µÇ¼ºó¸´ÖÆ

²éÕÒÌض¨ÉèÖÃÏ

grep 'Òªº¦´Ê' ~/.bashrc

µÇ¼ºó¸´ÖÆ

ͨ¹ý¶ÔBashrcÎļþ¾ÙÐÐÉèÖ㬿ÉÒÔʹÖն˵ÄʹÓÃÔ½·¢¸ßЧºÍÀû±ã¡£ºÏÀíµÄÉèÖÿÉÒÔÌá¸ßÊÂÇéЧÂÊ£¬¶¨ÖÆ»¯µÄÉèÖÿÉÒÔÖª×ã¸öÐÔ»¯ÐèÇó¡£Ï£ÍûÒÔÉÏÄÚÈÝÄÜ×ÊÖú¸÷ÈËÏàʶLinux BashrcµÄ¹¦Ð§¡¢ÉèÖÃÓëʹÓÃÒªÁì¡£

ÒÔÉϾÍÊÇÏàʶLinux Bashrc£º¹¦Ð§¡¢ÉèÖÃÓëʹÓÃÒªÁìµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是博ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是博ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是博

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ