window下cygwin完全卸载办法

具体步骤如下:

1.删除安装用的临时文件夹(在cygwin里输入命令)

$ rm -f /cygdrive/c/你的临时文件夹

2.停止cron service

$ cygrunsrv --stop cron

$ cygrunsrv --remove cron

3.停止并删除inetd服务

$ net stop inetd

$/usr/sbin/inetd --remove-as-service

4.删除安装文件夹,默认是c:/cygwin

5.删除桌面上的icon,和开始菜单里的启动文件夹

6.删除注册表里的相关项

HKEY_LOCAL_MACHINE/SOFTWARE/Cygnus Solutions

HKEY_CURRENT_USER/Software/Cygnus Solutions

7.删除环境变量(PATH, CYGWIN)

环境变量PATH里的c:/cygwin/bin; 还有名叫CYGWIN的变量

 

 

 

==================cygwin官方的分割线==================

 

 

 

Cygwin目录及文件的删除 (2007-10-19 00:13:48)

今天整理下硬盘里乱七八糟的东西,太乱太多不好整理,删除一些东西。看到以前保存的网页才想到有个问题还没解决——还没把cygwin删掉。这个cygwin目录还是几年前装的,XP重装N次了,小天鹅也重装过几次,都用同一个目录。

原文章在这里,一样的问题:

Hi,
    I installed cygwin a few months ago(installed on XP). I reinstalled WindowsXP recently. But there are some files in cygwin installation
directory can be deleted. Could somebody help me?
Best wishes,
Peng

cygwin官方的Larry Hall给出了回答

  Presumably, you reinstalled XP but left the previously
installed Cygwin intact. 

  So now it's possible you have files that were installed via Cygwin originally with a user/uid that doesn't exist on your Windows system anymore.
  A "Cygwin" way to resolve this would be to 'chown' of all
your files to a uid that exists for your new installation.
You should be able to manipulate the files as that user.
  Alternatively, you could change the uid (not your SID!) of
your user in your /etc/passwd file to correspond with your
old uid. 

  Finally, you could take ownership of the Cygwin
tree using the Windows security property tab.  I expect
you could find other ways to solve this problem too. ;-)

 

也看了别人的文章

一般故障表现:
以用户X登陆机器并安装了cygwin后,用户Y或者域用户Z登陆该机器后无法删除cygwin及其子目录文件。
解决办法:
1。原安装用户不是管理员用户,可以以原安装用户登陆将需要做删除操作的用户加入完全访问权限或者加入所有者列表。
2。以系统管理员登陆将需要做删除操作的用户加入所有者列表。

 

  问题解决了。

 

 这个问题告诉我们,不管你遇到什么问题(困难),肯定有人在你之前就遇到过了,肯定就有解决的办法,因此要正视困难,并解决之。

你可能感兴趣的:(WSN)