cygwin下安裝c語言開發環境


1、到官網cygwin.com下載安裝程序。

2、添加清華的cygwin鏡像:https://mirrors.tuna.tsinghua.edu.cn/cygwin/

3、在安裝:vim,git,gcc,g++,make

4、到kernel.org下載文檔:https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/Archive/

5、修改默認HOME目錄,在我的電腦->環境變量中添加“HOME"變量,並把值設為修改后的目錄。

6、完畢

附錄:How to change cygwin hostname

Cygwin reads the host name from Windows. On Windows 7 (instructions will be similar for other versions of Windows) you can change this by doing the following:

  1. Open Control Panel
  2. Click System and Security
  3. Click System
  4. Under "Computer name, domain, and workgroup settings", click Change Settings
  5. Next to "To rename this computer…" click "Change…"
  6. Enter your desired host name in the "Computer name" box then click OK twice.

To simply change the Bash prompt, however, you don't need to jump through those hoops. The Bash prompt is controlled by the PS1 environment variable, and there're extensive instructions in the Bash man pages under "Prompting".

For example, to temporarily set your Bash prompt to Howdy>, you can use the following command:

PS1='Howdy> '

While to set it whenever you restart the Bash shell, use the following to add it to your .bashrc file (which is run whenever Bash is started).

echo 'PS1="Howdy> "' >>~/.bashrc


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM