【linux命令】setterm控制終端屬性命令(中英文)


【linux命令】setterm控制終端屬性命令(中英文)

版權聲明:本文為博主原創文章,未經博主允許不得轉載。 https://blog.csdn.net/u010168781/article/details/79670282

setterm中文

SETTERM(1) 用戶命令 SETTERM(1)

名字 
setterm - 設置終端屬性

概要 
setterm [選項]

描述 
setterm向終端寫一個字符串到標准輸出,調用終端的特定功能。在虛擬終端上使用,將會改變虛擬終端的輸出特性。不支持的選項將被忽略。

選項 
對於布爾選項(on或off),默認設置為on。

 1   簡潔8色如下:黑色,紅色,綠色,黃色,藍色,洋紅色,青色,或白色
 2    black, red, green, yellow, blue, magenta, cyan, or white.
 3 
 4    16色是8色加上灰度或明暗,在紅色、綠色、黃色、藍色、洋紅色、青色或白色之后加上灰度或明暗
 5    red, green, yellow, blue, magenta, cyan, or white + grey 或 bright
 6 
 7    各種顏色選項可以獨立設置,其中設置多個模式的結果(例如,下划線和-半明亮)是硬件相關的。
 8 
 9    -term 終端名字
10         覆蓋環境變量TERM.
11 
12    -reset 顯示終端重置字符串,它通常將終端重新設置為電源的狀態??(測試未見任何效果)
13 
14    -initialize 清空屏幕。
15 
16    -cursor [on|off] 顯示或關閉光標(測試時,沒有效果)
17 
18    -repeat [on|off] 只在虛擬主機上有效:鍵盤打開或關閉(測試時,顯示不支持)
19 
20    -appcursorkeys [on|off] 只在虛擬主機上有效
21         將光標鍵應用程序模式設置為on或off. 
22 
23    -linewrap [on|off] (virtual consoles only)
24         自動換行或關閉。
25 
26    -default:將終端的呈現選項設置為默認值。
27 
28    -foreground 8-color|default 設置前景文本顏色
29 
30    -background 8-color|default 設置背景文本顏色。
31 
32    -ulcolor 16-color (virtual consoles only)為加下划線的字符設置顏色。
33 
34    -hbcolor 16-color (virtual consoles only)設置半明字符的顏色。
35 
36    -inversescreen [on|off] (virtual consoles only)顛倒的屏幕顏色。前台和后台交換,下划線和半亮交換。
37 
38    -bold [on|off] 打開或關閉粗體(額外亮度)模式
39 
40    -half-bright [on|off]將昏暗(半亮度)模式開啟或關閉
41 
42    -blink [on|off]開啟或關閉閃爍模式
43 
44    -reverse [on|off]打開或關閉反向視頻模式,字符和字符背景交換顏色(-inversescreen是全屏交換)
45 
46    -underline [on|off]在開啟或關閉狀態下顯示下划線模式
47 
48    -store 存儲終端當前的呈現選項
49 
50    -clear all:同命令clear
51 
52    -clear rest:測試時報參數錯誤
53 
54    -tabs [tab1 tab2 tab3 ...] 不帶參數,測試結果如下。帶參數沒效果。
55             root@myzr:~# setterm -tabs
56             10        20        30        40        50        60        70
57             12345678901234567890123456789012345678901234567890123456789012345678901234567890
58             T      T       T       T       T       T       T       T       T       T      T
59 
60    -clrtabs [tab1 tab2 tab3 ...] 測試時報終端不支持:setterm: terminal xterm does not support --clrtabs
61 
62    -regtabs [1-160] 測試時報終端不支持:setterm: terminal xterm does not support --regtabs
63 
64    -blank [0-60|force|poke] 設置不活動的時間間隔,在幾分鍾內,之后屏幕將自動變白(如果可用的話,使用APM)
65         force:即使按鍵被按下,也要保持屏幕空白。
66         poke:開啟屏幕
67 
68    -dump [1-NR_CONS]  將給定虛擬控制台(帶有屬性)的快照寫入-file選項中指定的文件,覆蓋該文件,默認文件是screen.dump
69 
70    -append [1-NR_CONS] 類似-dump,但是將其附加到快照文件,而不是重寫它。
71 
72    -file dump文件名
73 
74    -msg [on|off] 啟用或禁用發送內核printk()消息到控制台。
75 
76    -msglevel 1-8 設置內核打印等級。
77 
78    -powersave on|vsync 將監視器放入VESA vsync掛起模式。測試無效
79 
80    -powersave hsync 將監視器放入VESA hsync掛起模式。測試無效
81 
82    -powersave powerdown 將監視器放入VESA關閉模式。測試無效
83 
84    -powersave [off]節能模式。測試無效
85 
86    -powerdown [0-60]測試無效
87 
88    -blength [0-2000]:以毫秒為間隔設置鍾的持續時間,沒有參數,默認是0。測試時不支持
89 
90    -bfreq [freqnumber] 將鍾頻率設置為赫茲,沒有參數,默認是0。測試時不支持
91 
92    -version 輸出版本信息
93 
94    -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.

 
  1   For conciseness, an 8-color below is black, red, green, yellow, blue, magenta, cyan, or white.
  2 
  3    A 16-color is an 8-color, grey, or bright followed by red, green, yellow, blue, magenta, cyan, or white.
  4 
  5    The various color options may be set independently, at least at virtual consoles, though the results of setting multiple modes  (for
  6    example, -underline and -half-bright) are hardware-dependent.
  7 
  8    -term terminal_name
  9           Overrides the TERM environment variable.
 10 
 11    -reset Displays the terminal reset string, which typically resets the terminal to its power on state.
 12 
 13    -initialize
 14           Displays  the  terminal initialization string, which typically sets the terminal's rendering options, and other attributes to
 15           the default values.
 16 
 17    -cursor [on|off]
 18           Turns the terminal's cursor on or off.
 19 
 20    -repeat [on|off] (virtual consoles only)
 21           Turns keyboard repeat on or off.
 22 
 23    -appcursorkeys [on|off] (virtual consoles only)
 24           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
 25           [  A,  ESC  [ B, etc.  See the "vi and Cursor-Keys" section of the Text-Terminal-HOWTO for how this can cause problems for vi
 26           users.
 27 
 28    -linewrap [on|off] (virtual consoles only)
 29           Turns automatic line-wrapping on or off.
 30 
 31    -default
 32           Sets the terminal's rendering options to the default values.
 33 
 34    -foreground 8-color|default (virtual consoles only)
 35           Sets the foreground text color.
 36 
 37    -background 8-color|default (virtual consoles only)
 38           Sets the background text color.
 39 
 40    -ulcolor 16-color (virtual consoles only)
 41           Sets the color for underlined characters.
 42 
 43    -hbcolor 16-color (virtual consoles only)
 44           Sets the color for half-bright characters.
 45 
 46    -inversescreen [on|off] (virtual consoles only)
 47           Inverts the screen colors.  Foreground and background are swapped, as are underline and half-brightness.
 48 
 49    -bold [on|off]
 50           Turns bold (extra bright) mode on or off.  Except at a virtual console, -bold off  turns  off  all  attributes  (bold,  half-
 51           brightness, blink, reverse).
 52 
 53    -half-bright [on|off]
 54           Turns  dim  (half-brightness)  mode  on  or  off  (see -hbcolor). Except at a virtual console, -half-bright off turns off all
 55           attributes (bold, half-brightness, blink, reverse).
 56 
 57    -blink [on|off]
 58           Turns blink mode on or off.  Except at a virtual console, -blink off turns off all attributes (bold, half-brightness,  blink,
 59           reverse).
 60 
 61    -reverse [on|off]
 62           Turns  reverse  video mode on or off.  Except at a virtual console, -reverse off turns off all attributes (bold, half-bright‐
 63           ness, blink, reverse).
 64 
 65    -underline [on|off]
 66           Turns underline mode on or off (see -ulcolor).
 67 
 68    -store (virtual consoles only)
 69           Stores the terminal's current rendering options (foreground and background colors) as the values  to  be  used  at  reset-to-
 70           default.
 71 
 72    -clear [all]
 73           Clears the screen and "homes" the cursor, as clear(1).
 74 
 75    -clear rest
 76           Clears from the current cursor position to the end of the screen.
 77 
 78    -tabs [tab1 tab2 tab3 ...] (virtual consoles only)
 79           Sets  tab  stops at the given horizontal cursor positions, in the range 1-160.  Without arguments, shows the current tab stop
 80           settings.
 81 
 82    -clrtabs [tab1 tab2 tab3 ...] (virtual consoles only)
 83           Clears tab stops from the given horizontal cursor positions, in the range 1-160.  Without arguments, clears all tab stops.
 84 
 85    -regtabs [1-160] (virtual consoles only)
 86           Clears all tab stops, then sets a regular tab stop pattern, with one tab every specified number  of  positions.   Without  an
 87           argument, defaults to 8.
 88 
 89    -blank [0-60|force|poke] (virtual consoles only)
 90           Sets  the  interval of inactivity, in minutes, after which the screen will be automatically blanked (using APM if available).
 91           Without an argument, gets the blank status (returns which vt was blanked or zero for unblanked vt).
 92 
 93           The force option keeps screen blank even if a key is pressed.
 94 
 95           The poke option unblank the screen.
 96 
 97    -dump [1-NR_CONS]
 98           Writes a snapshot of the given virtual console (with attributes) to the file specified in the -file option,  overwriting  its
 99           contents; the default is screen.dump.  Without an argument, dumps the current virtual console.  Overrides -append.
100 
101    -append [1-NR_CONS]
102           Like -dump, but appends to the snapshot file instead of overwriting it.  Only works if no -dump options are given.
103 
104    -file dumpfilename
105           Sets  the  snapshot  file name for any -dump or -append options on the same command line.  If this option is not present, the
106           default is screen.dump in the current directory.  A path name that exceeds system maximum will  be  truncated,  see  PATH_MAX
107           from linux/limits.h for the value.
108 
109    -msg [on|off] (virtual consoles only)
110           Enables or disables the sending of kernel printk() messages to the console.
111 
112    -msglevel 1-8 (virtual consoles only)
113           Sets the console logging level for kernel printk() messages.  All messages strictly more important than this will be printed,
114           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) may
115           be a more convenient interface to the logging of kernel messages.
116 
117    -powersave on|vsync
118           Puts the monitor into VESA vsync suspend mode.
119 
120    -powersave hsync
121           Puts the monitor into VESA hsync suspend mode.
122 
123    -powersave powerdown
124           Puts the monitor into VESA powerdown mode.
125 
126    -powersave [off]
127           Turns off monitor VESA powersaving features.
128 
129    -powerdown [0-60]
130           Sets  the  VESA  powerdown  interval  in minutes.  Without an argument, defaults to 0 (disable powerdown).  If the console is
131           blanked or the monitor is in suspend mode, then the monitor will go into vsync suspend mode or  powerdown  mode  respectively
132           after this period of time has elapsed.
133 
134    -blength [0-2000]
135           Sets the bell duration in milliseconds.  Without an argument, defaults to 0.
136 
137    -bfreq [freqnumber]
138           Sets the bell frequency in Hz.  Without an argument, defaults to 0.
139 
140    -version
141           Output version information and exit.
142 
143    -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)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM