linux programmed shut down code example
Example 1: shutdown terminal command
#Shutdown
sudo shutdown -h now
#or
sudo shutdown -h [TIME]
#Reboot
sudo reboot
Example 2: write a script to shutdown at a time in linux
shutdown -h 21:45
#Shutdown
sudo shutdown -h now
#or
sudo shutdown -h [TIME]
#Reboot
sudo reboot
shutdown -h 21:45