cursor stops blinking on wsl2 after running top #15145

Closed
opened 2026-01-31 04:29:44 +00:00 by claunia · 6 comments
Owner

Originally created by @gfcroft on GitHub (Sep 9, 2021).

Windows Terminal version (or Windows build number)

1.10.2383.0

Other Software

top (part of procps - 2:3.3.16-1ubuntu2.2 amd64) (inside WSL2, Ubuntu 20.04.3 LTS on Windows 10 x86_64, 4.19.104-microsoft-standard)

Steps to reproduce

open wsl2 bash in windows terminal (with the cursor shape set to be filledbox)
the cursor should be blinking every few seconds - as normal

enter the command top
press q to exit top

you should now see that the cursor no longer blinks

Expected Behavior

the cursor to remain blinking after exiting top

Actual Behavior

cursor stops blinking and remains fixed for rest of session

Originally created by @gfcroft on GitHub (Sep 9, 2021). ### Windows Terminal version (or Windows build number) 1.10.2383.0 ### Other Software top (part of procps - 2:3.3.16-1ubuntu2.2 amd64) (inside WSL2, Ubuntu 20.04.3 LTS on Windows 10 x86_64, 4.19.104-microsoft-standard) ### Steps to reproduce open wsl2 bash in windows terminal (with the cursor shape set to be filledbox) the cursor should be blinking every few seconds - as normal enter the command top press q to exit top you should now see that the cursor no longer blinks ### Expected Behavior the cursor to remain blinking after exiting top ### Actual Behavior cursor stops blinking and remains fixed for rest of session
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-31 04:29:44 +00:00
Author
Owner

@elsaco commented on GitHub (Sep 9, 2021):

WSL Ubuntu defaults to "TERM=xterm-256color". Check with "printenv" or "echo $TERM". Changing "TERM=linux" in your shell profile will keep the cursor blinking after quitting top.

@elsaco commented on GitHub (Sep 9, 2021): WSL Ubuntu defaults to "TERM=xterm-256color". Check with "printenv" or "echo $TERM". Changing "TERM=linux" in your shell profile will keep the cursor blinking after quitting top.
Author
Owner

@isak102 commented on GitHub (Sep 9, 2021):

WSL Ubuntu defaults to "TERM=xterm-256color". Check with "printenv" or "echo $TERM". Changing "TERM=linux" in your shell profile will keep the cursor blinking after quitting top.

I'm having the same problem as the original poster and this didn't fix it for me, when I change the term using export TERM=linux it doesn't fix the problem. I'm new to linux so maybe I'm changing the term value the wrong way, could you give a detailed explanation on how to change it properly?

@isak102 commented on GitHub (Sep 9, 2021): > WSL Ubuntu defaults to "TERM=xterm-256color". Check with "printenv" or "echo $TERM". Changing "TERM=linux" in your shell profile will keep the cursor blinking after quitting top. I'm having the same problem as the original poster and this didn't fix it for me, when I change the term using `export TERM=linux` it doesn't fix the problem. I'm new to linux so maybe I'm changing the term value the wrong way, could you give a detailed explanation on how to change it properly?
Author
Owner

@gfcroft commented on GitHub (Sep 9, 2021):

hi @isak102 I've just tried it by doing the following

  • edit your ~/.bashrc file to include 'TERM=linux'
  • ensure that this section includes linux, if you want colour:
    case "$TERM" in xterm-color|*-256color|linux) color_prompt=yes;; esac
    save and exit the .bashrc file, then do
    source ~/.bashrc

doing this seems to have worked for me - my cursor now blinks continues to blink after exiting top - thank you very much @elsaco

@gfcroft commented on GitHub (Sep 9, 2021): hi @isak102 I've just tried it by doing the following - edit your ~/.bashrc file to include 'TERM=linux' - ensure that this section includes linux, if you want colour: `case "$TERM" in xterm-color|*-256color|linux) color_prompt=yes;; esac ` save and exit the .bashrc file, then do source ~/.bashrc doing this seems to have worked for me - my cursor now blinks continues to blink after exiting top - thank you very much @elsaco
Author
Owner

@ksze commented on GitHub (May 10, 2022):

Font colours seem a bit odd if I set TERM=linux though. Do you know what other TERM values I can try?

@ksze commented on GitHub (May 10, 2022): Font colours seem a bit odd if I set TERM=linux though. Do you know what other TERM values I can try?
Author
Owner

@host1812 commented on GitHub (Aug 3, 2022):

Font colours seem a bit odd if I set TERM=linux though. Do you know what other TERM values I can try?
I'm using tmux, and this is what I have to set:

TERM=tmux-256color
COLORTERM=truecolor
@host1812 commented on GitHub (Aug 3, 2022): > Font colours seem a bit odd if I set TERM=linux though. Do you know what other TERM values I can try? I'm using `tmux`, and this is what I have to set: ``` TERM=tmux-256color COLORTERM=truecolor ```
Author
Owner

@Luvjeet commented on GitHub (Jun 14, 2023):

Font colours seem a bit odd if I set TERM=linux though. Do you know what other TERM values I can try?
I'm using tmux, and this is what I have to set:

TERM=tmux-256color
COLORTERM=truecolor

this again stops the cursor from blinking!
For context I am using zsh and I edited .bashrc but the colors were gone and blinking stopped again after adding COLORTERM=truecolor in .bashrc

@Luvjeet commented on GitHub (Jun 14, 2023): > > Font colours seem a bit odd if I set TERM=linux though. Do you know what other TERM values I can try? > > I'm using `tmux`, and this is what I have to set: > > ``` > TERM=tmux-256color > COLORTERM=truecolor > ``` this again stops the cursor from blinking! For context I am using zsh and I edited .bashrc but the colors were gone and blinking stopped again after adding COLORTERM=truecolor in .bashrc
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15145