linux 環境變量的設置

參考:http://ubuntuhjbl.jiaogen.com/

 

不再贅述詳細內容,需要總結如下:

 

   linux下的環境變量設置涉及的文件:

 

   a.   /etc/profile  

 

  b.   /etc/environment

 

  c.   ~/.bash_profile

 

  d.  ~/.bash_rc

 

 

  另外如果只是爲了臨時修改環境變量,$ PATH=”$PATH:/my_new_path” (關閉shell,會還原PATH)

 

 

 

 

 

 

 

 

 

另外:

獲得root權限

 

我們在使用Gamit的過程中,要一直獲得root權限,但是root權限在Ubuntu系統中不是默認開放的,需要大家自己去開放,下面就先進行root權限的獲取。

 

在Ubuntu操作系統中打開終端(Terminal )——紅色部分爲自己進行輸入部分:

   1. yangsq@my-laptop: ~$ sudo passwd root   

   2. Password: 

then input yangsq's passwd 

Terminal 

   1. Enter new UNIX password:  123  

   2. Retype new UNIX password:    123

   3. passwd: password updated successfully   

input the root passwd two times.OK 

2) root權限登錄

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章