• WhyJiffie@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    6 hours ago

    Great command to know if you have a VM on a system you dont manage / share with others.

    won’t this kill all their processes just the same?

    • tux7350@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      2 hours ago

      So you can just run kexec if its installed on the distro. This tells the kernel to boot into another kernel. The reason to use it with systemctl is to properly shut down all the services running in userspace. That command will have systemd gracefully turn off all services and then the new kernel with whatever updates / modules can be loaded in a clean environment.

      Its useful if say, you have a VM in a data center. Now most of them provide a web gui where you can turn your VM off and then on. But if you’re lazy like me and already remoted into the terminal lol