If you refuse to use a GUI, I guess you could also create the profile line by using project.
E.g.
gmt project -C20/70 -E-8/78 -G10 -Q
where
-
-Cis starting point -
-Eis end point -
-G10is sampling -
-Qspecifies that sampling is in kilometer
I think.