Profile picture

[Linux] Ubuntu 22.04에서 Visual Studio Code 설치하기

JaehyoJJAng2023년 12월 01일

[1] 레포지토리와 키를 추가하여 Visual Studio 설치하기

‣ 시스템 업데이트

sudo apt-get update -y && sudo apt upgrade -y

‣ 패키지 설치

Visual Studio Code를 설치하기 전에 필수로 설치되어야 하는 패키지들을 설치해주자.

sudo apt-get install -y software-properties-common apt-transport-https wget

‣ VScode 레포지토리 등록

Visual Studio Code를 설치하기 위해 Visual Studio Code 레포지토리를 추가하자. 그 전에 설치된 패키지들을 인증하기 위해 Microsoft GPG 키를 가져와야 한다.

wget -O- https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor | sudo tee /usr/share/keyrings/vscode.gpg

‣ 시스템 다시 업데이트

저장소를 추가해줬기 때문에 해당 저장소에서의 패키지 목록을 최신화 해줘야 한다. 시스템 업데이트를 다시 수행

sudo apt-get update -y

‣ VSCode 설치

sudo apt-get install -y code

▶︎ Snap 스토어를 통해 VSCode 설치

Snap은 Ubuntu 22.04에 기본적으로 설치되어 있으나 그 하위 버전에서는 Snap이 설치되어 있지 않다.

Snap이 없는 경우 아래 명령어를 실행하여 설치해주자.

sudo apt-get install -y snapd

아래 명령을 실행하여 VSCode를 설치해주자.

sudo snap install code --classic

Loading script...