亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 3927 | 回復: 5
打印 上一主題 下一主題

系統(tǒng)啟動時怎么不讀取 .bash_profile下的path呢 [復制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2008-04-12 02:04 |只看該作者 |倒序瀏覽
我在用戶目錄下的   .bash_profile文件中設(shè)置了一個path,但是每次系統(tǒng)啟動后這個path路徑下的命令都不能執(zhí)行。我重新執(zhí)行一下   . .bash_profile就可以來了。很奇怪阿系統(tǒng)啟動時怎么不讀取 .bash_profile下的path呢?

論壇徽章:
0
2 [報告]
發(fā)表于 2008-04-12 02:35 |只看該作者
原帖由 iceman_x 于 2008-4-12 02:04 發(fā)表
我在用戶目錄下的   .bash_profile文件中設(shè)置了一個path,但是每次系統(tǒng)啟動后這個path路徑下的命令都不能執(zhí)行。我重新執(zhí)行一下   . .bash_profile就可以來了。很奇怪阿系統(tǒng)啟動時怎么不讀取 .bash_profile下的p ...


echo $SHELL 顯示.. ? 還有你是你種環(huán)境啟動 shell 的 ? ssh or console login ? or GUI 的終端機 or . ??

--

[ 本帖最后由 kenduest 于 2008-4-12 05:01 編輯 ]

論壇徽章:
0
3 [報告]
發(fā)表于 2008-04-12 02:41 |只看該作者
#man bash

When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first  reads
       and executes commands from the file /etc/profile, if that file exists.  After reading that file, it looks for ~/.bash_pro-
       file, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and  is
       readable.  The --noprofile option may be used when the shell is started to inhibit this behavior.

論壇徽章:
0
4 [報告]
發(fā)表于 2008-04-12 13:05 |只看該作者
原帖由 kenduest 于 2008-4-12 02:35 發(fā)表


echo $SHELL 顯示.. ? 還有你是你種環(huán)境啟動 shell 的 ? ssh or console login ? or GUI 的終端機 or . ??

--


shell為redhat默認的bash shell ,    在本機上以init 3 level 登錄到另為一個用戶,然后用su切換到這個用戶的。

論壇徽章:
0
5 [報告]
發(fā)表于 2008-04-12 14:32 |只看該作者
原帖由 iceman_x 于 2008-4-12 13:05 發(fā)表 [url=http://linux.chinaunix.net/bbs/redirect.php?goto=findpost&pid=6550978&ptid=991168][/url
shell為redhat默認的bash shell ,    在本機上以init 3 level 登錄到另為一個用戶,然后用su切換到這個用戶的。


怎麼又來了,每幾天就來一個這種 su 這問題。

su 要使用 -l 才表示為 login shell,這時候才會讀取 ~/.bash_profile 這類檔案。su 不傳入 -l 是以 interactive mode 啟動 bash,這時候讀取的是 ~/.bashrc 檔案。

多 man bash 看一下設(shè)定檔文件的說明就知道問題點了。

--

論壇徽章:
0
6 [報告]
發(fā)表于 2008-04-13 16:37 |只看該作者
把你的系統(tǒng)啟動腳本修改一下吧~~
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP