devsojang 님의 블로그

Go 설치하기 (feat. Ubuntu 22.04) 본문

Go

Go 설치하기 (feat. Ubuntu 22.04)

devsojang 2025. 1. 23. 01:12

Go는 2009년에 구글에서 개발한 오픈 소스 프로그램밍 언어로 간결한 문법과 뛰어난 성능을 보여주고 있습니다. 

기본 버전 설치

 

Linux에서 Go 언어를 사용하기 위해서는 다음 명령어를 사용합니다. 

$ sudo apt install golang-go

 

 

22.04 ubuntu 기준으로 1.18.1이 기본 버전 입니다. 

$ go version

 

다음 명령어로 기본 버전의 go를 삭제합니다. 

$ sudo apt remove golang-go

 

최신 버전 설치 

 

Download and install - The Go Programming Language

 

Download and install - The Go Programming Language

Documentation Download and install Download and install Download and install Go quickly with the steps described here. For other content on installing, you might be interested in: Download Go installation Select the tab for your computer's operating system

go.dev

 

이전 버전을 지우고 다운받은 최신버전의 go를 설치합니다. 

 $ rm -rf /usr/local/go && tar -C /usr/local -xzf go1.23.5.linux-amd64.tar.gz

 

PATH 경로에 다음 경로를 추가합니다. 

$ export PATH=$PATH:/usr/local/go/bin

 

go 버전을 확인합니다. 

$ go version

 

 

OR

 

snap을 사용한다. 

$ sudo snap install go --classic

 

 

go 언어 go go 해 보시죠 ^^