Is there a way I can open the Windows 10 Ubuntu bash without running the ~/.bashrc script?Bash script won't stay open in background after running through whileBash alias permanent <without running bash or . ~/.bashrc>Is there a way to run a bash script unattended?prompt only appears correctly after I use “bash” commandWSL Interoperability: Open Windows 10 applications w/ Bash (Windows Linux Subsystem)Bash Startup not showing color on bash input line

JPEG with transparent background

Was the Berlin Wall Breached Based upon an Erroneous Declaration?

Is it possible to be admitted to CS PhD programs (in US) with scholarship at age 18?

What is the rule?

Why most flyback converters / LED drivers operate under 100 kHz?

What were the prevailing real-life cultural connotations of "clones" in 1975 (Star Wars' 3rd draft)?

Security risks of user generated HTML?

Does Amoxicillin (as trihydrate) degrade in stomach acid?

I have been accused of copying two lab reports from the previous year even though I had done everything by myself

What happens if a country signs mutual defense treaties with several countries who later go to war with each other?

Vintage vs modern B&W photography techniques differ in color luminance - what's going on here?

Feasibility of keeping an Electrical Bike in poor (wet) storage conditions

Why is weak Kőnig's lemma weaker than Kőnig's lemma?

Replacing 2-prong outlets in basement - existing wiring has two hot wires, one neutral?

What is the difference between money and currency?

What is Trump's position on the whistle blower allegations? What does he mean by "witch hunt"?

How do I limit the scope of etoolbox environment patching?

Cheat at Rock-Paper-Scissors-Lizard-Spock

Can i solo with C blue minor scale in a C major Chord progression backing track?

Undefined control sequence error after TeX Live update

Is there a way to download the box art for games?

Why do we worry about overfitting even if "all models are wrong"?

How should a leader behave when they miss deadlines themselves?

How to wire for AC mains voltage relay, when printer board is connected to AC-charging laptop computer?



Is there a way I can open the Windows 10 Ubuntu bash without running the ~/.bashrc script?


Bash script won't stay open in background after running through whileBash alias permanent <without running bash or . ~/.bashrc>Is there a way to run a bash script unattended?prompt only appears correctly after I use “bash” commandWSL Interoperability: Open Windows 10 applications w/ Bash (Windows Linux Subsystem)Bash Startup not showing color on bash input line






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









12

















I was editing the bashrc script in my Windows 10 Ubuntu Bash and I made a mistake while editing the script. Now bash exits immediately upon opening it. Is there a way for me to open Bash without running bashrc, or will I have to reinstall it?










share|improve this question























  • 2





    Why not just edit .bashrc from any Windows App such as Notepad++ ?

    – Carl Witthoft
    Jul 8 at 13:12






  • 4





    @CarlWitthoft I believe you can't (shouldn't?) edit WSL files from Windows (but you can do it the other way around).

    – Martin
    Jul 8 at 14:29











  • I believe that it is safe to rename WSL files from Windows — so just rename .bashrc to .bashrc.hold. Or is that dangerous too?

    – G-Man Says 'Reinstate Monica'
    Jul 8 at 15:29

















12

















I was editing the bashrc script in my Windows 10 Ubuntu Bash and I made a mistake while editing the script. Now bash exits immediately upon opening it. Is there a way for me to open Bash without running bashrc, or will I have to reinstall it?










share|improve this question























  • 2





    Why not just edit .bashrc from any Windows App such as Notepad++ ?

    – Carl Witthoft
    Jul 8 at 13:12






  • 4





    @CarlWitthoft I believe you can't (shouldn't?) edit WSL files from Windows (but you can do it the other way around).

    – Martin
    Jul 8 at 14:29











  • I believe that it is safe to rename WSL files from Windows — so just rename .bashrc to .bashrc.hold. Or is that dangerous too?

    – G-Man Says 'Reinstate Monica'
    Jul 8 at 15:29













12












12








12


3






I was editing the bashrc script in my Windows 10 Ubuntu Bash and I made a mistake while editing the script. Now bash exits immediately upon opening it. Is there a way for me to open Bash without running bashrc, or will I have to reinstall it?










share|improve this question

















I was editing the bashrc script in my Windows 10 Ubuntu Bash and I made a mistake while editing the script. Now bash exits immediately upon opening it. Is there a way for me to open Bash without running bashrc, or will I have to reinstall it?







command-line bash windows-10 bashrc windows-subsystem-for-linux






share|improve this question
















share|improve this question













share|improve this question




share|improve this question








edited Jul 10 at 17:28









Zanna

53.8k15 gold badges150 silver badges253 bronze badges




53.8k15 gold badges150 silver badges253 bronze badges










asked Jul 7 at 20:44









iiiiii

1636 bronze badges




1636 bronze badges










  • 2





    Why not just edit .bashrc from any Windows App such as Notepad++ ?

    – Carl Witthoft
    Jul 8 at 13:12






  • 4





    @CarlWitthoft I believe you can't (shouldn't?) edit WSL files from Windows (but you can do it the other way around).

    – Martin
    Jul 8 at 14:29











  • I believe that it is safe to rename WSL files from Windows — so just rename .bashrc to .bashrc.hold. Or is that dangerous too?

    – G-Man Says 'Reinstate Monica'
    Jul 8 at 15:29












  • 2





    Why not just edit .bashrc from any Windows App such as Notepad++ ?

    – Carl Witthoft
    Jul 8 at 13:12






  • 4





    @CarlWitthoft I believe you can't (shouldn't?) edit WSL files from Windows (but you can do it the other way around).

    – Martin
    Jul 8 at 14:29











  • I believe that it is safe to rename WSL files from Windows — so just rename .bashrc to .bashrc.hold. Or is that dangerous too?

    – G-Man Says 'Reinstate Monica'
    Jul 8 at 15:29







2




2





Why not just edit .bashrc from any Windows App such as Notepad++ ?

– Carl Witthoft
Jul 8 at 13:12





Why not just edit .bashrc from any Windows App such as Notepad++ ?

– Carl Witthoft
Jul 8 at 13:12




4




4





@CarlWitthoft I believe you can't (shouldn't?) edit WSL files from Windows (but you can do it the other way around).

– Martin
Jul 8 at 14:29





@CarlWitthoft I believe you can't (shouldn't?) edit WSL files from Windows (but you can do it the other way around).

– Martin
Jul 8 at 14:29













I believe that it is safe to rename WSL files from Windows — so just rename .bashrc to .bashrc.hold. Or is that dangerous too?

– G-Man Says 'Reinstate Monica'
Jul 8 at 15:29





I believe that it is safe to rename WSL files from Windows — so just rename .bashrc to .bashrc.hold. Or is that dangerous too?

– G-Man Says 'Reinstate Monica'
Jul 8 at 15:29










1 Answer
1






active

oldest

votes


















21


















You should be able to skip loading the default .bashrc file in WSL in essentially the same way as in "regular" bash:



 --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.


So, open the Windows CMD.exe and type



wsl.exe -e bash --norc


Once you are in the interactive shell you can revert the changes yo made to the ~/.bashrc file.






share|improve this answer


























  • CMD? Why not PowerShell? Not perfect, but way better than cmd.

    – jpmc26
    Jul 8 at 15:06






  • 5





    @jpmc26 - Because in this situation, it doesn't matter, both work and the result is the exact same, but cmd is faster to load and easier to open with purely keyboard commands

    – Taegost
    Jul 8 at 15:46






  • 1





    There's no need to open a prompt first at all, you can simply hit the windows key and type "wsl -e bash --norc" followed by enter.

    – SoronelHaetir
    Jul 8 at 19:55












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);














draft saved

draft discarded
















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1156606%2fis-there-a-way-i-can-open-the-windows-10-ubuntu-bash-without-running-the-bash%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown


























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









21


















You should be able to skip loading the default .bashrc file in WSL in essentially the same way as in "regular" bash:



 --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.


So, open the Windows CMD.exe and type



wsl.exe -e bash --norc


Once you are in the interactive shell you can revert the changes yo made to the ~/.bashrc file.






share|improve this answer


























  • CMD? Why not PowerShell? Not perfect, but way better than cmd.

    – jpmc26
    Jul 8 at 15:06






  • 5





    @jpmc26 - Because in this situation, it doesn't matter, both work and the result is the exact same, but cmd is faster to load and easier to open with purely keyboard commands

    – Taegost
    Jul 8 at 15:46






  • 1





    There's no need to open a prompt first at all, you can simply hit the windows key and type "wsl -e bash --norc" followed by enter.

    – SoronelHaetir
    Jul 8 at 19:55















21


















You should be able to skip loading the default .bashrc file in WSL in essentially the same way as in "regular" bash:



 --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.


So, open the Windows CMD.exe and type



wsl.exe -e bash --norc


Once you are in the interactive shell you can revert the changes yo made to the ~/.bashrc file.






share|improve this answer


























  • CMD? Why not PowerShell? Not perfect, but way better than cmd.

    – jpmc26
    Jul 8 at 15:06






  • 5





    @jpmc26 - Because in this situation, it doesn't matter, both work and the result is the exact same, but cmd is faster to load and easier to open with purely keyboard commands

    – Taegost
    Jul 8 at 15:46






  • 1





    There's no need to open a prompt first at all, you can simply hit the windows key and type "wsl -e bash --norc" followed by enter.

    – SoronelHaetir
    Jul 8 at 19:55













21














21










21









You should be able to skip loading the default .bashrc file in WSL in essentially the same way as in "regular" bash:



 --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.


So, open the Windows CMD.exe and type



wsl.exe -e bash --norc


Once you are in the interactive shell you can revert the changes yo made to the ~/.bashrc file.






share|improve this answer














You should be able to skip loading the default .bashrc file in WSL in essentially the same way as in "regular" bash:



 --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.


So, open the Windows CMD.exe and type



wsl.exe -e bash --norc


Once you are in the interactive shell you can revert the changes yo made to the ~/.bashrc file.







share|improve this answer













share|improve this answer




share|improve this answer










answered Jul 7 at 21:24









steeldriversteeldriver

81.2k12 gold badges132 silver badges218 bronze badges




81.2k12 gold badges132 silver badges218 bronze badges















  • CMD? Why not PowerShell? Not perfect, but way better than cmd.

    – jpmc26
    Jul 8 at 15:06






  • 5





    @jpmc26 - Because in this situation, it doesn't matter, both work and the result is the exact same, but cmd is faster to load and easier to open with purely keyboard commands

    – Taegost
    Jul 8 at 15:46






  • 1





    There's no need to open a prompt first at all, you can simply hit the windows key and type "wsl -e bash --norc" followed by enter.

    – SoronelHaetir
    Jul 8 at 19:55

















  • CMD? Why not PowerShell? Not perfect, but way better than cmd.

    – jpmc26
    Jul 8 at 15:06






  • 5





    @jpmc26 - Because in this situation, it doesn't matter, both work and the result is the exact same, but cmd is faster to load and easier to open with purely keyboard commands

    – Taegost
    Jul 8 at 15:46






  • 1





    There's no need to open a prompt first at all, you can simply hit the windows key and type "wsl -e bash --norc" followed by enter.

    – SoronelHaetir
    Jul 8 at 19:55
















CMD? Why not PowerShell? Not perfect, but way better than cmd.

– jpmc26
Jul 8 at 15:06





CMD? Why not PowerShell? Not perfect, but way better than cmd.

– jpmc26
Jul 8 at 15:06




5




5





@jpmc26 - Because in this situation, it doesn't matter, both work and the result is the exact same, but cmd is faster to load and easier to open with purely keyboard commands

– Taegost
Jul 8 at 15:46





@jpmc26 - Because in this situation, it doesn't matter, both work and the result is the exact same, but cmd is faster to load and easier to open with purely keyboard commands

– Taegost
Jul 8 at 15:46




1




1





There's no need to open a prompt first at all, you can simply hit the windows key and type "wsl -e bash --norc" followed by enter.

– SoronelHaetir
Jul 8 at 19:55





There's no need to open a prompt first at all, you can simply hit the windows key and type "wsl -e bash --norc" followed by enter.

– SoronelHaetir
Jul 8 at 19:55


















draft saved

draft discarded















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1156606%2fis-there-a-way-i-can-open-the-windows-10-ubuntu-bash-without-running-the-bash%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown









Popular posts from this blog

Tamil (spriik) Luke uk diar | Nawigatjuun

Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?