Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 904
alex Avatar asked Jul 24 '16 13:07

alex


People also ask

How to check Cygwin version in cmd?

The -c option checks the version and status of installed Cygwin packages. If you specify one or more package names, cygcheck will limit its output to those packages, or with no arguments it lists all packages.

Is not Recognised as an internal or external command?

To resolve this error, check if the commands are correct and use file paths with spaces within double-quotes. For the programs not installed in the System32 folder, add an environment variable with your application's full file path to launch apps through CMD.

What version of Cygwin am I running?

What version of Cygwin is this, anyway? To find the version of the Cygwin DLL installed, you can use uname -r as you would for a Unix kernel. As the Cygwin DLL takes the place of a Unix kernel, you can also use the Unix compatible command: head /proc/version , or the Cygwin specific command: cygcheck -V .

Is not recognized as an internal or external command operable program or batch file?

If you meet the error “command is not recognized as an internal or external command, operable program or batch file” problem in Command Prompt in Windows 10, the reason may be that the Windows Environment Variables are messed up. Check what Windows Environment Variables are and how to fix this error below.


3 Answers

In Windows use set instead of export.

like image 94
hrnjan Avatar answered Oct 18 '22 12:10

hrnjan


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

  • An A-Z Index of the Bash command line for Linux - An excellent reference for all things Bash command line related.
  • export - Set an environment variable. Mark each name to be passed to child processes in the environment.
like image 38
DavidPostill Avatar answered Oct 18 '22 12:10

DavidPostill


EXPORT SQUAD_DIRECTORY ="/path/to/SQUAD"

Alternative for export in windows is SET :

SET SQUAD_DIRECTORY ="/path/to/SQUAD"

Refer : https://ss64.com/nt/set.html

like image 34
Vetrivel PS Avatar answered Oct 18 '22 12:10

Vetrivel PS