Linux中國
Fedora 中的 Toolbox 簡介
Toolbox 使你可以在容器中分類和管理開發環境,而無需 root 許可權或手動添加卷。它創建一個容器,你可以在其中安裝自己的命令行工具,而無需在基礎系統中安裝它們。當你沒有 root 許可權或無法直接安裝程序時,也可以使用它。本文會介紹 Toolbox 及其功能。
安裝 Toolbox
Silverblue 默認包含 Toolbox。對於 Workstation 和 Server 版本,你可以使用 dnf install toolbox 從默認倉庫中獲取它。
創建 Toolbox
打開終端並運行 toolbox enter。程序將自動請求許可來下載最新的鏡像,創建第一個容器並將你的 shell 放在該容器中。
$ toolbox enter
No toolbox containers found. Create now? [y/N] y
Image required to create toolbox container.
Download registry.fedoraproject.org/f30/fedora-toolbox:30 (500MB)? [y/N]: y
當前,Toolbox 和你的基本系統之間沒有區別。你的文件系統和軟體包未曾改變。下面是一個使用倉庫的示例,它包含 ~/src/resume 文件夾下的簡歷的文檔源文件。簡歷是使用 pandoc 工具構建的。
$ pwd
/home/rwaltr
$ cd src/resume/
$ head -n 5 Makefile
all: pdf html rtf text docx
pdf: init
pandoc -s -o BUILDS/resume.pdf markdown/*
$ make pdf
bash: make: command not found
$ pandoc -v
bash: pandoc: command not found
這個 toolbox 沒有構建簡歷所需的程序。你可以通過使用 dnf 安裝工具來解決此問題。由於正在容器中運行,因此不會提示你輸入 root 密碼。
$ sudo dnf groupinstall "Authoring and Publishing" -y && sudo dnf install pandoc make -y
...
$ make all #Successful builds
mkdir -p BUILDS
pandoc -s -o BUILDS/resume.pdf markdown/*
pandoc -s -o BUILDS/resume.html markdown/*
pandoc -s -o BUILDS/resume.rtf markdown/*
pandoc -s -o BUILDS/resume.txt markdown/*
pandoc -s -o BUILDS/resume.docx markdown/*
$ ls BUILDS/
resume.docx resume.html resume.pdf resume.rtf resume.txt
運行 exit 可以退出 toolbox。
$ cd BUILDS/
$ pandoc --version || ls
pandoc 2.2.1
Compiled with pandoc-types 1.17.5.4, texmath 0.11.1.2, skylighting 0.7.5
...
for a particular purpose.
resume.docx resume.html resume.pdf resume.rtf resume.txt
$ exit
logout
$ pandoc --version || ls
bash: pandoc: command not found...
resume.docx resume.html resume.pdf resume.rtf resume.txt
你會在主目錄中得到由 toolbox 創建的文件。而在 toolbox 中安裝的程序無法在外部訪問。
提示和技巧
本介紹僅涉及 toolbox 的表面。還有一些其他提示,但是你也可以查看官方文檔。
toolbox –help會顯示 Toolbox 的手冊頁。- 你可以一次有多個 toolbox。使用
toolbox create -c Toolboxname和toolbox enter -c Toolboxname。 - Toolbox 使用 Podman 來完成繁重的工作。使用
toolbox list可以查找 Toolbox 創建的容器的 ID。Podman 可以使用這些 ID 來執行rm和stop之類的操作。 (你也可以在此文章中閱讀有關 Podman 的更多信息。)
via: https://fedoramagazine.org/a-quick-introduction-to-toolbox-on-fedora/
作者:Ryan Walter 選題:lujun9972 譯者:geekpi 校對:wxy
本文轉載來自 Linux 中國: https://github.com/Linux-CN/archive
對這篇文章感覺如何?
太棒了
0
不錯
0
愛死了
0
不太好
0
感覺很糟
0
More in:Linux中國
捐贈 Let's Encrypt,共建安全的互聯網
隨著 Mozilla、蘋果和谷歌對沃通和 StartCom 這兩家 CA 公司處罰落定,很多使用這兩家 CA 所簽發證書的網站紛紛尋求新的證書籤發商。有一個非盈利組織可以為大家提供了免費、可靠和安全的 SSL 證書服務,這就是 Let's Encrypt 項目。現在,它需要您的幫助
Let's Encrypt 正式發布,已經保護 380 萬個域名
由於 Let's Encrypt 讓安裝 X.509 TLS 證書變得非常簡單,所以這個數量增長迅猛。
關於Linux防火牆iptables的面試問答
Nishita Agarwal是Tecmint的用戶,她將分享關於她剛剛經歷的一家公司(印度的一家私人公司Pune)的面試經驗。在面試中她被問及許多不同的問題,但她是iptables方面的專家,因此她想分享這些關於iptables的問題和相應的答案給那些以後可能會進行相關面試的人。 所有的問題和相應的答案都基於Nishita Agarwal的記憶並經過了重寫。 嗨,朋友!我叫Nishita Agarwal。我已經取得了理學學士學位,我的專業集中在UNIX和它的變種(BSD,Linux)。它們一直深深的吸引著我。我在存儲方面有1年多的經驗。我正在尋求職業上的變化,並將供職於印度的P
Lets Encrypt 已被所有主流瀏覽器所信任
旨在讓每個網站都能使用 HTTPS 加密的非贏利組織 Lets Encrypt 已經得了 IdenTrust的交叉簽名,這意味著其證書現在已經可以被所有主流的瀏覽器所信任。從這個裡程碑事件開始,訪問者訪問使用了Lets Encrypt 證書的網站不再需要特別配置就可以得到 HTTPS 安全保護了。 Lets Encrypt 的兩個中級證書 ...

















