Skip to main content

How to move an existing Cygwin installation

Although Cygwin is a self-contained installation with little in the way of the normal tendrils hooked into the dark shady corners of Windows there are a few hidden catches to moving an existing installation.

Cygwin creates a number of mount points for your drives, and it's these that cause the problems when you move your installation directory around.

Here are the steps to move your Cygwin installation:
  1. Save off existing mount points
    mount -m > /usr/bin/mountCommands.bat

  2. Unmount existing mount points
    umount -A

  3. Copy Cygwin directory to new home

  4. Update any Windows shortcuts & Start Menu items

  5. Update the Cgywin path within $CYGWIN_HOME/cygwin.bat

  6. Update mount points within $CYGWIN_HOME/bin/mountCommands.bat

  7. Re-mount to new location
    • Start Cygwin
    • ./mountCommands.bat
    • Close Cygwin

  8. Restart Cygwin, and carry on with life

This tip was compiled from information about Backup Your Cygwin installation

Technorati Tags: , , , , , , ,

Comments

Charles Stepp said…
This is primo info.

I might yet survive the corporate lockdown.
Anonymous said…
For windows you probably want to do a scan on your registry also to catch the file explorer context menu and installer path.
Kartar Saxena said…
Thanks Andy! This really did help me out. My Cygwin install size was 4.4 Gigs & it took me 25 minutes just to copy it from 1 drive to the other. Uninstall & install would have taken 3 hours at least. Appreciate your help.
Bogdan said…
Thank you, it worked like a charm.
Bogdan said…
Thank you, it worked like a charm and saved me a lot of time.