While there are many types of cedar, Eastern red cedar, aka aromatic red cedar, is the only type that gives off the familiar scent that deters moths and insects. Eastern red cedar is sold in both large pressboard panels and tongue-and-groove boards. Panels make for an easy, cut-to-fit installation, but they have a rough texture that can snag clothing. Tongue-and-groove boards, shown in this installation, require more cuts but give a closet a smooth, custom-finished look.
You don't have to line the entire closet for the cedar to be effective, but the more cedar the better. Lining the three interior walls is typical, but you might also consider continuing the coverage on the back of the door and on the ceiling. If your closet has baseboard molding, you can leave it in place as long as the baseboard is thicker than the cedar. But you can also take the lining down to the floor by first carefully removing the baseboard with a pry bar. Then you can use cove molding against the floor to hide the cut edges. That same cove can go at the top of the wall to hide the small gap above the last course. The raw cut ends of the boards will intersect in the corners of the closet, but as long as you start your installation on the back wall and cut the sidewall boards to fit snugly, the seam will appear neat from the front. However, if you have any trouble getting a tight fit to make an even intersection of back and side, you can always hide it with corner bead.
There are several ways to get the cedar on the walls. You can nail it to the studs, or adhere it with construction adhesive. This Old House general contractor Tom Silva uses a two-pronged approach, holding planks in place with adhesive before nailing them. “I like to nail on a 45-degree angle through the tongue to hide the nails,” he says. Nailing can be done with a pneumatic pin nailer or a good old-fashioned hammer and 5d nails, though without a pneumatic nailer you may need to drill pilot holes to avoid splitting the thin wood. Or, if you don't mind seeing the nailheads, you can face-nail for an easier installation. Then, once the cedar is in place, it will last for years and will only require a quick, light sanding to instantly rejuvenate it and bring back its aromatic effects.