How can I run a Bash script (such as https://github.com/willemdh/firemotd) when I open the Bash shell for Windows 10?
I tried putting a script in /etc/profile.d but it doesn't seem to get executed. Also tried executing the script from .profile in the main user home folder, but this also doesn't seem to work.
答案1
For newer versions of bash use ~/.bash_profile
- open bash shell
- vim ~/.bash_profile
- source ~/.bash_profile or exit shell then open shell