# cygconnect

Connects to Cygwin.

    cygconnect [<command line parameters>]

## Remarks

If MACRO is not linked to Tera Term, this command runs Tera Term that is connected to cygwin, and links it to MACRO. <command line parameters> is passed to CygTerm. See "CygTerm command line" for the format of <command line parameters>.

If MACRO has already been linked to Tera Term and Tera Term is not connected to the host, this command close Tera Term and runs new Tera Term that is connected to cygwin, and links it to MACRO.

If MACRO has already been linked to Tera Term and Tera Term has already been connected to the host, this command is ignored.

As a result of this command, the system variable "result" is set to one of the following values depending on the link and connection status:

Value | Status
--- | ---
0 | Link to Tera Term has not been made.
1 | Connection to the host has not been made, but link to Tera Term has been made.
2 | Both connection and link have been made.

To test the current link and connect status before executing the "cygconnect" command, use the "testlink" command.

Communication commands except "connect", "cygconnect" and "testlink" can not be executed before the link is established.

## Examples

    ; connects to cygwin.
    cygconnect

    ; change directory to C:\ and runs Tera Term that is connected to cygwin.
    cygconnect '-d C:\ -nocd -nols'

## See also

- connect
- closett
- disconnect
- testlink
- unlink
- Cygwin Information and Installation