Ooh, this is highly dependent on the city you live in, and the neighborhood you're in. I've visited many/lived in a few cities in the U.S. and Canada, and hi/smiles are actually not that uncommon, especially in the midwest, the south and in Canada.
It depends on the context of course. No one will greet you on a busy street corner, or at rush hour. But if you're walking your dog, at a bus shelter, or casually strolling in a quieter neighborhood with low pedestrian traffic, your chances are higher. It's just human nature.
Also, a great opportunity for human connection is just talking to cashiers, i.e. folks in retail that you come across. Surveys have shown that though these interactions are brief and fleeting, they can do a lot to alleviate loneliness.
And after thinking a little more on things i'm not too sure how I really feel now. Before I moved to the city I had a decent group of friends I was close with and I.knew enough people I could usually find someone to talk to or hang out with.
In the city i've met lots of different people, some i've gotten fairly close with then drifted apart from, others that I still feel close with nut don't see or talk to very often but never really friends like I had before or that feeling of knowing the people around.
But, after you mention the stuff about talking to cashiers or other people I started to think about all the people I do actually know and talk to on a regular basis, who's lives I know a fair bit about and there's lots of them. Just about every store or coffee shop or similar place I go regularly there's people I know fairly well and have conversations with. There's people on the bus I see most days i'll sit and talk with, and I even end up talking with random strangers a fair bit.
But they still just come and go, they're not really friends i've never really felt since i've lived out here that there were people I could just call up or that I knew would just be around.
I'm sorry I'm not sure where i'm going with this. This all has just made me think a lot about different things and people from over the years.
I hear you though. Finding a group of close friends you can hang out with is indeed a hard thing in most cities, and it takes a combination of effort and luck. One of the prerequisites of friendship is repeated personal exposure to each other, and cities do make that harder because they allow a range of individual lifestyles that are highly decorrelated. Unlike in smaller communities, in the city everybody does their own thing, and there are few central places where everyone gets together and meets regularly (there are a few exceptions, like continuing education classes, houses of worship, etc. I would recommend trying something along those lines).
Here's what I found though:
Friendships often start with getting to know 1-2 people, and it would help greatly if these people are sociable or are people connectors. If you can create a context where you can repeatedly meet with 1-2 people that you have something in common with (don't wait for invitations, reach out and invite them to stuff--there's a good chance that they will accept!), that will help to develop closer relationships, and from there, you will be slowly brought into existing networks. That's how it happened for me. I met this random couple who invited me to dinner, and then I invited them to dinner, and I gradually got to meet their friends and their friends' friends. It does take a bit of luck to find the right connections, but start small, and then try-and-fail a few times. Understand that there's a bit of randomness involved and accept that the process is not going to be as easy as in grade school, so sow your seeds widely and be prepared to say "yes" when opportunities arise, and to pick yourself up when people disappoint you. Best of luck.
On the other hand, it affords you more opportunity to meet people of like-mind.
Loneliness can be pretty bad in rural areas if you don’t fit into the community.