linux中bash是什么,linux bash profile bash_profile 小結

 2023-10-08 阅读 27 评论 0

摘要:? ? login 方式:: su - oracle 依次 /etc/bash.bashrc———— /home/$user/.bashrc ———— /ect/profile ———— /home/$user/.bash_profile(找不到~/.bash_profile, 則尋找~/.bash_login,若前兩者不存在,讀取~/.profile) -- 可見.pr

?

?

login 方式:: su - oracle
依次 /etc/bash.bashrc———— /home/$user/.bashrc ———— /ect/profile ———— /home/$user/.bash_profile(找不到~/.bash_profile, 則尋找~/.bash_login,若前兩者不存在,讀取~/.profile) -- 可見.profile的作用其實很次要的
正常

bash.bashrc
oracle .bashrc
etc profie
oracle .bash_profile


/home/oracle # mv .bashrc .bashrc2
bash.bashrc
etc profie!!
oracle .bash_profile


linux:/home/oracle # mv .bash_profile .bash_profile2
linux:/home/oracle # ..
linux:/home # su - oracle
bash.bashrc
etc profie!!
oracle . proflie

linux中bash是什么。
非login方式:————————圖形界面? 等等。。 依次 /etc/bash.bashrc———— /home/$user/.bashrc
linux:/home/oracle # su oracle
bash.bashrc
oracle .bashrc

?

1. 圖形模式登錄時,順序讀取:/etc/profile和~/.profile ----(3)~/.profile ---- 圖形模式登錄時,此文件將被讀取,即使存在~/.bash_profile和~/.bash_login

2. 圖形模式登錄后,打開終端時,順序讀取:/etc/bash.bashrc和~/.bashrc

3. 文本模式登錄時,順序讀取:/etc/bash.bashrc,/etc/profile和~/.bash_profile ---- 貌似這里第二步少了個~/.bashrc


(5)和(6) 有些矛盾。。

后面的內容就太啰嗦了! 而且有些不對。不應該看。


Xshell:\> open 218
Connecting to 10.67.164.218:22...
Connection established.
Escape character is '^@]'.

shell訪問hdfs的注意事項?Last login: Fri Apr 25 17:31:32 2014 from 10.74.169.50

etc bash.bashrc
.bash rc
etc profie!!
root . bash_profile (root 的根目錄下沒有.bash_profile 則新建一個)

可見這個順序和su - root的順序一樣的

?

?

?

shell和bash、
/etc/bash.bashrc 有的系統沒有此文件,而對應的是 bashrc
/etc/profile


/export/home/$user ??
/home/$user/

.bashrc
.proflie
.bash_history ?

.inputrc ?

http://www.cnblogs.com/yangwindsor/articles/3380322.html
bashrc用于交互式non-loginshell,而profile用于交互式login shell

?

bash:no such file or directory。?

關于?bash & profile

其實明白了一點就很容易理解、記憶了,否則下次可能還是忘記::

bash ?是shell 腳本, 執行shell 是不一定要登錄的, 所以,他隱隱約約表示non-login

profile 是概括文件, 包含一些環境變量等等預處理變量、腳本、函數, ?所以每次login 的時候都要執行一下

?

linux useradd。?

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://hbdhgg.com/3/132457.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息