open file from command line code example
Example 1: linux command to open a file
sudo apt install vim
vim filename
Example 2: how to open a file using terminal
open ~/Desktop/filename.txt
sudo apt install vim
vim filename
open ~/Desktop/filename.txt