°Ô½Ã¹° 259°Ç
   
[RHEL7.3] profile °ú bashrc ¿¡ ´ëÇÑ ³»¿ë Á¤¸®ÀÔ´Ï´Ù
±Û¾´ÀÌ : theko ³¯Â¥ : 2017-10-25 (¼ö) 16:38 Á¶È¸ : 2139
Login shell vs Non-login shell

·Î±×ÀÎ shellÀº »ç¿ëÀÚ°¡ ·Î±×ÀÎ ÇßÀ»¶§ Àû¿ëµÇ´Â shellÀ» ÀǹÌÇÑ´Ù(default bash).

·Î±×ÀÎÇÏ¿© bash°¡ óÀ½ ½ÃÀÛÇÒ¶§(login shellÀ϶§), ´ÙÀ½ ½ºÅ©¸³Æ® ÆÄÀϵéÀ» ¼öÇàÇÏ¿© ȯ°æÀ» ¼³Á¤ÇÑ´Ù.

    /etc/profile
    ~/.bash_profile    or    ~/.bash_login    or    ~/.profile
    ~/.bashrc
    /etc/bashrc

/etc/profile °ú .profileÀº shellÀÌ bash°¡ ¾Æ´Ï¶óµµ ·Î±×ÀÎÇÏ¸é ·ÎµåµÇ¾î Àû¿ëµÇ°í .bashrc ¿Í .bash_login, .bash_profileÀº bash shell·Î ·Î±×ÀÎ µÇ¾úÀ» °æ¿ì¸¸ Àû¿ëÀÌ µÈ´Ù.

·Î±×ÀÎ shellÀÌ ·Î±×¾Æ¿ôÇÒ¶§ ´ÙÀ½ ÆÄÀÏÀ» ã¾Æ¼­ ¼öÇàÇÑ´Ù.

~/.bash_logout

ºñ·Î±×ÀÎ shellÀº ·Î±×ÀÎ ¾øÀÌ ½ÇÇàµÇ´Â shellÀ» ¸»ÇÑ´Ù. GUI ȯ°æ¿¡¼­ »õ Å͹̳ÎÀ» ¿©´Â °æ¿ì°¡ ÀÌ¿¡ ÇØ´çÇϸç sudo bash ³ª su °°Àº °Íµµ ÀÌ¿¡ ÇØ´çÇÑ´Ù.

    /etc/profile °ú /etc/bashrc Àº Àüü »ç¿ëÀÚ¿¡°Ô Àû¿ëµÈ´Ù.
    ~/.bashrc ¿Í ~/.profile, ~/.bash_profile µîÀº ÇØ´ç »ç¿ëÀÚ¿¡°Ô¸¸ Àû¿ëµÈ´Ù.

»ç¿ëÀÚ°¡ ·Î±×ÀÎÀ» Çϸé /etc/profile °ú /home/»ç¿ëÀÚ/.profile ÀÇ ½ºÅ©¸³Æ®°¡ ÀÛµ¿ÇÏ¿© Àû¿ëµÈ´Ù. ÀÌ´Â µµ½º¿¡¼­ autoexec.bat ÆÄÀÏ°ú °°Àº ¸Æ¶ôÀÌ´Ù.


Ãâó: http://webdir.tistory.com/126 [WEBDIR]

À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

miwit.com sir.co.kr DNS Powered by DNSEver.com DNS Powered by DNSEver.com