有没有办法在不运行 ~/.bashrc 脚本的情况下打开 Windows 10 Ubuntu bash?

我正在 Windows 10 Ubuntu Bash 中编辑 bashrc 脚本,但在编辑脚本时出错。现在 bash 在打开它时立即退出。有没有办法让我在不运行 bashrc 的情况下打开 Bash,或者我必须重新安装它?

钢刀

您应该能够以.bashrc与“常规”bash 中基本相同的方式跳过在 WSL 中加载默认文件:

  --norc Do  not  read  and  execute  the system wide initialization file
          /etc/bash.bashrc and the personal initialization file  ~/.bashrc
          if  the  shell  is interactive.  This option is on by default if
          the shell is invoked as sh.

因此,打开 WindowsCMD.exe并键入

wsl.exe -e bash --norc

进入交互式 shell 后,您可以恢复对~/.bashrc文件所做的更改

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

有没有办法在没有 Wine 或虚拟机的情况下在 Ubuntu 上运行 Windows 应用程序?

来自分类Dev

在没有打开终端的情况下在Windows 10上运行bash后台进程

来自分类Dev

有没有办法在不关闭 Windows 10 中的文件资源管理器的情况下以编程方式关闭控制面板?

来自分类Dev

有没有办法强制shell脚本在bash而不是sh下运行?

来自分类Dev

有没有办法在没有快照的情况下使用 Ubuntu 软件中心?

来自分类Dev

有没有办法同时使用一个脚本运行多个 bash 脚本?

来自分类Dev

有没有办法在没有循环的情况下使用 bash 在数组中搜索相同性?

来自分类Dev

有没有办法在不创建循环的情况下运行此代码

来自分类Dev

如何在不损害 Windows 10 分区的情况下用 Ubuntu 替换 Linux Mint 分区?

来自分类Dev

在没有用户名或密码的情况下从Ubuntu访问Windows 10公共共享

来自分类Dev

使用 ubuntu 18.04 在没有 USB 的情况下安装 Windows 10:这不是可引导磁盘错误

来自分类Dev

有没有办法编写一个 Bash 脚本,每 X 分钟重复运行一次?

来自分类Dev

有没有办法在Windows 10上对Windows的组织进行编程?

来自分类Dev

在任何情况下.bashrc都对.bash_profile有利吗?

来自分类Dev

有没有一种方法可以在不使用bashrc / bash_profile的情况下使命令的输出着色?

来自分类Dev

在Windows 10上打开Ubuntu Bash的GUI应用程序

来自分类Dev

有没有办法在Windows 10中更改固定文件夹的顺序?

来自分类Dev

有没有办法安排Windows 10连接到互联网

来自分类Dev

有没有办法在Windows 10中扩展虚拟显示?

来自分类Dev

有没有办法使Windows 10中的WPF应用程序不那么“丑陋”?

来自分类Dev

有没有办法将 Windows 10 Mail autocmplete DB 移动到 Outlook?

来自分类Dev

c# 有没有办法停靠 Windows 10 的屏幕键盘?

来自分类Dev

有没有办法在Microsoft Windows上获得iTerm + Bash的可用性?

来自分类Dev

如何在没有root用户的情况下运行Windows bash?

来自分类Dev

有没有办法从Ubuntu编辑Windows注册表?

来自分类Dev

有没有办法从 Windows 中切换到 Ubuntu 双启动?

来自分类Dev

有没有办法从 Groovy 运行 Bash

来自分类Dev

有没有办法在Windows上运行LibreSSL?

来自分类Dev

有没有办法在Windows上运行LibreSSL?

Related 相关文章

  1. 1

    有没有办法在没有 Wine 或虚拟机的情况下在 Ubuntu 上运行 Windows 应用程序?

  2. 2

    在没有打开终端的情况下在Windows 10上运行bash后台进程

  3. 3

    有没有办法在不关闭 Windows 10 中的文件资源管理器的情况下以编程方式关闭控制面板?

  4. 4

    有没有办法强制shell脚本在bash而不是sh下运行?

  5. 5

    有没有办法在没有快照的情况下使用 Ubuntu 软件中心?

  6. 6

    有没有办法同时使用一个脚本运行多个 bash 脚本?

  7. 7

    有没有办法在没有循环的情况下使用 bash 在数组中搜索相同性?

  8. 8

    有没有办法在不创建循环的情况下运行此代码

  9. 9

    如何在不损害 Windows 10 分区的情况下用 Ubuntu 替换 Linux Mint 分区?

  10. 10

    在没有用户名或密码的情况下从Ubuntu访问Windows 10公共共享

  11. 11

    使用 ubuntu 18.04 在没有 USB 的情况下安装 Windows 10:这不是可引导磁盘错误

  12. 12

    有没有办法编写一个 Bash 脚本,每 X 分钟重复运行一次?

  13. 13

    有没有办法在Windows 10上对Windows的组织进行编程?

  14. 14

    在任何情况下.bashrc都对.bash_profile有利吗?

  15. 15

    有没有一种方法可以在不使用bashrc / bash_profile的情况下使命令的输出着色?

  16. 16

    在Windows 10上打开Ubuntu Bash的GUI应用程序

  17. 17

    有没有办法在Windows 10中更改固定文件夹的顺序?

  18. 18

    有没有办法安排Windows 10连接到互联网

  19. 19

    有没有办法在Windows 10中扩展虚拟显示?

  20. 20

    有没有办法使Windows 10中的WPF应用程序不那么“丑陋”?

  21. 21

    有没有办法将 Windows 10 Mail autocmplete DB 移动到 Outlook?

  22. 22

    c# 有没有办法停靠 Windows 10 的屏幕键盘?

  23. 23

    有没有办法在Microsoft Windows上获得iTerm + Bash的可用性?

  24. 24

    如何在没有root用户的情况下运行Windows bash?

  25. 25

    有没有办法从Ubuntu编辑Windows注册表?

  26. 26

    有没有办法从 Windows 中切换到 Ubuntu 双启动?

  27. 27

    有没有办法从 Groovy 运行 Bash

  28. 28

    有没有办法在Windows上运行LibreSSL?

  29. 29

    有没有办法在Windows上运行LibreSSL?

热门标签

归档