attroff - Linux


The attroff command disables text attributes for the current terminal line. Text attributes refer to the visual properties applied to text, such as bold, underline, reverse video, etc. attroff removes these attributes, restoring the default text appearance. This command is useful for controlling the formatting and readability of text in terminal-based applications.


attroff [options]


  • -a, –all: Disable all text attributes, including bold, underline, blink, reverse video, and hidden text.
  • -b, –bold: Disable bold attributes.
  • -u, –underline: Disable underline attributes.
  • -f, –foreground: Disable color attributes for the foreground text.
  • -g, –background: Disable color attributes for the background text.


  • Disable bold and underline attributes:

    attroff -bu
  • Disable all text attributes:

    attroff -a
  • Reset foreground and background colors to default:

    attroff -fg

Common Issues

  • Using attroff without arguments may not disable all text attributes on certain terminal emulators. Use the -a option to ensure all attributes are cleared.
  • If text attributes are not working as expected, check if the terminal emulator supports these attributes.


attroff can be integrated with other Linux commands and tools to manipulate terminal text formatting. For instance:

echo "Hello World" | attron -b | attron -u | attron -f green | attron -g yellow

This command chain displays "Hello World" in bold, underlined, green foreground with a yellow background.

Related Commands

  • `tput:** Control terminal output.
  • `setterm:** Set terminal settings.
  • `reset:** Reset terminal to default settings.