setterm
Set terminal attributes such as colors, cursor visibility, and screen blanking. Note: Some options only work in virtual consoles (TTY). More information: https://manned.org/setterm.
- Clear the screen:
setterm --clear
- Make the cursor visible or invisible:
setterm --cursor
- Turn blinking text on or off:
setterm --blink
- Set the text color:
setterm --foreground
- Set the background color:
setterm --background
- Set the screen blanking timeout in minutes (
0disables blanking):
setterm --blank
- Reset the terminal to its default state:
setterm --reset
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
