'bash' with Windows 10 (WSL)

Reminder on how to get bash under a french Windows 10.

Activation

  • Search Développeur,
  • launch Pour les paramètres du développeur,
  • select Mode développeur,
  • confirm Activer le mode développeur ? (click on Oui),
  • search fonctionnalités Windows,
  • launch Activer ou désactiver des fonctionnalités Windows,
  • select Sous-système Windows pour Linux (bêta),
  • reboot,
  • search and launch bash,
  • follow instructions.

aptitude is installed (it seems no more to be the case with the last version of Windows, so you have to install it with apt-get), so you can use it as installation tool (launch with sudo).

The root installation directory of this (GNU/)Linux is at :

C:\Users\<user>\AppData\Local\lxss

To manage this application, use the lxrun command (as Administrator). See below for an example.

Reinstallation

Under a DOS as Administrator :

  • lxrun /uninstall /full to delete the application and the home directory,
  • lxrun /install to install the application, or click the shortcut to bash if it remains from a previous installation.

'Path' conflict

It is possible to launch under this bash native Windows commands, and, by default, the default path have some entries which point to Windows system. This can lead to some problem (for example, npm doesn't work properly).

To avoid that the path points to Windows system, set or add following key to the Window registry : HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss\AppendNtPath=dword:00000000.

You have to reopen bash console in order for this to work.

Mounting removable drives

Removable drives (or TrueCrypt drives) are not mounted by default.

To mount such a drive:

sudo mount -t drvfs <drive>: <mountpoint>