Ubuntu – Ubuntu 16.04 suddenly stops responding and behaves in a weird way



Recently my Ubuntu 16.04 crashes frequently with no sign. From time to time, sidebar and top panel looks like following. When I tried to shutdown the machine from command line using shutdown now, it prompts "…no such command…".

This happens from about a week ago. Since I solely work on this machine for coursework and research, this causes a lot of troubles. I checked online to see whether someone else encountered something similar but no luck.

I am not sure if this is because

  1. Certain malware I mistakenly installed on my machine. I notice that the icon for one software I installed is still there when this issue occurs (see second picture).
  2. This machine has two systems (both Ubuntu 16.04 and Windows 10) and there is some issues with their co-existence.

I have thought about upgrading system to newer version of Ubuntu, but I am concerned about the compatibility issues with some of the software I use.

Could anyone help me, any input is appreciated.

enter image description here
enter image description here