Who has legal custody of a minor child if never married in Illinois?

The mother. The father have to prove paternity in court and petition for custody, visitation and can then also pay child support.