I was in the process of installing Java 11 on Ubuntu 16.04 and decided to reboot my computer.
Now, when trying to login to my user or the guest user, when I press enter, I get a black screen followed by the login screen. When logging on to the TTY terminal I get warnings that my PATH variable has no entries, for example, not even ls is available for use without typing in /bin/ls
. Aside: I used TTY to clear my .Xauthority
records.
This is what I've done so far.
- Reset the PATH variable using the command
$PATH=(getconf PATH)
, I used/usr/bin/getconf
instead since it's not on the PATH! - Run reboot in the TTY. This leads to my PATH not working again.
Due to this, I cannot login to Ubuntu at all. I think the best way to resolve this is to reset the PATH variable and protect it from any changes during runtime (so I can trace my steps back in my installation of Java and find where I may be messing up). How can I do this?
This are the files I touched before running into this:
- environment in
etc/
java.sh
andjdk.sh
files in/etc/profile.d
/etc/environment
is a configuration file not a shell script - it doesn't support statements likeexport
, or even parameter expansion. See for example Referencing environment variables in /etc/environment? – steeldriver Oct 26 '19 at 21:13