shell - Cygwin shell 不执行 .bashrc

标签 shell cygwin

启动 cygwin shell 后,它只是定位在错误的主目录中:

xfire@codingme.com ~
$ pwd
/cygdrive/c/Users/xfire

但它曾经是/home/xfire
xfire@codingme.com /etc
$ cat passwd | grep xfire
xfire:unused:22773:10513:U-CORP\xfire,S-1-5-21-527237240-725345543-682003330-12773:/home/xfire:/bin/bash

而/home/xfire中的.bashrc没有执行,即使我把它复制到/cygdrive/c/Users/xfire,它也不起作用!

最佳答案

在 cygwin 上,我将此添加到我的 ~/.bash_profile :

. ~/.bashrc

关于shell - Cygwin shell 不执行 .bashrc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9815927/

相关文章:

windows - 在 cygwin/msys bash 下使用 `pkg-config` 作为命令行参数

java - Cygwin 和 Java

通过unix shell脚本Mysql插入语句

linux - 写一个shell脚本计算一个目录下每个项目的大小?

python - 从 Python shell 中执行命令行或 R 脚本文件时出现问题

java - 使用 Jenkins 通过 SSH 发送文件或执行命令时脚本不退出

c++ - 简单的 shell 脚本语法错误 : [ : missing ']'

command-line - 如何从命令行查找文本文件中的唯一行?

windows - 带有 Hadoop 发行版的 Apache Spark 无法在 Windows 上运行

bash - 命令在命令行中工作,但在 bash 脚本中给出 'no such file or directory'