How do get an html file to open in preferred html application from command line on linux?

8,274

That's OS/distribution/desktop-environment dependent, but in many places, you'll find a xdg-open command that does just that.

Share:
8,274

Related videos on Youtube

Paul Taylor
Author by

Paul Taylor

Runs Albunack providing awesome artist discographies and the Jaikoz and SongKong Music Tagger applications. Main skills:Java and Databases. Also, photographer concentrating on the less obvious in South-West England, photographs can be seen at Secret Dorset Photo

Updated on September 18, 2022

Comments

  • Paul Taylor
    Paul Taylor over 1 year

    How do get an html file to open in preferred application from command line on linux?

    I have an xterm window open and an html file I want to do something like

    open test.html
    

    and that will start my preferred browser with the test.html file loaded.

    (I'm looking for a solution that will work for any Linux desktop machine without me needing to know which browser app they have installed.)

  • Paul Taylor
    Paul Taylor over 11 years
    Thx that did the trick