Linux系統下設定環境變數

2022-08-29 04:54:12 字數 302 閱讀 8630

例如我現在有乙個軟體understand**審閱軟體,現在我每次想要開啟這個軟體就要進到~/scitools/bin/linux32目錄下,去執行可執行檔案understand;

但每次都這樣我會覺得很麻煩,現在我修改環境變數配置檔案,vim  ~/.bashrc,開啟並在最後一行新增 export path="/home/linuxcnc/scitools/bin/linux32:$path"(注意這是我的電腦上的路徑),

要讓這個修改生效,需要執行source  ~/.bashrc,那麼每次我只需要在終端下輸入understand就可以開啟這個軟體了。

Linux下設定環境變數

單獨檢視path環境變數,可用 echo path方法一 在使用者主目錄下的 profile或 bashrc檔案 sudo gedit profile 或者sudo gedit bashrc可以在此檔案末尾加入path的設定如下 export path path your path1 your pa...

linux下設定環境變數

linux下設定環境變數 例如安裝mysql後設定環境變數 1.確認mysql的安裝目錄,可以使用which,whereis命令,還有一種通過檢視server執行狀態的方法,ps ef grep mysql 可以看到mysql的安裝目錄,例如是 usr local mysql 2.進入使用者環境變數...

linux 下設定環境變數

老生常談了,因為今天又用到了,再記錄一下,自己也鞏固一下。1.配置 etc profile 這個指令碼在登入時會執行 全域性 公有 配置,不管是哪個使用者,登入時都會讀取該檔案。2.配置 ect bashrc,在ubuntu下面是 ect bash.bashrc 這個應該是全域性的,我用root登入...