This article covers the different methods to open a file in Linux via a terminal. In fact, In Linux, we can display various file formats such as text file, audio files, video, image, doc, pdf, or any other file contents.
How to Open File Using gnome-open Command ?
For the GNOME-based Linux environment, we can use the gnome-open command to open a file.
If the gnome utility is not installed on our machine, we can install it by using the following command:
$ sudo apt install libgnome2-bin
Execute the above command and provide the system administrator password to install the GNOME utility.
Now, to display the file content, execute the command as follows:
$ gnome-open Test.txt
The above command will open the file with the default file system.
There are some other popular Linux environments, such as KDE DESKTOP, OS X UNIX, and more.
For KDE Desktop, execute the command as follows:
$ kde-open <file name>
$ xdg-open <file name>
For OS X UNIX, execute the command as follows:
$ open <file name>