Xdg-Open (Linux)

If you want open file use command line derectly. You can use “xdg-open”(Linux)

Linux

  • open html file by default application directly by command line

    1
    xdg-open index.html

    xdg-open is configured by the files mentioned in Default applications.
    xdg-mime modifies the local file ~/.config/mimeapps.list and
    ~/.local/share/applications/mimeapps.list (deprecated).

  • config xdg-open

    1
    vi ~/.config/mimeapps.list

other OS

  • windows

    1
    $ start filename_or_URL
  • Mac OS

    1
    $ open filename_or_URL
  • Cygwin

    1
    $ cygstart filename_or_URL