terminal open a file code example
Example 1: how to open a file using terminal and exit terminal
xdg-open <path/file_name>
Example 2: how to open a file using terminal
gedit <path/your_file>
Example 3: how to open a file using terminal
open ~/Desktop/filename.txt
Example 4: open a file in from terminal
cat <path/your_file>