Linux command
opkg 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Install
opkg install [package]
Remove
opkg remove [package]
Update
opkg update
Upgrade
opkg upgrade [package(s)]
Example
opkg info [package]
List
opkg list
Example
opkg search [/path/to/file]
Example
opkg files [package]
说明
opkg is a lightweight package manager used primarily on OpenWrt and other embedded Linux systems. It provides functionality similar to apt or yum but with minimal resource requirements suitable for routers and IoT devices. The package manager handles dependencies, downloads packages from configured repositories, and manages the installation database. Configuration is stored in /etc/opkg.conf and repository lists in **/etc/opkg/*.conf**. Space is often limited on embedded devices, so opkg supports installing packages to external storage and manages package state efficiently.
参数
- install
- Install packages
- remove
- Remove packages
- update
- Update package lists from repositories
- upgrade
- Upgrade installed packages
- info
- Display package information
- list
- List available packages
- list-installed
- List installed packages
- search
- Find which package owns a file
- files
- List files installed by a package
- --force-depends
- Ignore dependency errors
- --force-overwrite
- Overwrite files from other packages
FAQ
What is the opkg command used for?
opkg is a lightweight package manager used primarily on OpenWrt and other embedded Linux systems. It provides functionality similar to apt or yum but with minimal resource requirements suitable for routers and IoT devices. The package manager handles dependencies, downloads packages from configured repositories, and manages the installation database. Configuration is stored in /etc/opkg.conf and repository lists in **/etc/opkg/*.conf**. Space is often limited on embedded devices, so opkg supports installing packages to external storage and manages package state efficiently.
How do I run a basic opkg example?
Run `opkg install [package]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does install do in opkg?
Install packages