how to find the installing path of some install application? [duplicate]

  1. I install (using the terminal setup command) Visual Studio Code. I can run it (by clicking on the icon on the 'all programs') but I can't find the installation path of it.

I want to run it using sudo and I need to navigate to the installation path to use the terminal and call sudo visualStudioCode and I can't find it. (Try to use the 'find', but I can't find it.)

  1. How can I create a shortcut of this sudo visualStudioCode on the Ubuntu desktop?

Solution 1:

I tried

which code

, it returned /usr/bin/code

and to run, just typed

code

and it opened VS Code. hope this helps