How do I get to the internet from the command line
What do you mean by "getting to the internet"? And what command line?
If you want to start a browser on an OctoPi installation, you will probably first have to install a desktop environment and a browser.
On my raspberry pi 4b I have a desktop but no browser icon or icon for octoprint
sudo apt-install <some browser - brave, firefox, chrome, your choice>