Txhua tus programmer yuav tsum muaj daim ntawv thov yooj yim uas nws yuav ntaus thiab hloov kho cov lej. Nrig txog kev pom Studio Code yog ib qho kev daws teeb meem zoo tshaj plaws muab faib rau ob qho tib si ntawm Windows thiab ntawm Linux kemel operating systems. Txhim kho ntawm cov editor tau hais tseg tuaj yeem nqa los ntawm cov qauv sib txawv, txhua tus yuav yog qhov zoo tshaj plaws rau cov chav kawm ntawm cov neeg siv. Cia peb nyob ntawm tus txheej txheem niaj hnub no thiab cuam tshuam nrog txhua yam ua tau ua tau ntxaws.
Hmoov tsis zoo, qhov kev tsim kho ib puag ncig hu ua Visual Studio tsuas yog muaj rau PCs khiav lub Windows. Nws yuav tsum raug sau tseg tam sim ntawd tias hauv tsab xov xwm no peb qhia txog yuav ua li cas rub tawm Visual Studio Code source code editor - ib qho ntawm cov kev daws teeb meem hauv VS kab.
Txhim kho qhov muag saib lub Studio Code ntawm Linux
Tau kawg, muaj ntau qhov kev faib tawm tau sau rau ntawm lub pob hauv Linux. Txawm li cas los xij, cov haujlwm ua haujlwm raws li Debian lossis Ubuntu tshwj xeeb tshaj yog tam sim no. Nws nyob ntawm lub platform uas peb xav tau them rau, ua kom pom tseeb Ubuntu 18.04. Cov tswv ntawm lwm yam faib khoom xa tuaj, peb tseem yuav qhia koj li cas zoo tshaj plaws rau nruab, tab sis cia pib nyob rau hauv kev txiav txim.
Txoj Kev 1: Siv cov chaw cia khoom los ntawm lub console
Microsoft tseem niaj hnub saib xyuas nws cov chaw ua hauj lwm repositories. Cov kev hloov kho tshiab cov txheej txheem tau nrawm nyob rau ntawd thiab cov neeg siv tam sim tuaj yeem rub tawm lawv thiab nruab rau lawv lub computer tsis muaj teeb meem. Raws li rau Visual Studio Code, koj yuav tsum xav txog cov kev xaiv siv ob lub chaw txawv. Kev sib cuam tshuam nrog tus ua ntej yog raws li hauv qab no:
- Khiav "Chaw Nres Tsheb" txog Ctrl + kev + T lossis siv cov duab sib xws hauv cov ntawv qhia zaub mov.
- Sau npe cov lus txib
sudo snap nruab - khaw vscode
mus rub thiab nruab VS los ntawm cov chaw sau ntawv xeem. - Tshawb xyuas tus kheej ntawm tus as khauj los ntawm kev nkag mus hauv koj tus lej nkag mus siv tus password.
- Rub cov ntaub ntawv los ntawm cov channel yuav siv sijhawm, tsis txhob kaw lub console thaum ua cov txheej txheem no.
- Tom qab ua tiav ntawm kev teeb tsa, koj yuav tau txais kev ceeb toom thiab koj tuaj yeem pib qhov program tam sim ntawd los ntawm kev nkag mus
vscode
. - Tam sim no koj tuaj yeem cuam tshuam nrog lub graphical interface ntawm tus editor ntawm kev txaus siab. Lub cim tau tsim hauv cov ntawv qhia zaub mov hauv VS uas tseem tab tom pib ua.
Txawm li cas los xij, txoj kev teeb tsa los ntawm kev tshaj tawm cov khoom siv tsis zoo rau txhua tus neeg siv, yog li peb xav kom koj paub koj tus kheej nrog lwm txoj hauv kev xaiv uas tsis yog qhov nyuaj tshaj qhov kev txiav txim siab.
- Qhib "Chaw Nres Tsheb" Ua ntej tshaj plaws, hloov kho lub tsev qiv ntawv los ntawm kev ntaus ntawv
sudo Apt hloov tshiab
. - Tom ntej no, koj yuav tsum tau nruab cov dependencies siv
sudo Apt nruab software-zog-nquag apt-thauj-https wget
. - Paub meej tias qhov sib ntxiv ntawm cov ntaub ntawv tshiab los ntawm xaiv cov ntaub ntawv xaiv.
- Nruab qhov Microsoft GPG yuam sij, uas yog lub luag haujlwm ntawm kev siv lub cim hluav taws xob kos npe hauv
wget -q //packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-yawm sij ntxiv -
. - Tom qab ntawd ua tiav qhov sib ntxiv los ntawm kev ntxig rau txoj kab
sudo ntxiv-apt-repository "deb [arch = amd64] //packages.microsoft.com/repos/vscode tseem ceeb lub ntsiab"
. - Nws tshua tsuas yog rau nruab qhov program nws tus kheej los ntawm sau ntawv
sudo apt nruab code
. - Pib Saib Qhov Duab Studio Txoj Cai Ntxiv rau hauv cov kab ke hauv txoj kev no yog ua tiav los ntawm cov lus txib
chaws
.
Txoj Kev 2: Rub cov pob DEB pob
Tsis yog txhua tus neeg siv qee zaum yooj yim los ua haujlwm los ntawm lub console lossis nws yuav muaj qee qhov nyuaj nrog pawg. Ntxiv rau, qee zaum tsis muaj kev sib txuas hauv Is Taws Nem nyob rau hauv lub computer. Hauv cov xwm txheej no, pob DEB official los pab cawm, uas koj tuaj yeem rub tawm ua ntej rau hauv xov xwm thiab nruab VS Code ntawm koj lub PC.
Rub tawm DEB pob Visual Studio Code
- Ua raws li cov kab ntawv txuas saud thiab rub tawm DEB pob ntawm qhov kev pabcuam koj xav tau.
- Qhib lub nplaub tshev uas cov download tau ua thiab khiav nws.
- Pib lub installation los ntawm "Tus thawj tswj daim ntawv thov".
- Txheeb xyuas koj tus account nrog tus password.
- Qhov kawg ntawm kev teeb tsa, koj tuaj yeem nrhiav cov kev pabcuam tso tawm icon los ntawm cov ntawv qhia siv los ntawm kev tshawb.
Yog tias muaj qhov xav tau ntxiv cov software tshiab rau hauv cov lus nug, qhib lub console thiab nkag mus rau cov lus hauv qab no ib qho los ntawm ib qho:
sudo apt-tau nruab apt-thauj-https
sudo apt-tau hloov tshiab
sudo apt-tau nruab code
Rau cov neeg siv siv cov khoom faib tawm tsim raws RHEL, Fedora lossis CentOS, koj yuav tsum siv cov kab hauv qab no los nruab qhov program.
sudo rpm --import //packages.microsoft.com/keys/microsoft.asc
sudo sh -c 'echo -e "[code] nname = Visual Studio Code nbaseurl = // packages.microsoft.com/yumrepos/vscode
enabled=1
gpgcheck=1
gpgkey=//packages.microsoft.com /keys/microsoft.asc "> /etc/yum.repos.d/vscode.repo '
Cov pob khoom raug hloov kho los ntawm kev qhia kom meejdnf xyuas-hloov tshiab
thiab ntawdsudo dnf nruab code
.
Muaj cov tswv thiab OS ntawm openSUSE thiab SLE. Ntawm no tus code hloov me ntsis:
sudo rpm --import //packages.microsoft.com/keys/microsoft.asc
sudo sh -c 'echo -e "[code] nname = Visual Studio Code nbaseurl = // packages.microsoft.com/yumrepos/vscode
enabled=1
type=rpm-md
gpgcheck=1
gpgkey=/ /packages.microsoft.com/keys/microsoft.asc "> /etc/zypp/repos.d/vscode.repo '
Kev hloov kho tshiab yog ua tiav los ntawm kev ua kom ua ntu zus.sudo zypper refresh
thiabsudo zypper nruab ib qho chaws
Tam sim no koj tau paub txog txoj kev teeb tsa ntawm Visual Studio Code ntawm ntau cov Linux pob xa tawm. Yog tias koj ntsib teeb meem lossis tsis raug, nco ntsoov nyeem thawj cov ntawv nyeem yuam kev, kawm cov ntaub ntawv ntawm cov haujlwm ua haujlwm, thiab tseem sau cov lus nug hauv cov lus.