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?
  • Which exact command did you use to install it? Do you know the name of the executable?
    – wjandrea
    Aug 10, 2017 at 23:25
  • i not sure because it was 2-3 month ago - but maybe this sudo dpkg -i <file>.deb sudo apt-get install -f # Install dependencies
    – Yanshof
    Aug 10, 2017 at 23:26
  • It should be vscode and it doesn't require sudo.
    – user692175
    Aug 10, 2017 at 23:26
  • but there is some python script that i want to debug and its need to have sudo to debug it
    – Yanshof
    Aug 10, 2017 at 23:28
  • and call from the terminal 'sudo vscode ' does not find the vscode
    – Yanshof
    Aug 10, 2017 at 23:28

2 Answers 2


I tried

which code

, it returned /usr/bin/code

and to run, just typed


and it opened VS Code. hope this helps

  • thank you so much @joy-grewal
    – Ashif
    Jan 28, 2020 at 4:14
  • Who the hell names their code editor's binary as "code"? I swear to f-cking god, I've been trying to find an executable starting with V forever. The audacity of calling your software "code"... This is like making a desktop manager application and calling the binaries "computer". Yes, I'm f-cking mad. (Thanks by the way) Feb 13, 2020 at 16:09

The binary for anything that you install using apt-get dpkg is usually either in /bin or /usr/bin directories from where you can run the program. You can also try to use the which command to locate pathnames of files which would be executed. So in your case, on a terminal, type:

which visualStudioCode
  • which visualStudioCode ... do nothing :( and on the /bin and /usr/bin its not exist :(:(
    – Yanshof
    Aug 10, 2017 at 23:33
  • I think then as per the comments above from wjandrea you would need to know the name of the executable. You could try searching using a regular expression with find to search for an approximate word or phrase.
    – user718878
    Aug 10, 2017 at 23:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.