When I'm logged in as root, I can display colors, but not when I switch to another user.
The command ls --color=auto
only displays colors once when logged as normal user.
I searched a lot and did a couple things other users recommended like:
echo $TERM
which returns:
xterm-256color
I also changed the .bashrc
file in /home/ubuntu
as root
, I uncommented the #force_color_prompt=yes
line to force_color_prompt=yes
, but then I switched the normal user su steam
and tried ls
and everything is still white.
Here is my prompt when I'm logged as root
and when I switch user:
I saw that this system has only 1 directory inside the /home/
directory (it's home/ubuntu
), which confuses me because I thought it was supposed to have one directory for each user. I suspect that this must be causing my problem: the root
user shows colored prompt, but the standard user doesn't, because the standard user can't access the .bashrc
file inside the home/ubuntu
directory,
"to show how you are switching users"
I edited, I used
– Rayan Araujo Feb 15 '22 at 17:32su user1
to switch user