There is growing interest in the area of conductive textiles in the scientific and industrial community. Herein, we successfully prepared a conductive textile via covalently grafting polyaniline (PANI) onto cotton by a multi-step treatment process. The conductivity of the resultant fabric could be tuned by immersing in water having different pH values. The conductive and insulating properties of the textile could be conveniently switched by alternately immersing in acidic and alkaline bath solutions. Most importantly, the resultant conductive fabrics were able to withstand 40 simulated dry-wash cycles, with almost no decay in the electrical conductivity, indicating their excellent dry-wash durability. The present strategy for fabricating conductive fabrics with excellent switchability of electrical properties and dry-wash durability is expected to provide inspiration for the production of multifunctional conductive textiles for use in hash or sensitive conditions.