2

I have a command line only installation of Ubuntu 18.04.3. It boots to a login screen, I can login and everything works perfectly. Sometimes I plug it into a projector to give a presentation (from the command line). On a projector, the white text on a black background is hard to read.

console with black background

How can I invert the console so that the text is black and the entire background is white?

karel
  • 114,770
popey
  • 23,667
  • could you please take a look at https://askubuntu.com/q/1186716/248158. I've quoted you and my experience and that of two others differs with what your quote says. Thanks! – DK Bose Nov 07 '19 at 04:38

1 Answers1

1

You can do better than just invert, you can change the colour scheme to whatever you want from the command line. The following post has a number of answers so its a case of choosing with answer suits you best and if you really want to have black text on a blindingly bright white background, then this post should cover that too :)

Changing colour of text and background of terminal?

It appears that the above question doesn't contain any answers that demonstrate how to apply your settings permanently. I did this myself years back and it involves editing your.bashrc file and its a bit complicated in that you can apply your colours, but commands like ls use their own colours. I found an article on the community wiki that demonstrates how to edit the .bashrc file safely and apply your changes permanently. Note that the article uses gedit to edit the file which is not available in text mode and so obviously you will need to use nano or your preferred text editor instead:

https://help.ubuntu.com/community/CustomizingBashPrompt

  • Thanks. I tried setterm -term linux -back <background_colour> -fore <text_color> -clear which changes the colour, as expected. But then if I launch byobu to have multiple windows, it reverts back to white on black. – popey Nov 03 '19 at 02:39
  • Apologies I thought that at least one answer in the question I posted the link to, would demonstrate how to apply your colour changes permanently. So I posted an article from the Ubuntu Community Wiki that demonstrates how to achieve this. I hope this helps. –  Nov 03 '19 at 16:13