简体   繁体   English

Windows 终端上的 uname

[英]uname on Windows Terminal

I was wondering if the command uname works in Windows terminal?我想知道命令uname是否适用于 Windows 终端? If so what does it output?如果是这样,它是什么 output? I read that it could be Windows or WindowsNT我读到它可能是WindowsWindowsNT

I believe uname shows you your kernel.我相信 uname 向您展示了您的内核。 So on GNU/Linux, running uname gives you Linux because that is your kernel.所以在 GNU/Linux 上,运行 uname 会给你 Linux,因为那是你的内核。 Out of Windows or WindowsNT, I'd assume Windows would give you Windows NT because that's the kernel it uses.在 Windows 或 WindowsNT 之外,我认为 Windows 会给你 Windows NT,因为那是它使用的内核。

$ whatis uname
uname (1)            - print system information
uname (2)            - get name and information about current kernel

I think you can get similar information by using systeminfo .我认为您可以使用systeminfo获得类似的信息。

in Windows, uname-equivalent is the 'ver' command.在 Windows 中,uname-equivalent 是“ver”命令。

>ver

Microsoft Windows [Version 10.0.19044.1889]

you can create a tiny script, call it uname.cmd您可以创建一个小脚本,将其命名为 uname.cmd

>type uname.cmd
@ver

Then you have your own uname command on Windows然后你在 Windows 上有你自己的 uname 命令

>uname

Microsoft Windows [Version 10.0.19044.1889]

I tested the above on my Windows 10 PC.我在我的 Windows 10 PC 上测试了上述内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM