An outdoor unit of an air-conditioner and two-pipe and three-pipe air-conditioning systems having the same are provided. The outdoor unit includes a compressor defining an outlet and an inlet; a first four-way valve defining a first valve communicated with the outlet, second and third ports communicated with the inlet; a second four-way valve defining second and third ports communicated with the inlet; an outdoor heat exchanger defining a first refrigerant valve Communicated with the fourth port of the first four-way valve; a first gas pipe defining a first end connected with the second and third ports of the first and second four-way valves and, the inlet; a second gas pipe defining a first end connected with the fourth port of the second four-way valve; a third gas pipe defining a first end connected with the outlet and a second end connected with the first port of the second four-way valve.