⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setup2.sgml

📁 cygwin, 著名的在win32下模拟unix操作系统的东东
💻 SGML
字号:
<sect1 id="setup-env"><title>Environment Variables</title><para>Before starting bash, you may set some environment variables.  A .batfile is provided where the most important ones are set before bash inlaunched.  This is the safest way to launch bash initially.  The .batfile is installed in the root directory that you specified during setupand pointed to in the Start Menu under the "Cygwin" option.  You canedit it this file your liking.</para><para>The <envar>CYGWIN</envar> variable is used to configure many globalsettings for the Cygwin runtime system.  Initially you can leave<envar>CYGWIN</envar> unset or set it to <literal>tty</literal> (e.g.to support job control with ^Z etc...) using a syntax like this in theDOS shell, before launching bash.  </para><screen><prompt>C:\&gt;</prompt> <userinput>set CYGWIN=tty notitle glob</userinput></screen><para>The <envar>PATH</envar> environment variable is used by Cygwinapplications as a list of directories to search for executable filesto run.  This environment variable is converted from Windows format(e.g. <filename>C:\WinNT\system32;C:\WinNT</filename>) to UNIX format(e.g., <filename>/WinNT/system32:/WinNT</filename>) when a Cygwinprocess first starts.Set it so that it contains at least the <filename>x:\cygwin\bin</filename>directory where "<filename>x:\cygwin</filename> is the "root" of yourcygwin installation if you wish to use cygwin tools outside of bash.</para><para> The <envar>HOME</envar> environment variable is used by many programs todetermine the location of your home directory and we recommend that it bedefined.  This environment variable is also converted from Windows formatwhen a Cygwin process first starts.  Set it to point to your home directorybefore launching bash. </para><para>The <envar>TERM</envar> environment variable specifies your terminaltype.  It is automatically set to <literal>cygwin</literal> if you havenot set it to something else.</para><para>The <envar>LD_LIBRARY_PATH</envar> environment variable is used bythe Cygwin function <function>dlopen ()</function> as a list ofdirectories to search for .dll files to load.  This environment variableis converted from Windows format to UNIX format when a Cygwin processfirst starts.  Most Cygwin applications do not make use of the<function>dlopen ()</function> call and do not need this variable.</para></sect1><sect1 id="setup-files"><title>Customizing bash</title><para>To set bash up so that cut and paste work properly, click on the"Properties" button of the window, then on the "Misc" tab.  Make surethat "Quick Edit" is checked and "Fast Pasting" isn't.  These settingswill be remembered next time you run bash from thatshortcut. Similarly you can set the working directory inside the"Program" tab. The entry "%HOME%" is valid.</para><para>Your home directory should contain three initialization filesthat control the behavior of bash.  They are<filename>.profile</filename>, <filename>.bashrc</filename> and<filename>.inputrc</filename>.  These initialization files will onlybe read if <envar>HOME</envar> is defined before starting bash.</para><para><filename>.profile</filename> (other names are also valid, see the bash manpage) contains bash commands.  It is executed when bash is started as loginshell, e.g. from the command <command>bash --login</command> (the provided.bat file does not set the switch).  This is a useful place to define andexport environment variables and bash functions that will be used by bashand the programs invoked by bash.  It is a good place to redefine<envar>PATH</envar> if needed.  We recommend adding a ":." to the end of<envar>PATH</envar> to also search the current working directory (contraryto DOS, the local directory is not searched by default).  Also to avoiddelays you should either <command>unset</command> <envar>MAILCHECK</envar> or define <envar>MAILPATH</envar> to point to your existing mail inbox.</para><para><filename>.bashrc</filename> is similar to<filename>.profile</filename> but is executed each time an interactivebash shell is launched.  It serves to define elements that are notinherited through the environment, such as aliases. If you do not uselogin shells, you may want to put the contents of<filename>.profile</filename> as discussed above in this fileinstead.</para><para><screen>shopt -s nocaseglob</screen>will allow bash to glob filenames in a case-insensitive manner.Note that <filename>.bashrc</filename> is not called automatically for login shells. You can source it from <filename>.profile</filename>.</para><para><filename>.inputrc</filename> controls how programs using the readlinelibrary (including bash) behave.  It is loaded automatically.  Thefull details are in the <filename>readline.info</filename>. Due to a bug in the current readline version, <filename>.inputrc</filename> cannot contain \r,even on text mounted systems.Consider the following settings:<screen># Make Bash 8bit cleanset meta-flag onset convert-meta offset output-meta on# Ignore case while completingset completion-ignore-case on</screen>The first three commands allow bash to display 8-bit characters,useful for languages with accented characters.  The last line makesfilename completion case insensitive, which can be convenient in aWindows environment.</para></sect1>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -