Answers: <p>The question needs details, like what type of script you're attempting to run, and the specific errors you're getting.</p>
  <p>Generally speaking, by default Windows Terminal launches a PowerShell interpreter (but can launch others), whereas cmd.exe launches a command interpreter that's much older and has no PowerShell functionality.</p>
  <p>If you're attempting to run a PowerShell script, it needs to be in a PowerShell session (start either PowerShell, PowerShell ISE, Windows Terminal with a PowerShell tab, or if you really want to, you can run in a cmd.exe window by invoking <code>powershell.exe -File MyScript.ps1</code>).</p>
  <p>If it's a batch file, either interpreter can run it.</p>
  <p>If it's a shell script, it's most likely meant to be executed on Linux.</p>
  
Answers: CC BY-SA 4.0
Answers: 2022-02-24T00:04:04.347Z
Answers: Just to muddy the water further, remember. In Windows [.bat and .cmd are different extensions for two different flavors of batch file](https://www.educba.com/cmd-vs-bat/).
Answers: ScottWelker
Answers: CC BY-SA 4.0
Answers: 2021-10-09T16:26:09.740Z
Answers: 2021-10-09T16:31:17.777Z
Answers: 2021-10-09T16:31:17.777Z
Answers: Brian Cline
Answers: <p>In my opinion, the major difference between Windows 'cmd/PS' and Linux 'terminal' is the command line or shell language intepreters.</p>
  <p>They are both shells but have different script language, features and modules or packages.</p>
  <p>Windows CMD/PS Scripts are usually saved as 'file.bat' or 'file.ps1'. Note PS Scripts such as 'file.ps1' would only run using PowerShell interface while a 'file.bat' can run on both CMD and PowerShell interfaces.</p>
  <p>Linux Scripts files are usually saved as 'file.sh' and can only be run on terminal interface.</p>
  
Answers: CC BY-SA 4.0
Answers: 2024-02-27T11:27:24.687Z
Answers: 2024-02-27T11:27:24.687Z
Answers: Francis A
Body: <p>While using the Windows machine we face soo much trouble running the command line scripts on CMD(command prompt). Few commands run successfully but some are not. Why is there any difference between terminal and CMD.</p>
  
Comments: CC BY-SA 4.0
Comments: 2022-02-24T00:10:50.690Z
Comments: Can you clarify, what exactly do you mean by "terminal?" Note too there is the command processor (command prompt) which can be termed "_CMD_" and, there are the .cmd (Batch Files) which can be termed "_CMD_." See [EduCBA: CMD vs BAT](https://www.educba.com/cmd-vs-bat/).
Comments: ScottWelker
Comments: CC BY-SA 4.0
Comments: 2022-02-25T11:09:44.823Z
Comments: The command prompt available in software development IDE like IntelliJ, Eclipse and VS code is called terminal.
Comments: Rashid
Comments: CC BY-SA 4.0
Comments: 2022-02-25T15:57:27.940Z
Comments: Thanks @Rashid. To be of any help we'd need specifics. Which "terminal" exactly is not behaving as expected and what, specifically, is the error or undesired behavior. You've tagged your question with both [powershell](https://stackoverflow.com/questions/tagged/powershell) and [shell-script](https://stackoverflow.com/questions/tagged/shell) one is very specific, the other is general. Scripts developed for one will not likely run within the other. We need greater specificity.
Comments: ScottWelker
Tags: <windows><shell-script><powershell>
Title: What is the difference between CMD and terminal in Windows machine?
UserDisplayName: Rashid
ThreadText: # What is the difference between CMD and terminal in Windows machine?
  
  (Asked by: username_0 on 2021-10-08)
  
  While using the Windows machine we face soo much trouble running the command line scripts on CMD(command prompt). Few commands run successfully but some are not. Why is there any difference between terminal and CMD.
  
  **Tags:** windows, shell-script, powershell
  
  > **Comments:**
  > **username_1**: Can you clarify, what exactly do you mean by "terminal?" Note too there is the command processor (command prompt) which can be termed "_CMD_" and, there are the .cmd (Batch Files) which can be termed "_CMD_." See [EduCBA: CMD vs BAT](https://www.educba.com/cmd-vs-bat/).  
  > **username_0**: The command prompt available in software development IDE like IntelliJ, Eclipse and VS code is called terminal.  
  > **username_1**: Thanks @username_0. To be of any help we'd need specifics. Which "terminal" exactly is not behaving as expected and what, specifically, is the error or undesired behavior. You've tagged your question with both [powershell](https://stackoverflow.com/questions/tagged/powershell) and [shell-script](https://stackoverflow.com/questions/tagged/shell) one is very specific, the other is general. Scripts developed for one will not likely run within the other. We need greater specificity.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2021-10-09. Score: 0
  
  The question needs details, like what type of script you're attempting to run, and the specific errors you're getting.
  
  Generally speaking, by default Windows Terminal launches a PowerShell interpreter (but can launch others), whereas cmd.exe launches a command interpreter that's much older and has no PowerShell functionality.
  
  If you're attempting to run a PowerShell script, it needs to be in a PowerShell session (start either PowerShell, PowerShell ISE, Windows Terminal with a PowerShell tab, or if you really want to, you can run in a cmd.exe window by invoking `powershell.exe -File MyScript.ps1`).
  
  If it's a batch file, either interpreter can run it.
  
  If it's a shell script, it's most likely meant to be executed on Linux.
  
  > **Comments:**
  > **username_1**: Just to muddy the water further, remember. In Windows [.bat and .cmd are different extensions for two different flavors of batch file](https://www.educba.com/cmd-vs-bat/).  
  
  ---
  
  ### Answer by username_3 on 2024-02-27. Score: 0
  
  In my opinion, the major difference between Windows 'cmd/PS' and Linux 'terminal' is the command line or shell language intepreters.
  
  They are both shells but have different script language, features and modules or packages.
  
  Windows CMD/PS Scripts are usually saved as 'file.bat' or 'file.ps1'. Note PS Scripts such as 'file.ps1' would only run using PowerShell interface while a 'file.bat' can run on both CMD and PowerShell interfaces.
  
  Linux Scripts files are usually saved as 'file.sh' and can only be run on terminal interface.
  
  
  ---
  
  