Inside cmd.exe when I call which java I get this output:


When I call which vagrant I get:


But when I call which ssh I get:


I fear that this relative path causes a problem somewhere else.

Why does ssh return a relative path? How can I make ssh reference an absolute path?

  • "How can I make ssh reference an absolute path?" - Edit your PATH variable to include a more complete path to the executable. How you edit the PATH variable is well documented. There are many answers that explain how you edit it here at Superuser. – Ramhound Nov 4 '16 at 14:07

That path is actually complete. You're not using (pure) cmd.exe. There is no SSH under Windows so you're probably using Cygwin or similar as there is no which command on Windows either. As you can already see by the output from those other commands the paths also start with / as / references the root of a Linux filesystem.

| improve this answer | |
  • Yes. I was using which from my Git installation. The commands with the relative paths were also part of my Git installation. – Harold L. Brown Nov 4 '16 at 14:20
  • @HaroldL.Brown - Just so you're clear: all of the paths you cite are absolute, as is any path beginning with /; relative paths begin with ./, ../, or any other directory name without a leading /. A file name with no directory is always relative. Note that I am talking about your local file system: remote systems can be addressed with prefixes such as net://, though not all Windows versions of Unix utilities support this. – AFH Nov 4 '16 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.