Mahdyar's Blog

My Thoughts

Code command doesn’t work on Fedora Flatpak?

“Code” command doesn’t work on Fedora Flatpak? If you’ve installed Visual Studio Code via Flatpak, you’re probably here because of that.

Because of that and not working “code” command, so what to do?

What to do?

You can run Flatpak apps directly from Command line:

flatpak run

so, for Code we have something like this:

flatpak run com.visualstudio.code

Ok, now we can run Code from terminal, but It doesn’t look nice, does it?

and now, we can set our own alias, by editing our bashrc, zshrc, etc.. and adding the following line:

alias code="flatpak run com.visualstudio.code"

Have fun! 🙂