While installing Java I did something and now getting this error.
Asked
Active
Viewed 137 times
-1
1 Answers
0
Backup your existing /etc/profile
by running sudo cp /etc/profile /etc/profile.bak
. Then edit your /etc/profile
by running sudo nano /etc/profile
. Below is my /etc/profile
for comparison to yours. You could replace your your /etc/profile
with one from a live disk or the one below. If you had customizations in yours you can then run diff /etc/profile /etc/profile.bak
to find the differences and add back the needed customizations then test each, one at a time.
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ "$PS1" ]; then
if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
# The file bash.bashrc already sets the default PS1.
# PS1='\h:\w\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi

J. Starnes
- 1,969
-
It's good to mention that your
/etc/profile
has no change at all, I mean it looks like a recently installed system. – galoget Jan 03 '18 at 12:39
/etc/profile
file to get specific help. Paste it as text, not a screenshot! – Melebius Jan 03 '18 at 09:10