linux - 我如何在 ubuntu 15.10 上将 swift 的导出路径添加到 ./profile

标签 linux swift

一次性使用:

 export PATH = $ PATH:/home/raul/swift/usr/ bin

但是当终端重新启动时,配置丢失了,但是在 ~/.profile 中,同一行不工作 u.u

最佳答案

下面的代码可以添加到.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 后,执行以下操作以使更改生效:

  • 源.profile
  • 注销并重新登录到桌面 session
  • 重启机器

注意:.profile 将对桌面登录 session 的持续时间和同一桌面 session 中的后续终端 session 有效。 .bashrc 通常只适用于终端 session 的范围。

关于linux - 我如何在 ubuntu 15.10 上将 swift 的导出路径添加到 ./profile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34324865/

相关文章:

linux - 如何在/etc/fstab 中指定带有空格的标签/路径?

swift - Xcode-project 不使用 NSKeyedArchiver 存档,但 Playground 会

json - 使用 Alamofire API Rest 发送空数组

android - 我如何使用摩托罗拉使 ADB 在 linux 上工作

c - 检索给定 IP 地址的 Mac 地址

linux - cassandra 开发人员广泛使用哪个版本的 Linux 服务器?

python - 如何在 Python 中使用 librt 函数?

ios - 如何每日更新 UILabel?

Swift:如果定时器的引用计数器变为零,那么它会发生什么情况?

ios - 有没有办法使用 GPUImage 库在晕影过滤器上应用像素化过滤器?