Cygwin configuration in win7

Source: Internet
Author: User

OS: Windows 7

1. Download setup.exe from [url] www.cywin.com [/url] to install the boot program

2. Double-click setup.exe to start installation.

3. Select install source for Internet (if there is a software package downloaded from Internet last time, you can select install for local directory to select the directory to store)

4. Define the installation directory c:/cygwin (1) install for: all users (2) default text file type: Unix/binary

5. Define the directory where the downloaded software is stored (you can use the downloaded package to install it from the local hard disk next time). G:/download/cywin

6. Select the type of connection to the Internet.

7. Select an image download site

8. Select the installation package

(1) Select cygrunsrv in admini.

(2) Select cygwin-doc in Doc.

(3) Select OpenSSH in. net.

9. cywin automatically downloads and installs the selected software package.

10. Add the variable cygwin = ntsec to my computer> Properties> advanced> environment variables,

Add the cygwin/bin path to the path environment variable, for example:; C:/cygwin/bin

11. Double-click the cywin icon installed on Windows to start cywin.

Copying skeleton files.
These files are for the user to personalise
Their cygwin experience.

These will never be overwritten.

'./. Bashrc'->'/home/Administrator //. bashrc'

'./. Bash_profile'-> '/home/Administrator //. bash_profile'
'./. Inputrc'->'/home/Administrator //. inputrc'

12. Authorize the file to complete sshd service installation

Chmod + R/etc/group
Chmod + R/etc/passwd
Chmod + rwx/var

13. Install the sshd service

$ Ssh-host-config

Detailed installation steps and input parameters are as follows:

Copying skeleton files.

These files are for the user to personalise

Their cygwin experience.

These will never be overwritten.

'./. Bashrc'->'/home/Administrator //. bashrc'

'./. Bash_profile'-> '/home/Administrator //. bash_profile'

'./. Inputrc'->'/home/Administrator //. inputrc'

Administrator @ backup ~

$Chmod + R/etc/group # File Permission

Administrator @ backup ~

$Chmod + R/etc/passwd # File Permission

Administrator @ backup ~

$Chmod + rwx/var/# File Permission

Administrator @ backup ~

$Ssh-host-config # guide SSH service configuration

* ** Info: generating/etc/ssh_host_key

* ** Info: generating/etc/ssh_host_rsa_key

* ** Info: generating/etc/ssh_host_dsa_key

* ** Info: Creating default/etc/ssh_config File

* ** Info: Creating default/etc/sshd_config file

* ** Info: Privilege Separation is set to yes by default since OpenSSH 3.3.

* ** Info: However, this requires a non-privileged account called 'sshd '.

* ** Info: for more info on Privilege Separation read/usr/share/doc/OpenSSH/readme. privsep.

* ** Query: Should Privilege Separation be used? (Yes/No)Yes # Enter Yes

* ** Info: updating/etc/sshd_config file

* ** Warning: the following functions require administrator privileges!

* ** Query: Do you want to install sshd as a service?

* ** Query: (say "no" if it is already installed as a Service) (Yes/No)
Yes # Enter Yes

* ** Info: note that the cygwin variable must contain at least "ntsec"

* ** Info: For sshd to be able to change user context without password.

* ** Query: Enter the value of cygwin for the daemon: [ntsec]
Ntsec # Enter ntsec

* ** Info: on Windows Server 2003, Windows Vista, and above,

* ** Info: system account cannot setuid to other users -- a capability

* ** Info: sshd requires. You need to have or to create a privileged

* ** Info: account. This script will help you do so.

* ** Info: You appear to be running Windows 2003 Server or later. On 2003 and

* ** Info: Later systems, it's not possible to use the LocalSystem account

* ** Info: for services that can change the user ID without an explicit Password

* ** Info: (such as passwordless logins [e.g. Public Key Authentication] via sshd ).

* ** Info: If you want to enable that functionality, it's required to create a new

* ** Info: account with special privileges (unless a similar account already exists ).

* ** Info: This account is then used to run these special servers.

* ** Info: note that creating a new user requires that the current account have

* ** Info: Administrator privileges itself.

* ** Info: no privileged account cocould be found.

* ** Info: This script plans to use 'cyg _ Server '.

* ** Info: 'cyg _ Server' will only be used by registered services.

* ** Query: Do you want to use a different name? (Yes/No)
No # enter NO and do not specify the user to start

* ** Query: Create new privileged user account 'cyg _ Server '? (Yes/No)
No # enter NO and do not specify the user to start

* ** Error: there was a serious problem creating a privileged user.

* ** Query: do you want to proceed anyway? (Yes/No)
Yes # Enter Yes

* ** Warning: Expected privileged user 'cyg _ Server' does not exist.

* ** Warning: defaulting to 'system'

* ** Info: the sshd service has been installed under the LocalSystem

* ** Info: Account (also known as system). To start the service now, call

* ** Info: 'net start sshd' or 'cygrunsrv-s sshd'. Otherwise, it

* ** Info: will start automatically after the next reboot.

* ** Info: Host Configuration finished. Have fun!

Administrator @ backup ~

$Cygrunsrv.exe-s sshd # Start the SSH service

14. After the installation is complete, check whether the cygwin sshd service exists in the system service and no startup account.

15. Check whether the System user sshd is enabled and belongs to the Administrator group.

16. Everything works. You can start the SSH service. the username and password used for Logon are sshd and sshd.

Note: use Windows User Local Authentication

Mkpasswd-L>/etc/passwd use the password of a Windows User

Mkgroup-L>/etc/group use Windows User Group

Link: http://nails.blog.51cto.com/640492/144025

Cygwin: http://www.cygwin.cn/site/install/


[Latest update 2011-12-10] How to Use cygwin to learn Linux programming in windows.

Two methods are better. One is to directly install a Linux operating system such as Ubuntu, and the other is to install cygwin on Windows.

Some people may think that the former is very difficult, because a lot of things must be carried out in windows. However, I think, as long as you get used to it, Linux is also very easy to use. It is quite good to install a virtual machine in vbox and use it occasionally. (This method is recommended to get used to Linux)

In addition, do some people think Ubuntu cannot be installed on a virtual machine in windows? My test result is that a large memory is required. In the case of the same small memory size, installing Windows XP on a virtual machine is smoother than running ubuntu11.10.

The procedure is as follows:

Install cygwin. Note that if you choose to use it for development, you need to select some libraries, such as GCC, make, and GDB. A simpler method is to complete the installation, so that some packages will be used in the future. As shown in:


This package is the most comprehensive, so it is about 800 mb after download. You need to wait for a while.

After cygwin is installed, you can test it in the command line.
Gcc-V

In Windows, you can download eclipse integrated with the c ++ development environment on the eclipse official website, which is very convenient to use! Recommended!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.