A sailor who 'knows the ropes' is familiar with the miles of cordage and ropes involved in running a ship.