1. Access windows disk in Cygwin
Cd/cygdrive/c
CD C:
2. Consolidate Cygwin commands into Windows
Assuming that Cygwin is installed in D:/develop/cygwin, add D:/develop/cygwin/bin to the system variable path (preferably in front of windows, so that some of the same commands are executed with the Cygwin command first, Instead of Windows commands, such as Find)
You can execute the tar czvf xxx.tgz directly below the cmd.exe.
Basically all the commands are available, including ls,more,less,find,grep and so on.
3. Using tgz Backup
Add the Cygwin bin to the path
Build a BAT file:
@echo off
D:
CD D:\website\8thmanage
Tar czvf 8thmanage.tgz 8thmanage
4.Windows using shell scripts
Add the Cygwin bin to the path
In the $cygwin directory/var/a script t.sh, note that t.sh inside the path, are relative to the $cygwin, the inside need to access the C drive, please use/cygdrive/c/
Under Windows execution:
D:\cygwin\bin\bash d:\cygwin\var\t.sh
(Can be performed on a regular basis)
5. Synchronizing Windows system users
Mkpasswd-l >/etc/passwd
Mkgroup-l >/etc/group
If you have domain, you need to add-D domainname
6. Installing System Services
Cygrunsrv
Using rsync under 7.cygwing
A. Installing the Rsync component
B. Enter Cygwin, configure the server
Vi/etc/rsyncd.conf
... screts File=/etc/tom.ipaddr.pas
Configuration file, refer to another article I wrote about rsync, note: Password file permissions must be 0400
chmod 0400/etc/tom.ipaddr.pas
C. Start the service side
Rsync--daemon
D. Client synchronization
Under the client's Cygwin, run rsync sync, specific commands, please refer to another rsync article.
Using sshd under 8.cygwin
A. Need to install the CYGRUNSRC,OPENSSH
B. Running Ssh-host-config-y
Return to the cygwin=, enter the TTY Ntsec, and return to the
(or, add a system environment variable cugwin=nesec TTY)
C. The SSHD service has been installed into your Windows service and can be started and shut down directly in the service.
(Cygrunsrc-s sshd or net start sshd)
9. Chinese display
VI ~/.BASHRC
# Let LS and dir command display Chinese and color
Alias ls= ' ls--show-control-chars--color '
Alias dir= ' Dir-n--color '
# Set the Chinese environment so that the hint becomes Chinese
Export lang= "ZH_CN. GBK "
# Output to Chinese encoding
Export output_charset= "GBK"
~/.INPUTRC for
Set Completion-ignore-case on
Set Meta-flag on
Set Output-meta on
Set Convert-meta off
The Cygwin.bat script is:
@echo off
Set Make_mode=unix
Cygwin use of the experience reproduced