Hello all,
Crux: How do I get WSL to recognise and use my .bashrc
file?
After installing oh-my-bash, the theme and plugins worked as expected. Annoyingly it wrote over my existing .bashrc
file - requiring me to re-add path variables and such.
However, after closing the terminal, and re-opening it, the theme was gone, and my path variables were were not used:
Originally, I was using the native Ubuntu20.04 terminal, but switched to the Windows Terminal in the hope it would resolve the issue. Both behave in the same way.
To fix this, I have to type source ~/.bashrc
, every time I open a new terminal:
As can be seen, the theme becomes what I want, and my path variables are recognised again.
So, how can I make it so that I do not need to keep typing source ~/.bashrc
every time I open a new terminal?
I tried editing the /etc/wsl.conf
file to include:
[boot]
command="source ~/.bashrc"
But, I think this is not quite the use of the wsl.conf
file - runs at the wrong time.
I hope this is clear