Terminal won't open in Ubuntu 17.10

I am running Ubuntu 17.10 and when I try to open the terminal or files (nautilus) they won't open. The cursor shows that it's trying to load something but then just stops after about 10 seconds as if I didn't click anything. This problem only happens with terminal and files. Everything else works fine, chrome, firefox, thunderbird, ubuntu software. I've tried restarting my system but that didn't help.