3

Having the need to use a bash shell on a Windows computer (I'll spare you the details), I installed Cygwin, and a friend as a joke ran rm /usr/bin/rm on the terminal, and surprisingly nothing much happened other than rm being removed.

Is there any way to get back the rm program on Cygwin, or for that matter any distribution of Linux? As far as I know, there isn't any rm package on Red Hat or Debian systems I can reinstall.

3

rm is part of coreutils. So re-install that.

Cygwin doesn't have a fully-featured package manager, but you should be able to rerun setup*.exe (i.e. the original installer - it remembers your packages) to re-select coreutils.

  • Thank you for your answer, it definitely answers how to get back rm in a Linux distribution. However, is there any way to do so in Cygwin (which does not appear to have package management)? – Davidson Chua Dec 3 '13 at 6:00
  • That works, thank you! Also, reinstall needs to be selected for coreutils, or the installer will just say everything is already installed. EDIT: Thanks for adding that in! – Davidson Chua Dec 3 '13 at 6:03
1

The rm in most Linux distros, and I think Cygwin as well, comes from GNU Coreutils. In my OS, and probably Cygwin, there is a package simply called coreutils that contains all of these programs.

  • You are correct, thank you! For Cygwin, setup.exe needs to be run again. – Davidson Chua Dec 3 '13 at 6:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.