【linux命令】setterm控制终端属性命令(中英文)
###setterm中文
SETTERM(1) 用户命令 SETTERM(1)
名字
setterm - 设置终端属性
概要
setterm [选项]
描述
setterm向终端写一个字符串到标准输出,调用终端的特定功能。在虚拟终端上使用,将会改变虚拟终端的输出特性。不支持的选项将被忽略。
选项
对于布尔选项(on或off),默认设置为on。
简洁8色如下:黑色,红色,绿色,黄色,蓝色,洋红色,青色,或白色black, red, green, yellow, blue, magenta, cyan, or white.16色是8色加上灰度或明暗,在红色、绿色、黄色、蓝色、洋红色、青色或白色之后加上灰度或明暗red, green, yellow, blue, magenta, cyan, or white + grey 或 bright各种颜色选项可以独立设置,其中设置多个模式的结果(例如,下划线和-半明亮)是硬件相关的。-term 终端名字覆盖环境变量TERM.-reset 显示终端重置字符串,它通常将终端重新设置为电源的状态??(测试未见任何效果)-initialize 清空屏幕。-cursor [on|off] 显示或关闭光标(测试时,没有效果)-repeat [on|off] 只在虚拟主机上有效:键盘打开或关闭(测试时,显示不支持)-appcursorkeys [on|off] 只在虚拟主机上有效将光标键应用程序模式设置为on或off. -linewrap [on|off] (virtual consoles only)自动换行或关闭。-default:将终端的呈现选项设置为默认值。-foreground 8-color|default 设置前景文本颜色-background 8-color|default 设置背景文本颜色。-ulcolor 16-color (virtual consoles only)为加下划线的字符设置颜色。-hbcolor 16-color (virtual consoles only)设置半明字符的颜色。-inversescreen [on|off] (virtual consoles only)颠倒的屏幕颜色。前台和后台交换,下划线和半亮交换。-bold [on|off] 打开或关闭粗体(额外亮度)模式-half-bright [on|off]将昏暗(半亮度)模式开启或关闭-blink [on|off]开启或关闭闪烁模式-reverse [on|off]打开或关闭反向视频模式,字符和字符背景交换颜色(-inversescreen是全屏交换)-underline [on|off]在开启或关闭状态下显示下划线模式-store 存储终端当前的呈现选项-clear all:同命令clear-clear rest:测试时报参数错误-tabs [tab1 tab2 tab3 ...] 不带参数,测试结果如下。带参数没效果。root@myzr:~# setterm -tabs10 20 30 40 50 60 7012345678901234567890123456789012345678901234567890123456789012345678901234567890T T T T T T T T T T T-clrtabs [tab1 tab2 tab3 ...] 测试时报终端不支持:setterm: terminal xterm does not support --clrtabs-regtabs [1-160] 测试时报终端不支持:setterm: terminal xterm does not support --regtabs-blank [0-60|force|poke] 设置不活动的时间间隔,在几分钟内,之后屏幕将自动变白(如果可用的话,使用APM)force:即使按键被按下,也要保持屏幕空白。poke:开启屏幕-dump [1-NR_CONS] 将给定虚拟控制台(带有属性)的快照写入-file选项中指定的文件,覆盖该文件,默认文件是screen.dump-append [1-NR_CONS] 类似-dump,但是将其附加到快照文件,而不是重写它。-file dump文件名-msg [on|off] 启用或禁用发送内核printk()消息到控制台。-msglevel 1-8 设置内核打印等级。-powersave on|vsync 将监视器放入VESA vsync挂起模式。测试无效-powersave hsync 将监视器放入VESA hsync挂起模式。测试无效-powersave powerdown 将监视器放入VESA关闭模式。测试无效-powersave [off]节能模式。测试无效-powerdown [0-60]测试无效-blength [0-2000]:以毫秒为间隔设置钟的持续时间,没有参数,默认是0。测试时不支持-bfreq [freqnumber] 将钟频率设置为赫兹,没有参数,默认是0。测试时不支持-version 输出版本信息-help 输出帮助信息
参见其他命令:
tput(1), stty(1), terminfo(5), tty(4)
有效信息:
setterm命令是 util-linux包的你部分。
util-linux 2000年1月 SETTERM(1)
###setterm 英文
SETTERM(1) User Commands SETTERM(1)
NAME
setterm - set terminal attributes
SYNOPSIS
setterm [options]
DESCRIPTION
setterm writes to standard output a character string that will invoke the specified terminal capabilities. Where possible terminfo
is consulted to find the string to use. Some options however (marked “virtual consoles only” below) do not correspond to a ter‐
minfo(5) capability. In this case, if the terminal type is “con” or “linux” the string that invokes the specified capabilities on
the PC Minix virtual console driver is output. Options that are not implemented by the terminal are ignored.
OPTIONS
For boolean options (on or off), the default is on.
For conciseness, an 8-color below is black, red, green, yellow, blue, magenta, cyan, or white.A 16-color is an 8-color, grey, or bright followed by red, green, yellow, blue, magenta, cyan, or white.The various color options may be set independently, at least at virtual consoles, though the results of setting multiple modes (forexample, -underline and -half-bright) are hardware-dependent.-term terminal_nameOverrides the TERM environment variable.-reset Displays the terminal reset string, which typically resets the terminal to its power on state.-initializeDisplays the terminal initialization string, which typically sets the terminal's rendering options, and other attributes tothe default values.-cursor [on|off]Turns the terminal's cursor on or off.-repeat [on|off] (virtual consoles only)Turns keyboard repeat on or off.-appcursorkeys [on|off] (virtual consoles only)Sets Cursor Key Application Mode on or off. When on, ESC O A, ESC O B, etc. will be sent for the cursor keys instead of ESC[ A, ESC [ B, etc. See the "vi and Cursor-Keys" section of the Text-Terminal-HOWTO for how this can cause problems for viusers.-linewrap [on|off] (virtual consoles only)Turns automatic line-wrapping on or off.-defaultSets the terminal's rendering options to the default values.-foreground 8-color|default (virtual consoles only)Sets the foreground text color.-background 8-color|default (virtual consoles only)Sets the background text color.-ulcolor 16-color (virtual consoles only)Sets the color for underlined characters.-hbcolor 16-color (virtual consoles only)Sets the color for half-bright characters.-inversescreen [on|off] (virtual consoles only)Inverts the screen colors. Foreground and background are swapped, as are underline and half-brightness.-bold [on|off]Turns bold (extra bright) mode on or off. Except at a virtual console, -bold off turns off all attributes (bold, half-brightness, blink, reverse).-half-bright [on|off]Turns dim (half-brightness) mode on or off (see -hbcolor). Except at a virtual console, -half-bright off turns off allattributes (bold, half-brightness, blink, reverse).-blink [on|off]Turns blink mode on or off. Except at a virtual console, -blink off turns off all attributes (bold, half-brightness, blink,reverse).-reverse [on|off]Turns reverse video mode on or off. Except at a virtual console, -reverse off turns off all attributes (bold, half-bright‐ness, blink, reverse).-underline [on|off]Turns underline mode on or off (see -ulcolor).-store (virtual consoles only)Stores the terminal's current rendering options (foreground and background colors) as the values to be used at reset-to-default.-clear [all]Clears the screen and "homes" the cursor, as clear(1).-clear restClears from the current cursor position to the end of the screen.-tabs [tab1 tab2 tab3 ...] (virtual consoles only)Sets tab stops at the given horizontal cursor positions, in the range 1-160. Without arguments, shows the current tab stopsettings.-clrtabs [tab1 tab2 tab3 ...] (virtual consoles only)Clears tab stops from the given horizontal cursor positions, in the range 1-160. Without arguments, clears all tab stops.-regtabs [1-160] (virtual consoles only)Clears all tab stops, then sets a regular tab stop pattern, with one tab every specified number of positions. Without anargument, defaults to 8.-blank [0-60|force|poke] (virtual consoles only)Sets the interval of inactivity, in minutes, after which the screen will be automatically blanked (using APM if available).Without an argument, gets the blank status (returns which vt was blanked or zero for unblanked vt).The force option keeps screen blank even if a key is pressed.The poke option unblank the screen.-dump [1-NR_CONS]Writes a snapshot of the given virtual console (with attributes) to the file specified in the -file option, overwriting itscontents; the default is screen.dump. Without an argument, dumps the current virtual console. Overrides -append.-append [1-NR_CONS]Like -dump, but appends to the snapshot file instead of overwriting it. Only works if no -dump options are given.-file dumpfilenameSets the snapshot file name for any -dump or -append options on the same command line. If this option is not present, thedefault is screen.dump in the current directory. A path name that exceeds system maximum will be truncated, see PATH_MAXfrom linux/limits.h for the value.-msg [on|off] (virtual consoles only)Enables or disables the sending of kernel printk() messages to the console.-msglevel 1-8 (virtual consoles only)Sets the console logging level for kernel printk() messages. All messages strictly more important than this will be printed,so a logging level of 0 has the same effect as -msg on and a logging level of 8 will print all kernel messages. klogd(8) maybe a more convenient interface to the logging of kernel messages.-powersave on|vsyncPuts the monitor into VESA vsync suspend mode.-powersave hsyncPuts the monitor into VESA hsync suspend mode.-powersave powerdownPuts the monitor into VESA powerdown mode.-powersave [off]Turns off monitor VESA powersaving features.-powerdown [0-60]Sets the VESA powerdown interval in minutes. Without an argument, defaults to 0 (disable powerdown). If the console isblanked or the monitor is in suspend mode, then the monitor will go into vsync suspend mode or powerdown mode respectivelyafter this period of time has elapsed.-blength [0-2000]Sets the bell duration in milliseconds. Without an argument, defaults to 0.-bfreq [freqnumber]Sets the bell frequency in Hz. Without an argument, defaults to 0.-versionOutput version information and exit.-help Output help screen and exit.
SEE ALSO
tput(1), stty(1), terminfo(5), tty(4)
BUGS
Differences between the Minix and Linux versions are not documented.
AVAILABILITY
The setterm command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
util-linux January 2000 SETTERM(1)
相关文章:

搜狗分身技术再进化,让AI合成主播“动”起来
整理 | 一一出品 | AI科技大本营去年 11 月的互联网大会期间,搜狗与新华社联合发布全球首个AI合成主播一经亮相,引起了人们对“AI媒体”的广泛讨论。如今,搜狗 AI 合成主播不断更新迭代。2 月 19 日,在新华社新媒体中心与搜狗公司…

Angular http跨域
var app angular.module(Mywind,[ui.router]); app.controller(Myautumn,function($scope,$http,$filter){ //$http跨域 //服务端设置 // 访问权限 response.setHeader("Access-Control-Allow-Origin", "*"); // 访问类型 response.setHeader(&q…

文本分类step by step(二)
(注:如有转载请标明作者:finallyliuyu, 和出处:博客园) 《文本分类 step by step(一)》 在《文本分类step by step(一)》中,我们从处理语料库开始讲起,一直讲到利用分类器…

Centos7.4 版本环境下安装Mysql5.7操作记录
Centos7.x版本下针对Mysql的安装和使用多少跟之前的Centos6之前版本有所不同的,废话就不多赘述了,下面介绍下在centos7.x环境里安装mysql5.7的几种方法:一、yum方式安装 Centos7.x版本下针对Mysql的安装和使用多少跟之前的Centos6之前版本有所…

叫你一声“孙悟空”,敢答应么?
整理 | 一一出品 | AI科技大本营(ID:rgznai100)随着自然语言理解等技术的发展,对话机器人如今盛行,而基于此的智能音箱产品的发展也异常火热。很多开发者一般热衷于在一些对话机器人平台上开发相应的语音技能,但也有不…

【linux】Matchbox(一):启动脚本
脚本执行顺序 启动X服务器 /etc/rc5.d/S01xserver-nodm --> …/init.d/xserver-nodm–> 对应进程: /bin/sh /etc/rc5.d/S01xserver-nodm start background xinit /etc/X11/Xsession–> 对应进程: xinit /etc/X11/Xsession – /usr/bin/Xorg …

java试用(1)hello world
设置环境变量path H:\soft\j2sdk1.4.2_17\bin;H:\soft\eclipse;%path%set CLASSPATH.;H:\soft\j2sdk1.4.2_17\jre\lib;JAVA_HOME: D:\jdk1.5.0PATH: D:\jdk1.5.0\bin;编写程序 Noname1.java (注意:文件名要和class名一样)class Noname1 { public static void…

GAN性能不稳?这九大技术可“镇住”四类缺陷
作者 | Bharath Raj译者 | ang010ela编辑 | 一一出品 | AI科技大本营尽管 GAN 领域的进步令人印象深刻,但其在应用过程中仍然存在一些困难。本文梳理了 GAN 在应用过程中存在的一些难题,并提出了最新的解决方法。使用 GAN 的缺陷众所周知,GAN…

java正则表达式获取指定两个字符串之间内容
xml解析利用正则表达式获取指定两个字符串之间内容 在遇到解析复杂xml的时候,想到大家所想到的都是利用dom4j作为首发工具,但是当遇到层次很多,较为复杂,我们难道还需要从根节点一层一层的解析下去吗?此时不仅代码繁琐…

【linux】Matchbox(二):基本概念
X server X server是Linux系统里面图形接口服务器的简称。Windows系统的界面是这个系统不可分割的一部分,各种窗口操作界面显示都是由系统核心直接管理的,而Linux的图形界面并不是系统的必要组成部分,它可以在无界面的条件下运行。当需要Lin…

Android 控件之ImageSwitcher图片切换器
ImageSwitcher是Android中控制图片展示效果的一个控件,如:幻灯片效果...,颇有感觉啊。做相册一绝 源码下载 一、重要方法 setImageURI(Uri uri):设置图片地址 setImageResource(int resid):设置图片资源库 setImageDra…

【Qt】Qt5.x移植后的环境配置(imx6)
1、环境配置脚本如下 #!/bin/shexport QTDIR=/usr/lib/qt5 export QT_QPA_PLATFORM_PLUGIN_PATH=$QTDIR/plugins export QT_QPA_PLATFORM=eglfs:fb=/dev/fb0 export QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/event1 export QT_QPAFONTDIR=/usr/lib/fonts export QML2_IM…

程序员如何避免“滴滴式裁员”悲剧?
作者 | 徐麟转载自数据森麟(ID:shujusenlin)滴滴于2月15日正式发表裁员公告,想必很多互联网人的朋友圈都已经被这条消息刷屏了,其中最常见的莫过于下面这张图了:此图一出,广大互联网吃瓜群众不禁后背发凉&a…

windows服务搭建及命令总结
1、图解FTP服务器搭建(Windows Server 2008) https://wenku.baidu.com/view/803bdc1759eef8c75fbfb361.html?fromsearch https://www.cnblogs.com/john2017/p/6269671.html 2、WindowsServer2008下搭建ApachePHPMySQL https://wenku.baidu.com/view/2e82b99ea1116c175f0e7cd18…

Linux下的CST和UTC时间的区别
在linux中,用date查看时间的时候显示:2008年 12月 17日 星期三 09:04:14 CSTCST China Standard Time UTC8:00 中国沿海时间(北京时间)世界协调时间(Universal Time Coordinated,UTC)GPS 系统中有两种时间区分,一为UTC,另一为LT&a…

Python之父重回决策层,未来如何发展?
作者 | 豌豆花下猫来源 | Python猫(ID:python_cat)春节假期结束了,大家陆续地重回到原来的生活轨道上。假期是一个很好的休息与调节的机会,同时,春节还有辞旧迎新的本意,它是新的轮回的开端。在…

【Android】adb命令总结
1、adb version 显示ADB工具版本 2、adb devices 查询设备,显示设备序列号 3、adb sideload < file_location> 通过USB进行ROM刷机 4、adb install < apk文件路径> 安装APK 5、adb uninstall <软件名> 卸载软件 6、adb push <本地路径>…

MySQL中char与varchar的区别
字符与字节的区别 一个字符由于所使用的字符集的不同,会并存储在一个或多个字节中,所以一个字符占用多少个字节取决于所使用的字符集注意:char与varchar后面接的数据大小为存储的字符数,而不是字节数(其实是5.0版本以上…

怎样在Red Hat Enterprise Linux 5.4版本上安装GCC?
注意:如果打算使用GUI的方式安装,需要导入GPG-Key(否则在使用GUI时会出现public key for *.rpm is not installed) 请切换到安装光盘目录下: cd /media 可以看到 RHEL* 的目录,然后切换到这个目录中: cd RHEL* 你需要运…

【C++】mingw32-make+cmake:error: ‘nullptr‘ was not declared in this scope解决方法
###问题 使用cmake成功(Configuring done Generating done)后,在cmd终端中执行 mingw32-make报错: error: nullptr was not declared in this scope###原因 nullptr是在c11的新内容。编译时,没有添加对C11的支持。 解…

喜得爱女,吴恩达深情撰文:欢迎你来到新世界!
整理 | 琥珀出品 | AI科技大本营(ID:rgznai100)一个月前,吴恩达冷不丁在Twitter放出了重磅消息: “我们的最新‘成果’ Baby Ng 即将诞生!2019 年 2 月见面!”果然,昨日吴恩达公开了首个小公主降…

FastJson 简单使用
对象、List转JsonUser user new User(); /*JSON 序列化,默认序列化出的JSON字符串中键值对是使用双引号,如果需要单引号的JSON字符串, [eg:String jsonString JSON.toJSONString(map, SerializerFeature.UseSingleQuotes);] *fastjson序…

【数据安全案例】交警计算机系统再遭***,交通违法记录随意删除
根据新浪报道,据新华社10月14日电 利用当网管的机会,破解密码,非法进入交警计算机系统为他人删除车辆交通违法记录牟利。辽宁省鞍山市铁西区检察院透露,当地某公司员工程尚军因涉嫌破坏计算机信息系统罪,已于10月初被依…

开源,还能走多远?
【编者按】在各大厂纷纷拥抱开源的当口,“开源代码面临可持续发展危机”的言论也甚嚣尘上。早期,技术爱好者们“用爱发电”,“他们知道在出问题前,没人会注意到他们,没人会重视他们”。但遗憾的是,很长一段…

使用axis开发web service服务端
一、axis环境搭建 1.安装环境 JDK、Tomcat或Resin、eclipse等. 2.到 http://www.apache.org/dyn/closer.cgi/ws/axis/1_4 下载Axis的jar包 3.将Axis的jar包放入WEB-INF/lib目录下 二、编写web service服务端 1.编写服务 package com.webservice;public class HelloWebservice {…

【Qt】qt打印文件名、函数名、行号
#include <QDebug> #define MyDebug qDebug()<<"[FILE:"<<__FILE__<<",LINE"<<__LINE__<<",FUNC"<<__FUNCTION__<<"]

【Qt】Qt项目常用代码总结
路径 获取当前路径 #include <QCoreApplication> QString appDirPath QCoreApplication::applicationDirPath(); 转换成对应系统路径 返回路径名,使分隔符转换为适合底层操作系统的分隔符。 windows下为“\”; linux下为“/” #include <QDir> a…

滴滴裁员补偿丰厚,员工称裁出幸福感?
整理 | 一一出品 | AI科技大本营(rgznai100)滴滴裁员的“靴子”正在逐步落地。据《财经》报道,滴滴近日已给出裁员的具体赔偿方案:补偿一般为 N1 个月,如果本周能确认,再额外给一个月补偿——这一个月补偿是…

shell编程基础
1. 程序的执行风格 程序编程风格:过去式:以指令为中心,数据服务于指令。对象式:以数据为中心,指令服务于数据。过程式编程有以下特点:1) 顺序执行:指程序在执行的过程中,…

【Qt】QImage使用总结
图像格式转换 由 RGB 格式转换成 BGR 格式 QImage::rgbSwapped() 返回一个QImage,其中所有像素的红色和蓝色组件的值被交换,有效地将RGB图像转换为BGR图像。 QImage image(fileName); QImage bgr = image.rgbSwapped();将彩色图转换成 灰度图 使用QImage::convertToForma…