Is there any way to change the cursor shape within Windows Subsystem for Linux terminal? I'd like my cursor to reflect the state I'm in in vim or vi-mode.

In Git Bash for example I can use echo -ne "\e[2 q" and echo -ne "\e[6 q" to switch between block and line cursor. These don't seem to have any effect in WSL.

2 Answers 2


I'm assuming that you are using Bash through the default terminal window that comes with WLS.

If so then you will need to replace that terminal as it is not capable of understanding the special escape sequences. The only way I know to do this is to install a GUI such as Unity or XFCE4 and then install your preferred terminal emulator. This link will tell you how to do that.

This is probably overkill just for changing the cursor but it does have other advantages too, with a GUI installed you can now run many other Linux apps, not all work 100% but most will work fine, you can even set up a unified desktop with a Linux task bar and a windows task bar all on one screen.

  • Also, 1.5 years later, using the current version of WSL, the cursor shape can now be changed when run e.g. inside ConEmu.
    – ilves
    Jan 29, 2018 at 16:28

Since now there is an option for this, I would like to share it here

In settings.json of windows terminal you can set

        "cursorColor" : "#FFFFFF",
        "cursorShape": "filledBox",

inside the "profiles"

Taken from https://docs.microsoft.com/pt-br/windows/terminal/custom-terminal-gallery/retro-command-prompt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.