If possible, the EPSG code of the current location should be used with the srs option to avoid unnecessary reprojection.
When using GDAL WMS driver (driver=WMS_GDAL), the GDAL library needs to be built with WMS support, see GDAL WMS manual page for details.
# Topographic WMS with OpenStreetMap by mundialis r.in.wms -c url="http://ows.mundialis.de/services/service?" r.in.wms -c url="http://ows.mundialis.de/services/service?" | grep Name # Czech WMS r.in.wms -c url="http://wms.cuzk.cz/wms.asp"
# OSM, using WMS_GRASS driver g.region n=90 s=-90 w=-180 e=180 res=0:10:00 -p r.in.wms url="http://watzmann-geog.urz.uni-heidelberg.de/cached/osm" layers=osm_auto:all output=osm format=png r.info osm
# OSM Overlay WMS (can be used as an overlay for other maps) r.in.wms url="http://ows.mundialis.de/services/service?" layer=OSM-Overlay-WMS output=osm_overlay format=png # TOPO-OSM-WMS r.in.wms url="http://ows.mundialis.de/services/service?" layer=TOPO-OSM-WMS output=topo_osm format=png r.info topo_osm # TOPO-WMS r.in.wms url="http://ows.mundialis.de/services/service?" layer=TOPO-WMS output=topo format=png r.info topo
More OSM WMS servers can be found online, e.g. on the OSM wiki in a OSM WMS Servers list and on the OSM-WMS-EUROPE page.
# using WMS_GRASS driver r.in.wms url="http://www2.demis.nl/WMS/wms.asp" layers=Countries,Borders,Coastline output=countries srs=4326 format=png r.info countries
# North Carolina sample data g.region raster=elevation -p # using WMS_GRASS driver r.in.wms url="https://tiles.maps.eox.at/wms?" layers=s2cloudless output=sentinel2 format=png r.info sentinel2
# using WMTS_GRASS driver r.in.wms url="http://gpp3-wxs.ign.fr/yourAPIkey/geoportail/wmts" layers=ORTHOIMAGERY.ORTHOPHOTOS \ output=orthophoto srs=3857 format=jpeg driver=WMTS_GRASS style=normal password="*" username="*" r.info orthophoto
# using WMS_GRASS driver r.in.wms url="http://wms.cuzk.cz/wms.asp" layers=prehledka_kraju-linie srs=4326 output=kn format=png
# using WMTS_GRASS driver r.in.wms url="http://geoportal.cuzk.cz/WMTS_ORTOFOTO/WMTService.aspx" layers=orto output=orthophoto \ srs=3857 format=jpeg driver=WMTS_GRASS style=default r.info orthophoto
# get WMS layer list r.in.wms -c url="http://cidportal.jrc.ec.europa.eu/copernicus/services/ows/wms/public/core003?" r.in.wms -c url="http://cidportal.jrc.ec.europa.eu/copernicus/services/ows/wms/public/core003?" | grep Name # spatial subset of Europe # enlarging maxcols and maxrows in order to minimize impact of copyright notice in map g.region n=56 s=47 w=5 e=16 res=0:00:10 -pa # using WMS_GRASS driver r.in.wms url="http://cidportal.jrc.ec.europa.eu/copernicus/services/ows/wms/public/core003?" \ layer="OI.Mosaic.NaturalColor.Feathering" output="jrc_copernicus_core003_mosaik" \ maxcols=3400 maxrows=3400 r.info jrc_copernicus_core003_mosaik # Alternatively, using WMS_GDAL driver with BIGTIFF and compression enabled r.in.wms url="http://cidportal.jrc.ec.europa.eu/copernicus/services/ows/wms/public/core003?" \ layer="OI.Mosaic.NaturalColor.Feathering" output="jrc_copernicus_core003_mosaik2" \ maxcols=3400 maxrows=3400 driver=WMS_GDAL gdal_createopt="BIGTIFF=YES,COMPRESS=DEFLATE" r.info jrc_copernicus_core003_mosaik2
See also WMS support in wxGUI.