·터미널 명령어

pacman -S

패키지·런타임

쓰는 꼴

sudo pacman -S [--needed] <package>

Arch의 sync 저장소에서 패키지를 설치합니다 — 롤링 배포라서 -Sy로 목록만 새로 받고 설치하면 라이브러리가 어긋나는 부분 업그레이드가 되니 항상 -Syu로 함께 올립니다.

자주 쓰는 옵션

옵션
-Syurefresh and upgrade the whole system, the supported way to update
--neededdo not reinstall packages already at that version
--noconfirmno prompts, for scripts
-Ss <pattern>search the repositories
-R <package>remove a package
-Qi <package>show what is installed and why

예시

sudo pacman -S ripgrep

installs from the sync repositories

sudo pacman -Syu

the full upgrade Arch expects you to run

sudo pacman -S --needed base-devel

installs the group, skipping what is there

무엇을 어디에 넣는지가 문제입니다. 프로젝트 안인지 시스템 전체인지 먼저 정하세요.

읽는 방법

  • 대괄호 [ ]는 넣어도 되고 안 넣어도 되는 자리입니다.
  • 점 셋 …은 여러 개를 이어 쓸 수 있다는 뜻입니다.
  • 옵션은 대소문자를 가립니다 — -r과 -R이 다른 명령도 있습니다.

자주 묻는 것

Q. pacman -S은 무엇을 하나요?

Arch의 sync 저장소에서 패키지를 설치합니다 — 롤링 배포라서 -Sy로 목록만 새로 받고 설치하면 라이브러리가 어긋나는 부분 업그레이드가 되니 항상 -Syu로 함께 올립니다.

Q. 어떻게 치나요?

sudo pacman -S [--needed] <package> — 대괄호는 생략할 수 있는 자리입니다.

Q. 옵션은 몇 개나 자주 쓰나요?

여기 정리한 것은 6개입니다. 전체 목록은 man pacman에 있습니다. 이 명령은 패키지·런타임 갈래입니다.

같이 보는 명령

man 페이지: man pacman--S