Answer the question
In order to leave comments, you need to log in
Shutting down the computer with a script?
Hey! I was recently sent one .py file, a 5-line calculator, but 190+ lines
Question - will it work if run with sudo? os.system('shutdown -s')
Answer the question
In order to leave comments, you need to log in
On Linux, shutdown will not work without sudo if other users are authorized on the system. On Windows it should work anyway.
Weird team. I do not recall such a key from the Linux team.
And in Windows, the keys are not listed that way.
I think that nothing will happen at all under any system.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question