How can one access http://localhost/ using the command line

I recommend installing a browser for a command line like lynx ,Browsh.

Lynx is light-weight. Fast. An img element is always shown in their alt text. Browsh is a bit slower than Lynx. An img element is always shown ing(but as low quality as your command line can display).

I use different above depending on the purpose. If you just want to see the localhost is working well, use lynx. If you want to check your server working well and see details, use Browsh.

I hope my answer will help you. Any questions, google or ask me.


curl localhost (curl localhost:8080 if it's not port 80)

or

curl 127.0.0.1

or just test with

ping localhost

or download your index.html or something

wget localhost