例子: 使用命令將這個目錄:“/home/geeksongs/.local/bin”添加進環境變數 命令行如下: export PATH=/home/geeksongs/.local/bin:$PATH 查看是否添加成功: geeksongs@DESKTOP-V7FKNMA:~$ echo $PAT ...
例子:
使用命令將這個目錄:“/home/geeksongs/.local/bin”添加進環境變數
命令行如下:
export PATH=/home/geeksongs/.local/bin:$PATH
查看是否添加成功:
geeksongs@DESKTOP-V7FKNMA:~$ echo $PATH
輸出:
/home/geeksongs/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_1804.2019.521.0_x64__79rhkp1fndgsc:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/Intel/WiFi/bin/:/mnt/c/Program Files/Common Files/Intel/WirelessCommon/:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Users/THINK/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Python 3.8:/mnt/c/Users/THINK/AppData/Local/Programs/Python/Python38:/mnt/c/Users/THINK/AppData/Local/Programs/Python/Python38/Scripts:/mnt/c/Users/THINK/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/THINK/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin
裡面具有這個環境變數,第一個就是我們剛剛添加的文件夾目錄,則環境變數添加成功!!