您好,登錄后才能下訂單哦!
這篇文章主要介紹了Linux中apk命令有什么用,具有一定借鑒價(jià)值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。
apk install xxx apk search xxx # 支持正則 apk info xxx # 查看包的詳細(xì)信息 apk show # list local package # 卸載并刪除 包 apk del openssh openntp vim
upgrade命令升級(jí)系統(tǒng)已安裝的所以軟件包(一般包括內(nèi)核),當(dāng)然也可指定僅升級(jí)部分軟件包(通過(guò)-u或–upgrade選擇指定)。
apk update # 更新最新本地鏡像源 apk upgrade # 升級(jí)軟件 apk add --upgrade busybox # 指定升級(jí)部分軟件包
apk search # 查找所以可用軟件包 apk search -v # 查找所以可用軟件包及其描述內(nèi)容 apk search -v 'acf*' # 通過(guò)軟件包名稱(chēng)查找軟件包 apk search -v -d 'docker' # 通過(guò)描述文件查找特定的軟件包
info命令用于顯示軟件包的信息。
apk info # 列出所有已安裝的軟件包 apk info -a zlib # 顯示完整的軟件包信息 apk info --who-owns /sbin/lbu # 顯示指定文件屬于的包
還是蠻喜歡 alpine 的,簡(jiǎn)單純粹
apk add iproute2 # ss vs netstat ss -ptl apk add drill # drill vs nslookup&dig crond # 開(kāi)啟 cron 服務(wù) crontab -l -e apk add xxx apk search -v xxx apk info -a xxx apk info echo -e "http://mirrors.aliyun.com/alpine/v3.6/main\nhttp://mirrors.aliyun.com/alpine/v3.6/community" > /etc/apk/repositories apk update # storage ibu # alpine local backup # network echo "shortname" > /etc/hostname hostname -F /etc/hostname /etc/hosts /etc/resolv.conf # conig DNS modprobe ipv6 # enable ipv6 echo "ipv6" >> /etc/modules iface # config interface apk add iptables ip6tables iptables-doc /etc/init.d/networking restart # activate change apke add iputils # IPv6 traceroute traceroute6 ipv6.google.com awall # alpine wall # setup a openvpn server # post-install /etc/apk/repositories apk add cherokee --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted apk search -v --description 'NTP' # show description and search from description apk info -a zlib apk info -vv|sort apk info -r -R # require / depency apk version -v -l ' # show available updates apk upgrade -U -a apk add -u xxx # update xxx /etc/runlevels # runlevel apk add openrc # use openrc for init system rc-update add xxx # set to start on rc-service xxx start # equal -> /etc/init.d/xxx start rc-status adduser xxx passwd xxx apk add ansible # server ssh-keygen /etc/ansible/hosts apk add python # node ssh-copy-id apk add man man-pages mdocml-apropos less less-doc export PAGER=less /etc/rc.conf # /etc/rc.conf -> funny character apk add bash bash-doc bash-completion # bash apk add util-linux pciutils usbutils coreutils binutils findutils grep # grep / awk apk add build-base gcc abuild binutils binutils-doc gcc-doc # compile apk add cmake cmake-doc extra-cmake-modules extra-cmake-modules-doc apk add ccache ccache-doc apk add docker # docker rc-update add docker boot rc-service docker start apk add py-pip pip install docker-compose ln -s /usr/bin/docker-compose /usr/bin/doc # application apk add openssh # ssh rc-update add sshd /etc/init.d/sshd start /etc/sshd_config apk add dropbear # another openssh implementation
感謝你能夠認(rèn)真閱讀完這篇文章,希望小編分享的“Linux中apk命令有什么用”這篇文章對(duì)大家有幫助,同時(shí)也希望大家多多支持億速云,關(guān)注億速云行業(yè)資訊頻道,更多相關(guān)知識(shí)等著你來(lái)學(xué)習(xí)!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。