title: How to setup bash in vscode running in WSL2
body: <p>I would like to use something like <a href="https://github.com/ohmybash/oh-my-bash" rel="nofollow noreferrer">oh-my-bash</a> in vscode using WSL2. However according to the <a href="https://code.visualstudio.com/docs/remote/wsl#_advanced-environment-setup-script" rel="nofollow noreferrer">docs</a>:</p>
  
  <blockquote>
    <p>When VS Code Remote is started in WSL, no shell startup scripts are run. This was done to avoid issues with startup scripts that are tuned for shells. If you want to run additional commands or modify the environment this can be done in a setup script <code>~/.vscode-server/server-env-setup</code> (Insiders: <code>~/.vscode-server-insiders/server-env-setup</code>). If present, the script is processed before the server is started.</p>
  </blockquote>
  
  <p>I have added a <code>~/.vscode-server/server-env-setup</code> and according to the logs it is found and executed, but my linux skills are quite basic and i can't figure out how to get my profile installed. I have tried</p>
  
  <pre class="lang-sh prettyprint-override"><code>bash ~/.profile
  </code></pre>
  
  <p>...but that doesn't seem to do anything. I have also tried </p>
  
  <pre class="lang-sh prettyprint-override"><code>#!/bin/bash
  source ~/.profile
  </code></pre>
  
  <p>which gives me an error <code>/mnt/c/Users/cber/.vscode/extensions/ms-vscode-remote.remote-wsl-0.40.3/scripts/wslServer.sh: 3: /home/cber/.vscode-server/server-env-setup: source: not found</code></p>
  
  <p>UPDATE</p>
  
  <p>The question of how to source a profile is answered below, but my problem with getting <a href="https://github.com/justjanne/powerline-go" rel="nofollow noreferrer">powerline-go</a> to work in vs-code on WSL2 persists, but i moved that to a <a href="https://stackoverflow.com/questions/59268774/how-to-setup-powerline-go-in-vscode-running-in-wsl2-ubuntu">new question</a> in order to close this one.</p>