A
A
Alexander Pikeev2020-07-10 10:59:26
linux
Alexander Pikeev, 2020-07-10 10:59:26

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

2 answer(s)
D
Dmitry Link, 2020-07-10
@Baryon

On Linux, shutdown will not work without sudo if other users are authorized on the system. On Windows it should work anyway.

R
Ronald McDonald, 2020-07-10
@Zoominger

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 question

Ask a Question

731 491 924 answers to any question