Bashrc File Location Windows - 11
Bashrc File Location Windows - 11
To find or edit .bashrc from Windows File Explorer, type this into the WSL terminal:
~/.bashrc (which expands to /home/username/.bashrc ) Accessing from Windows File Explorer: Open File Explorer. Paste \\wsl$\ into the address bar. Navigate to [YourDistroName]\home\[username]\.bashrc . 2. Git Bash (Git for Windows)
Because this is a native Windows file, standard editors work fine—just ensure your editor saves with line endings, not CRLF. bashrc file location windows 11
# Open current directory in Windows File Explorer alias explorer='explorer.exe .'
In WSL (Ubuntu, Debian, etc.), the .bashrc file is located in your Linux user's home directory. To find or edit
To customize your terminal with aliases or environment variables, you can edit the file directly from your terminal: Type nano ~/.bashrc . Using Notepad: Type notepad .bashrc . Using VS Code: Type code ~/.bashrc .
After making changes, you must either restart your terminal or run source ~/.bashrc for the new settings to take effect. How to Create and Use .bashrc File on Windows 10 To customize your terminal with aliases or environment
And for the love of automation—back up your .bashrc before experimenting. One wrong PS1 variable can turn your prompt into a binary novel.
If you are using Git Bash on Windows, scripts often fail because Windows uses \r\n (CRLF) and Linux expects \n (LF). Add this to your .bashrc to prevent errors when reading scripts: