<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Cygwin</id>
	<title>Cygwin - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Cygwin"/>
	<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Cygwin&amp;action=history"/>
	<updated>2026-05-04T17:50:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://aznot.com/index.php?title=Cygwin&amp;diff=7661&amp;oldid=prev</id>
		<title>Kenneth: /* Setup.exe Command Line Options */</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Cygwin&amp;diff=7661&amp;oldid=prev"/>
		<updated>2024-07-22T06:13:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Setup.exe Command Line Options&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:13, 22 July 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l38&quot;&gt;Line 38:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 38:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See [[Cygwin/Notes#setup.exe command line options|Cygwin setup.exe command line options]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See [[Cygwin/Notes#setup.exe command line options|Cygwin setup.exe command line options]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Determin Path to environment ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Convert from Cygwin path to Windows path:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  cygpath -w ~&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Silent Install ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Silent Install ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key aznot:diff:1.41:old-5829:rev-7661:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
	<entry>
		<id>https://aznot.com/index.php?title=Cygwin&amp;diff=5829&amp;oldid=prev</id>
		<title>Kenneth: /* Setup.exe Command Line Options */</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Cygwin&amp;diff=5829&amp;oldid=prev"/>
		<updated>2021-02-03T18:24:56Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Setup.exe Command Line Options&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Cygwin ==&lt;br /&gt;
[http://cygwin.com/ cygwin]&lt;br /&gt;
&lt;br /&gt;
GNU + Cygnus + Windows = cygwin&lt;br /&gt;
&lt;br /&gt;
=== What Is Cygwin? ===&lt;br /&gt;
&lt;br /&gt;
* Cygwin is a Linux-like environment for Windows. It consists of two parts: A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.&lt;br /&gt;
* A collection of tools which provide Linux look and feel.&lt;br /&gt;
&lt;br /&gt;
The Cygwin DLL currently works with all recent, commercially released x86 32 bit and 64 bit versions of Windows, with the exception of Windows CE.&lt;br /&gt;
&lt;br /&gt;
Note that the official support for Windows 95, Windows 98, and Windows Me will be discontinued with the next major version (1.7.0) of Cygwin.&lt;br /&gt;
&lt;br /&gt;
=== What Isn&amp;#039;t Cygwin? ===&lt;br /&gt;
&lt;br /&gt;
* Cygwin is not a way to run native linux apps on Windows. You have to rebuild your application from source if you want it to run on Windows.&lt;br /&gt;
* Cygwin is not a way to magically make native Windows apps aware of UNIX ® functionality, like signals, ptys, etc. Again, you need to build your apps from source if you want to take advantage of Cygwin functionality.&lt;br /&gt;
&lt;br /&gt;
== Basic Cygwin Installation ==&lt;br /&gt;
&lt;br /&gt;
# Download Cygwin from http://www.cygwin.com/&lt;br /&gt;
#* https://www.cygwin.com/setup-x86.exe&lt;br /&gt;
#* https://www.cygwin.com/setup-x86_64.exe&lt;br /&gt;
# Execute setup.exe&lt;br /&gt;
# Select &amp;quot;Install from Internet&amp;quot;&lt;br /&gt;
# Root directory &amp;quot;C:\cygwin&amp;quot;&lt;br /&gt;
# Local Package Directory &amp;quot;C:\cygwin\install&amp;quot;&lt;br /&gt;
# Select &amp;quot;Direct Connection&amp;quot;&lt;br /&gt;
# Select Download URL - http://mirrors.kernel.org  (http://mirrors.kernel.org/sourceware/cygwin/)&lt;br /&gt;
# The Installation will proceed&lt;br /&gt;
# Select desired packages, which can be done later. &lt;br /&gt;
# Copy setup.exe into the C:\cygwin\install folder for future use&lt;br /&gt;
&lt;br /&gt;
Add c:\cygwin\bin to your PATH to be able to use Cygwin tools from &amp;#039;cmd&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Setup.exe Command Line Options ==&lt;br /&gt;
&lt;br /&gt;
See [[Cygwin/Notes#setup.exe command line options|Cygwin setup.exe command line options]]&lt;br /&gt;
&lt;br /&gt;
== Silent Install ==&lt;br /&gt;
&lt;br /&gt;
Powershell version:&lt;br /&gt;
&lt;br /&gt;
setup-x86.exe `&lt;br /&gt;
--site http://cygwin.mirror.constant.com `&lt;br /&gt;
--no-shortcuts `&lt;br /&gt;
--no-desktop `&lt;br /&gt;
--quiet-mode `&lt;br /&gt;
--root &amp;quot;c:\cygwin64&amp;quot; `&lt;br /&gt;
--arch x86 `&lt;br /&gt;
--local-package-dir &amp;quot;c:\cygwin64\install&amp;quot; `&lt;br /&gt;
--verbose `&lt;br /&gt;
--prune-install `&lt;br /&gt;
--packages openssh,git,rsync,nano&lt;br /&gt;
&lt;br /&gt;
-&lt;br /&gt;
&lt;br /&gt;
Install batch file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
REM Powershell 2&lt;br /&gt;
powershell -Command &amp;quot;(New-Object Net.WebClient).DownloadFile(&amp;#039;https://cygwin.com/setup-x86.exe&amp;#039;, &amp;#039;%PROGRAMFILES%\cygwinx86\setup-x86.exe&amp;#039;)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
REM Powershell 3&lt;br /&gt;
REM powershell -Command &amp;quot;Invoke-WebRequest https://cygwin.com/setup-x86.exe -OutFile setup-x86.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;%PROGRAMFILES%\cygwinx86\setup-x86.exe&amp;quot; ^&lt;br /&gt;
--site http://cygwin.mirror.constant.com ^&lt;br /&gt;
--no-shortcuts ^&lt;br /&gt;
--no-desktop ^&lt;br /&gt;
--quiet-mode ^&lt;br /&gt;
--root &amp;quot;%PROGRAMFILES%\cygwinx86\cygwin&amp;quot; ^&lt;br /&gt;
--arch x86 ^&lt;br /&gt;
--local-package-dir &amp;quot;%PROGRAMFILES%\cygwinx86\cygwin-packages&amp;quot; ^&lt;br /&gt;
--verbose ^&lt;br /&gt;
--prune-install ^&lt;br /&gt;
--packages openssh,git,rsync,nano&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 REM Run this as administrator!&lt;br /&gt;
 powershell (new-object System.Net.WebClient).DownloadFile(&amp;#039;https://THE_URL/cyg.bat&amp;#039;,&amp;#039;%TEMP%\cyg.bat&amp;#039;); Start-Process &amp;quot;%TEMP%\cyg.bat&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ref: [https://willhaley.com/blog/script-install-cygwin-windows/]&lt;br /&gt;
&lt;br /&gt;
== Packages ==&lt;br /&gt;
&lt;br /&gt;
See [[Cygwin/Notes#Default Pacakges|Cygwin Default Pacakges]]&lt;br /&gt;
&lt;br /&gt;
See [[Cygwin/Notes#Recommended Additional Packages|Cygwin Recommended Additional Packages]]&lt;br /&gt;
&lt;br /&gt;
=== Command Line Package Installation ===&lt;br /&gt;
&lt;br /&gt;
NOTE: On Windows 7, the shell has to be &amp;quot;Run As Administrator&amp;quot; to use setup.exe&lt;br /&gt;
&lt;br /&gt;
Install additional packages:&lt;br /&gt;
 # by package:&lt;br /&gt;
 setup.exe -q -P [PACKAGE#1],[PACKAGE#2],[PACKAGE#N]&lt;br /&gt;
&lt;br /&gt;
 # by category:&lt;br /&gt;
 setup.exe -q -C [CATEGORY#1],[CATEGORY#2],[CATEGORY#N]&lt;br /&gt;
&lt;br /&gt;
 # -q - quiet mode, unattended (does not ask questions)&lt;br /&gt;
 # -P - install specific package&lt;br /&gt;
 # -C - install all packages in category&lt;br /&gt;
&lt;br /&gt;
Common packages to install: (within shell)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /install&lt;br /&gt;
ln -s setup-x86_64.exe setup.exe&lt;br /&gt;
&lt;br /&gt;
./setup.exe -q -P cron,\&lt;br /&gt;
cygrunsrv,shutdown,syslog-ng,sharutils,unzip,zip,vim,Perl,Python,bc,\&lt;br /&gt;
units,bind,curl,netcat,nc,nfs-server,openssh,ping,rsync,whois,ipcalc,util-linux,cpio,\&lt;br /&gt;
diffutils,gnupg,screen,time,links,lynx,wget,tree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you get this error, you are probably running Windows 7 with UAC.  Run Cygwin terminal with &amp;quot;Run as administrator&amp;quot;.&lt;br /&gt;
 $ ./setup.exe -q -P wget&lt;br /&gt;
 -bash: ./setup.exe: Permission denied&lt;br /&gt;
&lt;br /&gt;
To just update packages:&lt;br /&gt;
 cd /install&lt;br /&gt;
 ./setup.exe -q&lt;br /&gt;
&lt;br /&gt;
=== Other Useful packages ===&lt;br /&gt;
&lt;br /&gt;
* subversion&lt;br /&gt;
* git&lt;br /&gt;
* mercurial&lt;br /&gt;
&lt;br /&gt;
 ./setup.exe -q -P subversion,git,mercurial&lt;br /&gt;
&lt;br /&gt;
=== Missing Packages or Tools ===&lt;br /&gt;
&lt;br /&gt;
Missing programs:&lt;br /&gt;
* killall&lt;br /&gt;
* nmap&lt;br /&gt;
* ntpdate&lt;br /&gt;
* mail&lt;br /&gt;
* sudo&lt;br /&gt;
* telnet&lt;br /&gt;
&lt;br /&gt;
=== tio ===&lt;br /&gt;
&lt;br /&gt;
 ./setup.exe -q -P gcc-core,make&lt;br /&gt;
&lt;br /&gt;
 wget https://github.com/tio/tio/releases/download/v1.20/tio-1.20.tar.xz&lt;br /&gt;
 tar -avxf tio-1.20.tar.xz&lt;br /&gt;
 cd tio-1.20&lt;br /&gt;
 ./configure&lt;br /&gt;
 make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
 # OR&lt;br /&gt;
&lt;br /&gt;
 ./setup.exe -q -P gcc-core,make,autoconf,automake&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/tio/tio.git&lt;br /&gt;
 cd tio&lt;br /&gt;
 ## sh autogen.sh  # throws errors&lt;br /&gt;
 autoconf&lt;br /&gt;
 ./configure&lt;br /&gt;
 make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
See [[Linux/tio]] for usage.&lt;br /&gt;
&lt;br /&gt;
== services for Cygwin ==&lt;br /&gt;
&lt;br /&gt;
List cygwin services:&lt;br /&gt;
 cygrunsrv -L&lt;br /&gt;
&lt;br /&gt;
Install service:&lt;br /&gt;
 cygrunsrv -I [svc_name] ...&lt;br /&gt;
&lt;br /&gt;
Remove service:&lt;br /&gt;
 cygrunsrv -R [svc_name]&lt;br /&gt;
&lt;br /&gt;
Example server installation (crond):&lt;br /&gt;
 # -I is install with service name&lt;br /&gt;
 # -p is program path&lt;br /&gt;
 # -a is arguments&lt;br /&gt;
 # -d is &amp;quot;Name&amp;quot;&lt;br /&gt;
 # -f is &amp;quot;Description&amp;quot;&lt;br /&gt;
 cygrunsrv -I crond -p /usr/sbin/cron.exe -a &amp;quot;-n&amp;quot; -u Administrator \&lt;br /&gt;
   -d &amp;quot;Cygwin crond service&amp;quot; -f &amp;quot;Cygwin crond service&amp;quot;&lt;br /&gt;
&lt;br /&gt;
See [[Cygwin Notes#cygrunsrv help|cygrunsrv help]]&lt;br /&gt;
&lt;br /&gt;
== syslog for Cygwin ==&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
 Admin - cygrunsrv   # to make windows services&lt;br /&gt;
 Admin - syslog-ng   # syslog service&lt;br /&gt;
 System - util-linux&lt;br /&gt;
&lt;br /&gt;
Important Files:&lt;br /&gt;
 /etc/syslog-ng.conf&lt;br /&gt;
 /var/log/messages&lt;br /&gt;
 /usr/share/doc/syslog-ng/syslog-ng.conf.sample&lt;br /&gt;
&lt;br /&gt;
Start/Stop Service:&lt;br /&gt;
 net start syslog-ng&lt;br /&gt;
 net stop syslog-ng&lt;br /&gt;
&lt;br /&gt;
=== Wizard Install ===&lt;br /&gt;
&lt;br /&gt;
Syslog Installation Wizard:&lt;br /&gt;
 /usr/bin/syslog-ng-config&lt;br /&gt;
&lt;br /&gt;
This will create the /etc/syslog-ng.conf using a simple and clean config file emedded in the syslog-ng-config script (not from syslog-ng.conf.sample).&lt;br /&gt;
&lt;br /&gt;
See [[Cygwin Notes#syslog-ng-config output|syslog-ng-config output]]&lt;br /&gt;
&lt;br /&gt;
See [[Cygwin Notes#syslog-ng.conf default|syslog-ng.conf default]]&lt;br /&gt;
&lt;br /&gt;
=== Manual Install ===&lt;br /&gt;
&lt;br /&gt;
Test service prior to installing Windows service, and fix any issues found:&lt;br /&gt;
 /usr/sbin/syslog-ng.exe&lt;br /&gt;
&lt;br /&gt;
 $ /usr/sbin/syslog-ng.exe&lt;br /&gt;
 Error opening configuration file; filename=&amp;#039;/etc/syslog-ng.conf&amp;#039;, error=&amp;#039;No such&lt;br /&gt;
  file or directory (2)&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Create /etc/syslog-ng.conf:&lt;br /&gt;
* See [[Cygwin Notes#syslog-ng.conf default|syslog-ng.conf default]]&lt;br /&gt;
* or See /usr/share/doc/syslog-ng/syslog-ng.conf.sample&lt;br /&gt;
&lt;br /&gt;
Install syslogd service:&lt;br /&gt;
 # -I is install with service name&lt;br /&gt;
 # -p is program path&lt;br /&gt;
 # -a is arguments&lt;br /&gt;
 # -d is &amp;quot;Name&amp;quot;&lt;br /&gt;
 # -f is &amp;quot;Description&amp;quot;&lt;br /&gt;
 cygrunsrv -I syslogd -p /usr/sbin/syslog-ng -a &amp;quot;-F --fd-limit 256&amp;quot; -d &amp;quot;Cygwin syslogd service&amp;quot; \&lt;br /&gt;
    -f &amp;quot;Cygwin syslogd service&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== sshd for Cygwin ==&lt;br /&gt;
&lt;br /&gt;
=== user creation ===&lt;br /&gt;
&lt;br /&gt;
If you add users, make sure to run: [http://ist.uwaterloo.ca/~kscully/CygwinSSHD_W2K3.html]&lt;br /&gt;
 mkpasswd -l &amp;gt;/etc/passwd&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 # net user root * /add&lt;br /&gt;
 net user root test12 /add&lt;br /&gt;
 net localgroup administrators root /add&lt;br /&gt;
 mkpasswd -l &amp;gt;/etc/passwd&lt;br /&gt;
 mkdir /home/root&lt;br /&gt;
&lt;br /&gt;
=== typical commands ===&lt;br /&gt;
&lt;br /&gt;
Reboot system&lt;br /&gt;
 reboot -r now&lt;br /&gt;
 &lt;br /&gt;
=== Wizard Installation ===&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
 # /usr/bin/ssh-host-config&lt;br /&gt;
 /usr/bin/ssh-host-config -y -w v&lt;br /&gt;
 net start sshd&lt;br /&gt;
 # add users&lt;br /&gt;
&lt;br /&gt;
Typical Answers:&lt;br /&gt;
 yes&lt;br /&gt;
 yes&lt;br /&gt;
 yes&lt;br /&gt;
 &lt;br /&gt;
 no&lt;br /&gt;
 yes&lt;br /&gt;
 v&lt;br /&gt;
 v&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh-host-config --help&lt;br /&gt;
usage:  [OPTION]...&lt;br /&gt;
&lt;br /&gt;
This script creates an OpenSSH host configuration.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
  --debug  -d            Enable shell&amp;#039;s debug output.&lt;br /&gt;
  --yes    -y            Answer all questions with &amp;quot;yes&amp;quot; automatically.&lt;br /&gt;
  --no     -n            Answer all questions with &amp;quot;no&amp;quot; automatically.&lt;br /&gt;
  --cygwin -c &amp;lt;options&amp;gt;  Use &amp;quot;options&amp;quot; as value for CYGWIN environment var.&lt;br /&gt;
  --port   -p &amp;lt;n&amp;gt;        sshd listens on port n.&lt;br /&gt;
  --user   -u &amp;lt;account&amp;gt;  privileged user for service.&lt;br /&gt;
  --pwd    -w &amp;lt;passwd&amp;gt;   Use &amp;quot;pwd&amp;quot; as password for privileged user.&lt;br /&gt;
  --privileged           On Windows NT/2k/XP, require privileged user&lt;br /&gt;
                         instead of LocalSystem for sshd service.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Cygwin Notes#ssh-host-config output|ssh-host-config output]]&lt;br /&gt;
&lt;br /&gt;
ssh-host-config and ssh-user-config&lt;br /&gt;
&lt;br /&gt;
=== Manual Installation ===&lt;br /&gt;
&lt;br /&gt;
 touch /etc/sshd_config&lt;br /&gt;
 echo &amp;quot;UsePrivilegeSeparation no&amp;quot; &amp;gt;&amp;gt; /etc/sshd_config&lt;br /&gt;
 ssh-keygen -t rsa -f /etc/ssh_host_rsa_key&lt;br /&gt;
&lt;br /&gt;
 # run server &lt;br /&gt;
 /usr/sbin/sshd&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ /usr/sbin/sshd&lt;br /&gt;
/etc/sshd_config: No such file or directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fix:&lt;br /&gt;
 touch /etc/sshd_config&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ /usr/sbin/sshd.exe&lt;br /&gt;
Privilege separation user sshd does not exist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fix:&lt;br /&gt;
 echo &amp;quot;UsePrivilegeSeparation no&amp;quot; &amp;gt;&amp;gt; /etc/sshd_config&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ /usr/sbin/sshd.exe&lt;br /&gt;
Could not load host key: /etc/ssh_host_rsa_key&lt;br /&gt;
Could not load host key: /etc/ssh_host_dsa_key&lt;br /&gt;
Disabling protocol version 2. Could not load host key&lt;br /&gt;
sshd: no hostkeys available -- exiting.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fix: (generate host keys)&lt;br /&gt;
 ssh-keygen -t rsa -f /etc/ssh_host_rsa_key&lt;br /&gt;
&lt;br /&gt;
 ssh-keygen.exe -t dsa -f /etc/ssh_host_dsa_key -N &amp;quot;&amp;quot;&lt;br /&gt;
 ssh-keygen.exe -t rsa1 -f /etc/ssh_host_key -N &amp;quot;&amp;quot;&lt;br /&gt;
 ssh-keygen.exe -t rsa -f /etc/ssh_host_rsa_key -N &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
TODO: finish notes&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
* [http://www.noah.org/ssh/cygwin-sshd.html Cygwin SSHD HowTo]&lt;br /&gt;
* [http://www.noah.org/wiki/Sshd_on_Windows Sshd on Windows - Noah.org]&lt;br /&gt;
&lt;br /&gt;
=== Cygwin is alternative to OpenSSH on Windows ===&lt;br /&gt;
&lt;br /&gt;
Network Simplicity - OpenSSH on Windows:&lt;br /&gt;
:&amp;quot;This project is shut down, but Michael Johnson has created a follow-up project to continue the work. You can get information at his [http://sshwindows.sourceforge.net/ website].&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:&amp;quot;This OpenSSH project is shutting down. I no longer have the time to maintain a package that is, for the most part, unnecessary due to improvements in the installation process of [http://www.cygwin.com/ Cygwin]. If you need some starter info on getting an OpenSSH server installed in the cygwin environment try [http://tech.erdelynet.com/cygwin-sshd.html this site], or the cygwin mailing list.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
* [http://www.networksimplicity.com/openssh/ OpenSSH on Windows]&lt;br /&gt;
&lt;br /&gt;
== crond for Cygwin ==&lt;br /&gt;
&lt;br /&gt;
Important Files:&lt;br /&gt;
 * windows crond service (See [[Cygwin Notes#crond registry service|crond registry service]]&lt;br /&gt;
 * /var/cron/tabs/[USER]&lt;br /&gt;
 * /var/log/cron.log&lt;br /&gt;
 * ~/cron.log&lt;br /&gt;
&lt;br /&gt;
=== Tools ===&lt;br /&gt;
&lt;br /&gt;
Create user crontab:&lt;br /&gt;
 crontab -e&lt;br /&gt;
&lt;br /&gt;
See cron log events (including windows event log):&lt;br /&gt;
 /usr/bin/cronevents&lt;br /&gt;
&lt;br /&gt;
Start/Stop service:&lt;br /&gt;
 # service is &amp;#039;cron&amp;#039; if using cygrunsrv&lt;br /&gt;
 # or &amp;#039;crond&amp;#039; if manually&lt;br /&gt;
 net start cron&lt;br /&gt;
 net stop cron&lt;br /&gt;
&lt;br /&gt;
=== Wizard Install ===&lt;br /&gt;
&lt;br /&gt;
Cron service configuration: (See [[Cygwin Notes#cron-config output]])&lt;br /&gt;
 cron-config&lt;br /&gt;
&lt;br /&gt;
Suggestion: rename the &amp;quot;Display Name&amp;quot; to &amp;quot;CYGWIN Cron daemon&amp;quot; to match the &amp;quot;CYGWIN&amp;quot; prefix of the syslog-ng and sshd services.  This will not break the service.  May have to reboot to see the change in the MMC.&lt;br /&gt;
&lt;br /&gt;
Start service:&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
=== Manually Install ===&lt;br /&gt;
&lt;br /&gt;
Run cron first to make sure there are no issues:&lt;br /&gt;
 $ /usr/sbin/cron.exe D&lt;br /&gt;
&lt;br /&gt;
Note: if you do this before running as a service you may get this issue:&lt;br /&gt;
 /usr/sbin/cron: can&amp;#039;t lock /var/run/cron.pid, otherpid may be 3796: Resource temporarily unavailable&lt;br /&gt;
&lt;br /&gt;
Install crond service:&lt;br /&gt;
 # -I is install with service name&lt;br /&gt;
 # -p is program path&lt;br /&gt;
 # -a is arguments&lt;br /&gt;
 # -d is &amp;quot;Name&amp;quot;&lt;br /&gt;
 # -f is &amp;quot;Description&amp;quot;&lt;br /&gt;
 cygrunsrv -I crond -p /usr/sbin/cron.exe -a &amp;quot;-n&amp;quot; -u Administrator \&lt;br /&gt;
   -d &amp;quot;Cygwin crond service&amp;quot; -f &amp;quot;Cygwin crond service&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Start service:&lt;br /&gt;
 net start crond&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
* [http://www.newmedialogic.com/node/33 Installing Cron on Cygwin | New Media Logic]&lt;br /&gt;
* [http://csc.csudh.edu/kleyba/cygwin-cron.pdf cygwin-cron.pdf]&lt;br /&gt;
&lt;br /&gt;
== nmap for Cygwin ==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Download nmap for windows at http://download.insecure.org/nmap/dist/nmap-3.95-win32.zip and extract it at /cygwin/bin. do the command &amp;quot;chmod +x+r nmap.exe&amp;quot; and use it. &amp;quot; [http://www.linuxcompatible.org/Has_anyone_perhaps_got_nmap_working_on_Cygwin_t32982.html]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Download and install Nmap from http://nmap.org/download.html&lt;br /&gt;
# Create a link to namp in the /bin directory:&lt;br /&gt;
 ln -s /cygdrive/c/Program\ Files/Nmap/nmap.exe nmap&lt;br /&gt;
&lt;br /&gt;
== Cygwin/X ==&lt;br /&gt;
&lt;br /&gt;
[http://x.cygwin.com/ Cygwin/X]&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Whether or not you already have Cygwin installed, you can add Cygwin/X to your installation by downloading the latest setup.exe, running setup, and selecting the &amp;#039;xorg-x11-base&amp;#039; package from the &amp;#039;X11&amp;#039; category.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== NFS for Cygwin ==&lt;br /&gt;
&lt;br /&gt;
[http://www.csparks.com/CygwinNFS/index.xhtml Cygwin NFS Server HOWTO]&lt;br /&gt;
&lt;br /&gt;
=== Wizard Installation ===&lt;br /&gt;
&lt;br /&gt;
 nfs-server-config&lt;br /&gt;
&lt;br /&gt;
The available mount points are listed here:&lt;br /&gt;
 /etc/exports&lt;br /&gt;
&lt;br /&gt;
To start NFS after running the nfs-server-config:&lt;br /&gt;
 net start portmap&lt;br /&gt;
 net start nfsd&lt;br /&gt;
 net start mountd&lt;br /&gt;
&lt;br /&gt;
After making changes to /etc/exports:&lt;br /&gt;
 net stop mountd&lt;br /&gt;
 net start mountd&lt;br /&gt;
&lt;br /&gt;
From the client, to show mount points:&lt;br /&gt;
  showmount -e [SERVERHOST]&lt;br /&gt;
&lt;br /&gt;
From the client, to mount a mount point:&lt;br /&gt;
 mount [SERVERHOST]:/cygdrive /mnt/[MOUNTPOINT]&lt;br /&gt;
&lt;br /&gt;
To add cygdrive C:&lt;br /&gt;
 SERVER&lt;br /&gt;
 # ln -s /cygdrive/c /nfs&lt;br /&gt;
 # vi /etc/exports:&lt;br /&gt;
   /nfs (ro,no_root_squash)&lt;br /&gt;
 # net stop mountd ; net start mountd&lt;br /&gt;
 &lt;br /&gt;
 CLIENT (both link or full path work)&lt;br /&gt;
 # mount [SERVERHOST]:/nfs /mnt&lt;br /&gt;
 or&lt;br /&gt;
 # mount [SERVERHOST]:/cygdrive/c /mnt&lt;br /&gt;
 # umount /mnt&lt;br /&gt;
&lt;br /&gt;
== Python pip ==&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
 wget https://bootstrap.pypa.io/get-pip.py&lt;br /&gt;
 python get-pip.py&lt;br /&gt;
&lt;br /&gt;
note: On Cygwin64 it will fail silently.  To get it to work:&lt;br /&gt;
 ./setup.exe -q -P libuuid-devel,binutils&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
 pip install pep8&lt;br /&gt;
 pip install http://sourceforge.net/projects/pychecker/files/pychecker/0.8.19/pychecker-0.8.19.tar.gz/download&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
* python - Pip install not functioning on windows 7 Cygwin install - Stack Overflow - http://stackoverflow.com/questions/21057931/pip-install-not-functioning-on-windows-7-cygwin-install&lt;br /&gt;
* Installation — pip 1.5.6 documentation - https://pip.pypa.io/en/latest/installing.html&lt;br /&gt;
&lt;br /&gt;
== Mercurial ==&lt;br /&gt;
&lt;br /&gt;
== 64bit vs 32bit ==&lt;br /&gt;
&lt;br /&gt;
How to tell which shell you are in?&lt;br /&gt;
&lt;br /&gt;
On a 64bit system, &amp;#039;uname -a&amp;#039; within Cygwin will tell you the architecture of Cygwin, not the system:&lt;br /&gt;
&lt;br /&gt;
64bit Cygwin: (x86_64)&lt;br /&gt;
{noformat}&lt;br /&gt;
$ uname -a&lt;br /&gt;
CYGWIN_NT-10.0 alienware 2.2.1(0.289/5/3) 2015-08-20 11:42 x86_64 Cygwin&lt;br /&gt;
{noformat}&lt;br /&gt;
&lt;br /&gt;
32bit Cygwin: (i686)&lt;br /&gt;
{noformat}&lt;br /&gt;
$ uname -a&lt;br /&gt;
CYGWIN_NT-10.0-WOW alienware 2.2.1(0.289/5/3) 2015-08-20 11:40 i686 Cygwin&lt;br /&gt;
{noformat}&lt;br /&gt;
&lt;br /&gt;
== Mirror ==&lt;br /&gt;
&lt;br /&gt;
Mirror cygwin:&lt;br /&gt;
 rsync -avrt rsync://mirrors.kernel.org/sourceware/cygwin/ .&lt;br /&gt;
&lt;br /&gt;
List of Mirrors - https://cygwin.com/mirrors.html#mirroradmin&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
&lt;br /&gt;
=== cygwin1.dll was not found ===&lt;br /&gt;
&lt;br /&gt;
Error:&lt;br /&gt;
 bash.exe - Unable To Locate Component&lt;br /&gt;
 &lt;br /&gt;
 This application has failed to start because cygwin1.dll was not found.&lt;br /&gt;
 Re-installing the application may fix this problem.&lt;br /&gt;
&lt;br /&gt;
This dll should be in the C:\cygwin\bin folder.  If it is not, then the installation was corrupt.  To resolve, delete the Cygwin folder and reinstall Cygwin.&lt;br /&gt;
&lt;br /&gt;
=== vim in Cygwin sucks ===&lt;br /&gt;
&lt;br /&gt;
Try using the .vimrc to bring it to Linux standards.  See [[vim]]&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
See [[Cygwin/Notes]]&lt;br /&gt;
&lt;br /&gt;
== keywords ==&lt;/div&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
</feed>