By foot from Cagliari to Cagliari (city)
It's possible to walk from the docking area to the city center. It's a 15 minutes walk. In the port is a lot of traffic because of the many cargo ships and ferries. So be extra careful.
Walk to the exit gate of the port at Calata S. Agostino. Right across from the Stazione Marittima is a Tourist Office information kiosk. If you cross the parking lot from there you arrive at Via Roma, from where you can enter the city.
TIP: The Old Town, Castello, is located in the upper town. The streets can be very steep and occasionally there are stairs. Wear solid shoes.