Search code examples
ubuntu-server

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


I installed apache2 on ubuntu and I want to check that it works by accessing http://localhost/. The problem is I installed ubuntu(17.04) server, so there is no web browser, only the command line.

What can I do?


Solution

  • 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