Connecting to internet entirely from command line is fun thing to practice.
You'll need to be proficient with ip tool and nmcli tool.
And you also want to learn about NetworkManger, systemd-networkd and networking services.
You might also want to learn where are networking configuration files...