Search code examples
windowsbatch-filecmdcygwinexport

export is not recognize in cmd while Cygwin is installed


My machine is running win7 64bit. I installed Cygwin and added C:\cygwin64\bin to the PATH. Now linux commands work on cmd , but export is not recognized:

'export' is not recognized as an internal or external command, operable program or batch file.

while it works properly in Cygwin64 Terminal. How should I add it to windows default cmd?


Solution

  • export is not recognized in cmd.

    'export' is not recognized as an internal or external command, operable program or batch file.

    Let's open a bash shell and look for the export command:

    DavidPostill@Hal /f/test
    $ which export
    which: no export in (.:/home/DavidPostill/bin:/usr/local/bin:/usr/bin:/c/Windows/system32:/c/Windows)
    

    That tells us that there isn't a program called export.

    So what is it?

    export is a bash built in command.

    Source export.

    It has no meaning outside of a bash shell.


    Further Reading