패키지 관리(Debian/Ubuntu): `apt`, `dpkg`
`apt`와 `dpkg`를 사용하여 Debian 기반 시스템의 소프트웨어 패키지를 관리하는 방법을 배웁니다.
패키지 관리(Debian/Ubuntu): `apt`, `dpkg`은(는) CoddyKit의 무료 Linux Command Line Mastery 강의입니다. 이것은 4개 중 2번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Linux Command Line Mastery 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Linux Command Line Mastery 강의에는 총 4개의 강의가 포함되어 있습니다.
이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.
Intro to Package Management
Welcome to package management! On Linux, software comes in packages. These are archives containing program files, documentation, and metadata.
A package manager is a tool that automates the installation, upgrade, configuration, and removal of software. It handles dependencies, ensuring all necessary components are installed.
`dpkg`: The Core Tool
On Debian-based systems (like Ubuntu), the fundamental tool for managing packages is dpkg. It's a low-level tool that directly interacts with .deb files (Debian package files).
dpkginstalls, removes, and manages individual.debpackages.- It does NOT automatically handle dependencies. If a package needs others, you must install them yourself.
Installing with `dpkg`
To install a .deb file you've downloaded, you use the -i (or --install) option with dpkg.
Remember, if the package has dependencies, dpkg will warn you and the installation might fail or be incomplete until those dependencies are met.
sudo dpkg -i /path/to/your-package.debListing `dpkg` Packages
You can query dpkg to see information about installed packages. The -l (or --list) option shows all installed packages.
You can pipe its output to grep to search for specific packages.
dpkg -l | grep firefox`apt`: The Smarter Manager
While dpkg handles individual .deb files, apt (Advanced Package Tool) is the user-friendly, high-level front-end. It works with repositories (servers holding many packages).
apt automatically handles dependencies, fetches packages from repositories, and simplifies system-wide updates.
Syncing with `apt update`
Before installing or upgrading, you should always run apt update. This command downloads the latest package information from the configured repositories.
It does NOT install new software or update existing ones, it only updates the list of what's available.
sudo apt updateInstalling Apps with `apt install`
To install new software from the repositories, use apt install followed by the package name. apt will resolve and install all necessary dependencies.
You'll be prompted to confirm the installation before it proceeds.
sudo apt install htopUpgrading Your System
To upgrade all installed packages to their latest available versions (based on your updated package lists), use apt upgrade.
This is crucial for security updates and new features. It's a good practice to run apt update before apt upgrade.
sudo apt upgradeRemoving Packages
When you no longer need a package, you can remove it using apt remove or apt purge.
apt remove package_name: Deletes the package but keeps its configuration files.apt purge package_name: Deletes the package AND its configuration files, for a cleaner uninstall.
sudo apt remove libreoffice-writerPackage Management Quiz
You've learned about the two main package management tools on Debian-based systems. Let's test your understanding!
Summary: `apt` & `dpkg`
Great job! You've learned about Debian's powerful package management system:
dpkg: The low-level tool for individual.debfiles, without dependency resolution.apt: The high-level, user-friendly tool for managing packages from repositories, handling dependencies automatically.
Key apt commands include update, install, upgrade, remove, and purge.
자주 묻는 질문
“패키지 관리(Debian/Ubuntu): `apt`, `dpkg`” 강의는 무료인가요?
네 — “패키지 관리(Debian/Ubuntu): `apt`, `dpkg`” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Linux Command Line Mastery 강의 전체를 잠금 해제할 수 있습니다. Linux Command Line Mastery 강의에는 총 4개의 강의가 포함되어 있습니다.
“패키지 관리(Debian/Ubuntu): `apt`, `dpkg`”에서 뭘 배우나요?
`apt`와 `dpkg`를 사용하여 Debian 기반 시스템의 소프트웨어 패키지를 관리하는 방법을 배웁니다. 브라우저에서 직접 실행하는 실습 코드로 Linux Command Line Mastery을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.
Linux Command Line Mastery을(를) 시작하는 데 경험이 필요한가요?
사전 경험은 필요하지 않습니다. CoddyKit의 Linux Command Line Mastery은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 2번째 강의입니다.
“패키지 관리(Debian/Ubuntu): `apt`, `dpkg`” 강의는 얼마나 걸리나요?
대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.
이 Linux Command Line Mastery 강의에서 코드를 작성하고 실행할 수 있나요?
네. 모든 Linux Command Line Mastery 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.
이 강의의 모든 강의
- 보관 및 압축: `tar`, `gzip`, `bzip2`
- 패키지 관리(Debian/Ubuntu): `apt`, `dpkg`
- 패키지 관리(CentOS/Fedora): `yum`, `dnf`, `rpm`
- 소스에서 빌드하기: configure, make, make install