How to detect the type of virtualization from the command line

If you want to find out whether the Linux OS is running inside a virtualized environment or on a real hardware computer, there are various heuristics you can try, depending on the type of hypervisor/container used underneath. Different hypervisors and container technologies may introduce different fingerprints within their instances (e.g., processor manufacturer, special file in /proc, virtualized NIC driver name).