Work from the bottom up: is the cable or Wi-Fi up, can I reach the router, can I reach the internet by IP, does DNS work, is the service listening?
ping -c 3 192.168.1.1 # router ping -c 3 1.1.1.1 # internet, by IP dig example.com +short # DNS traceroute example.com # where does it stop? nc -zv 192.168.1.50 22 # is port 22 open on that host?