Linux: command to open URL in default browser

后端 未结 10 1849
青春惊慌失措
青春惊慌失措 2020-12-07 17:47

What command we have to execute (from Java, but that should not matter) on Linux (different common distributions) to open a given URL in the default browser?

10条回答
  •  庸人自扰
    2020-12-07 18:07

    I believe the simplest method would be to use Python:

    python -m webbrowser "http://www.example.com/"
    

提交回复
热议问题