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

으로 바꿔보세요.

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

같은 카테고리의 다른 글
워드프레스 / 함수

워드프레스 / 함수

current_user_can() Returns whether the current user has the specified capability. Administrator라면 123을 출력한다. if ( current_user_can( 'administrator' ) ) { echo '123'; } is_admin()은 백엔드에서만 작동된다고 한다. has_post_thumbnail() 썸네일이 존재하는지 체크한다. wp_is_mobile() 모바일로 접속했는지 체크한다.

국세청 홈택스 / 지급명세서 조회하는 방법

국세청 홈택스 / 지급명세서 조회하는 방법

종합소득세 신고를 해야하는 5월이 되었습니다. 종합소득세 신고를 위해 제일 먼저 해야할 것은 총 수입을 계산하는 것이죠. 원천징수를 한 소득이라면 국세청 홈택스에서 쉽게 확인할 수 있습니다. 근로소득만 있다면 에서 받은 금액과 원천징수한 금액을 확인할 수 있습니다. 근로소득 외에 다른 소득도 있다면 로 가세요. 을 클릭하면... 원천징수를 당한 모든 소득에 ...

스토리지 / NAS / 특징, 장점

스토리지 / NAS / 특징, 장점

네트워크 연결 스토리지(NAS, Network Attached Storage)는 네트워크를 통해 여러 사용자와 디바이스가 중앙화된 스토리지 장치에 접근할 수 있도록 하는 파일 수준의 데이터 저장 장치입니다. NAS는 데이터 저장, 공유, 백업 등을 효율적으로 관리할 수 있는 솔루션으로 널리 사용됩니다. NAS의 주요 특징 파일 수준 스토리지 NAS는 파일 시스템을 제공하여, 사용자와 애플리케이션이 파일 단위로 데이터를 저장하고 접근할 ...

리눅스 / 파일 또는 디렉토리 이름 바꾸는 방법

파일 이름 바꾸기 mv는 파일을 이동시키는 명령어이다. 이 명령어를 이용해서 파일 이름을 바꿀 수 있다. 예를 들어 다음은 abc.txt를 xyz.txt로 바꾼다. # mv abc.txt xyz.txt 디렉토리 이름 바꾸기 디렉토리 이름을 바꾸는 것도 파일 이름 변경과 같다. 다음은 abc 디렉토리의 이름을 xyz로 바꾼다. # mv abc xyz

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

모니터 / 해상도

모니터 해상도는 화면에 표시되는 픽셀의 수를 의미하며, 가로 픽셀 수와 세로 픽셀 수로 표현됩니다. 예를 들어, 1920x1080 해상도는 가로 방향에 1920개의 픽셀, 세로 방향에 1080개의 픽셀이 있다는 뜻입니다. 해상도는 화면의 선명도와 세부 표현에 직접적인 영향을 미칩니다. 주요 해상도 종류 HD (High Definition) 해상도: 1280x720 (720p) 특징: 기본적인 HD 해상도로, 저가형 모니터와 TV에서 사용됩니다. 일반적인 ...

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

Ubuntu에서 패키지를 관리하는 명령어는 여러 가지가 있습니다. 그 중 널리 사용되는 것은 apt-get과 apt입니다. 아래는 apt를 이용하여 패키지를 설치하고 삭제하고 업그레이드하는 방법입니다. 대부분의 경우 apt-get을 사용해도 작동합니다. APT 사용법 패키지 목록을 갱신합니다 # apt update 모든 패키지를 최신 버전으로 업그레이드합니다. # apt upgrade abc 패키지를 설치합니다. 의존성있는 패키지도 함께 설치합니다. # apt install abc abc 패키지를 삭제합니다. 설정 ...

크롬 / 비밀번호 저장 설정하는 방법

크롬 / 비밀번호 저장 설정하는 방법

구글 크롬에는 비밀번호 저장 기능이 있다. 비밀번호 저장을 하면 동기화한 모든 기기에서 저장된 암호를 사용할 수 있다. 편리하긴 하지만, 공용 PC에서는 사용에 주의를 기울여야 한다. 비밀번호 저장 기능 사용 여부는 에서 한다. 를 클릭하고... 를 클릭한다. 을 클릭한다. 비밀번호 저장 기능을 사용했다면 저장된 비밀번호 목록을 볼 수 있다. 사이트를 클릭해서 ...

호스팅케이알 / 네임서버, DNS 설정하는 방법

호스팅케이알 / 네임서버, DNS 설정하는 방법

웹브라우저에서 도메인을 입력하면 그 도메인의 네임서버를 찾아가고, 네임서버에서 지정한 IP로 이동하게 된다. 예전에는 도메인 등록기관에서 네임서버 관련 서비스를 제공하지 않아 별도의 네임서버가 있어야 했지만, 요즘은 대부분 무료로 DNS 서비스를 제공한다. 호스팅케이알도 마찬가지이다. 도메인의 네임서버를 호스팅케이알이 제공하는 것으로 변경하면 DNS 서비스를 이용할 수 있다. 네임서버 변경하기 호스팅케이알에 로그인하고, 를 ...

안드로이드 / 앱 / 카카오뱅크 / 입출금 알림 설정하는 방법

안드로이드 / 앱 / 카카오뱅크 / 입출금 알림 설정하는 방법

입출금 알림 앱 은행마다 입출금이 있을 때 푸시 알림을 보내주는 앱이 있습니다. 우리은행은 원터치 알림, 국민은행은 KB스타알림이죠. 인터넷 뱅킹앱과는 다른 것이어서 따로 설치를 하고 설정해야 합니다. 입출금 내역을 알려주는 것은 편한데, 별도의 앱을 설치하고 설정하는 것이 좀 번거롭습니다. 하지만, 카카오뱅크는 다릅니다. 처음부터 앱 사용을 가정하고 있어서 입출금 알림 기능이 카카오뱅크 앱에 포함되어 있습니다. 기본 ...