Linux – How to open PDF file in Chrome via command in Linux

command linegoogle-chromelinuxpdf

Chrome can view PDF file, so I decide to make it as my default PDF viewer. However, I do not know how to open PDF file in chrome via my terminal emulator.

I have tried a command google-chrome example.pdf, but it failed while the address is not file:///path/to/example.pdf/ but http://example.pdf/.

My English is not good, so you can edit the question if necessary.

Thank you!

Updated: Sorry for I did not mention that the solution must be effective for GNU/Linux.

Best Answer

Right click on pdf file and change opens with application to chrome and apply the changes. For more information see this link Also using command line it can be done.Just use below command line

<path to chrome.exe> <path to pdf file>