A
A
Arthur2019-06-21 20:59:59
linux
Arthur, 2019-06-21 20:59:59

Command line difference?

Good evening programmers!
I have this question for you - what is the difference between the command lines of the Linux GitBash emulator and the Windows command line?
I used to use the GitBash command line, but yesterday I installed it using the Linux emulator - Ruby. It was not visible either through GitBash ( ruby ​​-v) or through the Windows command line. This seems to be logical, because Linux is emulated. But if it is installed by the installer under Windows, then GitBash does not see it with the same command.
What did I do wrong? Or is it all the same different teams. lines. If I'm right, tell me, it's very necessary. And if it's a very stupid question, I'm sorry)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2019-06-22
@TurnerIT

You need to read what the PATH variable is and how to set it in Linux and Windows - it lists the directories in which commands-programs are searched.
If you write a command in a line, then
in Windows:
* It is checked whether this command is an internal command (echo, set)
* Whether there is such a program in the current directory (if it is specified without an extension, then CMD.bat, CMD.cmd, CMD are searched. exe, CMD.com
* Is there such a program in the directories listed in the PATH
on Linux:
* Checks if this command is an internal shell command (echo, set)
* Is there such a program in the directories listed in the PATH (the file must have the attribute executable)

T
TyzhSysAdmin, 2019-06-21
@POS_troi

I don't know where GitBash gets its environment variables from, but obviously it has to be configured somehow, there should be a .bashrc file in your user's directory.
To see the PATH, execute in the bash console, the output should contain the path to the directory where the ruby ​​binaries are located
. Also, keep in mind that ruby.exe and ruby ​​are the same for the windows console, but for bash they are different things, so enter ruby.exe aka full name.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question