osm2pgrouting -file "/home/user/OSM/sample.osm" -conf "/home/user/osm2pgrouting/mapconfig.xml" -dbname pgrouting2 -user user -host localhost -clean
The previous command is a single line. and when using this one, "option '--conf' cannot be specified more than once" error is given by ubuntu.