1

The same way you can echo "hello world" on cmd by creating a shortcut using "C:\Windows\System32\cmd.exe" /k echo hello world, how can I do the same with Windows Terminal? Swapping the cmd file location with the wt file location doesn't work. It says "/k was not expected."

TylerH
  • 20,799
  • 66
  • 75
  • 101
cherieodu
  • 43
  • 3
  • 1
    HI, you might be confusing consoles and shells, have a look at this article: https://www.hanselman.com/blog/whats-the-difference-between-a-console-a-terminal-and-a-shell – Laurent Nov 20 '21 at 07:59

1 Answers1

6

You'll want to prepend wt.exe to that command, not replace cmd.exe. So the full commandline should look like:

wt cmd.exe /k echo hello world

That tells wt.exe to run the commandline cmd.exe /k echo hello world.

zadjii
  • 529
  • 2
  • 4