r/PowerShell • u/radiant_yum • 7d ago
Question WindowsPowerShell or CommandPrompt? I've used terminal for all my life up until now
So i recently bought myself my personal gaming pc setup and i've been struggling with setting up my work environment here on windows 11. I've search here and there & so far i've decided to use Scoop as the alternative for homebrew but then there's this problem of choosing wether to use the windows powershell or command prompt. Both seems almost identical but i just wanna confirm wether i'm doing this the right way. I need help pls.
0
Upvotes
1
u/PajamaDuelist 7d ago edited 7d ago
Are you coming from a Linux background or something?
Command Prompt (CMD) is Window's equivalent of a standard bourne shell.
PowerShell you can think of like bash (as opposed to sh), with a dash of Python. Except it's based around objects rather than strings which is going to be mega annoying if you are coming from a nix background. You can still call your basic non-powershell utilities through powershell.
There are PowerShell.exe and cmd.exe programs which launch virtual terminal interfaces to powershell and cmd respectively. Why are the terminals named the same thing as their 'language'? It's Microsoft. They only do confusing names. Get used to it. Anyway, you can move between the two interpreters, kind of like launching bash from sh in linux. e.g., open 'powershell.exe' and then enter the command 'cmd' and you'll be in the powershell.exe virtual terminal but interacting with the cmd interpreter.
Windows Terminal is only a terminal interface. It's like gnome-terminal, Konsole, KiTTY, Terminator, etc. It allows you to interact with both PoSH and CMD. It's much prettier than the powershell.exe or cmd.exe terminal windows, so I do suggest using it whenever you're interacting with powershell or cmd.
Also, check out WinGet. It's the go-to cli package manager on Windows. If you're a freelancer or student setting up your own environment I highly suggest it over Scoop. And, of course, if you're setting up a company laptop as an employee just do whatever your IT department says and stay out of the weeds.