从Linux终端关闭Windows计算机

编程入门 行业动态 更新时间:2024-10-25 02:18:44
本文介绍了从Linux终端关闭Windows计算机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在linux机器上运行一个应用程序.通过提供Windows计算机的IP地址作为输入,应用程序必须关闭Windows计算机.如果这些机器运行相同的操作系统,这是非常容易的,但是我对如何在跨操作系统中执行该操作感到困惑.

I am running an application on linux machine. By giving the ip address of a windows machine as input, the application must shutdown the windows machine. If the machines run the same OS it is very easy but I'm confused how to do it in cross OS.

推荐答案

从Linux-:

$ net rpc -S <ip address> -U <username>%<password> shutdown -t 1 -f

此命令可以从bash发出,甚至可以在cron作业中设置以在特定时间关闭计算机,并且默认情况下,此命令附带了许多发行版.

This command can be issued from bash or even set in cron job to shutdown the computer at a specific time and this command is shipped with many distros by default.

更多推荐

从Linux终端关闭Windows计算机

本文发布于:2023-11-02 13:48:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1552563.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:终端   计算机   Linux   Windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!