Posted On August 4, 2021

Windows WSL: How to Fix Broken bashrc File

kimconnect 4 comments
blog.KimConnect.com >> Linux >> Windows WSL: How to Fix Broken bashrc File
Problem:

When there’s an incorrect setup of Windows Subsystem for Linux (WSL), where $HOME/.bashrc is corrupted or having an ‘exit’ statement during its runtime, Windows cannot log into is WSL using the normal wsl command.

How To Fix:
# Execute bash using a different home directory
C:\Windows\System32\bash.exe ~ -c /bin/bash

# Edit the broken bashrc file
vim ~/.bashrc

 

4 thoughts on “Windows WSL: How to Fix Broken bashrc File”

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

OpenLDAP Migration

LDAP PKGSRC Cutover # Compress ldap directory on WEB01.PROD tar -C /home/webadmin/pkg/var/openldap -czvf /tmp/kimconnect-com.gz kimconnect-com…

Linux Mint 20: How to Disable the Annoying Keyring Prompts for Passwords

Update 03/2023: https://blog.kimconnect.com/linux-how-to-bypass-annoying-login-keyring-prompts/ The default installation of Linux Mint expects that the user would login…

Run Memory Tester On Ubuntu 20.04

GNU Grub 2.04 does have memtest86+ that could be used to perform RAM load tests.…