The field at a distance r from a long string of charge per unit length λ is :
Consider a surface of a cylinder of radius r and length l as Gaussian surface. Apply Gauss's law, →E.→ds=Qenϵ0 where Qen is the charge enclosed by the Gaussian surface. here Qen=λl
thus, E.(2πrl)=λlϵ0
∴E=λ2πϵ0r=k2λr where k=14πϵ0r