These tips are for Windows users who are getting started with Linux via WSL.

Type bash at a PowerShell or command prompt to run bash.

Use bash inside ConEmu (see above).

From within bash,

  • the C drive is at /mnt/c/.
  • pwd outputs your current location.
  • lsb_release -r outputs your Ubuntu version.
  • SOME_VAR="SOME_VALUE" sets a local environmental variable.
  • export SOME_VAR="SOME_VALUE" sets a global environmental variable.
  • printenv SOME_VAR outputs the environmental variable
  • ampersands separate multiple commands: command1 && command2 && et cetera
  • single quotes behave differently than do double quotes

Use PowerShell in the Linux subsystem for Windows.

  1. install PowerShell
  2. open a bash prompt
  3. type powershell
  4. type exit to return to bash

Install Node/NPM from bash.

Paste from the Window's clipboard into bash using right click.

Clear the current input using Ctrl + E + U.

Convert from dos to unix line endings in vim with this command :set ff=unix.

Pipe command output to file and show it in the sell command |& tee output.txt.

Window's clip.exe can be run from the bash shell to copy/paste. E.g.

`clip.exe < ~/.ssh/`


  • sudo apt-get install git
  • sudo apt-get remove git