I have a dual boot Kubuntu 18.04/Windows 10 on my Dell XPS 13, currently typing from my Windows partition. It can't boot the Kubuntu partition anymore. I have been using Kubuntu 18.04 for some time now, this doesn't seem to be an upgrade issue from 17.10 like I've seen elsewhere. I have been a (K)Ubuntu user for multiple years but I'm not a pro.
An hour ago, I was unable to open up Dolphin (file explorer), the icon just appeared in the tray and then disappeared again. I decided to try to log out and back in, but when I clicked log out nothing happened. I decided to try to reboot, but when I clicked reboot nothing happened. Eventually, I decided to force my laptop off by holding down the power button 10 seconds (what most likely caused the problem). Now, I see the grub2 menu, and if I try to boot Kubuntu, I see the logo appear for a couple seconds, then it goes in single command mode. Here's what it looks like, the first lines are not always there (sometimes it starts at "Ubuntu 18.04.1 LTS ...").
I can login, but it doesn't seem to be able to access the internet (Edit: I am indeed able to access to the internet -- I managed to ssh into a remote server). I type reboot and it does the same thing again.
Here's another possible cause: I was on Kubuntu doing some C++ assignments for school. I decided to try installing netCDF4 to test something out, and so I used this shell script. It ran and gave me some errors and warnings, but when running "make check" afterwards, it said every test were successful. It's immediately after that that my troubles (described above) began.
I've tried a couple of fixes here and there that didn't seem too invasive but nothing worked. I have a working bootable USB if needed.
Edit: one thing I have tried is to run "startx" from that terminal, because everyone suggests that. When I do it, it just does nothing for a long time, then "xauth: timeout in locking authority file /home/username/.Xauthority", then "/usr/lib/xorg/Xorg: /usr/local/lib/libz.so.1: version '2LIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16)" then "xinit: giving up", "xinit: unable to connect to X server: Connection refused", "xinit: server error".
Edit 2: Time was sort of of the essence so I backed up my files and did a fresh install. I'm leaving this as unsolved because it truly is unsolved, but I won't be able to test any offered solution. Leaving it up just so that people know this problem exists.
Thanks in advance for any help.