osx – 终端:shell启动文件在哪里?

前端之家收集整理的这篇文章主要介绍了osx – 终端:shell启动文件在哪里?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在遵循一个名为 Starting a Django 1.4 Project the Right Way的教程,其中介绍了如何使用virtualenv和virtualenvwrapper等等。

有一个部分如下:

If you’re using pip to install packages (and I can’t see why you wouldn’t),you can get both virtualenv and virtualenvwrapper by simply installing the latter.

06000

After it’s installed,add the following lines to your shell’s start-up file (.zshrc,.bashrc,.profile,etc).

06001

Reload your start up file (e.g. source .zshrc) and you’re ready to go.

我正在运行Mac OSX,并且不太了解我的终端方式。作者是什么意思的shell的启动文件(.zshrc,.bashrc,.profile等)?我在哪里可以找到这个文件,以便我可以添加这三行?

而且,他重启你的启动文件(例如source .zshrc)是什么意思?

我非常感激OSX的具体响应。

你可能使用bash,所以只需将这3行添加到〜/ .bash_profile中:
$ cat >> ~/.bash_profile
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/directory-you-do-development-in
source /usr/local/bin/virtualenvwrapper.sh
^D

其中^ D表示您键入Control D(EOF)。

然后关闭你的终端窗口并打开一个新的窗口,或者你可以像这样重新加载你的.bash_profile文件

$ source ~/.bash_profile
原文链接:https://www.f2er.com/bash/387983.html

猜你在找的Bash相关文章