EzDevInfo.com

cygwin interview questions

Top cygwin frequently asked interview questions

How do I fix certificate errors when running wget on an HTTPS URL in Cygwin?

For example, running wget https://www.dropbox.com results in the following errors:

ERROR: The certificate of `www.dropbox.com' is not trusted.
ERROR: The certificate of `www.dropbox.com' hasn't got a known issuer.

Source: (StackOverflow)

How to check if running in Cygwin, Mac or Linux?

I have a shell script that is used both on Windows/Cygwin and Mac and Linux. It needs slightly different variables for each versions.

How can a shell/bash script detect whether it is running in Cygwin, on a Mac or in Linux?


Source: (StackOverflow)

Advertisements

Open Cygwin at a specific folder

How can I create a Cygwin shortcut that will open Cygwin at a specific folder? This would avoid me having to type

cd /cygdrive/c/Users/Tom/Desktop/

each time I launch Cygwin.


Source: (StackOverflow)

Where can I download an offline installer of Cygwin?

I need an offline installer with most of the utilities commonly needed. Somehow the default installer confuses me with all its package selection. I installed Cygwin but I can't find the diff utility after the installation.


Source: (StackOverflow)

How can I change my Cygwin home folder after installation? [duplicate]

This question already has an answer here:

I just installed Cygwin, and it looks like the home directory in the bash prompt is on my Z: drive. That's not where I want it.

How can I change this?


Source: (StackOverflow)

apt-get for cygwin?

Is there any apt-get like for use with cygwin?

I already tried the cyg-apt but when I try I get this error:

cyg-apt: downloading: http://cygwin.mirrors.pair.com/setup-2.bz2
cyg-apt: downloading: http://cygwin.mirrors.pair.com/setup-2.ini
cyg-apt: bad URL http://cygwin.mirrors.pair.com/setup-2.ini, exiting.

Source: (StackOverflow)

How do I install cURL on cygwin?

I tried to enable curl on cygwin but it says bash: curl: command not found

How do I install curl on cygwin?


Source: (StackOverflow)

Root user/sudo equivalent in Cygwin?

I'm trying to run a bash script in Cygwin.

I get Must run as root, i.e. sudo ./scriptname errors.

chmod 777 scriptname does nothing to help.

I've looked for ways to imitate sudo on Cygwin, to add a root user, since calling "su" renders the error su: user root does not exist, anything useful, and have found nothing.

Anyone have any suggestions?


Source: (StackOverflow)

What is the difference between Cygwin and MinGW?

I want to make my C++ project cross platform, and I'm considering using Cygwin/MinGW. But what is the difference between them ?

Another question is whether I will be able to run the binary on a system without Cygwin/MinGW ?


Source: (StackOverflow)

Git on Windows: How do you set up a mergetool?

I've tried msysGit and Git on Cygwin. Both work just fine in and of themselves and both run gitk and git-gui perfectly.

Now how the heck do I configure a mergetool? (Vimdiff works on Cygwin, but preferrably I would like something a little more user-friendly for some of our more. Windows-loving coworkers.)


Source: (StackOverflow)

Objective C for Windows

What would be the best way to write Objective-C on the Windows platform?

Cygwin and gcc? Is there a way I can somehow integrate this into Visual Studio?

Along those lines - are there any suggestions as to how to link in and use the Windows SDK for something like this. Its a different beast but I know I can write assembly and link in the Windows DLLs giving me accessibility to those calls but I don't know how to do this without googling and getting piecemeal directions.

Is anyone aware of a good online or book resource to do or explain these kinds of things?


Source: (StackOverflow)

How do I get the 'clear' command in Cygwin?

I installed Cygwin, choosing a fairly minimal set of packages.

In a terminal, I tried to do 'clear' to clear the terminal, but I get

bash: clear: command not found

How do I get this to work?


Source: (StackOverflow)

SSL certificate rejected trying to access GitHub over HTTPS behind firewall

I'm stuck behind a firewall so have to use HTTPS to access my GitHub repository. I'm using cygwin 1.7.7 on Windows XP.

I've tried setting the remote to https://username@github.com/username/ExcelANT.git, but pushing prompts for a password, but doesn't do anything once I've entered it. https://username:<password>github.com/username/ExcelANT.git and cloning the empty repo from scratch but each time it gives me the same error

error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/username/ExcelANT.git/info/refs

Turning on GIT_CURL_VERBOSE=1 gives me

* About to connect() to github.com port 443 (#0)
* Trying 207.97.227.239... * successfully set certificate verify locations:
* CAfile: none
CApath: /usr/ssl/certs
* SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
* Expire cleared
* Closing connection #0
* About to connect() to github.com port 443 (#0)
* Trying 207.97.227.239... * successfully set certificate verify locations:
* CAfile: none
CApath: /usr/ssl/certs
* SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
* Expire cleared
* Closing connection #0
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/username/ExcelANT.git/info/refs

fatal: HTTP request failed

Is this a problem with my firewall, cygwin or what?

I hadn't set the HTTP proxy in the Git config, however it's an ISA server that needs NTLM authentication, not basic, so unless anyone knows how to force git to use NTLM, I'm scuppered.


Source: (StackOverflow)

Git Extensions: Win32 error 487: Couldn't reserve space for cygwin's heap, Win32 error 0

Git Extensions: Everything was working fine until yesterday.

But suddenly I am get this error when I try to pull some repositories using git extensions

C:\Program Files\Git\bin\git.exe pull --progress "origin" 
Done
    0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
AllocationBase 0x0, BaseAddress 0x68560000, RegionSize 0x390000, State 0x10000
C:\Program Files\Git\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0

It is happening for all the repositories which I have cloned. But, my git bash is working fine. I don't have any idea what is going on. Any idea as to why this is happening?


Source: (StackOverflow)

How to navigate to a directory in C:\ with cygwin?

I'm trying to install PyQt4 so I can mess around with it. The installation guide said I had to install sip. The last step to installing sip is to use the make install command. Windows doesn't have that, so I looked it up and everything I saw said to install cygwin. So I did. But...sip is in C:\Python31\sip.

Can I run this from the cygwin command? If so...how would I do that?

or...

Can I run this from the normal windows command prompt? If so...how would I go about that?


Source: (StackOverflow)