xitang

1 首先查看PATH

  命令:$PATH  

2 如何设置PATH

  命令:echo "export PATH=xxxxxx:$PATH" >> ~/.bash_profile

  解释:把"export PATH=xxxxxx:$PATH"输出打印到~/.bash_profile中去。

3 Unix知识补充:~/.bash_profile介绍

  mac和linux终端一般用bash来进行解析。当bash在读完了整体环境变量的/etc/profile并借此调用其他配置文件后,接下来则是会读取用户自定义的个人配置文件。bash读取的文件总共有三种:

  ~/.bash_profile   ~/.bash_login    ~/.profile

  其实bash再启动是只读上面文件的一个,而读取的顺序则是依照上面的顺序。也就是说读到bash_profile就不读后面的了,如果bash_profile不存在,后面的才能有机会。

  让我们来看看bash_profile里面有什么内容:

  命令:cat ~/.bash_profile  

  图中展示了其中的内容。

分类:

技术点:

相关文章:

  • 2021-12-03
  • 2021-12-10
  • 2022-12-23
  • 2021-08-16
  • 2022-02-15
  • 2021-10-08
  • 2021-12-06
  • 2021-12-06
猜你喜欢
  • 2021-05-14
  • 2022-12-23
  • 2021-11-13
  • 2021-06-15
  • 2021-06-13
  • 2021-09-29
  • 2021-09-06
相关资源
相似解决方案