2013-03-12 34 views
2

慶典:/etc/profile.d/sm.sh:沒有這樣的文件或目錄 慶典:/etc/profile.d/rvm.sh:沒有這樣的文件或目錄如何刪除此[Bash],每次我打開終端?


好吧傢伙的IM接近解決我的問題

我只是用

須藤打開/ etc/profile文件

,我發現這兩條線,當我嘗試編輯,它說你沒有權限,使該文件中的變化和要求製作副本...

只是告訴我如何評論這些線擁有管理員權限。

解決其工作:

「你最後的答案工作,我的意思是說這是我沒有! sudo的納米/ etc/profile文件 放#兩條路徑 按命令X保存文件前」

+0

你可能想看看這個[問題](http://stackoverflow.com/questions/9839748/error-on-terminal-start)...它可能甚至像註釋掉幾行一樣簡單在/ etc/profile' :) – summea 2013-03-12 18:46:39

+0

我的主頁主目錄是fawadn 我進入現在..我怎麼能看到這個目錄中的文件?以及如何評論此行.. – Fawad 2013-03-12 18:58:14

+0

好的,所以這裏是顯式版本: sudo nano /etc/profile.d/sm.sh #刪除對/etc/profile.d/rvm.sh的引用(刪除行完全),保存文件(CTRL-O) – 2013-03-12 19:26:31

回答

3

從bash的手冊頁

FILES 
     /bin/bash 
       The bash executable 
     /etc/profile 
       The systemwide initialization file, executed for login shells 
     /etc/bash.bashrc 
       The systemwide per-interactive-shell startup file 
     /etc/bash.bash.logout 
       The systemwide login shell cleanup file, executed when a login shell exits 
     ~/.bash_profile 
       The personal initialization file, executed for login shells 
     ~/.bashrc 
       The individual per-interactive-shell startup file 
     ~/.bash_logout 
       The individual login shell cleanup file, executed when a login shell exits 
     ~/.inputrc 
       Individual readline initialization file 

您將要檢查全系統文件,並查看它們是否引用RVM。如果你是系統中的唯一用戶(它是你的工作站或家用計算機),請隨時修改這些文件以刪除rvm引用(假設你不再使用rvm)。否則,請您的系統管理員修復執行環境。

關於rvm的更多信息可以在here找到,您的在線手冊頁面可以提供有關bash默認讀取哪些文件的更多詳細信息。

未按上述所有的,一個快速和骯髒的黑客將執行

touch /etc/profile.d/rvm.sh 

爲具有適當權限的用戶。

+0

但我需要導航到這個目錄嗎? 我認爲這些絕對是在我的首頁主目錄 檢查終端中的文件的命令是什麼,如在其窗口中的目錄 – Fawad 2013-03-12 18:55:33

+0

ls命令用於列出目錄中的文件。你可能會想結賬一個關於使用shell進行導航的初學者教程。看到http://linux.org.mt/article/terminal/和http://linuxcommand.org/learning_the_shell.php讓你開始吧! – 2013-03-12 19:04:38

+0

我更新了我的問題,請問現在如何刪除此問題。我喜歡通過解決任何問題來學習。 – Fawad 2013-03-12 19:12:22