Ubuntu 18.04 Server / apt / 패키지 설치, 삭제, 업그레이드하는 명령어

Ubuntu에서 패키지를 관리하는 명령어는 여러 가지가 있습니다. 그 중 널리 사용되는 것은 apt-get과 apt입니다. 아래는 apt를 이용하여 패키지를 설치하고 삭제하고 업그레이드하는 방법입니다. 대부분의 경우 apt-get을 사용해도 작동합니다.

APT 사용법

  • 패키지 목록을 갱신합니다
# apt update
  • 모든 패키지를 최신 버전으로 업그레이드합니다.
# apt upgrade
  • abc 패키지를 설치합니다. 의존성있는 패키지도 함께 설치합니다.
# apt install abc
  • abc 패키지를 삭제합니다. 설정 파일 등은 삭제하지 않습니다.
# apt remove abc
  • 더 이상 필요 없는 패키지들을 삭제합니다.
# apt autoremove
  • 설정 파일 등도 포함하여 abc 패키지를 삭제합니다.
# apt purge abc
  • abc와 관련된 패키지를 검색합니다.
# apt search abc
  • abc 패키지의 정보를 출력합니다.
# apt show abc
  • 패키지 목록을 출력합니다.
# apt list
  • 설치된 패키지 목록을 출력합니다.
# apt list --installed
  • 업그레이드 가능한 패키지 목록을 출력합니다.
# apt list --upgradable
  • 도움말을 출력합니다.
# apt --help
apt 1.6.12 (amd64)
Usage: apt [options] command

apt is a commandline package manager and provides commands for
searching and managing as well as querying information about packages.
It provides the same functionality as the specialized APT tools,
like apt-get and apt-cache, but enables options more suitable for
interactive use by default.

Most used commands:
  list - list packages based on package names
  search - search in package descriptions
  show - show package details
  install - install packages
  remove - remove packages
  autoremove - Remove automatically all unused packages
  update - update list of available packages
  upgrade - upgrade the system by installing/upgrading packages
  full-upgrade - upgrade the system by removing/installing/upgrading packages
  edit-sources - edit the source information file

See apt(8) for more information about the available commands.
Configuration options and syntax is detailed in apt.conf(5).
Information about how to configure sources can be found in sources.list(5).
Package and version choices can be expressed via apt_preferences(5).
Security details are available in apt-secure(8).
                                        This APT has Super Cow Powers.

저장소 변경하는 방법

우분투에서 패키지를 업데이트 하거나 설치하면, 미러 서버에서 소프트웨어를 다운로드하여 설치합니다. 그런데, 그 미러 서버가 멀리 있거나 속도가 느리다면, 패키지를 다운로드하는데 많은 시간이 소요됩니다. 속도가 너무 느려서 불편하다면 저장소를 지정하여 속도를 빠르게 할 수 있습니다.

저장소 설정은 /etc/apt/sources.list에서 합니다. 파일을 텍스트 에디터로 열고

http://archive.ubuntu.com/ubuntu

를 모두 변경합니다. 만약 한국이라면

http://mirror.kakao.com/ubuntu

으로 바꿔보세요.

참고로, 지역별 우분투 미러 서버 리스트는 여기서 확인할 수 있습니다.

같은 카테고리의 다른 글
PuTTY / 사용법 / SSH / 자동 로그인하는 방법

PuTTY / 사용법 / SSH / 자동 로그인하는 방법

PuTTY로 리눅스 서버에 접속할 때 사용자 이름과 비밀번호를 입력합니다. 그 과정이 번거롭다면 Key를 이용하여 자동으로 로그인하도록 만들 수 있습니다. 그 방법을 정리합니다. 서버에서 Key 생성 서버에 root으로 로그인했고, 현재 디렉토리는 /root이라고 가정합니다. 다음과 같이 명령하여 Key를 생성합니다. 몇 가지 질문을 하는데 계속 엔터를 치면 됩니다. ssh-keygen .ssh 디렉토리로 이동합니다. cd .ssh id_rsa와 id_rsa.pub 두 개의 파일이 있습니다. id_rsa.pub 파일의 ...

리눅스 / 명령어 / which, whereis, locate / 명령어 위치 찾기

명령어의 위치를 찾을 때 사용할 수 있는 명령어에는 which, whereis, locate가 있다. 명령어의 위치만 찾을 때는 which를 사용하고, 관련된 파일들의 위치까지 찾을 때는 whereis나 locate를 사용한다. which 명령어로 find 명령어를 찾는다. # which find /usr/bin/find whereis 명령어로 find 명령어를 찾는다. # whereis find find: /usr/bin/find /usr/share/man/man1/find.1.gz locate 명령어로 find 명령어를 찾는다. # locate find /usr/bin/find /usr/bin/find2perl /usr/bin/findmnt /usr/bin/nl-link-ifindex2name /usr/bin/nl-link-name2ifindex /usr/bin/oldfind /usr/lib64/python2.7/modulefinder.py /usr/lib64/python2.7/modulefinder.pyc /usr/lib64/python2.7/modulefinder.pyo /usr/sbin/btrfs-find-root /usr/sbin/findfs /usr/share/bash-completion/completions/findmnt /usr/share/doc/findutils-4.5.11 /usr/share/doc/findutils-4.5.11/AUTHORS /usr/share/doc/findutils-4.5.11/COPYING /usr/share/doc/findutils-4.5.11/ChangeLog /usr/share/doc/findutils-4.5.11/NEWS /usr/share/doc/findutils-4.5.11/README /usr/share/doc/findutils-4.5.11/THANKS /usr/share/doc/findutils-4.5.11/TODO /usr/share/doc/wpa_supplicant-2.6/examples/p2p/p2p_find.py /usr/share/doc/wpa_supplicant-2.6/examples/p2p/p2p_stop_find.py /usr/share/info/find-maint.info.gz /usr/share/info/find.info.gz /usr/share/locale/be/LC_MESSAGES/findutils.mo /usr/share/locale/bg/LC_MESSAGES/findutils.mo /usr/share/locale/ca/LC_MESSAGES/findutils.mo /usr/share/locale/cs/LC_MESSAGES/findutils.mo /usr/share/locale/da/LC_MESSAGES/findutils.mo /usr/share/locale/de/LC_MESSAGES/findutils.mo /usr/share/locale/el/LC_MESSAGES/findutils.mo /usr/share/locale/eo/LC_MESSAGES/findutils.mo /usr/share/locale/es/LC_MESSAGES/findutils.mo /usr/share/locale/et/LC_MESSAGES/findutils.mo /usr/share/locale/fi/LC_MESSAGES/findutils.mo /usr/share/locale/fr/LC_MESSAGES/findutils.mo /usr/share/locale/ga/LC_MESSAGES/findutils.mo /usr/share/locale/gl/LC_MESSAGES/findutils.mo /usr/share/locale/hr/LC_MESSAGES/findutils.mo /usr/share/locale/hu/LC_MESSAGES/findutils.mo /usr/share/locale/id/LC_MESSAGES/findutils.mo /usr/share/locale/it/LC_MESSAGES/findutils.mo /usr/share/locale/ja/LC_MESSAGES/findutils.mo /usr/share/locale/ko/LC_MESSAGES/findutils.mo /usr/share/locale/lg/LC_MESSAGES/findutils.mo /usr/share/locale/lt/LC_MESSAGES/findutils.mo /usr/share/locale/ms/LC_MESSAGES/findutils.mo /usr/share/locale/nl/LC_MESSAGES/findutils.mo /usr/share/locale/pl/LC_MESSAGES/findutils.mo /usr/share/locale/pt/LC_MESSAGES/findutils.mo /usr/share/locale/pt_BR/LC_MESSAGES/findutils.mo /usr/share/locale/ro/LC_MESSAGES/findutils.mo /usr/share/locale/ru/LC_MESSAGES/findutils.mo /usr/share/locale/rw/LC_MESSAGES/findutils.mo /usr/share/locale/sk/LC_MESSAGES/findutils.mo /usr/share/locale/sl/LC_MESSAGES/findutils.mo /usr/share/locale/sr/LC_MESSAGES/findutils.mo /usr/share/locale/sv/LC_MESSAGES/findutils.mo /usr/share/locale/tr/LC_MESSAGES/findutils.mo /usr/share/locale/uk/LC_MESSAGES/findutils.mo /usr/share/locale/vi/LC_MESSAGES/findutils.mo /usr/share/locale/zh_CN/LC_MESSAGES/findutils.mo /usr/share/locale/zh_TW/LC_MESSAGES/findutils.mo /usr/share/man/man1/find.1.gz /usr/share/man/man1/find2perl.1.gz /usr/share/man/man1/oldfind.1.gz /usr/share/man/man8/btrfs-find-root.8.gz /usr/share/man/man8/findfs.8.gz /usr/share/man/man8/findmnt.8.gz locate 명령어는 -n 옵션으로 출력 ...

Windows용 Outlook / 무료 전자 메일 클라이언트

Windows용 Outlook / 무료 전자 메일 클라이언트

윈도우 10 또는 윈도우 11에는 메일 앱이 있다. 그 앱이 2024년부터 Windows용 Outlook으로 대체된다. 메일 앱과 같은 별도의 프로그램이 아니라, Outlook의 무료 버전으로 생각하면 된다. 인터페이스나 사용법도 아웃룩과 같다. 설치는 Microsoft Store에서 하면 된다. 메일 주소만 입력하면 대부분 계정 추가가 자동으로 된다. 상용 Outlook과 다른 점은 광고가 붙는다는 것... 만약 상용 Outlook이 설치되어 있다면, 계정 ...

안드로이드 / 앱 / 골프존 / 비밀번호 변경, 닉네임 변경, 로그아웃

안드로이드 / 앱 / 골프존 / 비밀번호 변경, 닉네임 변경, 로그아웃

골프존 앱에서 비밀번호를 변경하거나 닉네임을 변경하거나 로그아웃을 하는 것은 한 곳에 모여 있다. 앱을 실행하고 를 누른다. 오른쪽 위의 설정 아이콘을 누른다. 를 누르면 닉네임을 변경할 수 있고, 내 정보에서 비밀번호를 변경할 수 있다. 만약 비밀번호를 잊어서 변경을 할 수 없다면 로그아웃한 후 다시 로그인하면서 비밀번호 찾기를 한다. 이미지에 있는 카메라 아이콘을 누르면 프로필 ...

일러스트레이터(Illustrator) 대체 프로그램 7가지

Adobe Illustrator는 벡터 그래픽 디자인 소프트웨어의 표준이지만, 고가의 가격 때문에 대체 프로그램을 찾는 사람들이 많다. 아래는 다양한 기능을 제공하면서 저렴하거나 무료로 사용할 수 있는 Illustrator 대체 프로그램이다. 1. Inkscape 특징 : 무료 오픈 소스 벡터 그래픽 에디터로, Illustrator와 유사한 기능을 제공한다. SVG 파일 포맷을 기본으로 사용하며, 다양한 파일 포맷을 지원한다. 장점 : 무료, ...

아이피타임(ipTIME) 공유기 / Easy Mesh 구성하는 방법

아이피타임(ipTIME) 공유기 / Easy Mesh 구성하는 방법

ipTIME의 Easy Mesh는 여러 개의 공유기를 묶어서 하나의 무선 네트워크를 만드는 기능이다. 구형 제품도 펌웨어 업그레이드로 구성 가능하다고 한다. 이지메시(EasyMesh) 기술은 무선 네트워크 장치(AP 또는 공유기)를 그물망(Mesh)처럼 연결하여 통합 무선 네트워크를 구축하는 기술로 일반적으로 중앙 제어를 위한 컨트롤러 공유기와 여기에 여러 개의 에이전트 공유기를 연결하여 구성된다. ipTIME의 이지메시(EasyMesh)는 특정모델에서만 지원하는 타사 메시(Mesh) ...

안드로이드 / 앱 / 카카오뱅크 / 외국에서 송금 받을 때 필요한 SWIFT 코드 알아내는 방법

안드로이드 / 앱 / 카카오뱅크 / 외국에서 송금 받을 때 필요한 SWIFT 코드 알아내는 방법

해외에서 송금을 받기 위해서는 계좌번호 말고도 다른 정보가 필요하다. 그 중 하나가 SWIFT 코드. 카카오뱅크의 SWIFT 코드를 알아내기 위해서는... 카카오뱅크 앱을 실행하고 를 누른다. 밑으로 내려가서 을 누른다. 를 누르면, SWIFT 코드를 확인할 수 있다. CITIKRSXKAK 해외에서 송금이 오면 사유를 확인하는 전화를 할 수도 있다고 한다. 소액이어도 전화가 올라나? ...

국세청 홈택스 / 세무서 발송 우편물 홈택스에서 보는 방법

국세청 홈택스 / 세무서 발송 우편물 홈택스에서 보는 방법

세무서에서 여러 가지 우편물을 보내온다. 만약 그 우편물을 분실했거나, 우편물을 받기 곤란한 상황이라면 어떻게 할까? 다행히 국세청 홈택스에서 최근 1년 우편물을 확인할 수 있다. 국세청 홈택스에 로그인한 후 로 간다. 를 클릭한다. 를 클릭하면... 우편물 발송 내역이 나온다. 를 클릭하면... 우편물의 내용을 볼 수 있다.

삼성 SSD / 삼성 매지션으로 펌웨어 업그레이드하는 방법

삼성 SSD / 삼성 매지션으로 펌웨어 업그레이드하는 방법

삼성 SSD 850을 사용하고 있습니다. 구입한지는 꽤 되었습니다. 구입 당시 사용하던 메인보드가 AHCI를 지원하지 않아서 성능에서 손해를 좀 보고 있었죠. 이번에 메인보드를 교체하면서 제대로 SSD를 사용해보자라고 마음 먹었습니다. 제일 먼저 한 것은 삼성 매지션 설치입니다. 삼성 매지션은 삼성 SSD 관리를 위한 소프트웨어로, 벤치마크, 최적화, 데이터 완전 삭제 등을 할 수 있습니다. 다운로드는 여기에서 ...

노트북 / 스티커 제거 방법

노트북 / 스티커 제거 방법

노트북을 사면 키보드 밑 터치패드 옆에 스티커가 붙어 있다. CPU 스티커, 그래픽 카드 스티커, AS 스티커 등 노트북마다 다르기는 하지만 3-4개는 항상 붙어 있다. 개인적인 성향이겠으나, 나는 그 스티커들을 좋아하지 않는다. 열심히 디자인한 노트북에 왜 붙였는지 이유를 모르겠다. 시스템 정보나 제품 설명에 다 나오는 것인데 말이다. 스티커가 노트북을 더 멋있게 만드는 ...