擅长:python、mysql、java
<p>您可以将shell会话置于后台,该会话休眠1秒,然后执行<code>reboot</code>命令。由于<a href="https://stackoverflow.com/questions/8775598/start-a-background-process-with-nohup-using-fabric">nohup issue</a>,必须在不使用<code>nohup</code>命令的情况下完成。我用<code>tmux</code>。。。在</p>
<pre><code>reboot(command='tmux new-session -d "sleep 1; reboot;"')
</code></pre>