How do I tell whether my cygwin installation is 32 or 64 bit? I don't remember which setup.exe to download. And I would hate to mess up my cygwin installation.
相关问题
- winsound not found in Python
- check the difference of symlink type in cygwin
- adb shell: can't use the ESCAPE key
- bash: applet not found when running gradle in Moba
- How do I make a command in cygwin to run Sublime T
相关文章
- git.exe: error while loading shared libraries: ?:
- ffmpeg run from shell runs properly, but does not
- How Can I Build wxWidgets With Eclipse On Windows
- Cygwin issue - unable to remap; same address as pa
- Needed environment for building gstreamer plugins
- How to set up and use ccache (with cygwin) on wind
- getting Cygwin to know about microsoft cl and nmak
- What version of ruby use with cygwin?
Run
uname -m
. If your cygwin install is 64-bit, the output will bex86_64
. If it's 32-bit, you will instead seei386
,i486
,i586
, ori686
.The other answers address the OP's question, but if you're like me and use both flavors of Cygwin, it's useful to know which one you're using for more than just running setup.exe. If I know my script is running on Cygwin, I prefer
because it gives me only "x86_64" or "i686" as output. I can use that in an "if" block like this:
Of course, you can also use "uname -a" with "grep" in an if statement. It's a matter of personal preference.
uname -m
And it should say
x86_64
in the output if it's 64-bit, ori686
if 32-bit.NateT gives the correct command to "print the machine hardware name" according to "uname --help":
I get "x86_64" or "i686", but who knows whether those strings will change? Here's the entire output of "uname -a". The WOW64 tells you it's 32-bit Cygwin on 64-bit Windows. On 32-bit you've got no choice, right? ; - )
Update: (Thanks to theDrake.) Ironically, since around Feb 2015 the WOW64 in the string has changed to WOW, so although checking for WOW is probably safe now it seems the "machine hardware name" might indeed be safer than the "kernel name".
Cygwin does seem to be take backwards compatibility seriously according to that thread, but also note that under MSYS2 you'd need to rely on the "machine hardware name" anyway and not the "kernel name":