1
I'm running Cygwin 64-bit on Windows.
When I launch an instance of mintty
using the "Cygwin64 Terminal" desktop shortcut that comes with the Cygwin installation, it runs fine and all installed commands work.
However, when I launch mintty.exe
, from where it's contained at C:\cygwin64\bin
, I get a command not found
error.
I also have an AutoHotKey script set up that launches a mintyy.exe instance at the Desktop directory on the press of a NumPad key. When mintyy
is launched this way, it also gives a command not found
error. cd
ing to any other directory, or doing cd
on its own, doesn't fix this either. All that seems to matter is where the mintty instance was initially run from.
A few of the commands that display errors are:
killall
man
info
wc
which
ssh
clear
Most of these are included as part of the base Cywgin package, and are therefore definitely installed as part of the Cygwin instllation, so I'm really not sure what's going on here.
Commands that do work generally seem to be limited to those listed when I do help
in the terminal. Here's the whole ouput of that command.
$ help
GNU bash, version 4.4.12(3)-release (x86_64-unknown-cygwin)
These shell commands are defined internally. Type `help' to see this list.
Type `help name' to find out more about the function `name'.
Use `info bash' to find out more about the shell in general.
Use `man -k' or `info' to find out more about commands not in this list.
job_spec [&] history [-c] [-d offset] [n] or hist>
(( expression )) if COMMANDS; then COMMANDS; [ elif C>
. filename [arguments] jobs [-lnprs] [jobspec ...] or jobs >
: kill [-s sigspec | -n signum | -sigs>
[ arg... ] let arg [arg ...]
[[ expression ]] local [option] name[=value] ...
alias [-p] [name[=value] ... ] logout [n]
bg [job_spec ...] mapfile [-d delim] [-n count] [-O or>
bind [-lpsvPSVX] [-m keymap] [-f file> popd [-n] [+N | -N]
break [n] printf [-v var] format [arguments]
builtin [shell-builtin [arg ...]] pushd [-n] [+N | -N | dir]
caller [expr] pwd [-LP]
case WORD in [PATTERN [| PATTERN]...)> read [-ers] [-a array] [-d delim] [->
cd [-L|[-P [-e]] [-@]] [dir] readarray [-n count] [-O origin] [-s>
command [-pVv] command [arg ...] readonly [-aAf] [name[=value] ...] o>
compgen [-abcdefgjksuv] [-o option] [> return [n]
complete [-abcdefgjksuv] [-pr] [-DE] > select NAME [in WORDS ... ;] do COMM>
compopt [-o|+o option] [-DE] [name ..> set [-abefhkmnptuvxBCHP] [-o option->
continue [n] shift [n]
coproc [NAME] command [redirections] shopt [-pqsu] [-o] [optname ...]
declare [-aAfFgilnrtux] [-p] [name[=v> source filename [arguments]
dirs [-clpv] [+N] [-N] suspend [-f]
disown [-h] [-ar] [jobspec ... | pid > test [expr]
echo [-neE] [arg ...] time [-p] pipeline
enable [-a] [-dnps] [-f filename] [na> times
eval [arg ...] trap [-lp] [[arg] signal_spec ...]
exec [-cl] [-a name] [command [argume> true
exit [n] type [-afptP] name [name ...]
export [-fn] [name[=value] ...] or ex> typeset [-aAfFgilnrtux] [-p] name[=v>
false ulimit [-SHabcdefiklmnpqrstuvxPT] [l>
fc [-e ename] [-lnr] [first] [last] o> umask [-p] [-S] [mode]
fg [job_spec] unalias [-a] name [name ...]
for NAME [in WORDS ... ] ; do COMMAND> unset [-f] [-v] [-n] [name ...]
for (( exp1; exp2; exp3 )); do COMMAN> until COMMANDS; do COMMANDS; done
function name { COMMANDS ; } or name > variables - Names and meanings of so>
getopts optstring name [arg] wait [-n] [id ...]
hash [-lr] [-p pathname] [-dt] [name > while COMMANDS; do COMMANDS; done
help [-dms] [pattern ...] { COMMANDS ; }
However, even more confusingly, ping
is not part of this list, but also works.
Anyone have any idea what's going on here?
Good point about the CMD
ping
. As for point 1, I'd rather use themintty
terminal, I prefer how it looks and behaves to CMD. As for point 2: as mentioned, most of the commands that are failing are already installed as part of the base Cygwin installation. Regardless, I have double-checked, and everything that I'm trying to use is installed. This is proven by the fact that - as the question also states - they work fine on an instance of mintty that is started via the desktop shortcut. – Hashim – 2017-02-05T06:38:01.920The
Cygwin.bat
will run the samemintty
but in correct way, it will switcth to cygwin's directory and willlogin
to the session. As aboutkillall man info wc which ssh clear
they all need to be run from directorybin
or you need to provide full path to them when lunching. Just checked some of them and it works as it should if I gave them full path – Alex – 2017-02-05T06:45:51.810That's incorrect.
Cygwin.bat
runs bash usingCMD
as its terminal. There must be a way to do what you're saying with the terminals that Cygwin comes with, otherwise it would be entirely pointless to include them as packages. – Hashim – 2017-02-05T08:47:12.100If that's the case for the faulty commands, why do they work when running
mintty
from the "Cygwin Terminal" desktop shortcut? – Hashim – 2017-02-05T08:48:04.027Check my updated answer, if you don't like windows's cmd console and prefer
mintty
then you need to run it as it shown in my answer – Alex – 2017-02-05T09:07:25.083Honestly, you're not really answering any questions at all. So far, you've done nothing but provide pointless workarounds, and even in doing that you've shown that you don't really understand how Cygwin functions. I'm starting to doubt whether you've had experience with it at all. I'm looking for an answer to a very specific problem here, one which I documented the full details to in a long question. If you don't have the knowledge required to answer that question, then it'd be much more helpful for everyone if you refrained from posting an answer. – Hashim – 2017-02-05T09:24:09.713
Did you tried to run
mintty -
before you made such conclusion ? May be my english write up not good enough, but I answer technically correct all of your questions and if you would do that what I advised you will resolve your issue – Alex – 2017-02-05T09:40:06.257Okay, the latest version after the edits has solved the problem. I wish we could have gotten there without the edits and numerous other workaround solutions, but thanks anyway. – Hashim – 2017-02-05T11:06:39.353
1Well, I'm sorry, but I needed to get understand your issue first. It's often not clear at first glance where problem is especially with multiple issues(ping, absents of listed commands that turns that cygwin simply cant find it in path), but after some questions and answers in comments when both sides stay on the same page problem usually could be solved positively. Anyway, I'm glad I was able to help you – Alex – 2017-02-05T11:22:20.227
Fair enough. I'm sorry if I was short with you, like I said on the other question, I've not slept today. – Hashim – 2017-02-05T11:23:54.780
1I wish every problems between people would be resolved such way as we did. – Alex – 2017-02-05T11:25:21.167