How to set the terminal not to display the cursor in centos

WBOY
Release: 2022-02-09 17:09:53
Original
3823 people have browsed it

在centos中,可以利用echo命令设置终端不显示光标,该命令用于输出内容,当参数设置为“-e”时,可以根据控制字符来设置光标不显示,语法为“echo -e "\033[?25l"”。

How to set the terminal not to display the cursor in centos

本文操作环境:centos 6.4系统、Dell G3电脑。

centos怎么设置终端不显示光标

1、问题描述

终端光标消失,看不到编辑位置,很不方便。

2、解决方案

终端的光标和vim的光标是关联的。

隐藏光标

echo -e "\033[?25l"
Copy after login

显示光标

echo -e "\033[?25h"
Copy after login

3、光标相关

光标保持悬停,输入的字符出现在光标前面,按Backspace可以删除光标前面的字符,按Delete可以删除光标悬停位置的字符。

左右箭头可以控制光标在输入行的位置。上下箭头不能控制光标移动,只能显示以前敲过的命令,或者用

history

命令可以显示历史输入命令。

看一个真正的专家操作命令行绝对是一种很好的体验-光标在单词之间来回穿梭,命令行不同的滚动。

但是事情也不是那么简单,还是需要知道“如何去做”。在单词之间跳转,使用Ctrl+左右键。

echo。该命令格式如下:

[root@localhost ~]# echo [选项] [输出内容]
Copy after login

选项:

-e:支持反斜线控制的字符转换

-n:取消输出后行末的换行符号

其实 echo 命令非常简单,命令的输出内容如果没有特殊含义,则原内容输出到屏幕;如果输出内容有特殊含义,则输出打印其含义。

How to set the terminal not to display the cursor in centos

推荐教程:《centos教程

The above is the detailed content of How to set the terminal not to display the cursor in centos. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!