For installing Git on a Windows operating system, first download it from this page Download Git for 64 bit and 32 bit Windows OS and then follow the instructions on this page except the first step Step wise instructions to install Git on Windows
Determine on which Linux distribution your system is based on. See List of Linux distributions – Wikipedia for a list. Most Linux systems – including Ubuntu – are Debian-based.