I installed the Atom Editor via flatpack/flathub. When I go to the command line terminal, I would like to open a file with it. This is what I see:
$ atom
Command 'atom' not found, did you mean:
command 'adom' from snap adom (3.3.3)
command 'atobm' from deb x11-apps (7.7+9)
command 'atrm' from deb at (3.2.5-1ubuntu1)
command 'atop' from deb atop (2.9.0-1ubuntu1)
command 'atom4' from deb atom4 (4.1-9build2)
command 'atoms' from deb horae (071~svn537+ds1-1)
See 'snap info <snapname>' for additional versions.
So, the atom editor cannot be used straight from the command line. How can I open a file with the command:
atom file.txt
I edited the
atom.desktopfile and found the solution. You can find it in the application menu and edit it. The command below is the command is the same command as in the.desktopfile but the%Fis replaced with"$@".If you put this in your
~/.bashrcfile, then you can use theatomfunction to open files.When you open a new Terminal, you can use this to open the file: