After Linux no color to root

I use DeepIn system, non-root mode command line is color, although not very nice, but also acceptable. But a switch to root mode thief feel uncomfortable. . It becomes a solid color. Compulsive people will inevitably want to change the color back. . .
Here Insert Picture Description
In fact the color is stored in the file~/.bashrcunder.
And ~ / .bashrc inside PS variables are only acting in the user's own terminal, it is necessary to re-set after the handover to PS root to the root, the default /root/.bashrc is empty.

We look at the non-root ~ / .bashrc file: vi ~/.bashrc
Here Insert Picture Description
and then switch to root mode, let's look at: vi ~/.bashrc, obviously empty.
Here Insert Picture Description
PS we need to copy the settings to /root/.bashrc , you can modify the color.

sudo cp ~/.bashrc /root/.bashrc
Here Insert Picture Description

Published 170 original articles · won praise 47 · views 20000 +

Guess you like

Origin blog.csdn.net/weixin_43734095/article/details/105035484