Search code examples
powershellcmakewindows-subsystem-for-linux

How to install cmake in wsl on windows?


I have WSL running on my Windows computer and when I install it cmake it accessible only in command prompt not WSL. How can I get access to it from my Powershell WSL Window?


Solution

  • You need to install cmake within WSL, rather than within Windows. Fire up your WSL distro and install the cmake package from your distribution's repo. For example, on Debian-based distros:

    sudo apt install cmake

    This will install the CMake tools for linux, within WSL.