How to detect the type of virtualization from the command line

Question: I am trying to write a shell script in which I need to detect whether the Linux server on which the script is running is a virtual machine, a container or actual bare-metal hardware. This is because the script should perform different tasks depending on whether the underlying server is virtual or physical. Is […]
Continue reading…

 

How to reset the password in an LXC container

Question: I created an LXC container, but I cannot log in to the container as I forgot the default user’s password and the root password. How can I reset the password on an LXC container? When you create an LXC container, it will have the default username/password set up. The default username/password will vary depending […]
Continue reading…