Change Linux Terminal Background Color
To change the background color of the Linux terminal, you can follow these steps:
- Open the terminal and log into the Linux system.
- Enter the following command in the terminal to edit the terminal configuration file:
- Open the .bashrc file in your home directory.
- Locate the following code line in the open file.
- Uncomment this line to enable colored prompts in the terminal window. This feature is turned off by default to ensure the user’s focus is on the output of commands rather than the prompt.
- Add the following code in front of the line where force_color_prompt=yes.
- Set the prompt to display username, host, and current directory in red font for the user.
- This code will set the prompt of the terminal to appear in red color.
- Save the file and exit the editor.
- Enter the following command in the terminal to apply the changes:
- Execute the .bashrc file
- Alternatively, if you are using a zsh terminal, you can input the following command:
- execute the .zshrc file
- If you are using a different terminal, you can refer to its documentation to learn how to reload the configuration file.
- Now you should be able to see that the background color of the terminal has been changed.
Please note that only the terminal prompt color is being set here, not the entire terminal background color. If you want to change the background color of the entire terminal, you can right-click within the terminal, select “Profile Preferences” (or a similar option), and then make the changes under the “Colors” (or similar) tab.