This tutorial explains how to use the Line Segment tool (forward slash / hotkey) to draw perfectly straight lines. You can create lines by clicking and dragging, holding Shift to snap to 45-degree angles, or by clicking the artboard to manually input the length and angle of the line.