You can find the Photoshop ruler tool in the toolbar though the location, great for measuring distances and angles
Layers panel, info panel and measurement log panel are useful. The layers panel for the straighten option, info for the same data that is displayed along the control bar, measurement log for the storage of the data fr and you can find more about that in the log notes, you can record the details for each apply. The most useful line is along the control bar where you can see the X and Y start position as well as the width and height (not the end point but the difference between them) along with the angle (A) and L1 (length).
Draw it on the document, it is not added to the document's image itself it is just an interactive display. You can draw it from the start point to the end point and you can then see from the top bar that the length is 250 pixels etc as well as the angle of the line is -45 degrees etc. You can move the points. You can have only one of these objects at a time (there is also a second line for the L2). You can select the line and re-position it. You can use it to find the distance between all kinds of different things such as dots, gradient stops, star designs, shape layers, markings and more
Draw from one position to another. Repeat and the line will be re-started and redrawn. The line is super thin and in black.
Go to the image menu and analysis and you can set the scale. personally, I keep it 1:1
There is only one modifier, hold down the shift key as you draw the line and it will be drawn at 45 degrees or 90 degrees etc
You can clear the line by clicking the clear button
You will also see an option to straighten the layer, the active layer selected. Draw it to where you think the alignment of the shape / layer should be and then click the straighten. You can use this with type, you can use this with shapes, you can also use this with unlocked background layers.
So what is L2. Well, L2 only appears when you go to the start point or end point and hold down the alt / option key and drag and that will then produce another line and you can then get the length from that and the angle then becomes the angle between line 1 and line 2. Sadly, line 3 and 4 etc are not available. You can still move the new line but they cannot be separated. You can shift the origin point but cannot drag it away from the end points. The end points can be re-sized and the L1 and L2 will then change. You can then see the L2 active