I saw many answer related this question in "Stack Overflow" and "Ask Ubuntu". I also tried with this solution. I tried gnome-open and evince commands. This command works when the filename has one word. But my filename is "Java The Complete Reference Ninth Edition.pdf". Is there any solution to open this file using command in Terminal. I am using Ubuntu 14.04 LTS.
Spaces in file names need to be escaped with a \, for example with a document called "Document Name.pdf" you need to type "evince 'Document\ Name.pdf'. Autocompletion in your shell should do this for you if you type for example "evince Doc" and press tab.
There are two ways to quickly open a pdf file from the terminal in Ubuntu without typing the pdf file's full name.
You can use
evincefollowed by a space character and then drag the pdf file's icon into the terminal to automatically input its full name.
cdto the directory containing the pdf file and then you can use
evincefollowed by a space character and type the first few letters of the pdf file's name followed by the Tab key to automatically complete the full name of the pdf file in the terminal. All of the space characters in the pdf file's name will be automatically replaced by a
\character, used to escape the next character in the string from not having a special meaning in the Bash shell, followed by a space character.
You can also do it with the filename between '"' characters, for example:
evince "Java The Complete Reference Ninth Edition.pdf"