2015-12-17 30 views

回答

6

下面的代碼可以添加到.profile的末尾。檢查以確保沒有空格的路徑字符串/home/raul/swift/usr/binPATH="$PATH:/home/raul/swift/usr/bin"

## :MY:PROFILE:EDIT: add swift executable path 
    if [ -d "/home/raul/swift/usr/bin" ] ; then 
     PATH="$PATH:/home/raul/swift/usr/bin" 
    fi 

.profile後編輯,做一個爲改變以下生效:

  • source .profile
  • 註銷並重新登錄到桌面會話
  • 重啓機器

注意:.profile將是有效的duratio n的桌面登錄會話以及相同桌面會話中的後續終端會話。 .bashrc通常只適用於終端會話的範圍。