Terminal cursor disappearance causes echo and hide cursor methods boot automatic echo cursor summary
The reason the terminal cursor disappears
When I was using the Ubuntu subsystem terminal, the cursor would often disappear after a single action. Now I suddenly found the reason for the switch between Chinese and English input. When I just entered the terminal, because it was Chinese input, I did not pay attention to typing a few words, so I switched to English with
shift casually, and then the cursor disappeared. If you want to retrieve the cursor, press
shift to switch the input method to see the cursor.
Echo and hide cursor methods
# Hide the cursor echo -e "\033[?25l" # Show cursor echo -e "\033[?25h"
Power on auto echo cursor
I mainly encountered the following problems in the process of using the Ubuntu subsystem. Although the above command can be normally displayed back to the cursor each time, once the terminal is closed, the cursor is not opened again, so I need to continue typing the above command, but it is very troublesome to go one after another, so I have the following solution ideas.
write shell script, named
#!/bin/bash echo -e "\033[?25h"
Set automatic startup execution,
/etc/init.d/ directory is stored in the program of automatic startup execution:
>$ chmod +x cursor_show.sh >$ sudo mv cursor_show.sh /etc/init.d/cursor_show.sh
This is my personal solution to the ubuntu subsystem, but if you have the same problem on other Linux systems, try it.
- How to set fixed IP address for Raspberry Pie
- How to Use Apt get Command Under Mac OSX
- Windows command execution bypass
- Sublime text 3 compiles and executes C/C++ programs directly
- The JSON variable is parsed in the shell to obtain the value corresponding to the key
- How to Fix Linux sub process /usr/bin/dpkg returned an error code (1)
- Chinese garbled problem when running. C file in Linux
- PM2 user defined Log, PID and other Log File Locations
- How to Skip testing when Maven is packaged
- Vector series in actual C + +_ To_ fit()
- Notes on Linux SCP command using specific port
- How to Fix error 28 from storage engine
- Installation and configuration of redis in Linux
- How to Uncompress 7z files on Ubuntu, Debian, Fedora
- Linux Nagios failed to log in to internal server error (Fixed)
- Git initializes the local existing project
- linux tomcat Run (DWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugIni）
- linux yum Error: PYCURL ERROR 6 – “Couldn’t resolve host ‘mirrorlist.centos.org’”
- How to Fix Ubuntu(Linux) mount error(22)
- Summary of unity3d 11 SceneManager scene management usage