You can use the pointing device or enter coordinate values on the command line.
To undo the previous line segment during the Line command, enter U or click Undo on the toolbar.