I installed the new subsystem for Linux on Windows 10 (which comes with the Windows anniversary update), and started playing around with it.
What I noticed is that starting the shell (ubuntu bash) does not load .profile or .bash_profile, even though the .profile file exists. Is there a fix?
(And can someone with a lot of reputation make the windows-bash tag?)
Note that bash runs natively on Windows 10, which is different from using emulators like 'cygwin' for Windows which enabled GNU tools to run on unsupported Windows environment. Also, Linux subsystem for Windows 10 is only available on the 64-bit version of the OS.
Enable the new Bash on Ubuntu on Windows 1 – Right click on the Start icon and select Programs and Features. 2 – Click Turn Windows features on or off. 3 – Scroll down to the new Windows subsystem for Linux and tick it, click OK. 4 – Wait for it to apply and reboot when prompted.
You can put . bash_profile in your user directory: C:\Users\<username>. If aliases for Git commands are needed, editing the .
By default, this release of Ubuntu-on-windows loads the file named .bashrc
.
You can either put the script or add the below line to .bashrc
(and create .bashrc
if it is non-existent):
. ~/.profile
Note: If .bashrc
is sourced from .profile
, you may want to comment it out to prevent bash endlessly looping.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With