本文介绍了如何确定我是在Powershell还是cmd中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直在玩 Windows上的OpenSSH ,看起来普通的Unix别名是丢失的.我不确定通过SSH登录Windows计算机时是启动powershell还是cmd.在Windows上查看当前正在运行的Shell的正确方法是什么?
I've been playing with OpenSSH on Windows and it looks like the normal Unix aliases are missing. I'm not sure whether it's starting powershell or cmd when I log in to a Windows machine via SSH. What's the correct way to see the currently running shell on Windows?
推荐答案
所有功劳归于 PetSerAl ,被发布为Aswer:
All credit goes to PetSerAl, this had to be posted as an aswer:
(dir 2>&1 *`|echo CMD);&<# rem #>echo PowerShell
在Win32-OpenSSH
内,此命令也有效,并输出CMD
.
Within Win32-OpenSSH
this command also works, and outputs CMD
.
NB:Win32-OpenSSH
似乎有点限制,在我的系统上无法识别cd
.
NB : Win32-OpenSSH
seems a bit limited, cd
is not recognized on my system.
这篇关于如何确定我是在Powershell还是cmd中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!