linux termina open file code example Example 1: how to open a file using terminal open ~/Desktop/filename.txt Example 2: open file in note from command line linux gedit filename