Terminal Git vs Terminal Node vs Windows Terminal

1

I'm having a hard time noticing the need to have so many terminals installed on my computer when I need to use git or node.js. What are the differences between the terminals, what can one do and the other not? For example: I wanted to check if I had Node.js installed on my Windows 10, so I did which node on the Windows terminal and without success, I realize that this command is not implemented in this terminal and I have to use another one (Git gave me the path of installation), but how to know which one to use for each task if the article / tutorial is not specified?

    
asked by anonymous 05.01.2018 / 17:02

1 answer

2

Very simply, the "terminals" (as they are called) or CLI s C ommand L ine I nterface) are software that allow you to execute commands, such commands can be other compiled software or simple scripts written specifically for the CLI "x" and interpreted also by it.

Why so many?

There is no real need to have all, the main difference of each is how it is configured and written, which ends up implying the commands that it will be able to run.

The Node terminal, for example, already comes with the command node available, other than GitBash, which comes with git commands available, while the default Windows terminal does not have any of them.

Where do these commands come from?

Each terminal will search for compatible commands in places where it is configured to search. Windows CMD, for example, will consume the environment variable PATH , indexing all compatible commands when opening the terminal and every time you give a command, the CMD will try to use any of these commands and if it has found, will run it.

These "commands" can be .exe files, and in CMD .bat . The Terminal on the Mac can run .bash files, but not .bat and so on.

What's the best?

It goes from taste and need, I use a lot (in Windows environment) the cmder emulator , the CLI GitBash and the CMD CLI.

You can still add the program you want (as long as it is compatible) on any CLI, to add node to the CMD, for example, you only need to include the path of the node.exe in%% of Windows. And that means you can choose and use the CLI you want.

    
05.01.2018 / 17:41