20.04 keeps freezing randomly [closed]

Solution 1:

After a "sudden shutdown", aka "system crash", and reboot, the terminal command sudo journalctl -b -1 -e will show you the end of the previous boot's log's. If there is no hint there, suspect power/ overheating.

Overheating is most likely caused by dust. Power down your system. Unblock your fans and vents, clean out the dust. Ensure air circulation. Dust that coats heat exchangers and chips is a good insulator, and bad for cooling. Don't disassemble your computer until you have downloaded the manufacturer's manual, and researched how-to-clean. Make this information available for when your computer isn't (paper, other computer) Don't use water.

Read man journalctl to see how to extract information from the logs.

You can find how I make use of journalctl easier at https://askubuntu.com/users/25618/waltinator.