[英]Where is the .bashrc file on Windows? (Daniel Kehoe's learn-rails tutorial book)
I previously asked a similar question with regards to cloud9, but I am now trying to do the same project in parallel on my windows 10 machine because I will not have internet access to use cloud9.我之前问过关于 cloud9 的类似问题,但我现在正尝试在我的 Windows 10 机器上并行执行相同的项目,因为我无法访问互联网来使用 cloud9。 I am trying to set up the configuration in preparation for following Daniel Kehoe's learn-rails tutorial book, but I am having trouble setting up the environment variables.
我正在尝试设置配置以准备遵循 Daniel Kehoe 的 learn-rails 教程书,但我在设置环境变量时遇到了麻烦。 The book seems to explain how to do it on Mac but I can not find the file in the atom editor.
这本书似乎解释了如何在 Mac 上执行此操作,但我在 atom 编辑器中找不到该文件。 the book says to type the command:
书上说要输入命令:
atom ~/.bash_profile
However this just creates a new file that is not part of my rails app project directory.但是,这只会创建一个不属于我的 rails app 项目目录的新文件。 i have also tried
我也试过
atom ~/.bashrc
which is the alternative but with the same result.这是替代方案,但结果相同。 It just creates a file unrelated to my project.
它只是创建一个与我的项目无关的文件。 The file is supposed to already exist somewhere.
该文件应该已经存在于某处。
I am supposed to put the environment variables into a file called ".bashrc" but I don't know where to find this file as it is hidden.我应该将环境变量放入一个名为“.bashrc”的文件中,但我不知道在哪里可以找到这个文件,因为它是隐藏的。 How can I locate and open this file with Atom text editor?
如何使用 Atom 文本编辑器找到并打开此文件?
.bashrc
, .bash_profile
are used in unix based operating systems for the terminal. .bashrc
, .bash_profile
用于基于 unix 的终端操作系统。 In windows you set environment variables differently.在 Windows 中,您以不同的方式设置环境变量。 In windows 10, search for environment variables in start menu, and select
Edit the system environment variables
and set them from there.在 Windows 10 中,在开始菜单中搜索环境变量,然后选择
Edit the system environment variables
并从那里设置它们。
PS: You can have .bashrc
if you have installed something like git bash, cygwin bash or bash for windows 10 or something else. PS:如果你安装了 git bash、cygwin bash 或 bash for windows 10 或其他东西,你可以拥有
.bashrc
。 And all 3 handle .bashrc
differently.并且所有 3 处理
.bashrc
的方式都不同。
在 Git Bash 终端中键入echo ~
将告诉您包含.bashrc
文件的文件夹在哪里
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.