6
  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?
wjandrea
  • 14,236
  • 4
  • 48
  • 98
Yanshof
  • 321
  • Which exact command did you use to install it? Do you know the name of the executable? – wjandrea Aug 10 '17 at 23:25
  • i not sure because it was 2-3 month ago - but maybe this

    sudo dpkg -i .deb sudo apt-get install -f # Install dependencies

    – Yanshof Aug 10 '17 at 23:26
  • It should be vscode and it doesn't require sudo. –  Aug 10 '17 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 '17 at 23:28
  • and call from the terminal 'sudo vscode ' does not find the vscode – Yanshof Aug 10 '17 at 23:28
  • quick hint(s): to see what commands you entered, look at history (which can be made to record date & time too). also if you know the command that runs a program/app, use the whereis sudo to find out where the command sudo is stored by example... – guiverc Aug 11 '17 at 01:00
  • @Yanshof run sudo updatedb then locate -i visual | grep -i -e studio -e code let me know what is the out put. also let me know about the output of locate -i visual | grep -i desktop. – Ravexina Aug 11 '17 at 02:27

2 Answers2

17

I tried

which code

, it returned /usr/bin/code

and to run, just typed

code

and it opened VS Code. hope this helps

  • thank you so much @joy-grewal – Ashif Jan 28 '20 at 04: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) – Faruk D. Feb 13 '20 at 16:09
0

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
wjandrea
  • 14,236
  • 4
  • 48
  • 98
  • which visualStudioCode ... do nothing :( and on the /bin and /usr/bin its not exist :(:( – Yanshof Aug 10 '17 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. –  Aug 10 '17 at 23:39