Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open Visual Studio Code from the command line on linux?

I know I can use command "code" to open VS code or file, but I don't know what should I do to make it possible after I install VS code in Ubuntu.Thanks.

like image 946
An07 Avatar asked Aug 14 '16 14:08

An07


1 Answers

Launching from the Command Line You can launch VS Code from the command line to quickly open a file, folder, or project. Typically, you open VS Code within the context of a folder. We find the best way to do this is to simply type:

code .

Tip: We have instructions for Mac users in our Setup topic that enable you to start VS Code from within a terminal. We add the VS Code executable to the PATH environment variable on Windows and Linux automatically during installation. Sometimes you will want to open or create a file. If the specified files does not exist, VS Code will create them for you:

code index.html style.css readme.md

Tip: You can have as many file names as you want separated by spaces.

Source: https://code.visualstudio.com/Docs/editor/codebasics

like image 150
Olavo Neto Avatar answered Dec 24 '22 18:12

Olavo Neto