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

으로 바꿔보세요.

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

같은 카테고리의 다른 글
안드로이드 / 앱 / 페이스북 / 뉴스피드에서 동영상 소리, 자동 재생 없애는 방법

안드로이드 / 앱 / 페이스북 / 뉴스피드에서 동영상 소리, 자동 재생 없애는 방법

페이스북 앱의 뉴스피드에 동영상이 있으면 자동으로 재생되고 소리가 난다. 이를 해제하는 방법은... 오른쪽 위의 프로필 아이콘을 누른다. 밑으로 내려와서 을 누른다. 을 누르고... 를 누른다. 를 해제하면, 재생은 되나 소리는 나지 않는다. 재생을 아예 안하고 싶다면 으로 들어가서 설정한다.

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

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

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

IP 스푸핑, MAC 스푸핑, ARP 스푸핑

IP 스푸핑(IP Spoofing) IP 스푸핑은 네트워크 공격 기법 중 하나로, 공격자가 자신의 IP 주소를 위조하여 다른 컴퓨터나 네트워크 장치를 속이는 행위를 말합니다. 이 기법은 주로 권한 없는 접근, 데이터 도청, 서비스 거부(DoS) 공격 등을 수행하기 위해 사용됩니다. 작동 원리 IP 스푸핑은 IP 패킷 헤더에 있는 발신자 IP 주소(SRC IP)를 위조하여 공격 대상이 이를 ...

FreeCommander / 파일 관리 프로그램 / 소개 및 사용법

FreeCommander / 파일 관리 프로그램 / 소개 및 사용법

FreeCommander는 윈도우에서 사용할 수 있는 무료 파일 매니저입니다. 듀얼 패널을 지원하며, 대부분의 작업을 키보드로 할 수 있고, 대량의 파일을 관리할 때 편리합니다. 압축(풀기), 일괄 이름 변경, 싱크(동기화), FTP 등 유용한 툴도 포함하고 있습니다.

Gmail / 언어를 한국어로 설정하는 방법

Gmail / 언어를 한국어로 설정하는 방법

지메일(Gmail) 계정이 여러 개 있습니다. 한 계정에 오랜만에 로그인했는데, 언어가 영어로 되어있더군요. 앞으로 자주 사용할 거 같아 언어를 한국어로 바꾸었습니다. 오른쪽 위에 설정 아이콘을 클릭하고 를 클릭합니다. Gmail display language를 로 설정한 후... 밑으로 주욱 내려와서 를 클릭합니다. 한국어로의 변경이 완료되었습니다. 아웃룩 등 이메일 클라이언트에서도... 적용됩니다.

당구 / 길 / 대회전

당구 / 길 / 대회전

수구가 당구대 전체를 돌아서 득점하는 것을 대회전이라고 합니다. 파이브 앤 하프 시스템의 6 쿠션 포인트를 알면 대회전을 구사하는 게 쉬워집니다. 여러 가지 방식의 대회전이 있습니다.

엣지 / 즐겨찾기 내보내기, 즐겨찾기 가져오기

엣지 / 즐겨찾기 내보내기, 즐겨찾기 가져오기

마이크로소프트 엣지에서 즐겨찾기를 내보내고 가져오는 방법은 다음과 같다. 내보내기 오른쪽 위의 점 세 개 아이콘을 클릭하고 를 클릭한다. 검색 폼 옆에 있는 즐겨찾기 아이콘을 클릭해도 된다. 점 세 개 아이콘을 클릭한다. 를 클릭하면... HTML 형식으로 즐겨찾기를 내보낸다. 가져오기 를 클릭한다. 을 클릭한다. 선택 목록에서 [즐겨찾기 ...

리눅스 / 명령어 / 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 옵션으로 출력 ...

국세청 홈택스 / 매입 전자세금계산서 조회하고 인쇄하는 방법

국세청 홈택스 / 매입 전자세금계산서 조회하고 인쇄하는 방법

전자세금계산서 기업 간 거래를 할 때 주로 세금계산서를 증빙으로 주고받습니다. 예전엔 종이로 된 세금계산서를 사용했는데, 요즘엔 거의 다 전자세금계산서로 처리합니다. 전자세금계산서를 받게 되면, 보통 발급한 쪽에서 메일로 그 사실을 알려주고 열람이나 출력 가능한 링크를 보내줍니다. 그런데, 그 링크를 통해서만 열람 등이 가능한 것은 아닙니다. 전자세금계산서는 국세청 홈택스에서도 볼 수 있습니다. 거래처별로 확인하는 것 ...

안드로이드 / 앱 / 카카오톡 / 채팅방 알림 끄는 방법

안드로이드 / 앱 / 카카오톡 / 채팅방 알림 끄는 방법

카카오톡 채팅 방에는 알림을 끄는 기능이 있다. 그런데, 분명 알림을 껐는데도 계속 알림이 온다. 이유는 전체 설정이 알림 설정 여부와 상관없이 모든 알림을 받는 것이기 때문이다. 이 설정까지 바꿔야 원치 않는 알림을 안 받을 수 있다. 으로 간다. 으로 설정을 변경한다.