Ubuntu – How to set the TERM environment variable for the Gnome Terminal Emulator app


The TERM environment variable defaults to xterm so the .bashrc file does not provide full color in the shell by default.

How to I change the TERM environment variable to xterm-color for the gnome terminal emulator app only?

Update: By full color I mean changes the command prompt to use color in addition to displaying output such as directory listing in color too.

Best Answer

For gnome-terminal

Edit the profile settings in gnome-termninal:

enter image description here

Replace /bin/bash with your shell command and use your parameter for TERM.

You can also edit the entries with dconf. Open a terminal and start dconf-editor:


Open the entry org/gnome/terminal/legacy/profiles: and select your profile. Change the value for custom-command.