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

Crontab Maintenance

vim /home/diskAlert ----  #!/bin/sh df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5…

Linux Mint /dev/sda1 Out of Space Issue

Issue: "sudo apt --fix-broken install"leads to something such as:"dpkg: error processing archive /var/cache/apt/archives/linux-image-6.8.0-87-generic_6.8.0-87.88~22.04.1_amd64.deb(--unpack):cannot copy extracted…

Set Automatic Updates for CentOS & Redhat

Easy. yum -y install yum-cron vimvim /etc/yum/yum-cron.conf----------apply_updates = yes----------systemctl start yum-cron.service