This is the best method


sudo shutdown -h now

This is an alternative (halt and shutdown are not the same thing so a halt command may not cause a complete power off shutdown, it depends on the system):


sudo halt

 

Comments

  1. ExperiMentor

    6 months ago

    So, on a Raspberry Pi specifically, does ‘sudo halt’ so something different to ‘sudo shutdown -h now’ as neither can physically cause power-off?
    What exactly i the difference, if there is one?

  2. Eduard

    2 years ago

    I generally use `poweroff`