没有合适的资源?快使用搜索试试~ 我知道了~
首页Cygwin User Guide(PDF)
Cygwin User Guide(PDF)
5星 · 超过95%的资源 183 下载量 161 浏览量
更新于2023-03-03
评论
收藏 602KB PDF 举报
Cygwin是Windows下的一个类Linux环境,可在Windows下进行Linux学习及编程,提供了大多数Linux操作。<br>本手册是Cygwin官方的用户指南,pdf版本,全标签,不过是英文版!
资源详情
资源评论
资源推荐
Cygwin User’s Guide
Cygwin User’s Guide
Copyright (c) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
Table of Contents
1. Cygwin Overview.............................................................................................................1
What is it?......................................................................................................................1
Quick Start Guide for those more experienced with Windows.............................1
Quick Start Guide for those more experienced with UNIX...................................1
Are the Cygwin tools free software? .........................................................................2
A brief history of the Cygwin project........................................................................2
Highlights of Cygwin Functionality..........................................................................3
Introduction.........................................................................................................3
Supporting both Windows NT and 9x ............................................................3
Permissions and Security ..................................................................................4
File Access............................................................................................................4
Text Mode vs. Binary Mode ..............................................................................5
ANSI C Library ...................................................................................................5
Process Creation..................................................................................................5
Signals ..................................................................................................................6
Sockets..................................................................................................................6
Select.....................................................................................................................7
2. Setting Up Cygwin ...........................................................................................................9
Internet Setup................................................................................................................9
Download Source ...............................................................................................9
Selecting an Install Directory ............................................................................9
Local Package Directory ..................................................................................10
Connection Method..........................................................................................10
Choosing Mirrors..............................................................................................10
Choosing Packages...........................................................................................10
Download and Installation Progress .............................................................11
Icons....................................................................................................................11
Post-Install Scripts ............................................................................................11
Environment Variables ..............................................................................................11
Changing Cygwin’s Maximum Memory................................................................12
NT security and usage of ntsec...............................................................................13
NT security ........................................................................................................13
Process privileges .............................................................................................15
File permissions ................................................................................................15
NT SIDs in Cygwin ..........................................................................................17
The mapping leak .............................................................................................18
The ACL API .....................................................................................................19
New setuid concept..........................................................................................20
Switching User Context ...................................................................................22
Special values of user and group ids .............................................................22
Customizing bash.......................................................................................................23
3. Using Cygwin..................................................................................................................25
Mapping path names.................................................................................................25
Introduction.......................................................................................................25
The Cygwin Mount Table................................................................................25
Additional Path-related Information.............................................................26
Text and Binary modes ..............................................................................................26
The Issue ............................................................................................................26
The default Cygwin behavior .........................................................................27
Example..............................................................................................................27
Binary or text? ...................................................................................................28
Programming ....................................................................................................28
File permissions..........................................................................................................29
Special filenames ........................................................................................................29
DOS devices.......................................................................................................29
POSIX devices ...................................................................................................29
The .exe extension.............................................................................................31
iii
The /proc filesystem ........................................................................................31
The @pathnames...............................................................................................31
The CYGWIN environment variable.......................................................................32
Cygserver ....................................................................................................................33
What is Cygserver?...........................................................................................33
Cygserver command line options ..................................................................34
How to start Cygserver....................................................................................35
How to use the Cygserver services................................................................36
The Cygserver configuration file....................................................................36
Cygwin Utilities..........................................................................................................37
cygcheck.............................................................................................................37
cygpath...............................................................................................................38
dumper...............................................................................................................39
getfacl .................................................................................................................40
kill .......................................................................................................................40
mkgroup.............................................................................................................42
mkpasswd..........................................................................................................42
mount .................................................................................................................44
passwd................................................................................................................46
ps.........................................................................................................................47
regtool.................................................................................................................48
setfacl..................................................................................................................49
ssp .......................................................................................................................51
strace...................................................................................................................53
umount...............................................................................................................54
Using Cygwin effectively with Windows...............................................................54
Pathnames..........................................................................................................55
Console Programs.............................................................................................55
Cygwin and Windows Networking...............................................................55
The cygutils package........................................................................................56
Creating shortcuts with cygutils ....................................................................56
Printing with cygutils ......................................................................................56
4. Programming with Cygwin ..........................................................................................59
Using GCC with Cygwin ..........................................................................................59
Console Mode Applications............................................................................59
GUI Mode Applications...................................................................................59
Debugging Cygwin Programs..................................................................................61
Building and Using DLLs .........................................................................................62
Building DLLs ...................................................................................................62
Linking Against DLLs......................................................................................63
Defining Windows Resources...................................................................................63
iv
Chapter 1. Cygwin Overview
What is it?
Cygwin is a Linux-like environment for Windows. It consists of a DLL
(cygwin1.dll), which acts as an emulation layer providing substantial POSIX
1
(Portable Operating System Interface) system call functionality, and a collection
of tools, which provide a Linux look and feel. The Cygwin DLL works with all
x86 versions of Windows since Windows 95. The API follows the Single Unix
Specification
2
as much as possible, and then Linux practice. Two other major
differences between Cygwin and Linux are the C library (newlib instead of glibc)
and default /bin/sh, which is ash on Cygwin but bash on most Linux distributions.
With Cygwin installed, users have access to many standard UNIX utilities. They can
be used from one of the provided shells such as bash or from the Windows Command
Prompt. Additionally, programmers may write Win32 console or GUI applications
that make use of the standard Microsoft Win32 API and/or the Cygwin API. As a
result, it is possible to easily port many significant UNIX programs without the need
for extensive changes to the source code. This includes configuring and building most
of the available GNU software (including the development tools included with the
Cygwin distribution).
Quick Start Guide for those more experienced with Windows
If you are new to the world of UNIX, you may find it difficult to understand at first.
This guide is not meant to be comprehensive, so we recommend that you use the
many available Internet resources to become acquainted with UNIX basics (search
for "UNIX basics" or "UNIX tutorial").
To install a basic Cygwin environment, run the setup.exe program and click Next
at each page. The default settings are correct for most users. If you want to know
more about what each option means, see the Section called Internet Setup in Chapter
2. Use setup.exe any time you want to update or install a Cygwin package. If you
are installing Cygwin for a specific purpose, use it to install the tools that you need.
For example, if you want to compile C++ programs, you need the gcc-g++ package
and probably a text editor like nano. When running setup.exe, clicking on categories
and packages in the package installation screen will provide you with the ability to
control what is installed or updated.
Another option is to install everything by clicking on the Default field next to the
All category. However, be advised that this will download and install several hun-
dreds of megabytes of software to your computer. The best plan is probably to click
on individual categories and install either entire categories or packages from the cat-
egories themselves. After installation, you can find Cygwin-specific documentation
in the /usr/share/doc/Cygwin/ directory.
Developers coming from a Windows background will find a set of tools capable of
writing console or GUI executables that rely on the Microsoft Win32 API. The dlltool
utility may be used to write Windows Dynamically Linked Libraries (DLLs). The
resource compiler windres is also provided. All tools may be used from the Microsoft
command prompt, with full support for normal Windows pathnames.
Quick Start Guide for those more experienced with UNIX
If you are an experienced UNIX user who misses a powerful command-line envi-
ronment, you will enjoy Cygwin. Note that there are some workarounds that cause
Cygwin to behave differently than most UNIX-like operating systems; these are de-
1
剩余69页未读,继续阅读
mengzyou
- 粉丝: 15
- 资源: 15
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 2023年中国辣条食品行业创新及消费需求洞察报告.pptx
- 2023年半导体行业20强品牌.pptx
- 2023年全球电力行业评论.pptx
- 2023年全球网络安全现状-劳动力资源和网络运营的全球发展新态势.pptx
- 毕业设计-基于单片机的液体密度检测系统设计.doc
- 家用清扫机器人设计.doc
- 基于VB+数据库SQL的教师信息管理系统设计与实现 计算机专业设计范文模板参考资料.pdf
- 官塘驿林场林防火(资源监管)“空天地人”四位一体监测系统方案.doc
- 基于专利语义表征的技术预见方法及其应用.docx
- 浅谈电子商务的现状及发展趋势学习总结.doc
- 基于单片机的智能仓库温湿度控制系统 (2).pdf
- 基于SSM框架知识产权管理系统 (2).pdf
- 9年终工作总结新年计划PPT模板.pptx
- Hytera海能达CH04L01 说明书.pdf
- 数据中心运维操作标准及流程.pdf
- 报告模板 -成本分析与报告培训之三.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论4