Rails must be attached according to local building codes. A tape measure can help you meet the required code. Zoning in most areas will require a rail set 32 inches to 34 inches from the top of a stair tread. Measure from the top of several stair treads to maintain the required height at which the rail will be hanged.
A chalk line creator snaps a perfectly straight line to serve as reference for placing the railing's hardware. They are metal or plastic diamond-shaped tools with a spool of string inside and a crank on the outside. For a line that will not leave a stain, try baby powder as an alternative. This will wipe right off with a damp cloth
A drill will allow you to insert the screws into walls quickly and securely and drill holes that are needed to hang the railing.
This battery-powered tool has a small sensor inside that will detect where a stud is located behind a wall. Some of these tools also have lights that point to the stud's direct center. You will need to drill into studs for support when hanging the rail.