Equivalent of which in Windows, where is a command stored?

The which command will give the location of a command in Linux. For example-

 $ which date
 /bin/date

In Windows, we have the where command which is available from Windows 2003 onwards. For example-

C:\Users\Administrator>where cmd
C:\Windows\System32\cmd.exe

If you run it in a Powershell, use where.exe because where is an alias for Where-Object.

Advertisements