How to call VS Code Editor from terminal / command line

前端 未结 21 1425
别那么骄傲
别那么骄傲 2020-12-04 06:22

The question says it all.

How can I open VS Code editor from

  • windows cmd
  • linux and mac terminal

e.g. for notepad++ I write

21条回答
  •  一整个雨季
    2020-12-04 07:07

    In the case of Linux and Mac, you want to navigate to the directory that you extracted the VSCode files using the 'cd' command. For example:

    cd ~/Downloads/VSCode
    

    Then you start the application by running..

    ./Code
    

    'Code' being the name of the executable.

    If you have root access on the machine, you can configure the system to allow you to start VSCode from anywhere by linking it to /usr/bin, where links to executables are often stored.

    sudo ln -s /path/to/VSCode/folder/Code /usr/bin/Code    
    

    You can now launch VSCode from anywhere by typing:

    Code
    

提交回复
热议问题