Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

iamvinny's avatar

Programmatically Reboot Ubuntu Server

How can I programmatically reboot the server that is hosting my Laravel project?

I have tried using the below commands on my controller, but it didn't work, nothing happened.

exec('reboot');

system('reboot');

0 likes
2 replies
Snapey's avatar

the www-data user may not have rights to execute reboot?

Please or to participate in this conversation.