One trick with Terro: the liquid can be messy if you're not careful. Honestly it seems to wander out: maybe ants are tracking it out? Anyway, it helps to sit the thing inside a ziploc bag, with a bridge of paper towel or something to help the ants find it. It makes cleanup way easier.
The stuff that I used was a small bottle with waxed cardboard "targets" to place it on. You can use waxed paper as well, and I've never had a problem with it running out onto the floor.
Do you know why they are averse to diatomaceous earth? They are so small I would not have thought they would experience a tactile aversion to a material. Nature is so neat.
Edit: I see now. It's not an aversion. It sticks to them and get into their joints. Interesting.
As for diatomaceous earth, it works best in dry places. If it gets wet they can walk right over it without issue, or it will just wash away in the rain. It's also an ingredient in toothpaste and is included in animal feed to allegedly kill parasites. The research on that seems to be propped up by those invested in selling the stuff, though, so take that with a grain of salt.
Nature is really quite incredible. This blew my mind when I saw it, and it unravels a lot of the mystery behind ant locomotion: https://i.imgur.com/7Zh6Im5.gif -- It's so simple, but it works amazingly well.
This is awesome. They walk like us, but instead of two legs they use two tripods.
Anyway, Terro liquid ant bait has worked very reliably for me on ants like these. It is essentially a borax and sugar mixture that the ants take into their crop and return it to the nest. Eventually they feed it to the queen, stopping the flow of eggs. The stuff in the white houses usually kills them too quickly -- you want them to live and give it to the other ants in the colony.
One caveat here is that, for some types of ants (Pharaoh), their colony will splinter if it is stressed. So one colony may turn into many colonies, each with a queen, at the first sign of danger. Using liquid baits on these types of ants will actually make your problem worse.
If you go with Terro, resist the urge to do anything to the ants while they are going to town on the bait. It's going to look bad, but they need to return to the colony.
Another solution, if you want to find all of the open spaces in your house, is to puff diatomaceous earth into these spaces. It's pulverized diatoms and looks and feels like talcum powder to humans. To insects, though, it is like walking across glass and acts as a mechanical insecticide.
Both of these options are relatively non-toxic to humans and pets.