Hot gas in and between galaxies