mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-29 21:41:00 +08:00
commit
5a2197bb63
274
published/20200908 Deploy a deep learning model on Kubernetes.md
Normal file
274
published/20200908 Deploy a deep learning model on Kubernetes.md
Normal file
@ -0,0 +1,274 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (chunibyo-wly)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-13744-1.html)
|
||||
[#]: subject: (Deploy a deep learning model on Kubernetes)
|
||||
[#]: via: (https://opensource.com/article/20/9/deep-learning-model-kubernetes)
|
||||
[#]: author: (Chaimaa Zyani https://opensource.com/users/chaimaa)
|
||||
|
||||
在 Kubernetes 上部署一个深度学习模型
|
||||
======
|
||||
|
||||
> 了解如何使用 Kubermatic Kubernetes 平台来部署、扩展与管理图像识别预测的深度学习模型。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202109/01/233417ryy87hyza7jmgy33.jpg)
|
||||
|
||||
随着企业增加了对人工智能(AI)、机器学习(ML)与深度学习(DL)的使用,出现了一个关键问题:如何将机器学习的开发进行规模化与产业化?这些讨论经常聚焦于机器学习模型本身;然而,模型仅仅只是完整解决方案的其中一环。为了达到生产环境的应用和规模,模型的开发过程必须还包括一个可以说明开发前后关键活动以及可公用部署的可重复过程。
|
||||
|
||||
本文演示了如何使用 [Kubermatic Kubernetes 平台][2] 对图像识别预测的深度学习模型进行部署、扩展与管理。
|
||||
|
||||
Kubermatic Kubernetes 平台是一个生产级的开源 Kubernetes 集群管理工具,提供灵活性和自动化,与机器学习/深度学习工作流程整合,具有完整的集群生命周期管理。
|
||||
|
||||
### 开始
|
||||
|
||||
这个例子部署了一个用于图像识别的深度学习模型。它使用了 [CIFAR-10][3] 数据集,包含了 60,000 张分属 10 个类别的 32x32 彩色图,同时使用了 [Apache MXNet][5] 的 [Gluon][4] 与 NVIDIA GPU 进行加速计算。如果你希望使用 CIFAR-10 数据集的预训练模型,可以查阅其 [入门指南][6]。
|
||||
|
||||
使用训练集中的样本对模型训练 200 次,只要训练误差保持缓慢减少,就可以保证模型不会过拟合。下方图展示了训练的过程:
|
||||
|
||||
![深度学习模型训练 loss 图][7]
|
||||
|
||||
训练结束后,必须保存模型训练所得到的参数,以便稍后可以加载它们:
|
||||
|
||||
```
|
||||
file_name = "net.params"
|
||||
net.save_parameters(file_name)
|
||||
```
|
||||
|
||||
一旦你的模型训练好了,就可以用 Flask 服务器来封装它。下方的程序演示了如何接收请求中的一张图片作为参数,并在响应中返回模型的预测结果:
|
||||
|
||||
```
|
||||
from gluoncv.model_zoo import get_model
|
||||
import matplotlib.pyplot as plt
|
||||
from mxnet import gluon, nd, image
|
||||
from mxnet.gluon.data.vision import transforms
|
||||
from gluoncv import utils
|
||||
from PIL import Image
|
||||
import io
|
||||
import flask
|
||||
app = flask.Flask(__name__)
|
||||
|
||||
@app.route("/predict",methods=["POST"])
|
||||
def predict():
|
||||
if flask.request.method == "POST":
|
||||
if flask.request.files.get("img"):
|
||||
img = Image.open(io.BytesIO(flask.request.files["img"].read()))
|
||||
transform_fn = transforms.Compose([
|
||||
transforms.Resize(32),
|
||||
transforms.CenterCrop(32),
|
||||
transforms.ToTensor(),
|
||||
transforms.Normalize([0.4914, 0.4822, 0.4465], [0.2023, 0.1994, 0.2010])])
|
||||
img = transform_fn(nd.array(img))
|
||||
net = get_model('cifar_resnet20_v1', classes=10)
|
||||
net.load_parameters('net.params')
|
||||
pred = net(img.expand_dims(axis=0))
|
||||
class_names = ['airplane', 'automobile', 'bird', 'cat', 'deer',
|
||||
'dog', 'frog', 'horse', 'ship', 'truck']
|
||||
ind = nd.argmax(pred, axis=1).astype('int')
|
||||
prediction = 'The input picture is classified as [%s], with probability %.3f.'%
|
||||
(class_names[ind.asscalar()], nd.softmax(pred)[0][ind].asscalar())
|
||||
return prediction
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host='0.0.0.0')
|
||||
```
|
||||
|
||||
### 容器化模型
|
||||
|
||||
在将模型部署到 Kubernetes 前,你需要先安装 Docker 并使用你的模型创建一个镜像。
|
||||
|
||||
1. 下载、安装并启动 Docker:
|
||||
|
||||
```
|
||||
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
|
||||
sudo yum-config-manager --add-repo <https://download.docker.com/linux/centos/docker-ce.repo>
|
||||
sudo yum install docker-ce
|
||||
sudo systemctl start docker
|
||||
```
|
||||
|
||||
2. 创建一个你用来管理代码与依赖的文件夹:
|
||||
|
||||
```
|
||||
mkdir kubermatic-dl
|
||||
cd kubermatic-dl
|
||||
```
|
||||
|
||||
3. 创建 `requirements.txt` 文件管理代码运行时需要的所有依赖:
|
||||
|
||||
```
|
||||
flask
|
||||
gluoncv
|
||||
matplotlib
|
||||
mxnet
|
||||
requests
|
||||
Pillow
|
||||
```
|
||||
|
||||
4. 创建 `Dockerfile`,Docker 将根据这个文件创建镜像:
|
||||
|
||||
```
|
||||
FROM python:3.6
|
||||
WORKDIR /app
|
||||
COPY requirements.txt /app
|
||||
RUN pip install -r ./requirements.txt
|
||||
COPY app.py /app
|
||||
CMD ["python", "app.py"]
|
||||
```
|
||||
|
||||
这个 `Dockerfile` 主要可以分为三个部分。首先,Docker 会下载 Python 的基础镜像。然后,Docker 会使用 Python 的包管理工具 `pip` 安装 `requirements.txt` 记录的包。最后,Docker 会通过执行 `python app.py` 来运行你的脚本。
|
||||
|
||||
5. 构建 Docker 容器:
|
||||
|
||||
```
|
||||
sudo docker build -t kubermatic-dl:latest .
|
||||
```
|
||||
这条命令使用 `kubermatic-dl` 镜像为你当前工作目录的代码创建了一个容器。
|
||||
|
||||
6. 使用
|
||||
|
||||
```
|
||||
sudo docker run -d -p 5000:5000 kubermatic-dl
|
||||
```
|
||||
|
||||
命令检查你的容器可以在你的主机上正常运行。
|
||||
|
||||
7. 使用
|
||||
|
||||
```
|
||||
sudo docker ps -a
|
||||
```
|
||||
命令查看你本地容器的运行状态:
|
||||
|
||||
![查看容器的运行状态][9]
|
||||
|
||||
### 将你的模型上传到 Docker Hub
|
||||
|
||||
在向 Kubernetes 上部署模型前,你的镜像首先需要是公开可用的。你可以通过将你的模型上传到 [Docker Hub][10] 来将它公开。(如果你没有 Docker Hub 的账号,你需要先创建一个)
|
||||
|
||||
1. 在终端中登录 Docker Hub 账号:
|
||||
|
||||
```
|
||||
sudo docker login
|
||||
```
|
||||
|
||||
2. 给你的镜像打上标签,这样你的模型上传到 Docker Hub 后也能拥有版本信息:
|
||||
|
||||
```
|
||||
sudo docker tag <your-image-id> <your-docker-hub-name>/<your-app-name>
|
||||
|
||||
sudo docker push <your-docker-hub-name>/<your-app-name>
|
||||
```
|
||||
|
||||
![给镜像打上 tag][11]
|
||||
|
||||
3. 使用
|
||||
|
||||
```
|
||||
sudo docker images
|
||||
```
|
||||
|
||||
命令检查你的镜像的 ID。
|
||||
|
||||
### 部署你的模型到 Kubernetes 集群
|
||||
|
||||
1. 首先在 Kubermatic Kubernetes 平台创建一个项目, 然后根据 [快速开始][12] 创建一个 Kubernetes 集群。
|
||||
|
||||
![创建一个 Kubernetes 集群][13]
|
||||
|
||||
2. 下载用于访问你的集群的 `kubeconfig`,将它放置在下载目录中,并记得设置合适的环境变量,使得你的环境能找到它:
|
||||
|
||||
![Kubernetes 集群示例][14]
|
||||
|
||||
3. 使用 `kubectl` 命令检查集群信息,例如,需要检查 `kube-system` 是否在你的集群正常启动了就可以使用命令 `kubectl cluster-info`:
|
||||
|
||||
![查看集群信息][15]
|
||||
|
||||
4. 为了在集群中运行容器,你需要创建一个部署用的配置文件(`deployment.yaml`),再运行 `apply` 命令将其应用于集群中:
|
||||
|
||||
```
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: kubermatic-dl-deployment
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: kubermatic-dl
|
||||
replicas: 3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: kubermatic-dl
|
||||
spec:
|
||||
containers:
|
||||
- name: kubermatic-dl
|
||||
image: kubermatic00/kubermatic-dl:latest
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
kubectl apply -f deployment.yaml`
|
||||
```
|
||||
|
||||
5. 为了将你的部署开放到公网环境,你需要一个能够给你的容器创建外部可达 IP 地址的服务:
|
||||
|
||||
```
|
||||
kubectl expose deployment kubermatic-dl-deployment --type=LoadBalancer --port 80 --target-port 5000`
|
||||
```
|
||||
|
||||
6. 就快大功告成了!首先检查你布署的服务的状态,然后通过 IP 请求的你图像识别 API:
|
||||
|
||||
```
|
||||
kubectl get service
|
||||
```
|
||||
|
||||
![获取请求图像识别 API 的 IP 地址][16]
|
||||
|
||||
7. 最后根据你的外部 IP 使用以下两张图片对你的图像识别服务进行测试:
|
||||
|
||||
![马][17]
|
||||
|
||||
![狗][18]
|
||||
|
||||
![测试 API][19]
|
||||
|
||||
### 总结
|
||||
|
||||
在这篇教程中,你可以创建一个深度学习模型,并且使用 Flask 提供 [REST API][20] 服务。它介绍了如何将应用放在 Docker 容器中,如何将这个镜像上传到 Docker Hub 中,以及如何使用 Kubernetes 部署你的服务。只需几个简单的命令,你就可以使用 Kubermatic Kubernetes 平台部署该应用程序,并且开放服务给别人使用。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/9/deep-learning-model-kubernetes
|
||||
|
||||
作者:[Chaimaa Zyani][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[chunibyo-wly](https://github.com/chunibyo-wly)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/chaimaa
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/brain_computer_solve_fix_tool.png?itok=okq8joti (Brain on a computer screen)
|
||||
[2]: https://www.loodse.com/products/kubermatic/
|
||||
[3]: https://www.cs.toronto.edu/~kriz/cifar.html
|
||||
[4]: https://gluon.mxnet.io/
|
||||
[5]: https://mxnet.apache.org/
|
||||
[6]: https://gluon-cv.mxnet.io/build/examples_classification/demo_cifar10.html
|
||||
[7]: https://opensource.com/sites/default/files/uploads/trainingplot.png (Deep learning model training plot)
|
||||
[8]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[9]: https://opensource.com/sites/default/files/uploads/containerstatus.png (Checking the container's status)
|
||||
[10]: https://hub.docker.com/
|
||||
[11]: https://opensource.com/sites/default/files/uploads/tagimage.png (Tagging the image)
|
||||
[12]: https://docs.kubermatic.com/kubermatic/v2.13/installation/install_kubermatic/_installer/
|
||||
[13]: https://opensource.com/sites/default/files/uploads/kubernetesclusterempty.png (Create a Kubernetes cluster)
|
||||
[14]: https://opensource.com/sites/default/files/uploads/kubernetesexamplecluster.png (Kubernetes cluster example)
|
||||
[15]: https://opensource.com/sites/default/files/uploads/clusterinfo.png (Checking the cluster info)
|
||||
[16]: https://opensource.com/sites/default/files/uploads/getservice.png (Get the IP address to call your image recognition API)
|
||||
[17]: https://opensource.com/sites/default/files/uploads/horse.jpg (Horse)
|
||||
[18]: https://opensource.com/sites/default/files/uploads/dog.jpg (Dog)
|
||||
[19]: https://opensource.com/sites/default/files/uploads/testapi.png (Testing the API)
|
||||
[20]: https://www.redhat.com/en/topics/api/what-is-a-rest-api
|
116
published/20210719 Apps for daily needs part 2- office suites.md
Normal file
116
published/20210719 Apps for daily needs part 2- office suites.md
Normal file
@ -0,0 +1,116 @@
|
||||
[#]: subject: (Apps for daily needs part 2: office suites)
|
||||
[#]: via: (https://fedoramagazine.org/apps-for-daily-needs-part-2-office-suites/)
|
||||
[#]: author: (Arman Arisman https://fedoramagazine.org/author/armanwu/)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-13755-1.html)
|
||||
|
||||
满足日常需求的应用(二):办公套件
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
今天,几乎每个家庭都有一台台式电脑或笔记本电脑。这是因为计算机已经成为一个非常重要的要求。此外,不管是为了工作还是学习,许多人需要创建电子版的文档和演示文稿。因此,办公套件是几乎所有计算机上的必备应用程序。本文将介绍一些你可以在 Fedora Linux 上使用的开源办公套件。这些软件你可能需要安装。如果你不熟悉如何在 Fedora Linux 中添加软件包,请参阅我之前的文章 [安装 Fedora 34 工作站后要做的事情][4]。下面是满足日常需求的办公套件类的应用程序列表。
|
||||
|
||||
### LibreOffice
|
||||
|
||||
LibreOffice 是 GNU/Linux 用户中最流行的办公套件。它的用户界面和用户体验类似于微软 Office。这使得 LibreOffice 对于那些刚刚从微软 Office 迁移过来的人来说很容易学习。LibreOffice 有完整的功能,可以满足你在文档和演示方面的工作需要。它由六个应用程序组成:Writer、Calc、Impress、Draw、Math 和 Base。
|
||||
|
||||
第一个应用程序是 Writer,用于创建各种类型的文档,如信件、传真、议程、会议记录等。它是一个全功能的文字处理和桌面出版工具。第二个应用程序是 Calc,它是一个电子表格程序,非常适合以表格形式呈现数据和记录数据。Calc 可以创建简单的表格或进行专业的数据分析。第三个应用程序是 Impress,它是一个易于使用的演示应用程序。你可以很容易地选择你在演示幻灯片中想要的功能,如文本、图像、表格、图表等。
|
||||
|
||||
![LibreOffice Writer][5]
|
||||
|
||||
![LibreOffice Calc][6]
|
||||
|
||||
![LibreOffice Impress][7]
|
||||
|
||||
前面提到的三个 LibreOffice 应用程序是创建文档和演示文稿中最常用的应用程序。然而,LibreOffice 提供的其他三个应用程序也非常有用。第一个是 Draw,它可以用来创建从简单到复杂的图纸和图表。下一个应用程序是 Math,它可以帮助我们做出完美格式的数学和科学公式。最后一个是 Base,这是一个用于处理数据库的应用程序。
|
||||
|
||||
![LibreOffice Draw][8]
|
||||
|
||||
![LibreOffice Math][9]
|
||||
|
||||
![LibreOffice Base][10]
|
||||
|
||||
更多信息请见此链接:<https://www.libreoffice.org/>
|
||||
|
||||
### ONLYOFFICE
|
||||
|
||||
ONLYOFFICE 是一款与微软 Office 高度兼容的办公套件应用程序。因此,我们与使用微软 Office 的同事协作时就不必担心了,因为它可以读取各种文件格式,如 docx、xlsx 和 pptx。
|
||||
|
||||
ONLYOFFICE 提供了三种具有简洁和现代外观的应用程序。我们可以很容易地找到我们需要的功能和工具。虽然功能没有 LibreOffice 那么齐全,但也足以帮助我们创建良好的文档和演示文稿。
|
||||
|
||||
第一个应用程序是文档编辑器,它的功能与 LibreOffice 的 Writer 相同。它具有文字处理器所需的所有基本功能,如管理字体和样式、格式化文本、调整行距和段距、插入页眉和页脚、自定义页面布局和设置页边距。第二个应用程序是电子表格编辑器,它是一个用于处理数据并将其创建为表格格式的文件的应用程序。它是一个具有与 Calc 相同功能的应用程序。最后一个是演示文稿编辑器,它是一个演示文稿应用程序,其功能类似于 Impress。
|
||||
|
||||
不幸的是,ONLYOFFICE 在官方的 Fedora Linux 软件库中并没有提供。但是你仍然可以使用 Flatpak 或 Appimages 在 Fedora Linux 上安装它。
|
||||
|
||||
![ONLYOFFICE Documents Editor][11]
|
||||
|
||||
![ONLYOFFICE Spreadsheets Editor][12]
|
||||
|
||||
![ONLYOFFICE Presentations Editor][13]
|
||||
|
||||
更多信息请见此链接:<https://www.onlyoffice.com/desktop.aspx>
|
||||
|
||||
### Calligra
|
||||
|
||||
Calligra 是一个由 KDE 创建的办公套件。因此,这个应用程序实际上更适合于 KDE Plasma 桌面环境的用户。但它仍然可以在其他桌面环境中良好运行,例如使用 GNOME 的 Fedora 工作站。
|
||||
|
||||
Calligra 提供的几个应用程序的外观与 LibreOffice 或 ONLYOFFICE 略有不同。对于那些习惯于主流办公套件应用程序的人来说,可能需要一些适应。然而,Calligra 仍然是一个可靠的办公套件,足以支持我们的日常需求。
|
||||
|
||||
第一个应用程序是 Words,它是一个具有桌面出版功能的直观的文字处理器。它具有帮助我们进行文档创作的全面功能。第二个应用程序是 Sheets,它具有与 Calc 和电子表格编辑器相同的功能,是一个功能齐全的电子表格应用程序。第三个应用程序是 Stage,它可以帮助我们制作演示幻灯片。
|
||||
|
||||
![Calligra Words][14]
|
||||
|
||||
![Calligra Sheets][15]
|
||||
|
||||
![Calligra Stage][16]
|
||||
|
||||
这三个 Calligra 应用程序是创建文档和演示文稿最常用的应用程序。另外还有三个应用程序也非常有用。第一个是 Karbon,它可以用来创建从简单到复杂的图纸和图表。下一个应用程序是 Plan,这是一个项目管理应用程序,可以帮助管理具有多种资源的中等规模的项目。最后一个是 KEXI,它是一个可视化数据库应用程序的创建器。
|
||||
|
||||
![Calligra Karbon][17]
|
||||
|
||||
![Calligra Plan][18]
|
||||
|
||||
![Calligra Kexi][19]
|
||||
|
||||
更多信息请见此链接:<https://calligra.org/>
|
||||
|
||||
### 总结
|
||||
|
||||
这篇文章介绍了 3 个可以在 Fedora Linux 上使用的办公套件,以满足你的日常需要。如果你想拥有具有一套完整功能的办公套件,那么 LibreOffice 可能是正确的选择。如果想与微软 Office 有良好的兼容性,那么你可以选择 ONLYOFFICE。然而,如果你想要一个不同的用户界面和创建文档和演示文稿的体验,你可以试试 Calligra。希望这篇文章能帮助你选择合适的办公套件。如果你有使用这些应用程序的经验,请在评论中分享你的经验。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/apps-for-daily-needs-part-2-office-suites/
|
||||
|
||||
作者:[Arman Arisman][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://fedoramagazine.org/author/armanwu/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2021/07/FedoraMagz-Apps-2-Office-816x345.jpg
|
||||
[2]: https://unsplash.com/@brookecagle?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
||||
[3]: https://unsplash.com/s/photos/meeting-on-cafe-computer?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
||||
[4]: https://fedoramagazine.org/things-to-do-after-installing-fedora-34-workstation/
|
||||
[5]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-libre-writer-1-1024x575.png
|
||||
[6]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-libre-calc-1-1024x575.png
|
||||
[7]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-libre-impress-1-1024x575.png
|
||||
[8]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-libre-draw-1-1024x575.png
|
||||
[9]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-libre-math-1-1024x575.png
|
||||
[10]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-libre-base-1-1024x575.png
|
||||
[11]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-only-doc-1024x575.png
|
||||
[12]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-only-sheet-1024x575.png
|
||||
[13]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-only-presentation-1024x575.png
|
||||
[14]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-calligra-words-1024x575.png
|
||||
[15]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-calligra-sheets-1024x575.png
|
||||
[16]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-calligra-stage-1024x575.png
|
||||
[17]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-calligra-karbon-1-1024x575.png
|
||||
[18]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-calligra-plan-1024x575.png
|
||||
[19]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-calligra-kexi-1024x575.png
|
389
published/20210727 Analyze the Linux kernel with ftrace.md
Normal file
389
published/20210727 Analyze the Linux kernel with ftrace.md
Normal file
@ -0,0 +1,389 @@
|
||||
[#]: subject: (Analyze the Linux kernel with ftrace)
|
||||
[#]: via: (https://opensource.com/article/21/7/linux-kernel-ftrace)
|
||||
[#]: author: (Gaurav Kamathe https://opensource.com/users/gkamathe)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (mengxinayan)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-13752-1.html)
|
||||
|
||||
通过 ftrace 来分析 Linux 内核
|
||||
======
|
||||
|
||||
> 通过 `ftrace` 来了解 Linux 内核内部工作方式是一个好方法。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202109/05/151954cb5z5rg7zqa9lbzu.jpg)
|
||||
|
||||
操作系统的内核是最难以理解的软件之一。自从你的系统启动后,它会一直在后台运行。尽管每个用户都不与内核直接交互,但他们在内核的帮助下完成自己的计算任务。与内核的交互发生在调用系统调用或者用户日常使用的各种库或应用间接调用了系统调用。
|
||||
|
||||
在之前的文章里我介绍了如何使用 [strace][6] 来追踪系统调用。然而,使用 `strace` 时你的视野是有限的。它允许你查看特定参数的系统调用。并在工作完成后,看到其返回值或状态,以表明是成功还是失败。但是你无法知道内核在这段时间内发生了什么。除了系统调用外,还有很多其他活动内核中发生,而你却视而不见。
|
||||
|
||||
### ftrace 介绍
|
||||
|
||||
本文的旨在通过使用一个名为 `ftrace` 的机制来阐明追踪内核函数的一些情况。它使得任何 Linux 用户可以轻松地追踪内核,并且了解更多关于 Linux 内核内部如何工作。
|
||||
|
||||
`ftrace` 默认产生的输出往往是巨大的,因为内核总是忙碌的。为了节省空间,很多情况下我会通过截断来给出尽量小的输出。
|
||||
|
||||
我使用 Fedora 来演示下面的例子,但是它们应该在其他最新的 Linux 发行版上同样可以运行。
|
||||
|
||||
### 启用 ftrace
|
||||
|
||||
`ftrace` 现在已经是内核中的一部分了,你不再需要事先安装它了。也就是说,如果你在使用最近的 Linux 系统,那么 `ftrace` 是已经启用了的。为了验证 `ftrace` 是否可用,运行 `mount` 命令并查找 `tracefs`。如果你看到类似下面的输出,表示 `ftrace` 已经启用,你可以轻松地尝试本文中下面的例子。下面有些命令需要在 root 用户下使用(用 `sudo` 执行是不够的)。
|
||||
|
||||
```
|
||||
# mount | grep tracefs
|
||||
none on /sys/kernel/tracing type tracefs (rw,relatime,seclabel)
|
||||
```
|
||||
|
||||
要想使用 `ftrace`,你首先需要进入上面 `mount` 命令中找到的特定目录中,在那个目录下运行文章中的其他命令。
|
||||
|
||||
```
|
||||
# cd /sys/kernel/tracing
|
||||
```
|
||||
|
||||
### 一般的工作流程
|
||||
|
||||
首先,你需要理解捕捉踪迹和获取输出的一般流程。如果你直接运行 `ftrace`,不会运行任何特定的 `ftrace` 命令。相反的,基本操作是通过标准 Linux 命令来写入或读取一些文件。
|
||||
|
||||
一般的步骤如下:
|
||||
|
||||
1. 通过写入一些特定文件来启用/结束追踪
|
||||
2. 通过写入一些特定文件来设置/取消追踪时的过滤规则
|
||||
3. 从文件中读取基于第 1 和 2 步的追踪输出
|
||||
4. 从文件中清除早期输出或缓冲区
|
||||
5. 缩小到你的特定用例(你要追踪的内核函数),重复 1、2、3、4 步
|
||||
|
||||
### 可用的追踪器类型
|
||||
|
||||
有多种不同的追踪器可供使用。之前提到,在运行任何命令前,你需要进入一个特定的目录下,因为需要的文件在这些目录下。我在我的例子中使用了相对路径(而不是绝对路径)。
|
||||
|
||||
你可以查看 `available_tracers` 文件内容来查看所有可用的追踪器类型。你可以看下面列出了几个。不需要担心这些:
|
||||
|
||||
```
|
||||
$ pwd
|
||||
/sys/kernel/tracing
|
||||
|
||||
$ sudo cat available_tracers
|
||||
hwlat blk mmiotrace function_graph wakeup_dl wakeup_rt wakeup function nop
|
||||
```
|
||||
|
||||
在所有输出的追踪器中,我会聚焦于下面三个特殊的:启用追踪的 `function` 和 `function_graph`,以及停止追踪的 `nop`。
|
||||
|
||||
### 确认当前的追踪器
|
||||
|
||||
通常情况默认的追踪器设定为 `nop`。即在特殊文件中 `current_tracer` 中的 “无操作”,这意味着追踪目前是关闭的:
|
||||
|
||||
```
|
||||
$ pwd
|
||||
/sys/kernel/tracing
|
||||
|
||||
$ sudo cat current_tracer
|
||||
nop
|
||||
```
|
||||
|
||||
### 查看追踪输出
|
||||
|
||||
在启用任何追踪功能之前,请你看一下保存追踪输出的文件。你可以用 [cat][2] 命令查看名为 `trace` 的文件的内容:
|
||||
|
||||
```
|
||||
# cat trace
|
||||
|
||||
# tracer: nop
|
||||
#
|
||||
# entries-in-buffer/entries-written: 0/0 #P:8
|
||||
#
|
||||
# _-----=> irqs-off
|
||||
# / _----=> need-resched
|
||||
# | / _---=> hardirq/softirq
|
||||
# || / _--=> preempt-depth
|
||||
# ||| / delay
|
||||
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
|
||||
# | | | |||| | |
|
||||
```
|
||||
|
||||
### 启用 function 追踪器
|
||||
|
||||
你可以通过向 `current_tracer` 文件写入 `function` 来启用第一个追踪器 `function`(文件原本内容为 `nop`,意味着追踪是关闭的)。把这个操作看成是启用追踪的一种方式:
|
||||
|
||||
```
|
||||
$ pwd
|
||||
/sys/kernel/tracing
|
||||
|
||||
$ sudo cat current_tracer
|
||||
nop
|
||||
$ echo function > current_tracer
|
||||
$
|
||||
$ cat current_tracer
|
||||
function
|
||||
```
|
||||
|
||||
### 查看 function 追踪器的更新追踪输出
|
||||
|
||||
现在你已启用追踪,是时候查看输出了。如果你查看 `trace` 文件内容,你将会看到许多被连续写入的内容。我通过管道只展示了文件内容的前 20 行。根据左边输出的标题,你可以看到在某个 CPU 上运行的任务和进程 ID。根据右边输出的内容,你可以看到具体的内核函数和其父函数。中间显示了时间戳信息:
|
||||
|
||||
```
|
||||
# sudo cat trace | head -20
|
||||
|
||||
# tracer: function
|
||||
#
|
||||
# entries-in-buffer/entries-written: 409936/4276216 #P:8
|
||||
#
|
||||
# _-----=> irqs-off
|
||||
# / _----=> need-resched
|
||||
# | / _---=> hardirq/softirq
|
||||
# || / _--=> preempt-depth
|
||||
# ||| / delay
|
||||
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
|
||||
# | | | |||| | |
|
||||
<idle>-0 [000] d... 2088.841739: tsc_verify_tsc_adjust <-arch_cpu_idle_enter
|
||||
<idle>-0 [000] d... 2088.841739: local_touch_nmi <-do_idle
|
||||
<idle>-0 [000] d... 2088.841740: rcu_nocb_flush_deferred_wakeup <-do_idle
|
||||
<idle>-0 [000] d... 2088.841740: tick_check_broadcast_expired <-do_idle
|
||||
<idle>-0 [000] d... 2088.841740: cpuidle_get_cpu_driver <-do_idle
|
||||
<idle>-0 [000] d... 2088.841740: cpuidle_not_available <-do_idle
|
||||
<idle>-0 [000] d... 2088.841741: cpuidle_select <-do_idle
|
||||
<idle>-0 [000] d... 2088.841741: menu_select <-do_idle
|
||||
<idle>-0 [000] d... 2088.841741: cpuidle_governor_latency_req <-menu_select
|
||||
```
|
||||
|
||||
请记住当追踪打开后,这意味着追踪结果会被一直连续写入直至你关闭追踪。
|
||||
|
||||
### 关闭追踪
|
||||
|
||||
关闭追踪是简单的。你只需要在 `current_tracer` 文件中用 `nop` 替换 `function` 追踪器即可:
|
||||
|
||||
```
|
||||
$ sudo cat current_tracer
|
||||
function
|
||||
|
||||
$ sudo echo nop > current_tracer
|
||||
|
||||
$ sudo cat current_tracer
|
||||
nop
|
||||
```
|
||||
|
||||
### 启用 function_graph 追踪器
|
||||
|
||||
现在尝试第二个名为 `function_graph` 的追踪器。你可以使用和上面相同的步骤:在 `current_tracer` 文件中写入 `function_graph`:
|
||||
|
||||
```
|
||||
$ sudo echo function_graph > current_tracer
|
||||
|
||||
$ sudo cat current_tracer
|
||||
function_graph
|
||||
```
|
||||
|
||||
### function_tracer 追踪器的追踪输出
|
||||
|
||||
注意到目前 `trace` 文件的输出格式已经发生变化。现在,你可以看到 CPU ID 和内核函数的执行时长。接下来,一个花括号表示一个函数的开始,以及它内部调用了哪些其他函数:
|
||||
|
||||
```
|
||||
# cat trace | head -20
|
||||
|
||||
# tracer: function_graph
|
||||
#
|
||||
# CPU DURATION FUNCTION CALLS
|
||||
# | | | | | | |
|
||||
6) | n_tty_write() {
|
||||
6) | down_read() {
|
||||
6) | __cond_resched() {
|
||||
6) 0.341 us | rcu_all_qs();
|
||||
6) 1.057 us | }
|
||||
6) 1.807 us | }
|
||||
6) 0.402 us | process_echoes();
|
||||
6) | add_wait_queue() {
|
||||
6) 0.391 us | _raw_spin_lock_irqsave();
|
||||
6) 0.359 us | _raw_spin_unlock_irqrestore();
|
||||
6) 1.757 us | }
|
||||
6) 0.350 us | tty_hung_up_p();
|
||||
6) | mutex_lock() {
|
||||
6) | __cond_resched() {
|
||||
6) 0.404 us | rcu_all_qs();
|
||||
6) 1.067 us | }
|
||||
```
|
||||
|
||||
### 启用追踪的设置来增加追踪的深度
|
||||
|
||||
你可以使用下面的步骤来调整追踪器以看到更深层次的函数调用。完成之后,你可以查看 `trace` 文件的内容并发现输出变得更加详细了。为了文章的可读性,这个例子的输出被省略了:
|
||||
|
||||
```
|
||||
# cat max_graph_depth
|
||||
0
|
||||
|
||||
# echo 1 > max_graph_depth ## or:
|
||||
# echo 2 > max_graph_depth
|
||||
|
||||
# sudo cat trace
|
||||
```
|
||||
|
||||
### 查找要追踪的函数
|
||||
|
||||
上面的步骤足以让你开始追踪。但是它产生的输出内容是巨大的,当你想试图找到自己感兴趣的内容时,往往会很困难。通常你更希望能够只追踪特定的函数,而忽略其他函数。但如果你不知道它们确切的名称,你怎么知道要追踪哪些进程?有一个文件可以帮助你解决这个问题 —— `available_filter_functions` 文件提供了一个可供追踪的函数列表:
|
||||
|
||||
```
|
||||
$ sudo wc -l available_filter_functions
|
||||
63165 available_filter_functions
|
||||
```
|
||||
|
||||
### 查找一般的内核函数
|
||||
|
||||
现在试着搜索一个你所知道的简单内核函数。用户空间由 `malloc` 函数用来分配内存,而内核由 `kmalloc` 函数,它提供类似的功能。下面是所有与 `kmalloc` 相关的函数:
|
||||
|
||||
```
|
||||
$ sudo grep kmalloc available_filter_functions
|
||||
debug_kmalloc
|
||||
mempool_kmalloc
|
||||
kmalloc_slab
|
||||
kmalloc_order
|
||||
kmalloc_order_trace
|
||||
kmalloc_fix_flags
|
||||
kmalloc_large_node
|
||||
__kmalloc
|
||||
__kmalloc_track_caller
|
||||
__kmalloc_node
|
||||
__kmalloc_node_track_caller
|
||||
[...]
|
||||
```
|
||||
|
||||
### 查找内核模块或者驱动相关函数
|
||||
|
||||
在 `available_filter_functions` 文件的输出中,你可以看到一些以括号内文字结尾的行,例如下面的例子中的 `[kvm_intel]`。这些函数与当前加载的内核模块 `kvm_intel` 有关。你可以运行 `lsmod` 命令来验证:
|
||||
|
||||
```
|
||||
$ sudo grep kvm available_filter_functions | tail
|
||||
__pi_post_block [kvm_intel]
|
||||
vmx_vcpu_pi_load [kvm_intel]
|
||||
vmx_vcpu_pi_put [kvm_intel]
|
||||
pi_pre_block [kvm_intel]
|
||||
pi_post_block [kvm_intel]
|
||||
pi_wakeup_handler [kvm_intel]
|
||||
pi_has_pending_interrupt [kvm_intel]
|
||||
pi_update_irte [kvm_intel]
|
||||
vmx_dump_dtsel [kvm_intel]
|
||||
vmx_dump_sel [kvm_intel]
|
||||
|
||||
$ lsmod | grep -i kvm
|
||||
kvm_intel 335872 0
|
||||
kvm 987136 1 kvm_intel
|
||||
irqbypass 16384 1 kvm
|
||||
```
|
||||
|
||||
### 仅追踪特定的函数
|
||||
|
||||
为了实现对特定函数或模式的追踪,你可以利用 `set_ftrace_filter` 文件来指定你要追踪上述输出中的哪些函数。这个文件也接受 `*` 模式,它可以扩展到包括具有给定模式的其他函数。作为一个例子,我在我的机器上使用 ext4 文件系统。我可以用下面的命令指定 ext4 的特定内核函数来追踪:
|
||||
|
||||
```
|
||||
# mount | grep home
|
||||
/dev/mapper/fedora-home on /home type ext4 (rw,relatime,seclabel)
|
||||
|
||||
# pwd
|
||||
/sys/kernel/tracing
|
||||
|
||||
# cat set_ftrace_filter
|
||||
|
||||
#### all functions enabled ####
|
||||
$
|
||||
$ echo ext4_* > set_ftrace_filter
|
||||
$
|
||||
$ cat set_ftrace_filter
|
||||
ext4_has_free_clusters
|
||||
ext4_validate_block_bitmap
|
||||
ext4_get_group_number
|
||||
ext4_get_group_no_and_offset
|
||||
ext4_get_group_desc
|
||||
[...]
|
||||
```
|
||||
|
||||
现在当你可以看到追踪输出时,你只能看到与内核函数有关的 `ext4` 函数,而你之前已经为其设置了一个过滤器。所有其他的输出都被忽略了:
|
||||
|
||||
```
|
||||
# cat trace |head -20
|
||||
|
||||
## tracer: function
|
||||
#
|
||||
# entries-in-buffer/entries-written: 3871/3871 #P:8
|
||||
#
|
||||
# _-----=> irqs-off
|
||||
# / _----=> need-resched
|
||||
# | / _---=> hardirq/softirq
|
||||
# || / _--=> preempt-depth
|
||||
# ||| / delay
|
||||
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
|
||||
# | | | |||| | |
|
||||
cupsd-1066 [004] .... 3308.989545: ext4_file_getattr <-vfs_fstat
|
||||
cupsd-1066 [004] .... 3308.989547: ext4_getattr <-ext4_file_getattr
|
||||
cupsd-1066 [004] .... 3308.989552: ext4_file_getattr <-vfs_fstat
|
||||
cupsd-1066 [004] .... 3308.989553: ext4_getattr <-ext4_file_getattr
|
||||
cupsd-1066 [004] .... 3308.990097: ext4_file_open <-do_dentry_open
|
||||
cupsd-1066 [004] .... 3308.990111: ext4_file_getattr <-vfs_fstat
|
||||
cupsd-1066 [004] .... 3308.990111: ext4_getattr <-ext4_file_getattr
|
||||
cupsd-1066 [004] .... 3308.990122: ext4_llseek <-ksys_lseek
|
||||
cupsd-1066 [004] .... 3308.990130: ext4_file_read_iter <-new_sync_read
|
||||
```
|
||||
|
||||
### 排除要被追踪的函数
|
||||
|
||||
你并不总是知道你想追踪什么,但是,你肯定知道你不想追踪什么。因此,有一个 `set_ftrace_notrace` —— 请注意其中的 “no”。你可以在这个文件中写下你想要的模式,并启用追踪。这样除了所提到的模式外,任何其他东西都会被追踪到。这通常有助于删除那些使我们的输出变得混乱的普通功能:
|
||||
|
||||
```
|
||||
$ sudo cat set_ftrace_notrace
|
||||
#### no functions disabled ####
|
||||
```
|
||||
|
||||
### 具有目标性的追踪
|
||||
|
||||
到目前为止,你一直在追踪内核中发生的一切。但是,它无法帮助你追踪与某个特定命令有关的事件。为了达到这个目的,你可以按需打开和关闭跟踪,并且在它们之间,运行我们选择的命令,这样你就不会在跟踪输出中得到额外的输出。你可以通过向 `tracing_on` 写入 `1` 来启用跟踪,写 `0` 来关闭跟踪。
|
||||
|
||||
```
|
||||
# cat tracing_on
|
||||
0
|
||||
|
||||
# echo 1 > tracing_on
|
||||
|
||||
# cat tracing_on
|
||||
1
|
||||
|
||||
### Run some specific command that we wish to trace here ###
|
||||
|
||||
# echo 0 > tracing_on
|
||||
|
||||
# cat tracing_on
|
||||
0
|
||||
```
|
||||
|
||||
### 追踪特定的 PID
|
||||
|
||||
如果你想追踪与正在运行的特定进程有关的活动,你可以将该 PID 写入一个名为 `set_ftrace_pid` 的文件,然后启用追踪。这样一来,追踪就只限于这个 PID,这在某些情况下是非常有帮助的。
|
||||
|
||||
```
|
||||
$ sudo echo $PID > set_ftrace_pid
|
||||
```
|
||||
|
||||
### 总结
|
||||
|
||||
`ftrace` 是一个了解 Linux 内核内部工作的很好方式。通过一些练习,你可以学会对 `ftrace` 进行调整以缩小搜索范围。要想更详细地了解 `ftrace` 和它的高级用法,请看 `ftrace` 的核心作者 Steven Rostedt 写的这些优秀文章。
|
||||
|
||||
* [调试 Linux 内核,第一部分][3]
|
||||
* [调试 Linux 内核,第二部分][4]
|
||||
* [调试 Linux 内核,第三部分][5]
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/7/linux-kernel-ftrace
|
||||
|
||||
作者:[Gaurav Kamathe][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[萌新阿岩](https://github.com/mengxinayan)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/gkamathe
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer)
|
||||
[2]: https://opensource.com/article/19/2/getting-started-cat-command
|
||||
[3]: https://lwn.net/Articles/365835/
|
||||
[4]: https://lwn.net/Articles/366796/
|
||||
[5]: https://lwn.net/Articles/370423/
|
||||
[6]: https://linux.cn/article-11545-1.html
|
@ -1,30 +1,32 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (unigeorge)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-13726-1.html)
|
||||
[#]: subject: (A beginner’s guide to SSH for remote connection on Linux)
|
||||
[#]: via: (https://opensource.com/article/20/9/ssh)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
Linux 远程连接之 SSH 新手指南
|
||||
======
|
||||
学会使用安全外壳协议连接远程计算机。
|
||||
![woman on laptop sitting at the window][1]
|
||||
|
||||
使用 Linux,你只需要在键盘上输入命令,就可以巧妙地使用计算机(甚至这台计算机可以在世界上任何地方),这正是 Linux 最吸引人的特性之一。有了 OpenSSH,[POSIX][2] 用户就可以在有权限连接的计算机上打开安全外壳协议,然后远程使用。这对于许多 Linux 用户来说可能不过是日常任务,但从没操作过的人可能就会感到很困惑。本文介绍了如何为 <ruby>安全外壳协议<rt>secure shell</rt></ruby>(简称 SSH)连接配置两台计算机,以及如何在没有密码的情况下安全地从一台计算机连接到另一台计算机。
|
||||
> 学会使用安全外壳协议连接远程计算机。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202108/28/105409ztj7akfjpcluwjp3.jpg)
|
||||
|
||||
使用 Linux,你只需要在键盘上输入命令,就可以巧妙地使用计算机(甚至这台计算机可以在世界上任何地方),这正是 Linux 最吸引人的特性之一。有了 OpenSSH,[POSIX][2] 用户就可以在有权限连接的计算机上打开安全外壳协议,然后远程使用。这对于许多 Linux 用户来说可能不过是日常任务,但从没操作过的人可能就会感到很困惑。本文介绍了如何配置两台计算机的 <ruby>安全外壳协议<rt>secure shell</rt></ruby>(简称 SSH)连接,以及如何在没有密码的情况下安全地从一台计算机连接到另一台计算机。
|
||||
|
||||
### 相关术语
|
||||
|
||||
在讨论多台计算机时,如何将不同计算机彼此区分开可能会让人头疼。IT 社区拥有完善的术语来描述计算机联网的过程。
|
||||
|
||||
* **<ruby>服务<rt>service</rt></ruby>:**
|
||||
* <ruby>服务<rt>service</rt></ruby>:
|
||||
服务是指在后台运行的软件,因此它不会局限于仅供安装它的计算机使用。例如,Web 服务器通常托管着 Web 共享 _服务_。该术语暗含(但非绝对)它是没有图形界面的软件。
|
||||
* **<ruby>主机<rt>host</rt></ruby>:**
|
||||
主机可以是任何计算机。在 IT 中,任何计算机都可以称为 _主机_,因为从技术上讲,任何计算机都可以托管对其他计算机有用的应用程序。你可能不会把自己的笔记本电脑视为 `主机`,但其实上面可能正运行着一些对你、你的手机或其他计算机有用的服务。
|
||||
* **<ruby>本地<rt>local</rt></ruby>:**
|
||||
* <ruby>主机<rt>host</rt></ruby>:
|
||||
主机可以是任何计算机。在 IT 中,任何计算机都可以称为 _主机_,因为从技术上讲,任何计算机都可以<ruby>托管<rt>host</rt></ruby>对其他计算机有用的应用程序。你可能不会把自己的笔记本电脑视为 **主机**,但其实上面可能正运行着一些对你、你的手机或其他计算机有用的服务。
|
||||
* <ruby>本地<rt>local</rt></ruby>:
|
||||
本地计算机是指用户或某些特定软件正在使用的计算机。例如,每台计算机都会把自己称为 `localhost`。
|
||||
* **<ruby>远程<rt>remote</rt></ruby>:**
|
||||
* <ruby>远程<rt>remote</rt></ruby>:
|
||||
远程计算机是指你既没在其面前,也没有在实际使用的计算机,是真正意义上在 _远程_ 位置的计算机。
|
||||
|
||||
现在术语已经明确好,我们可以开始了。
|
||||
@ -59,19 +61,17 @@ $ sudo dnf install openssh-clients openssh-server
|
||||
$ sudo systemctl enable --now sshd
|
||||
```
|
||||
|
||||
你也可以在 GNOME 上的 **系统设置** 或 macOS 上的 **系统首选项** 中启用 SSH 服务。在 GNOME 桌面上,该设置位于 **Sharing** 面板中:
|
||||
你也可以在 GNOME 上的 **系统设置** 或 macOS 上的 **系统首选项** 中启用 SSH 服务。在 GNOME 桌面上,该设置位于 **共享** 面板中:
|
||||
|
||||
![在 GNOME 系统设置中激活 SSH][3]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][4])
|
||||
|
||||
### 开启安全外壳协议
|
||||
|
||||
现在你已经在远程计算机上安装并启用了 SSH,可以尝试使用密码登录作为测试。要访问远程计算机,你需要有用户帐户和密码。
|
||||
|
||||
远程用户不必与本地用户相同。只要拥有相应用户的密码,你就可以在远程机器上以任何用户的身份登录。例如,我在我的工作计算机上的用户是 `sethkenlon` ,但在我的个人计算机上是 `seth`。如果我正在使用我的个人计算机(即作为当前的本地计算机),并且想通过 SSH 连接到我的工作计算机,我可以通过将自己标识为 `sethkenlon` 并使用我的工作密码来实现连接。
|
||||
|
||||
要通过 SSH 连接到远程计算机,你必须知道其 <ruby>因特网协议<rt>internet protocol</rt></ruby> (简称IP) 地址或可解析的主机名。在远程计算机上使用 `ip` 命令可以查看该机器的 IP 地址:
|
||||
要通过 SSH 连接到远程计算机,你必须知道其 IP 地址或可解析的主机名。在远程计算机上使用 `ip` 命令可以查看该机器的 IP 地址:
|
||||
|
||||
```
|
||||
$ ip addr show | grep "inet "
|
||||
@ -81,9 +81,9 @@ inet 10.1.1.5/27 brd 10.1.1.31 [...]
|
||||
|
||||
如果远程计算机没有 `ip` 命令,可以尝试使用 `ifconfig` 命令(甚至可以试试 Windows 上通用的 `ipconfig` 命令)。
|
||||
|
||||
127.0.0.1 是一个特殊的地址,它实际上是 `localhost` 的地址。这是一个 `环回` 地址,系统使用它来找到自己。这在登录远程计算机时并没有什么用,因此在此示例中,远程计算机的正确 IP 地址为 10.1.1.5。在现实生活中,我的本地网络正在使用 10.1.1.0 子网,进而可得知前述正确的 IP 地址。如果远程计算机在不同的网络上,那么 IP 地址几乎可能是任何地址(但绝不会是 127.0.0.1),并且可能需要一些特殊的路由才能通过各种防火墙到达远程。如果你的远程计算机在同一个网络上,但想要访问比自己的网络更远的计算机,请阅读我之前写的关于 [在防火墙中打开端口][5] 的文章。
|
||||
`127.0.0.1` 是一个特殊的地址,它实际上是 `localhost` 的地址。这是一个<ruby>环回<rt>loopback</rt></ruby>地址,系统使用它来找到自己。这在登录远程计算机时并没有什么用,因此在此示例中,远程计算机的正确 IP 地址为 `10.1.1.5`。在现实生活中,我的本地网络正在使用 `10.1.1.0` 子网,进而可得知前述正确的 IP 地址。如果远程计算机在不同的网络上,那么 IP 地址几乎可能是任何地址(但绝不会是 `127.0.0.1`),并且可能需要一些特殊的路由才能通过各种防火墙到达远程。如果你的远程计算机在同一个网络上,但想要访问比自己的网络更远的计算机,请阅读我之前写的关于 [在防火墙中打开端口][5] 的文章。
|
||||
|
||||
如果你能通过 IP 地址 _或_ 主机名 ping 到远程机器,并且拥有登录帐户,那么就可以通过 SSH 接入远程机器:
|
||||
如果你能通过 IP 地址 _或_ 主机名 `ping` 到远程机器,并且拥有登录帐户,那么就可以通过 SSH 接入远程机器:
|
||||
|
||||
```
|
||||
$ ping -c1 10.1.1.5
|
||||
@ -93,7 +93,7 @@ $ ping -c1 akiton.local
|
||||
PING 10.1.1.5 (10.1.1.5) 56(84) bytes of data.
|
||||
```
|
||||
|
||||
至此就成功了一小步。再试试使用SSH登录:
|
||||
至此就成功了一小步。再试试使用 SSH 登录:
|
||||
|
||||
```
|
||||
$ whoami
|
||||
@ -107,7 +107,7 @@ sethkenlon
|
||||
|
||||
### 创建 SSH 密钥
|
||||
|
||||
要在没有密码的情况下安全地登录到另一台计算机,登陆者必须拥有 SSH 密钥。可能你的机器上已经有一个 SSH 密钥,但再多创建一个新密钥也没有什么坏处。SSH 密钥的生命周期是在本地计算机上开始的,它由两部分组成:一个是永远不会与任何人或任何东西共享的私钥,一个是可以复制到任何你想要无密码访问的远程机器上的公钥。
|
||||
要在没有密码的情况下安全地登录到另一台计算机,登录者必须拥有 SSH 密钥。可能你的机器上已经有一个 SSH 密钥,但再多创建一个新密钥也没有什么坏处。SSH 密钥的生命周期是在本地计算机上开始的,它由两部分组成:一个是永远不会与任何人或任何东西共享的私钥,一个是可以复制到任何你想要无密码访问的远程机器上的公钥。
|
||||
|
||||
有的人可能会创建一个 SSH 密钥,并将其用于从远程登录到 GitLab 身份验证的所有操作,但我会选择对不同的任务组使用不同的密钥。例如,我在家里使用一个密钥对本地机器进行身份验证,使用另一个密钥对我维护的 Web 服务器进行身份验证,再一个单独的密钥用于 Git 主机,以及又一个用于我托管的 Git 存储库,等等。在此示例中,我将只创建一个唯一密钥,以在局域网内的计算机上使用。
|
||||
|
||||
@ -135,7 +135,7 @@ bash$ whoami
|
||||
sethkenlon
|
||||
```
|
||||
|
||||
对局域网上的所有计算机重复此过程,你就将能够无密码浏览这个局域网上的每台主机。实际上,一旦你设置了无密码认证,你就可以编辑 `/etc/ssh/sshd_config` 文件来禁止密码认证。这有助于防止其他人使用 SSH 对计算机进行身份验证,除非他们拥有你的私钥。要想达到这个效果,可以在有 `sudo` 权限的文本编辑器中打开 `/etc/ssh/sshd_config` 并搜索字符串 `PasswordAuthentication`,将默认行更改为:
|
||||
对局域网上的所有计算机重复此过程,你就将能够无密码访问这个局域网上的每台主机。实际上,一旦你设置了无密码认证,你就可以编辑 `/etc/ssh/sshd_config` 文件来禁止密码认证。这有助于防止其他人使用 SSH 对计算机进行身份验证,除非他们拥有你的私钥。要想达到这个效果,可以在有 `sudo` 权限的文本编辑器中打开 `/etc/ssh/sshd_config` 并搜索字符串 `PasswordAuthentication`,将默认行更改为:
|
||||
|
||||
```
|
||||
PasswordAuthentication no
|
||||
@ -151,7 +151,7 @@ $
|
||||
|
||||
### 日常使用 SSH
|
||||
|
||||
OpenSSH 改变了人们对操作计算机的看法,使用户不再被束缚在面前的计算机上。使用 SSH,你可以访问家中的任何计算机,或者拥有帐户的服务器,甚至是移动和物联网设备。充分利用 SSH 也意味着解锁 Linux 终端的更多用途。如果你还没有习惯使用 SSH,请试一下它吧。试着适应 SSH,创建一些适当的密钥,以此更安全地使用计算机,打破必须与计算机面对面的局限性。
|
||||
OpenSSH 改变了人们对操作计算机的看法,使用户不再被束缚在面前的计算机上。使用 SSH,你可以访问家中的任何计算机,或者拥有帐户的服务器,甚至是移动和物联网设备。充分利用 SSH 也意味着解锁 Linux 终端的更多用途。如果你还没有使用过 SSH,请试一下它吧。试着适应 SSH,创建一些适当的密钥,以此更安全地使用计算机,打破必须与计算机面对面的局限性。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -160,7 +160,7 @@ via: https://opensource.com/article/20/9/ssh
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[unigeorge](https://github.com/unigeorge)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -3,18 +3,20 @@
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (alim0x)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-13727-1.html)
|
||||
|
||||
如何在 Windows 和 Linux 上确定系统使用 MBR 还是 GPT 分区
|
||||
如何在 Windows 和 Linux 上确定系统使用的是 MBR 还是 GPT 分区
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202108/28/165508gqjyigp3yz3gy6yy.jpg)
|
||||
|
||||
在你安装 Linux 或任何其他系统的时候,了解你的磁盘的正确分区方案是非常关键的。
|
||||
|
||||
目前有两种流行的分区方案,老一点的 MBR 和新一些的 GPT。现在大多数的电脑使用 GPT。
|
||||
|
||||
在制作 live 镜像或可启动 USB 设备时,一些工具(比如 [Rufus][1])会问你在用的磁盘分区情况。如果你在 MBR 分区的磁盘上选择 GPT 方案的话,制作出来的可启动 USB 设备可能会不起作用。
|
||||
在制作临场镜像或可启动 USB 设备时,一些工具(比如 [Rufus][1])会问你在用的磁盘分区情况。如果你在 MBR 分区的磁盘上选择 GPT 方案的话,制作出来的可启动 USB 设备可能会不起作用。
|
||||
|
||||
在这个教程里,我会展示若干方法,来在 Windows 和 Linux 系统上检查磁盘分区方案。
|
||||
|
||||
@ -48,15 +50,15 @@
|
||||
|
||||
命令行的方法应该在所有 Linux 发行版上都有效。
|
||||
|
||||
打开终端并使用 sudo 运行下列命令:
|
||||
打开终端并使用 `sudo` 运行下列命令:
|
||||
|
||||
```
|
||||
sudo parted -l
|
||||
```
|
||||
|
||||
上述命令实际上是一个基于命令行的 [Linux 分区管理器][5]。命令参数 -l 会列出系统中的所有磁盘以及它们的详情,里面包含了分区方案信息。
|
||||
上述命令实际上是一个基于命令行的 [Linux 分区管理器][5]。命令参数 `-l` 会列出系统中的所有磁盘以及它们的详情,里面包含了分区方案信息。
|
||||
|
||||
在命令输出中,寻找以 **Partition Table(分区表)**开头的行:
|
||||
在命令输出中,寻找以 **Partition Table**(分区表)开头的行:
|
||||
|
||||
![][6]
|
||||
|
||||
@ -76,17 +78,17 @@ Ubuntu 和一些其它基于 GNOME 的发行版内置了叫做 Disks 的图形
|
||||
|
||||
如果你没办法使用 GNOME Disks 工具,别担心,还有其它工具可以使用。
|
||||
|
||||
其中一款流行的工具是 Gparted。你应该可以在大多数 Linux 发行版的软件源中找到它。如果系统中没有安装的话,使用你的发行版的软件中心或[包管理器][9]来[安装 Gparted][8]。
|
||||
其中一款流行的工具是 Gparted。你应该可以在大多数 Linux 发行版的软件源中找到它。如果系统中没有安装的话,使用你的发行版的软件中心或 [包管理器][9] 来 [安装 Gparted][8]。
|
||||
|
||||
在 Gparted 中,通过菜单选择 **View-Device Information(查看—设备信息)**。它会在左下区域显示磁盘信息,这些信息中包含分区方案信息。
|
||||
在 Gparted 中,通过菜单选择 **View->Device Information**(查看—>设备信息)。它会在左下区域显示磁盘信息,这些信息中包含分区方案信息。
|
||||
|
||||
![][10]
|
||||
|
||||
看吧,也不是太复杂,对吗?现在你了解了好几种途径来确认你的系统使用的是 GPT 还是 MBR 分区方案。
|
||||
|
||||
同时我还要提一下,有时候磁盘还会有[混合分区方案][11]。这不是很常见,大多数时候分区不是 MBR 就是 GPT。
|
||||
同时我还要提一下,有时候磁盘还会有 [混合分区方案][11]。这不是很常见,大多数时候分区不是 MBR 就是 GPT。
|
||||
|
||||
有任何问题或建议?请在下方留下评论。
|
||||
有任何问题或建议,请在下方留下评论。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -95,7 +97,7 @@ via: https://itsfoss.com/check-mbr-or-gpt/
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[alim0x](https://github.com/alim0x)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,235 @@
|
||||
[#]: subject: (Brave vs. Firefox: Your Ultimate Browser Choice for Private Web Experience)
|
||||
[#]: via: (https://itsfoss.com/brave-vs-firefox/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-13736-1.html)
|
||||
|
||||
Brave vs. Firefox:你的私人网络体验的终极浏览器选择
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202108/30/223133tqzkg4pjpwwb8u4g.jpg)
|
||||
|
||||
Web 浏览器经过多年的发展,从下载文件到访问成熟的 Web 应用程序,已经有了长足的发展。
|
||||
|
||||
对于很多用户来说,Web 浏览器是他们如今完成工作的唯一需要。
|
||||
|
||||
因此,选择合适的浏览器就成为了一项重要的任务,它可以帮助改善你多年来的工作流程。
|
||||
|
||||
### Brave vs. Firefox
|
||||
|
||||
Brave 和 Mozilla Firefox 是两个最受到关注隐私的用户和开源爱好者欢迎的 Web 浏览器。
|
||||
|
||||
考虑到两者都非常注重隐私和安全,让我们看看它们到底能提供什么,以帮助你决定应该选择哪一个。
|
||||
|
||||
以下是我所使用的比较指标:
|
||||
|
||||
### 用户界面
|
||||
|
||||
用户界面是使用浏览器时的工作流程和体验的最大区别。
|
||||
|
||||
当然,你会有你的个人偏好,但它看起来越容易使用、越轻快、越干净,就越好。
|
||||
|
||||
![Brave 浏览器][12]
|
||||
|
||||
首先,Brave 与 Chrome 和微软 Edge 有着相似的外观和感受。它提供了一种简洁的体验,具有精简的 UI 元素,所有的基本选项都可以通过浏览器菜单访问。
|
||||
|
||||
它也提供了一个暗色主题。恰到好处的动画使得互动成为一种愉快的体验。
|
||||
|
||||
要定制它,你可以选择使用 Chrome Web 商店中的主题。
|
||||
|
||||
说到 Mozilla Firefox,多年来它经历了几次重大的重新设计,其最新的用户界面试图提供与 Chrome 更接近的体验。
|
||||
|
||||
![Firefox 浏览器][13]
|
||||
|
||||
Firefox 浏览器的设计看起来令人印象深刻,并提供了干净利落的用户体验。如果需要的话,你还可以选择一个暗色主题,此外还有其它几个主题可供下载使用。
|
||||
|
||||
这两个 Web 浏览器都能提供良好的用户体验。
|
||||
|
||||
如果你想要一个熟悉的体验,但又具有一丝独特之处,Mozilla Firefox 是一个不错的选择。
|
||||
|
||||
但是,如果你想获得更快捷的体验、更好的动画感受,Brave 更有优势。
|
||||
|
||||
### 性能
|
||||
|
||||
实际上,我发现 Brave 加载网页的速度更快,整体的用户体验感觉很轻快。
|
||||
|
||||
Firefox 浏览器倒不是非常慢,但它绝对感觉比 Brave 慢。
|
||||
|
||||
为了给你一些参考,我还利用 [Basemark][14] 运行了一个基准测试,看看事实上是否真的如此。
|
||||
|
||||
你可以使用其他的浏览器基准测试工具来测试一下,但我用 Basemark 进行了各种测试,所以我们在这篇文章中会用它。
|
||||
|
||||
![Firefox 基准得分][15]
|
||||
|
||||
![Brave 基准得分][16]
|
||||
|
||||
Firefox 浏览器成功获得了 **630** 的得分,而 Brave 以大约 **792** 的得分取得了更好的成绩。
|
||||
|
||||
请注意,这些基准测试是在没有安装任何浏览器扩展程序的情况下,以默认的浏览器设置进行的。
|
||||
|
||||
当然,你的分数可能会有所不同,这取决于你在后台进行的工作和你系统的硬件配置。
|
||||
|
||||
这是我在 **i5-7400、16GB 内存和 GTX 1050ti GPU** 配置的桌面电脑上得到的结果。
|
||||
|
||||
一般来说,与大多数流行的浏览器相比,Brave 浏览器是一个快速的浏览器。
|
||||
|
||||
这两者都占用了相当大的系统资源,而且在一定程度上随着标签数量、访问的网页类型和使用的拦截扩展的种类而变化。
|
||||
|
||||
例如,Brave 在默认情况下会主动阻止广告,但 Firefox 在默认情况下不会阻止显示广告。而且,这也影响了系统资源的使用。
|
||||
|
||||
### 浏览器引擎
|
||||
|
||||
Firefox 浏览器在自己的 Gecko 引擎基础上,使用来自 [servo 研究项目][17] 的组件来进行改进。
|
||||
|
||||
目前,它基本上是一个改进的 Gecko 引擎,其项目名称是随着 Firefox Quantum 的发布而推出的 “Quantum”。
|
||||
|
||||
另一方面,Brave 使用 Chromium 的引擎。
|
||||
|
||||
虽然两者都有足够的能力处理现代 Web 体验,但基于 Chromium 的引擎更受欢迎,Web 开发人员通常会在基于 Chrome 的浏览器上定制他们的网站以获得最佳体验。
|
||||
|
||||
另外,有些服务恰好只支持基于 Chrome 的浏览器。
|
||||
|
||||
### 广告 & 追踪器阻止功能
|
||||
|
||||
![][18]
|
||||
|
||||
正如我之前提到的,Brave 在阻止跟踪器和广告方面非常积极。默认情况下,它已经启用了屏蔽功能。
|
||||
|
||||
Firefox 浏览器也默认启用了增强的隐私保护功能,但并不阻止显示广告。
|
||||
|
||||
如果你想摆脱广告,你得选择火狐浏览器的 “严格隐私保护模式”。
|
||||
|
||||
也就是说,火狐浏览器执行了一些独特的跟踪保护技术,包括“全面 Cookie 保护”,可以为每个网站隔离 Cookie 并防止跨站 Cookie 跟踪。
|
||||
|
||||
![][19]
|
||||
|
||||
这是在 [Firefox 86][20] 中引入的技术,要使用它,你需要启用 “严格隐私保护模式”。
|
||||
|
||||
总的来说,Brave 可能看起来是一个更好的选择,而 Mozilla Firefox 提供了更好的隐私保护功能。
|
||||
|
||||
### 容器
|
||||
|
||||
当你访问 Facebook 时,Firefox 还提供了一种借助容器来隔离网站活动的方法。换句话说,它可以防止 Facebook 跟踪你的站外活动。
|
||||
|
||||
你还可以使用容器来组织你的标签,并在需要时分离会话。
|
||||
|
||||
Brave 没有提供任何类似的功能,但它本身可以阻止跨站追踪器和 cookie。
|
||||
|
||||
### 奖励
|
||||
|
||||
![][21]
|
||||
|
||||
与 Firefox 不同,Brave 通过屏蔽网络上的其他广告来提供自己的广告网络。
|
||||
|
||||
当你选择显示 Brave 的隐私友好型广告时,你会得到可以放到加密货币钱包里的通证奖励,而你可以用这些通证来回馈你喜欢的网站。
|
||||
|
||||
虽然这是摆脱主流广告的一个很好的商业策略,但对于不想要任何形式的广告的用户来说,这可能没有用。
|
||||
|
||||
因此,Brave 以奖励的形式提供了一个替代方案,即使你屏蔽了广告,也可以帮助网站发展。如果这是你欣赏的东西,Brave 将是你的一个好选择。
|
||||
|
||||
### 跨平台可用性
|
||||
|
||||
你会发现 Brave 和 Firefox 都有 Linux、Windows 和 macOS 版本,也有用于 iOS 和 Android 的移动应用程序。
|
||||
|
||||
对于 Linux 用户来说,Firefox 浏览器捆绑在大多数的 Linux 发行版中。而且,你也可以在软件中心里找到它。除此之外,还有一个 [Flatpak][22] 包可用。
|
||||
|
||||
Brave 不能通过默认的软件库和软件中心获得。因此,你需要按照官方的说明来添加私有仓库,然后 [把 Brave 安装在你的 Linux 发行版中][23]。
|
||||
|
||||
### 同步
|
||||
|
||||
通过 Mozilla Firefox,你可以创建一个 Firefox 账户来跨平台同步你的所有数据。
|
||||
|
||||
![][24]
|
||||
|
||||
Brave 也可以让你跨平台同步,但你需要能访问其中一个设备才行。
|
||||
|
||||
![][25]
|
||||
|
||||
因此,Firefox 的同步更方便。
|
||||
|
||||
另外,你可以通过 Firefox 的账户访问它的“虚拟专用网络”、数据泄露监控器、电子邮件中继,以及密码管理器。
|
||||
|
||||
### 服务集成
|
||||
|
||||
从一开始 Firefox 就提供了更多的服务集成,包括 Pocket、“虚拟私有网络”、密码管理器,还有一些新产品,如 Firefox 中继。
|
||||
|
||||
如果你想通过你的浏览器访问这些服务,Firefox 将是你的方便选择。
|
||||
|
||||
虽然 Brave 确实提供了加密货币钱包,但它并不适合所有人。
|
||||
|
||||
![][26]
|
||||
|
||||
同样,如果你喜欢使用 [Brave Search][27],在使用 Brave 浏览器时,由于用户体验的原因,你可能体验会更顺滑。
|
||||
|
||||
### 可定制性 & 安全性
|
||||
|
||||
Firefox 浏览器在可定制性方面大放异彩。你可以通过众多选项来调整体验,也可以控制你的浏览器的隐私/安全。
|
||||
|
||||
自定义的能力使你可以让 Firefox 比 Brave 浏览器更安全。
|
||||
|
||||
而加固 Firefox 浏览器是一个我们将讨论的单独话题。略举一例,[Tor 浏览器][28] 只是一个定制的 Firefox 浏览器。
|
||||
|
||||
然而,这并不意味着 Brave 的安全性更低。总的来说,它是一个安全的浏览器,但你确实可以通过 Firefox 浏览器获得更多的选择。
|
||||
|
||||
### 扩展支持
|
||||
|
||||
毫无疑问,Chrome Web 商店提供了更多的扩展。
|
||||
|
||||
因此,如果你是一个使用大量扩展(或不断尝试新扩展)的人,Brave 明显比 Firefox 更有优势。
|
||||
|
||||
可能 Firefox 的扩展清单不是最大的,但它确实支持大多数的扩展。对于常见的使用情况,你很少能找到一个 Firefox 中没有的扩展。
|
||||
|
||||
### 你应该选择那个?
|
||||
|
||||
如果你希望尽量兼容现代的 Web 体验,并希望有更多的扩展,Brave 浏览器似乎更合适。
|
||||
|
||||
另一方面,Firefox 浏览器是日常浏览的绝佳选择,它具有业界首创的隐私功能,并为不懂技术的用户提供了方便的同步选项。
|
||||
|
||||
在选择它们中的任何一个时会有一些取舍。因此,你需要优先考虑你最想要的东西。
|
||||
|
||||
请在下面的评论中告诉我你的最终选择!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/brave-vs-firefox/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: tmp.5yJseRG2rb#ui
|
||||
[2]: tmp.5yJseRG2rb#perf
|
||||
[3]: tmp.5yJseRG2rb#engine
|
||||
[4]: tmp.5yJseRG2rb#ad
|
||||
[5]: tmp.5yJseRG2rb#container
|
||||
[6]: tmp.5yJseRG2rb#reward
|
||||
[7]: tmp.5yJseRG2rb#cp
|
||||
[8]: tmp.5yJseRG2rb#sync
|
||||
[9]: tmp.5yJseRG2rb#service
|
||||
[10]: tmp.5yJseRG2rb#customise
|
||||
[11]: tmp.5yJseRG2rb#extensions
|
||||
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/brave-ui-new.jpg?resize=800%2C450&ssl=1
|
||||
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/firefox-ui.jpg?resize=800%2C450&ssl=1
|
||||
[14]: https://web.basemark.com
|
||||
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/firefox-basemark.png?resize=800%2C598&ssl=1
|
||||
[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/basemark-brave.png?resize=800%2C560&ssl=1
|
||||
[17]: https://servo.org
|
||||
[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/brave-blocker.png?resize=800%2C556&ssl=1
|
||||
[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/firefox-blocker.png?resize=800%2C564&ssl=1
|
||||
[20]: https://news.itsfoss.com/firefox-86-release/
|
||||
[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/brave-rewards.png?resize=800%2C560&ssl=1
|
||||
[22]: https://itsfoss.com/what-is-flatpak/
|
||||
[23]: https://itsfoss.com/brave-web-browser/
|
||||
[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/firefox-sync.png?resize=800%2C651&ssl=1
|
||||
[25]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/brave-sync.png?resize=800%2C383&ssl=1
|
||||
[26]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/brave-crypto-wallet.png?resize=800%2C531&ssl=1
|
||||
[27]: https://itsfoss.com/brave-search-features/
|
||||
[28]: https://itsfoss.com/install-tar-browser-linux/
|
@ -0,0 +1,89 @@
|
||||
[#]: subject: "Automatically Synchronize Subtitle With Video Using SubSync"
|
||||
[#]: via: "https://itsfoss.com/subsync/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "turbokernel"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13722-1.html"
|
||||
|
||||
使用 SubSync 自动同步视频字幕
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202108/27/100003ts3j0odw05j0ooy3.jpg)
|
||||
|
||||
让我分享一个场景:当你想要观看一部电影或视频,而又需要字幕时,在你下载字幕后,却发现字幕没有正确同步,也没有其他更好的字幕可用。现在该怎么做?
|
||||
|
||||
你可以 [在 VLC 中按 G 或 H 键来同步字幕][1]。它可以为字幕增加延迟。如果字幕在整个视频中的时间延迟相同,这可能会起作用。但如果不是这种情况,就需要 SubSync 出场了。
|
||||
|
||||
### SubSync: 字幕语音同步器
|
||||
|
||||
[SubSync][2] 是一款实用的开源工具,可用于 Linux、macOS 和 Windows。
|
||||
|
||||
它通过监听音轨来同步字幕,这就是它的神奇之处。即使音轨和字幕使用的是不同的语言,它也能发挥作用。如果有必要,它也支持翻译,但我没有测试过这个功能。
|
||||
|
||||
我播放一个视频不同步的字幕进行了一个简单的测试。令我惊讶的是,它工作得很顺利,我得到了完美的同步字幕。
|
||||
|
||||
使用 SubSync 很简单。启动这个应用,它会让你添加字幕文件和视频文件。
|
||||
|
||||
![SubSync 用户界面][3]
|
||||
|
||||
你需要在界面上选择字幕和视频的语言。它可能会根据选择的语言下载额外的资源。
|
||||
|
||||
![SubSync 可下载附加语言支持包][4]
|
||||
|
||||
请记住,同步字幕需要一些时间,这取决于视频和字幕的长度。在等待过程完成时,你可以喝杯茶/咖啡或啤酒。
|
||||
|
||||
你可以看到正在进行同步的状态,甚至可以在完成之前保存它。
|
||||
|
||||
![SubSync 同步中][5]
|
||||
|
||||
同步完成后,你就可以点击保存按钮,把修改的内容保存到原文件中,或者把它保存为新的字幕文件。
|
||||
|
||||
![同步完成][6]
|
||||
|
||||
我不能保证所有情况下都能正常工作,但在我运行的样本测试中它是正常的。
|
||||
|
||||
### 安装 SubSync
|
||||
|
||||
SubSync 是一个跨平台的应用,你可以从它的 [下载页面][7] 获得 Windows 和 MacOS 的安装文件。
|
||||
|
||||
对于 Linux 用户,SubSync 是作为一个 Snap 包提供的。如果你的发行版已经提供了 Snap 支持,使用下面的命令来安装 SubSync:
|
||||
|
||||
```
|
||||
sudo snap install subsync
|
||||
```
|
||||
|
||||
请记住,下载 SubSync Snap 包将需要一些时间。所以要有一个稳定的网络连接或足够的耐心。
|
||||
|
||||
### 最后
|
||||
|
||||
就我个人而言,我很依赖字幕。即使我在 Netflix 上看英文电影,我也会把字幕打开。它有助于我清楚地理解每段对话,特别是在有强烈口音的情况下。如果没有字幕,我永远无法理解 [电影 Snatch 中 Mickey O'Neil(由 Brad Pitt 扮演)的一句话][8]。
|
||||
|
||||
使用 SubSync 比 [Subtitle Editor][9] 同步字幕要容易得多。对于像我这样在整个互联网上搜索不同国家的冷门或推荐(神秘)电影的人来说,除了 [企鹅字幕播放器][10],这是另一个很棒的工具。
|
||||
|
||||
如果你是一个“字幕用户”,你会喜欢这个工具。如果你使用过它,请在评论区分享你的使用经验。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/subsync/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[turbokernel](https://github.com/turbokernel)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/how-to-synchronize-subtitles-with-movie-quick-tip/
|
||||
[2]: https://subsync.online/
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/subsync-interface.png?resize=593%2C280&ssl=1
|
||||
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/subsync-subtitle-synchronize.png?resize=522%2C189&ssl=1
|
||||
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/subsync-subtitle-synchronize-1.png?resize=424%2C278&ssl=1
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/subsync-subtitle-synchronize-2.png?resize=424%2C207&ssl=1
|
||||
[7]: https://subsync.online/en/download.html
|
||||
[8]: https://www.youtube.com/watch?v=tGDO-9hfaiI
|
||||
[9]: https://itsfoss.com/subtitld/
|
||||
[10]: https://itsfoss.com/penguin-subtitle-player/
|
@ -3,24 +3,24 @@
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13723-1.html"
|
||||
|
||||
用 fastjar 和 gjar 构建一个 JAR 文件
|
||||
======
|
||||
fastjar、gjar 和 jar 等工具可以帮助你手动或以编程方式构建 JAR 文件,而其他工具链,如 Maven
|
||||
和 Gradle 提供了依赖性管理的功能。
|
||||
![Someone wearing a hardhat and carrying code ][1]
|
||||
|
||||
JAR 文件使用户很容易下载和启动他们想尝试的应用,很容易将该应用从一台计算机转移到另一台计算机(而且 Java 是跨平台的,所以可以鼓励自由分享),而且对于新的程序员来说,很容易理解 JAR 文件的内容,以找出使 Java 应用运行的原因。
|
||||
> fastjar、gjar 和 jar 等工具可以帮助你手动或以编程方式构建 JAR 文件,而其他工具链,如 Maven 和 Gradle 提供了依赖性管理的功能。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202108/27/105207oj4f44t4vbkkv4iq.jpg)
|
||||
|
||||
根据我的经验,Java 的许多优点之一是它能够以整齐方便的包(称为 JAR,或 Java 归档)来提供应用程序。JAR 文件使用户很容易下载并启动他们想尝试的应用,很容易将该应用从一台计算机转移到另一台计算机(而且 Java 是跨平台的,所以可以鼓励自由分享),而且对于新的程序员来说,查看 JAR 文件的内容,以找出使 Java 应用运行的原因是很容易理解的。
|
||||
|
||||
创建 JAR 文件的方法有很多,包括 Maven 和 Gradle 等工具链解决方案,以及 IDE 中的一键构建功能。然而,也有一些独立的命令,如 `jarfast`、`gjar` 和普通的 `jar`,它们对于快速和简单的构建是很有用的,并且可以演示 JAR 文件运行所需要的东西。
|
||||
|
||||
### 安装
|
||||
|
||||
在 Linux 上,你可能已经有了 `fastjar`、`gjar` 或 `jar` 命令,作为 OpenJDK 包或 GCJ(GCC-Java)的一部分。你可以通过输入不带参数的命令来测试这些命令是否已经安装:
|
||||
|
||||
在 Linux 上,你可能已经有了 `fastjar`、`gjar` 或作为 OpenJDK 包或 GCJ(GCC-Java)的一部分的 `jar` 命令。你可以通过输入不带参数的命令来测试这些命令是否已经安装:
|
||||
|
||||
```
|
||||
$ fastjar
|
||||
@ -35,7 +35,7 @@ Try `jar --help' for more information.
|
||||
|
||||
我安装了所有这些命令,但你只需要一个。所有这些命令都能够构建一个 JAR。
|
||||
|
||||
在 Fedora 等现代 Linux 系统上,输入一个缺失的命令会使你的操作系统提示安装。
|
||||
在 Fedora 等现代 Linux 系统上,输入一个缺失的命令你的操作系统提示安装它。
|
||||
|
||||
另外,你可以直接从 [AdoptOpenJDK.net][3] 为 Linux、MacOS 和 Windows [安装 Java][2]。
|
||||
|
||||
@ -43,45 +43,40 @@ Try `jar --help' for more information.
|
||||
|
||||
首先,你需要构建一个 Java 应用。
|
||||
|
||||
为了简单起见,在一个名为 hello.java 的文件中创建一个基本的 “hello world” 应用:
|
||||
|
||||
为了简单起见,在一个名为 `hello.java` 的文件中创建一个基本的 “hello world” 应用:
|
||||
|
||||
```
|
||||
class Main {
|
||||
public static void main([String][4][] args) {
|
||||
[System][5].out.println("Hello Java World");
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello Java World");
|
||||
}}
|
||||
```
|
||||
|
||||
这是一个简单的应用,在某种程度上淡化了管理外部依赖关系在现实世界中的重要性。不过,这也足以让你开始了解创建 JAR 所需的基本概念了。
|
||||
|
||||
接下来,创建一个清单文件。清单文件描述了 JAR 的 Java 环境。在这种情况下,最重要的信息是识别主类,这样执行 JAR 的 Java 运行时就知道在哪里可以找到应用的入口点。
|
||||
|
||||
接下来,创建一个清单文件。清单文件描述了 JAR 的 Java 环境。在这个例子里,最重要的信息是识别主类,这样执行 JAR 的 Java 运行时就知道在哪里可以找到应用的入口点。
|
||||
|
||||
```
|
||||
$ mdir META-INF
|
||||
$ echo "Main-Class: Main" > META-INF/MANIFEST.MF
|
||||
$ echo "Main-Class: Main" > META-INF/MANIFEST.MF
|
||||
```
|
||||
|
||||
### 编译 Java 字节码
|
||||
|
||||
接下来,把你的 Java 文件编译成 Java 字节码。
|
||||
|
||||
|
||||
```
|
||||
`$ javac hello.java`
|
||||
$ javac hello.java
|
||||
```
|
||||
|
||||
另外,你也可以使用 GCC 的 Java 组件来编译:
|
||||
|
||||
|
||||
```
|
||||
`$ gcj -C hello.java`
|
||||
$ gcj -C hello.java
|
||||
```
|
||||
|
||||
无论哪种方式,都会产生文件 `Main.class`:
|
||||
|
||||
|
||||
```
|
||||
$ file Main.class
|
||||
Main.class: compiled Java class data, version XX.Y
|
||||
@ -91,32 +86,28 @@ Main.class: compiled Java class data, version XX.Y
|
||||
|
||||
你有了所有需要的组件,这样你就可以创建 JAR 文件了。
|
||||
|
||||
我经常包含 Java 源码给好奇的用户参考,但_所有_需要的只是 `META-INF` 目录和类文件。
|
||||
|
||||
`fastjar` 命令使用类似于 [`tar` 命令][6]的语法。
|
||||
我经常包含 Java 源码给好奇的用户参考,这只需 `META-INF` 目录和类文件即可。
|
||||
|
||||
`fastjar` 命令使用类似于 [tar 命令][6]的语法。
|
||||
|
||||
```
|
||||
`$ fastjar cvf hello.jar META-INF Main.class`
|
||||
$ fastjar cvf hello.jar META-INF Main.class
|
||||
```
|
||||
|
||||
另外,你也可以用 `gjar`,方法大致相同,只是 `gjar` 需要你明确指定清单文件:
|
||||
|
||||
|
||||
```
|
||||
`$ gjar cvf world.jar Main.class -m META-INF/MANIFEST.MF`
|
||||
$ gjar cvf world.jar Main.class -m META-INF/MANIFEST.MF
|
||||
```
|
||||
|
||||
或者你可以使用 `jar` 命令。注意这个命令不需要 Manifest 文件,因为它会自动为你生成一个,但为了安全起见,我明确定义了主类:
|
||||
|
||||
或者你可以使用 `jar` 命令。注意这个命令不需要清单文件,因为它会自动为你生成一个,但为了安全起见,我明确定义了主类:
|
||||
|
||||
```
|
||||
`$ jar --create --file hello.jar --main-class=Main Main.class`
|
||||
$ jar --create --file hello.jar --main-class=Main Main.class
|
||||
```
|
||||
|
||||
测试你的应用:
|
||||
|
||||
|
||||
```
|
||||
$ java -jar hello.jar
|
||||
Hello Java World
|
||||
@ -135,7 +126,7 @@ via: https://opensource.com/article/21/8/fastjar
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -3,62 +3,60 @@
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13729-1.html"
|
||||
|
||||
用 ncdu 检查 Linux 中的可用磁盘空间
|
||||
======
|
||||
用 ncdu Linux 命令获得关于磁盘使用的交互式报告。
|
||||
![Check disk usage][1]
|
||||
|
||||
计算机用户多年来往往积累了大量的数据,无论是重要的个人项目、数码照片、视频、音乐还是代码库。虽然现在的硬盘往往相当大,但有时你必须退一步,评估一下你在硬盘上实际存储了什么。经典的 Linux 命令 [`df`][2] 和 [`du`][3] 是快速了解硬盘上的内容的方法,它们提供了一个可靠的报告,易于解析和处理。这对脚本和处理来说是很好的,但人的大脑对数百行的原始数据并不总是反应良好。认识到这一点,`ncdu` 命令旨在提供一份关于你在硬盘上使用的空间的交互式报告。
|
||||
> 用 ncdu Linux 命令获得关于磁盘使用的交互式报告。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202108/29/095819e87oz4ox6p40t6q0.jpg)
|
||||
|
||||
计算机用户多年来往往积累了大量的数据,无论是重要的个人项目、数码照片、视频、音乐还是代码库。虽然现在的硬盘往往相当大,但有时你必须退一步,评估一下你在硬盘上实际存储了什么。经典的 Linux 命令 [df][2] 和 [du][3] 是快速了解硬盘上的内容的方法,它们提供了一个可靠的报告,易于解析和处理。这对脚本和处理来说是很好的,但人的大脑对数百行的原始数据并不总是反应良好。认识到这一点,`ncdu` 命令旨在提供一份关于你在硬盘上使用的空间的交互式报告。
|
||||
|
||||
### 在 Linux 上安装 ncdu
|
||||
|
||||
在 Linux 上,你可以从你的软件仓库安装 `ncdu`。例如,在 Fedora 或 CentOS 上:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install ncdu`
|
||||
$ sudo dnf install ncdu
|
||||
```
|
||||
|
||||
在 BSD 上,你可以使用 [pkgsrc][4]。
|
||||
|
||||
在 macOS 上,你可以从 [MacPorts][5] 或 [HomeBrew][6] 安装。
|
||||
|
||||
另外,你也可以[从源码编译 ncdu][7]。
|
||||
另外,你也可以 [从源码编译 ncdu][7]。
|
||||
|
||||
### 使用 ncdu
|
||||
|
||||
ncdu 界面使用 ncurses 库,它将你的终端窗口变成一个基本的图形应用,所以你可以使用方向键来浏览菜单。
|
||||
`ncdu` 界面使用 ncurses 库,它将你的终端窗口变成一个基本的图形应用,所以你可以使用方向键来浏览菜单。
|
||||
|
||||
![ncdu interface][8]
|
||||
|
||||
CC BY-SA Seth Kenlon
|
||||
|
||||
这是 `ncdu` 的主要吸引力之一,也是它与最初的 `du` 命令不同的地方。
|
||||
|
||||
要获得一个目录的完整列表,启动 `ncdu`。它默认为当前目录。
|
||||
|
||||
|
||||
```
|
||||
$ ncdu
|
||||
ncdu 1.16 ~ Use the arrow keys to navigate, press ? for help
|
||||
\--- /home/tux -----------------------------------------------
|
||||
22.1 GiB [##################] /.var
|
||||
19.0 GiB [############### ] /Iso
|
||||
10.0 GiB [######## ] /.local
|
||||
7.9 GiB [###### ] /.cache
|
||||
3.8 GiB [### ] /Downloads
|
||||
3.6 GiB [## ] /.mail
|
||||
2.9 GiB [## ] /Code
|
||||
2.8 GiB [## ] /Documents
|
||||
2.3 GiB [# ] /Videos
|
||||
ncdu 1.16 ~ Use the arrow keys to navigate, press ? for help
|
||||
--- /home/tux -----------------------------------------------
|
||||
22.1 GiB [##################] /.var
|
||||
19.0 GiB [############### ] /Iso
|
||||
10.0 GiB [######## ] /.local
|
||||
7.9 GiB [###### ] /.cache
|
||||
3.8 GiB [### ] /Downloads
|
||||
3.6 GiB [## ] /.mail
|
||||
2.9 GiB [## ] /Code
|
||||
2.8 GiB [## ] /Documents
|
||||
2.3 GiB [# ] /Videos
|
||||
[...]
|
||||
```
|
||||
|
||||
这个列表首先显示了最大的目录(在这个例子中,那是 `~/.var` 目录,充满了很多的 flatpaks)。
|
||||
这个列表首先显示了最大的目录(在这个例子中,那是 `~/.var` 目录,塞满了很多的 flatpak 包)。
|
||||
|
||||
使用键盘上的方向键,你可以浏览列表,深入到一个目录,这样你就可以更好地了解什么东西占用了最大的空间。
|
||||
|
||||
@ -66,63 +64,57 @@ ncdu 1.16 ~ Use the arrow keys to navigate, press ? for help
|
||||
|
||||
你可以在启动 `ncdu` 时提供任意一个文件夹的路径:
|
||||
|
||||
|
||||
```
|
||||
`$ ncdu ~/chromiumos`
|
||||
$ ncdu ~/chromiumos
|
||||
```
|
||||
|
||||
### 排除目录
|
||||
|
||||
默认情况下,`ncdu` 包括一切可以包括的东西,包括符号链接和伪文件系统,如 procfs 和 sysfs。你可以用 `--exclude-kernfs` 来排除这些。
|
||||
|
||||
你可以使用 --exclude 选项排除任意文件和目录,并在后面加上一个匹配模式。
|
||||
|
||||
你可以使用 `--exclude` 选项排除任意文件和目录,并在后面加上一个匹配模式。
|
||||
|
||||
```
|
||||
$ ncdu --exclude ".var"
|
||||
19.0 GiB [##################] /Iso
|
||||
10.0 GiB [######### ] /.local
|
||||
7.9 GiB [####### ] /.cache
|
||||
3.8 GiB [### ] /Downloads
|
||||
19.0 GiB [##################] /Iso
|
||||
10.0 GiB [######### ] /.local
|
||||
7.9 GiB [####### ] /.cache
|
||||
3.8 GiB [### ] /Downloads
|
||||
[...]
|
||||
```
|
||||
|
||||
另外,你可以在文件中列出要排除的文件和目录,并使用 `--exclude-from` 选项来引用该文件:
|
||||
|
||||
```
|
||||
$ ncdu --exclude-from myexcludes.txt /home/tux
|
||||
10.0 GiB [######### ] /.local
|
||||
7.9 GiB [####### ] /.cache
|
||||
3.8 GiB [### ] /Downloads
|
||||
$ ncdu --exclude-from myexcludes.txt /home/tux
|
||||
10.0 GiB [######### ] /.local
|
||||
7.9 GiB [####### ] /.cache
|
||||
3.8 GiB [### ] /Downloads
|
||||
[...]
|
||||
```
|
||||
|
||||
### 颜色方案
|
||||
|
||||
你可以用 `--color dark` 选项给 ncdu 添加一些颜色。
|
||||
你可以用 `--color dark` 选项给 `ncdu` 添加一些颜色。
|
||||
|
||||
![ncdu color scheme][9]
|
||||
|
||||
CC BY-SA Seth Kenlon
|
||||
|
||||
### 包括符号链接
|
||||
|
||||
`ncdu` 输出按字面意思处理符号链接,这意味着一个指向 9GB 文件的符号链接只占用 40 个字节。
|
||||
|
||||
|
||||
```
|
||||
$ ncdu ~/Iso
|
||||
9.3 GiB [##################] CentOS-Stream-8-x86_64-20210427-dvd1.iso
|
||||
@ 0.0 B [ ] fake.iso
|
||||
9.3 GiB [##################] CentOS-Stream-8-x86_64-20210427-dvd1.iso
|
||||
@ 0.0 B [ ] fake.iso
|
||||
```
|
||||
|
||||
你可以用 `--follow-symlinks` 选项强制 ncdu 跟踪符号链接:
|
||||
|
||||
|
||||
```
|
||||
$ ncdu --follow-symlinks ~/Iso
|
||||
9.3 GiB [##################] fake.iso
|
||||
9.3 GiB [##################] CentOS-Stream-8-x86_64-20210427-dvd1.iso
|
||||
9.3 GiB [##################] fake.iso
|
||||
9.3 GiB [##################] CentOS-Stream-8-x86_64-20210427-dvd1.iso
|
||||
```
|
||||
|
||||
### 磁盘使用率
|
||||
@ -136,7 +128,7 @@ via: https://opensource.com/article/21/8/ncdu-check-free-disk-space-linux
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,121 @@
|
||||
[#]: subject: "How to Monitor Log Files in Real Time in Linux [Desktop and Server]"
|
||||
[#]: via: "https://www.debugpoint.com/2021/08/monitor-log-files-real-time/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13733-1.html"
|
||||
|
||||
如何在 Linux 中实时监控日志文件
|
||||
======
|
||||
|
||||
> 本教程解释了如何实时监控 Linux 日志文件(桌面、服务器或应用),以进行诊断和故障排除。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202108/30/082607bmf6nlud6sdy49rm.jpg)
|
||||
|
||||
当你在你的 Linux 桌面、服务器或任何应用中遇到问题时,你会首先查看各自的日志文件。日志文件通常是来自应用的文本和信息流,上面有一个时间戳。它可以帮助你缩小具体的实例,并帮助你找到任何问题的原因。它也可以帮助从网络上获得援助。
|
||||
|
||||
一般来说,所有的日志文件都位于 `/var/log` 中。这个目录包含以 `.log` 为扩展名的特定应用、服务的日志文件,它还包含单独的其他目录,这些目录包含其日志文件。
|
||||
|
||||
![log files in var-log][1]
|
||||
|
||||
所以说,如果你想监控一堆日志文件或特定的日志文件。这里有一些你可以做到方法。
|
||||
|
||||
### 实时监控 Linux 日志文件
|
||||
|
||||
#### 使用 tail 命令
|
||||
|
||||
使用 `tail` 命令是实时跟踪日志文件的最基本方法。特别是,如果你所在的服务器只有一个终端,没有 GUI。这是很有帮助的。
|
||||
|
||||
比如:
|
||||
|
||||
```
|
||||
tail /path/to/log/file
|
||||
```
|
||||
|
||||
![Monitoring multiple log files via tail][2]
|
||||
|
||||
使用开关 `-f` 来跟踪日志文件,它是实时更新的。例如,如果你想跟踪 `syslog`,你可以使用以下命令:
|
||||
|
||||
```
|
||||
tail -f /var/log/syslog
|
||||
```
|
||||
|
||||
你可以用一个命令监控多个日志文件,使用:
|
||||
|
||||
```
|
||||
tail -f /var/log/syslog /var/log/dmesg
|
||||
```
|
||||
|
||||
如果你想监控 http 或 sftp 或任何服务器,你也可以在这个命令中监控它们各自的日志文件。
|
||||
|
||||
记住,上述命令需要管理员权限。
|
||||
|
||||
#### 使用 lnav(日志文件浏览器)
|
||||
|
||||
![lnav Running][3]
|
||||
|
||||
`lnav` 是一个很好的工具,你可以用它来通过彩色编码的信息以更有条理的方式监控日志文件。在 Linux 系统中,它不是默认安装的。你可以用下面的命令来安装它:
|
||||
|
||||
```
|
||||
sudo apt install lnav ### Ubuntu
|
||||
sudo dnf install lnav ### Fedora
|
||||
```
|
||||
|
||||
好的是,如果你不想安装它,你可以直接下载其预编译的可执行文件,然后在任何地方运行。甚至从 U 盘上也可以。它不需要设置,而且有很多功能。使用 `lnav`,你可以通过 SQL 查询日志文件,以及其他很酷的功能,你可以在它的 [官方网站][4] 上了解。
|
||||
|
||||
一旦安装,你可以简单地用管理员权限从终端运行 `lnav`,它将默认显示 `/var/log` 中的所有日志并开始实时监控。
|
||||
|
||||
#### 关于 systemd 的 journalctl 说明
|
||||
|
||||
今天所有的现代 Linux 发行版大多使用 systemd。systemd 提供了运行 Linux 操作系统的基本框架和组件。systemd 通过 `journalctl` 提供日志服务,帮助管理所有 systemd 服务的日志。你还可以通过以下命令实时监控各个 systemd 服务和日志。
|
||||
|
||||
```
|
||||
journalctl -f
|
||||
```
|
||||
|
||||
下面是一些具体的 `journalctl` 命令,可以在一些情况下使用。你可以将这些命令与上面的 `-f` 开关结合起来,开始实时监控。
|
||||
|
||||
* 对紧急系统信息,使用:
|
||||
```
|
||||
journalctl -p 0
|
||||
```
|
||||
* 显示带有解释的错误:
|
||||
```
|
||||
journalctl -xb -p 3
|
||||
```
|
||||
* 使用时间控制来过滤输出:
|
||||
```
|
||||
journalctl --since "2020-12-04 06:00:00"
|
||||
journalctl --since "2020-12-03" --until "2020-12-05 03:00:00"
|
||||
journalctl --since yesterday
|
||||
journalctl --since 09:00 --until "1 hour ago"
|
||||
```
|
||||
|
||||
如果你想了解更多关于 `journalctl` 的细节,我已经写了一个 [指南][6]。
|
||||
|
||||
### 结束语
|
||||
|
||||
我希望这些命令和技巧能帮助你找出桌面或服务器问题/错误的根本原因。对于更多的细节,你可以随时参考手册,摆弄各种开关。如果你对这篇文章有什么意见或看法,请在下面的评论栏告诉我。
|
||||
|
||||
加油。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2021/08/monitor-log-files-real-time/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/log-files-in-var-log-1024x312.jpeg
|
||||
[2]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/Monitoring-multiple-log-files-via-tail-1024x444.jpeg
|
||||
[3]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/lnav-Running-1024x447.jpeg
|
||||
[4]: https://lnav.org/features
|
||||
[6]: https://www.debugpoint.com/2020/12/systemd-journalctl/
|
@ -0,0 +1,105 @@
|
||||
[#]: subject: "Access your iPhone on Linux with this open source tool"
|
||||
[#]: via: "https://opensource.com/article/21/8/libimobiledevice-iphone-linux"
|
||||
[#]: author: "Don Watkins https://opensource.com/users/don-watkins"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13737-1.html"
|
||||
|
||||
用这个开源工具在 Linux 上访问你的 iPhone
|
||||
======
|
||||
|
||||
> 通过使用 Libimobiledevice 从 Linux 与 iOS 设备进行通信。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202108/31/092907bc26qep3ekc73czl.jpg)
|
||||
|
||||
iPhone 和 iPad 绝不是开源的,但它们是流行的设备。许多拥有 iOS 备的人恰好也在使用大量的开源软件,包括 Linux。Windows 和 macOS 的用户可以通过使用苹果公司提供的软件与 iOS 设备通信,但苹果公司不支持 Linux 用户。开源程序员早在 2007 年(就在 iPhone 发布一年后)就以 Libimobiledevice(当时叫 libiphone)来拯救了人们,这是一个与 iOS 通信的跨平台解决方案。它可以在 Linux、Android、Arm 系统(如树莓派)、Windows、甚至 macOS 上运行。
|
||||
|
||||
Libimobiledevice 是用 C 语言编写的,使用原生协议与 iOS 设备上运行的服务进行通信。它不需要苹果公司的任何库,所以它完全是自由而开源的。
|
||||
|
||||
Libimobiledevice 是一个面向对象的 API,它捆绑了许多便于你使用的终端工具。该库支持苹果从最早到其最新的型号的 iOS 设备。这是多年来研究和开发的结果。该项目中的应用包括 `usbmuxd`、`ideviceinstaller`、`idevicerestore`、`ifuse`、`libusbmuxd`、`libplist`、`libirecovery` 和 `libideviceactivation`。
|
||||
|
||||
### 在 Linux 上安装 Libimobiledevice
|
||||
|
||||
在 Linux 上,你可能已经默认安装了 `libimobiledevice`。你可以通过你的软件包管理器或应用商店找到,或者通过运行项目中包含的一个命令:
|
||||
|
||||
```
|
||||
$ ifuse --help
|
||||
```
|
||||
|
||||
你可以用你的包管理器安装 `libimobiledevice`。例如,在 Fedora 或 CentOS 上:
|
||||
|
||||
```
|
||||
$ sudo dnf install libimobiledevice ifuse usbmuxd
|
||||
```
|
||||
|
||||
在 Debian 和 Ubuntu 上:
|
||||
|
||||
|
||||
```
|
||||
$ sudo apt install usbmuxd libimobiledevice6 libimobiledevice-utils
|
||||
```
|
||||
|
||||
或者,你可以从源代码 [下载][2] 并安装 `libimobiledevice`。
|
||||
|
||||
### 连接你的设备
|
||||
|
||||
当你安装了所需的软件包,将你的 iOS 设备连接到你的电脑。
|
||||
|
||||
为你的 iOS 设备建立一个目录作为挂载点。
|
||||
|
||||
```
|
||||
$ mkdir ~/iPhone
|
||||
```
|
||||
|
||||
接下来,挂载设备:
|
||||
|
||||
```
|
||||
$ ifuse ~/iPhone
|
||||
```
|
||||
|
||||
你的设备提示你,是否信任你用来访问它的电脑。
|
||||
|
||||
![iphone prompts to trust the computer][3]
|
||||
|
||||
*图 1:iPhone 提示你要信任该电脑。*
|
||||
|
||||
信任问题解决后,你会在桌面上看到新的图标。
|
||||
|
||||
![iphone icons appear on desktop][4]
|
||||
|
||||
*图 2:iPhone 的新图标出现在桌面上。*
|
||||
|
||||
点击 “iPhone” 图标,显示出你的 iPhone 的文件夹结构。
|
||||
|
||||
![iphone folder structure displayed][5]
|
||||
|
||||
*图 3:显示了 iPhone 的文件夹结构。*
|
||||
|
||||
我通常最常访问的文件夹是 `DCIM`,那里存放着我的 iPhone 照片。有时我在写文章时使用这些照片,有时有一些照片我想用 GIMP 等开源应用来增强。可以直接访问这些图片,而不是通过电子邮件把它们发给我自己,这是使用 `libimobiledevice` 工具的好处之一。我可以把这些文件夹中的任何一个复制到我的 Linux 电脑上。我也可以在 iPhone 上创建文件夹并删除它们。
|
||||
|
||||
### 发现更多
|
||||
|
||||
[Martin Szulecki][6] 是该项目的首席开发者。该项目正在寻找开发者加入他们的 [社区][7]。Libimobiledevice 可以改变你使用外设的方式,而无论你在什么平台上。这是开源的又一次胜利,这意味着它是所有人的胜利。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/8/libimobiledevice-iphone-linux
|
||||
|
||||
作者:[Don Watkins][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/don-watkins
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/idea_innovation_mobile_phone.png?itok=RqVtvxkd (A person looking at a phone)
|
||||
[2]: https://github.com/libimobiledevice/libimobiledevice/
|
||||
[3]: https://opensource.com/sites/default/files/1trust_0.png
|
||||
[4]: https://opensource.com/sites/default/files/2docks.png
|
||||
[5]: https://opensource.com/sites/default/files/2iphoneicon.png
|
||||
[6]: https://github.com/FunkyM
|
||||
[7]: https://libimobiledevice.org/#community
|
@ -3,23 +3,24 @@
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "unigeorge"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13730-1.html"
|
||||
|
||||
如何在 Bash shell 脚本中解析命令行选项
|
||||
======
|
||||
把选项交给你的 shell 脚本吧。
|
||||
![Terminal commands][1]
|
||||
|
||||
终端命令通常具有 [<ruby>选项<rt>options or switches</rt></ruby>][2] 功能,用户可以使用选项来修改命令的执行方式。关于命令行接口的 [POSIX 规范][3] 中就对选项做出了规范,这也是基于最早的 UNIX 应用程序建立的一个由来已久的约定,因此你在创建自己的命令时,最好知道如何将选项包含进 [Bash 脚本][4] 中。
|
||||
> 给你的 shell 脚本添加选项。
|
||||
|
||||
与大多数语言一样,有若干种方法可以解决 Bash 中解析选项的问题。但直到今天,我最喜欢的方法仍然是我从 Patrick Volkerding 的 Slackware 构建脚本中学到的方法,当我第一次得知 Linux 并勇于探索操作系统附带的纯文本文件时,它就是我关于 shell 脚本的引路人。
|
||||
![](https://img.linux.net.cn/data/attachment/album/202108/29/110849lvhr1bjg1r43sfcx.jpg)
|
||||
|
||||
终端命令通常具有 [选项或开关][2],用户可以使用它们来修改命令的执行方式。关于命令行界面的 [POSIX 规范][3] 中就对选项做出了规范,这也是最早的 UNIX 应用程序建立的一个由来已久的惯例,因此你在创建自己的命令时,最好知道如何将选项包含进 [Bash 脚本][4] 中。
|
||||
|
||||
与大多数语言一样,有若干种方法可以解决 Bash 中解析选项的问题。但直到今天,我最喜欢的方法仍然是我从 Patrick Volkerding 的 Slackware 构建脚本中学到的方法,当我第一次发现 Linux 并敢于冒险探索操作系统所附带的纯文本文件时,这些脚本就是我的 shell 脚本的引路人。
|
||||
|
||||
### Bash 中的选项解析
|
||||
|
||||
在 Bash 中解析选项的策略是循环遍历传递给 shell 脚本的所有参数,确定它们是否为选项,然后转移到下一个参数。重复这个过程,直到没有选项为止。
|
||||
|
||||
在 Bash 中解析选项的策略是循环遍历所有传递给 shell 脚本的参数,确定它们是否是一个选项,然后转向下一个参数。重复这个过程,直到没有选项为止。
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
@ -38,7 +39,7 @@ echo $ALPHA
|
||||
|
||||
在这段代码中,我创建了一个 `while` 循环,它会一直进行循环操作,直到处理完所有参数。`if` 语句会试着将在第一个位置(`$1`)中找到的参数与 `--alpha` 或 `-a` 匹配。(此处的待匹配项是任意选项名称,并没有特殊意义。在实际的脚本中,你可以使用 `--verbose` 和 `-v` 来触发详细输出)。
|
||||
|
||||
`shift` 关键字会使所有参数向后移动一位,这样位置 2(`$2`)的参数移动到位置 1(`$1`)。处理完所有参数后会触发 else 语句,进而中断 while 循环。
|
||||
`shift` 关键字会使所有参数位移一位,这样位置 2(`$2`)的参数移动到位置 1(`$1`)。处理完所有参数后会触发 `else` 语句,进而中断 `while` 循环。
|
||||
|
||||
在脚本的末尾,`$ALPHA` 的值会输出到终端。
|
||||
|
||||
@ -106,7 +107,7 @@ bar
|
||||
|
||||
有一些选项需要传入参数。比如,你可能希望允许用户设置诸如颜色或图形分辨率之类的属性,或者将应用程序指向自定义配置文件。
|
||||
|
||||
要在 Bash 中实现这一点,你仍然可以像使用布尔选项一样使用 `shift` 关键字,但参数需要向后移动两位而不是一位。
|
||||
要在 Bash 中实现这一点,你仍然可以像使用布尔开关一样使用 `shift` 关键字,但参数需要位移两位而不是一位。
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
@ -133,7 +134,7 @@ for i in ${ARG[@]}; do
|
||||
done
|
||||
```
|
||||
|
||||
在这段代码中,我添加了一个 `elif` 子句来将每个参数与 `--config` 和 `-c` 进行比较。如果匹配,名为 `CONFIG` 的变量的值就设置为下一个参数的值(这就表示 `--config` 选项需要一个参数)。所有参数都后移两位:其中一位是跳过 `--config` 或 `-c`,另一位是跳过其参数。与上节一样,循环重复直到没有匹配的参数。
|
||||
在这段代码中,我添加了一个 `elif` 子句来将每个参数与 `--config` 和 `-c` 进行比较。如果匹配,名为 `CONFIG` 的变量的值就设置为下一个参数的值(这就表示 `--config` 选项需要一个参数)。所有参数都位移两位:其中一位是跳过 `--config` 或 `-c`,另一位是跳过其参数。与上节一样,循环重复直到没有匹配的参数。
|
||||
|
||||
下面是新版脚本的测试:
|
||||
|
||||
@ -150,7 +151,7 @@ baz
|
||||
|
||||
### Bash 让选项解析变得简单
|
||||
|
||||
还有一些其他方法也可以解析 Bash 中的选项。你可以交替使用 `case` 语句或 `getopt` 命令。无论使用什么方法,用户选项都是应用程序的重要功能,而 Bash 让解析选项成为了一件简单的事。
|
||||
还有一些其他方法也可以解析 Bash 中的选项。你可以替换使用 `case` 语句或 `getopt` 命令。无论使用什么方法,给你的用户提供选项都是应用程序的重要功能,而 Bash 让解析选项成为了一件简单的事。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -159,7 +160,7 @@ via: https://opensource.com/article/21/8/option-parsing-bash
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[unigeorge](https://github.com/unigeorge)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,70 @@
|
||||
[#]: subject: "30 things you didn't know about the Linux kernel"
|
||||
[#]: via: "https://opensource.com/article/21/8/linux-kernel"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13724-1.html"
|
||||
|
||||
关于 Linux 内核的 30 件你不知道的事
|
||||
======
|
||||
|
||||
> Linux 内核今年 30 岁了。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202108/27/150006o152rdghq0zqr02f.jpg)
|
||||
|
||||
Linux 内核今年 30 岁了。这开创性的开源软件的三个十年,让用户能够运行自由软件,让他们能从运行的应用程序中学习,让他们能与朋友分享他们所学到的知识。有人认为,如果没有 Linux 内核,我们如今所享受的 [开源文化][2] 和自由软件的累累硕果,可能就不会应时而出现。如果没有 Linux 作为催化剂,苹果、微软和谷歌所开源的那些就不可能开源。Linux 作为一种现象,对开源文化、软件开发和用户体验的影响,是怎么强调都不为过的,但所有这一切,都滥觞于一个 Linux 内核。
|
||||
|
||||
Linux 内核是启动计算机、并识别和确保计算机内外所连接的所有组件之间通信的软件。这些对于大多数用户从未想过,更不用说能理解的代码,Linux 内核有很多令人惊讶的地方。以下是 Linux 内核在其三十年生命中每一年的一件事。顺序无关。
|
||||
|
||||
1. Linux 是第一个具有 USB 3.0 驱动的操作系统。Sarah Sharp 在 2009 年 6 月 7 日宣布她的 USB 3.0 设备的驱动程序可以使用了,她的代码被包含在内核 2.6.31 版本中。
|
||||
2. 当某些事件发生时,内核会将自己标记为“受污染”,这在以后的故障排除中可能有用。运行一个“被污染”的内核并不是什么问题。但如果出现错误,首先要做的是在一个没有被污染的内核上重现该问题。
|
||||
3. 你可以指定一个主机名或域名作为 `ip=` 内核命令行选项的一部分,Linux 会保留它,而不是用 DHCP 或 BOOTP 提供的主机名或域名来覆盖它。例如,`ip=::::myhostname::dhcp` 设置主机名 `myhostname`。
|
||||
4. 在文本启动过程中,可以选择显示黑白的、16 色的或 224 色的 Tux 徽标之一。
|
||||
5. 在娱乐业中,DRM 是一种用来防止访问媒介的技术。然而,在 Linux 内核中,DRM 指的是<ruby>直接渲染管理器<rt>Direct Rendering Manager</rt></ruby>,它指的是用于与对接显卡的 GPU 的库(`libdrm`)和驱动程序。
|
||||
6. 能够在不重启的情况下给 Linux 内核打补丁。
|
||||
7. 如果你自己编译内核,你可以将文本控制台配置为超过 80 列宽。
|
||||
8. Linux 内核提供了内置的 FAT、exFAT 和 NTFS(读和写)支持。
|
||||
9. Wacom 平板电脑和许多类似设备的驱动程序都内置在内核中。
|
||||
10. 大多数内核高手使用 `git send-email` 来提交补丁。
|
||||
11. 内核使用一个叫做 [Sphinx][3] 的文档工具链,它是用 Python 编写的。
|
||||
12. Hamlib 提供了具有标准化 API 的共享库,可以通过你的 Linux 电脑控制业余无线电设备。
|
||||
13. 我们鼓励硬件制造商帮助开发 Linux 内核,以确保兼容性。这样就可以直接处理硬件,而不必从制造商那里下载驱动程序。直接成为内核一部分的驱动程序也会自动从新版本内核的性能和安全改进中受益。
|
||||
14. 内核中包含了许多树莓派模块(Pi Hats)的驱动程序。
|
||||
15. netcat 乐队发布了一张只能作为 [Linux 内核模块][4] 播放的专辑。
|
||||
16. 受 netcat 发布专辑的启发,人们又开发了一个 [把你的内核变成一个音乐播放器][5] 的模块。
|
||||
17. Linux 内核的功能支持许多 CPU 架构:ARM、ARM64、IA-64、 m68k、MIPS、Nios II、PA-RISC、OpenRISC、PowerPC、s390、 Sparc、x86、Xtensa 等等。
|
||||
18. 2001 年,Linux 内核成为第一个 [以长模式运行的 x86-64 CPU 架构][6]。
|
||||
19. Linux 3.4 版引入了 x32 ABI,允许开发者编译在 64 位模式下运行的代码,而同时只使用 32 位指针和数据段。
|
||||
20. 内核支持许多不同的文件系统,包括 Ext2、Ext3、Ext4、JFS、XFS、GFS2、GCFS2、BtrFS、NILFS2、NFS、Overlay FS、UDF 等等。
|
||||
21. <ruby>虚拟文件系统<rt>Virtual File System</rt></ruby>(VFS)是 Linux 内核中的一个软件层,为用户运行的应用程序提供文件系统接口。它也是内核的一个抽象层,以便不同的文件系统实现可以共存。
|
||||
22. Linux 内核包括一个实体的盲文输出设备的驱动程序。
|
||||
23. 在 2.6.29 版本的内核中,启动时的 Tux 徽标被替换为 “Tuz”,以提高人们对当时影响澳大利亚的<ruby>塔斯马尼亚魔鬼<rt>Tasmanian Devil</rt></ruby>(即袋獾)种群的一种侵袭性癌症的认识。
|
||||
24. <ruby>控制组<rt>Control Groups</rt></ruby>(cgroups)是容器(Docker、Podman、Kubernetes 等的基础技术)能够存在的原因。
|
||||
25. 曾经花了大量的法律行动来解放 CIFS,以便将其纳入内核中,而今天,CIFS 模块已被内置于内核,以实现对 SMB 的支持。这使得 Linux 可以挂载微软的远程共享和基于云的文件共享。
|
||||
26. 对于计算机来说,产生一个真正的随机数是出了名的困难(事实上,到目前为止是不可能的)。`hw_random` 框架可以利用你的 CPU 或主板上的特殊硬件功能,尽量改进随机数的生成。
|
||||
27. _操作系统抖动_ 是应用程序遇到的干扰,它是由后台进程的调度方式和系统处理异步事件(如中断)的方式的冲突引起的。像这些问题在内核文档中都有详细的讨论,可以帮助面向 Linux 开发的程序员写出更聪明的代码。
|
||||
28. `make menuconfig` 命令可以让你在编译前使用 GUI 来配置内核。`Kconfig` 语言定义了内核配置选项。
|
||||
29. 对于基本的 Linux 服务器,可以实施一个 _看门狗_ 系统来监控服务器的健康状况。在健康检查间隔中,`watchdog` 守护进程将数据写入一个特殊的 `watchdog` 内核设备,以防止系统重置。如果看门狗不能成功记录,系统就会被重置。有许多看门狗硬件的实现,它们对远程任务关键型计算机(如发送到火星上的计算机)至关重要。
|
||||
30. 在火星上有一个 Linux 内核的副本,虽然它是在地球上开发的。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/8/linux-kernel
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/kernel-30.png?itok=xmwX2pCQ (30 years)
|
||||
[2]: https://opensource.com/article/18/1/creative-commons-real-world
|
||||
[3]: https://opensource.com/article/19/11/document-python-sphinx
|
||||
[4]: https://github.com/usrbinnc/netcat-cpi-kernel-module
|
||||
[5]: https://github.com/FlaviaR/Netcat-Music-Kernel-Expansion
|
||||
[6]: http://www.x86-64.org/pipermail/announce/2001-June/000020.html
|
@ -0,0 +1,184 @@
|
||||
[#]: subject: "Debian vs Ubuntu: What’s the Difference? Which One Should You Use?"
|
||||
[#]: via: "https://itsfoss.com/debian-vs-ubuntu/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "perfiffer"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13746-1.html"
|
||||
|
||||
Debian 和 Ubuntu:有什么不同?应该选择哪一个?
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202109/02/230706mpahrwpwjjm2jkpu.jpg)
|
||||
|
||||
在 Debian 和 Ubuntu 系统中,你都可以 [使用 apt-get 命令][1] 来管理应用。你也可以在这两个发行版中安装 DEB 安装包。很多时候,你会在这两个发行版中发现同样的包安装命令。
|
||||
|
||||
它们两者是如此的相似,那么,它们两者之间有什么区别呢?
|
||||
|
||||
Debian 和 Ubuntu 属于同一系列的发行版。Debian 是由 Ian Murdock 在 1993 年创建的最初的发行版。Ubuntu 是 Mark Shuttleworth 在 2004 年基于 Debian 创建的发行版。
|
||||
|
||||
### Ubuntu 基于 Debian:这意味着什么?
|
||||
|
||||
Linux 发行版虽然有数百个,但其中只有少数是从零开始的独立发行版。 [Debian][2]、Arch、Red Hat 是其中几个不派生于其它发行版的使用最广的发行版。
|
||||
|
||||
Ubuntu 源自 Debian。这意味着 Ubuntu 使用与 Debian 相同的 APT 包管理系统,并共享来自 Debian 库中的大量包和库。它建立在 Debian 基础架构上。
|
||||
|
||||
![Ubuntu uses Debian as base][3]
|
||||
|
||||
这就是大多数“衍生”发行版所做的。它们使用相同的包管理器,并与基础发行版共享包。但它们也做了一些改变,添加了一些自己的包。这就是 Ubuntu 和 Debian 的不同之处,尽管它是从 Debian 衍生而来的。
|
||||
|
||||
### Ubuntu 和 Debian 的不同之处
|
||||
|
||||
因此,Ubuntu 构建在 Debian 架构和基础设施上,也与 Debian 一样是用 .DEB 格式的软件包。
|
||||
|
||||
这意味着使用 Ubuntu 和使用 Debian 是一样的吗?并不完全如此。有很多因素可以用来区分两个不同的发行版。
|
||||
|
||||
让我逐一讨论这些因素来比较 Ubuntu 和 Debian。请记住,有些比较适用于桌面版本,而有些比较适用于服务器版本。
|
||||
|
||||
![][4]
|
||||
|
||||
#### 1、发布周期
|
||||
|
||||
Ubuntu 有两种发布版本:LTS(长期支持)和常规版本。[Ubuntu LTS 版本][5] 每两年发布一次,并且会提供五年的支持。你可以选择升级到下一个可用的 LTS 版本。LTS 版本被认为更稳定。
|
||||
|
||||
还有一个非 LTS 版本,每六个月发布一次。这些版本仅仅提供九个月的支持,但是它们会有一些新的软件版本和功能。在当前的版本到达维护年限时,你应当升级到下一个 Ubuntu 版本。
|
||||
|
||||
所以基本上,你可以根据这些版本在稳定性和新特性之间进行选择。
|
||||
|
||||
另一方面,Debian 有三个不同的版本:稳定版、测试版和非稳定版。非稳定版是为了实际测试,应该避免使用。
|
||||
|
||||
测试版不是那么不稳定。它是用来为下一个稳定版做准备。有一些 Debian 用户更倾向于使用测试版来获取新的特性。
|
||||
|
||||
然后是稳定版。这是 Debian 的主要版本。Debian 稳定版可能没有最新的软件和功能,但在稳定性方面毋庸置疑。
|
||||
|
||||
每两年 Debian 会发布一个稳定版,并且会提供三年的支持。此后,你应当升级到下一个可用的稳定版。
|
||||
|
||||
#### 2、软件更新
|
||||
|
||||
![][6]
|
||||
|
||||
Debian 更关注稳定性,这意味着它并不总是使用最新版本的软件。例如,最新的 Debian 11 用的 GNOME 版本为 3.38,并不是最新版的 GNOME 3.40。
|
||||
|
||||
对于 GIMP、LibreOffice 等其它软件也是如此。这是你必须对 Debian 做出的妥协。这就是“Debian stable = Debian stale”笑话在 Linux 社区流行的原因。
|
||||
|
||||
Ubuntu LTS 版本也关注稳定性。但是它们通常拥有较新版本的常见软件。
|
||||
|
||||
你应该注意,对于某些软件,从开发者的仓库安装也是一种选择。例如,如果你想要安装最新版的 Docker,你可以在 Debian 和 Ubuntu 中添加 Docker 仓库。
|
||||
|
||||
总体来说,相比较于 Ubuntu ,Debian 稳定版的软件版本会更旧。
|
||||
|
||||
#### 3、软件可用性
|
||||
|
||||
Debian 和 Ubuntu 都拥有一个巨大的软件仓库。然而,[Ubuntu 还有 PPA][7](<ruby>个人软件包存档<rt>Personal Package Archive</rt></ruby>)。通过 PPA,安装更新版本的软件或者获取最新版本的软件都将会变的更容易。
|
||||
|
||||
![][8]
|
||||
|
||||
你可以在 Debian 中尝试使用 PPA,但是体验并不好。大多数时候你都会遇到问题。
|
||||
|
||||
#### 4、支持的平台
|
||||
|
||||
Ubuntu 可以在 64 位的 x86 和 ARM 平台上使用。它不再提供 32 位的镜像。
|
||||
|
||||
另一方面,Debian 支持 32 位和 64 位架构。除此之外,Debian 还支持 64 位 ARM(arm64)、ARM EABI(armel)、ARMv7(EABI hard-float ABI,armhf)、小端 MIPS(mipsel)、64 位小端 MIPS(mips64el)、64 位小端 PowerPC(ppc64el) 和 IBM System z(s390x)。
|
||||
|
||||
所以它也被称为 “<ruby>通用操作系统<rt>universal operating system</rt></ruby>”。
|
||||
|
||||
#### 5、安装
|
||||
|
||||
[安装 Ubuntu][9] 比安装 Debian 容易得多。我并不是在开玩笑。即使对于有经验的 Linux 用户,Debian 也可能令人困惑。
|
||||
|
||||
当你下载 Debian 的时候,它默认提供的是最小化镜像。此镜像没有非自由(非开源)的固件。如果你继续安装它,你就可能会发现你的网络适配器和其它硬件将无法识别。
|
||||
|
||||
有一个单独的包含固件的非自由镜像,但它是隐藏的,如果你不知道,你可能会大吃一惊。
|
||||
|
||||
![Getting non-free firmware is a pain in Debian][10]
|
||||
|
||||
Ubuntu 在默认提供的镜像中包含专有驱动程序和固件时要宽容的多。
|
||||
|
||||
此外,Debian 安装程序看起来很旧,而 Ubuntu 安装程序看起来就比较现代化。Ubuntu 安装程序还可以识别磁盘上其它已安装的操作系统,并为你提供将 Ubuntu 与现有操作系统一起安装的选项(双引导)。但我在测试时并没有注意到 Debian 有此选项。
|
||||
|
||||
![Installing Ubuntu is smoother][11]
|
||||
|
||||
#### 6、开箱即用的硬件支持
|
||||
|
||||
就像之前提到的,Debian 主要关注 [FOSS][12](自由和开源软件)。这意味着 Debian 提供的内核不包括专有驱动程序和固件。
|
||||
|
||||
这并不是说你无法使其工作,而是你必须添加/启动额外的存储库并手动安装。这可能令人沮丧,特别是对于初学者来说。
|
||||
|
||||
Ubuntu 并不完美,但在提供开箱即用的驱动程序和固件方面,它比 Debian 好得多。这意味着更少的麻烦和更完整的开箱即用体验。
|
||||
|
||||
#### 7、桌面环境选择
|
||||
|
||||
Ubuntu 默认使用定制的 GNOME 桌面环境。你可以在其上安装 [其它桌面环境][13],或者选择 [各种不同桌面风格的 Ubuntu][14],如 Kubuntu(使用 KDE 桌面)、Xubuntu(使用 Xfce 桌面)等。
|
||||
|
||||
Debian 也默认安装了 GNOME 桌面。但是它会让你在安装的过程中选择你要安装的桌面环境。
|
||||
|
||||
![][15]
|
||||
|
||||
你还可以从其网站获取 [特定桌面环境的 ISO 镜像][16]。
|
||||
|
||||
#### 8、游戏性
|
||||
|
||||
由于 Stream 及其 Proton 项目,Linux 上的游戏总体上有所改善。尽管如此,游戏在很大程度上取决于硬件。
|
||||
|
||||
在硬件兼容性上,Ubuntu 比 Debian 在支持专有驱动程序方面要好。
|
||||
|
||||
并不是说在 Debian 中不能做到这一点,而是需要一些时间和精力来实现。
|
||||
|
||||
#### 9、性能
|
||||
|
||||
性能部分没有明显的“赢家”,无论是在服务器版本还是在桌面版本。 Debian 和 Ubuntu 作为桌面和服务器操作系统都很受欢迎。
|
||||
|
||||
性能取决于你系统的硬件和你所使用的软件组件。你可以在你的操作系统中调整和控制你的系统。
|
||||
|
||||
#### 10、社区和支持
|
||||
|
||||
Debian 是一个真正的社区项目。此项目的一切都由其社区成员管理。
|
||||
|
||||
Ubuntu 由 [Canonical][17] 提供支持。然而,它并不是一个真正意义上的企业项目。它确实有一个社区,但任何事情的最终决定权都掌握在 Canonical 手中。
|
||||
|
||||
就支持而言,Ubuntu 和 Debian 都有专门的论坛,用户可以在其中寻求帮助和提出建议。
|
||||
|
||||
Canonical 还为其企业客户提供收费的专业支持。Debian 则没有这样的功能。
|
||||
|
||||
### 结论
|
||||
|
||||
Debian 和 Ubuntu 都是桌面或服务器操作系统的可靠选择。 APT 包管理器和 DEB 包对两者都是通用的,因此提供了一些相似的体验。
|
||||
|
||||
然而,Debian 仍然需要一定程度的专业知识,特别是在桌面方面。如果你是 Linux 新手,坚持使用 Ubuntu 将是你更好的选择。在我看来,你应该积累一些经验,熟悉了一般的 Linux,然后再尝试使用 Debian。
|
||||
|
||||
并不是说你不能从一开始就使用 Debian,但对于 Linux 初学者来说,这并不是一种很好的体验。
|
||||
|
||||
欢迎你对这场 Debian 与 Ubuntu 辩论发表意见。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/debian-vs-ubuntu/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[perfiffer](https://github.com/perfiffer)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/apt-get-linux-guide/
|
||||
[2]: https://www.debian.org/
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/Debian-ubuntu-upstream.png?resize=800%2C400&ssl=1
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/debian-vs-ubuntu.png?resize=800%2C450&ssl=1
|
||||
[5]: https://itsfoss.com/long-term-support-lts/
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-policy.png?resize=795%2C456&ssl=1
|
||||
[7]: https://itsfoss.com/ppa-guide/
|
||||
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/03/ffmpeg_add_ppa.jpg?resize=800%2C222&ssl=1
|
||||
[9]: https://itsfoss.com/install-ubuntu/
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/Debian-firmware.png?resize=800%2C600&ssl=1
|
||||
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/choose-something-else-installing-ubuntu.png?resize=800%2C491&ssl=1
|
||||
[12]: https://itsfoss.com/what-is-foss/
|
||||
[13]: https://itsfoss.com/best-linux-desktop-environments/
|
||||
[14]: https://itsfoss.com/which-ubuntu-install/
|
||||
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/debian-install-desktop-environment.png?resize=640%2C479&ssl=1
|
||||
[16]: https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/
|
||||
[17]: https://canonical.com/
|
@ -2,39 +2,41 @@
|
||||
[#]: via: "https://itsfoss.com/youtube-dl-audio-only/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13753-1.html"
|
||||
|
||||
How to Download Audio Only Using youtube-dl
|
||||
如何使用 youtube-dl 只下载音频
|
||||
======
|
||||
|
||||
[youtube-dl][1] is a versatile command line tool for downloading videos from YouTube and many other websites. I use it for making back up of my own YouTube videos.
|
||||
![](https://img.linux.net.cn/data/attachment/album/202109/05/153110dkamc1kv0173ggc3.jpg)
|
||||
|
||||
By default, you [use youtube-dl for downloading videos][2]. How about extracting only the audio with youtubde-dl? That’s very simple actually. Let me show you the steps.
|
||||
[youtube-dl][1] 是一个多功能的命令行工具,用于从 YouTube 和许多其他网站下载视频。我用它来做我自己的 YouTube 视频的备份。
|
||||
|
||||
Attention
|
||||
默认情况下,你会 [使用 youtube-dl 下载视频][2]。用 youtube-dl 只提取音频怎么样? 其实很简单。让我告诉你步骤。
|
||||
|
||||
Downloading videos from websites could be against their policies. It’s up to you if you choose to download videos or audio.
|
||||
> **注意**
|
||||
>
|
||||
> 从网站下载视频可能违反他们的政策。这取决于你是否选择下载视频或音频。
|
||||
|
||||
### Download only audio with youtube-dl
|
||||
### 使用 youtube-dl 只下载音频
|
||||
|
||||
Please make sure that you have installed youtube-dl on your Linux distribution first.
|
||||
请确保你已经在你的 Linux 发行版上安装了 `youtube-dl`。
|
||||
|
||||
```
|
||||
sudo snap install youtube-dl
|
||||
```
|
||||
|
||||
If you only want to download audio from a YouTube video, you can use the -x option with youtube-dl. This extract-audio option converts the video files to audio-only files.
|
||||
如果你只想从 YouTube 视频中下载音频,你可以使用 `youtube-dl` 的 `-x` 选项。这个提取音频的选项将视频文件转换为纯音频文件。
|
||||
|
||||
```
|
||||
youtube-dl -x video_URL
|
||||
```
|
||||
|
||||
The file is saved in the same directory from where you ran the youtube-dl command.
|
||||
该文件被保存在你运行 `youtube-dl` 命令的同一目录下。
|
||||
|
||||
Here’s an example where I downloaded the voice-over of our Zorin OS 16 review video.
|
||||
这是我下载 Zorin OS 16 评论视频的画外音的示例:
|
||||
|
||||
```
|
||||
youtube-dl -x https://www.youtube.com/watch?v=m_PmLG7HqbQ
|
||||
@ -45,15 +47,15 @@ youtube-dl -x https://www.youtube.com/watch?v=m_PmLG7HqbQ
|
||||
[ffmpeg] Post-process file Zorin OS 16 Review - It's a Visual Masterpiece-m_PmLG7HqbQ.m4a exists, skipping
|
||||
```
|
||||
|
||||
Did you notice the audio format? It is in .m4a format. You may specify the audio format to something of your choice.
|
||||
你注意到音频格式了吗?它是 .m4a 格式。你可以把音频格式指定为你所选择的格式。
|
||||
|
||||
Say you want to extract the audio in MP3 format. You can use it like this:
|
||||
比如你想提取 MP3 格式的音频。你可以像这样使用它:
|
||||
|
||||
```
|
||||
youtube-dl -x --audio-format mp3 video_URL
|
||||
```
|
||||
|
||||
Here’s the same example I showed previously. You can see that it [uses ffmpeg to convert][3] the m4a file into mp3.
|
||||
下面是我之前展示的同一个例子。你可以看到它 [使用 ffmpeg 转换][3] m4a 文件为 mp3:
|
||||
|
||||
```
|
||||
youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=m_PmLG7HqbQ
|
||||
@ -65,33 +67,33 @@ youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=m_PmLG7HqbQ
|
||||
Deleting original file Zorin OS 16 Review - It's a Visual Masterpiece-m_PmLG7HqbQ.m4a (pass -k to keep)
|
||||
```
|
||||
|
||||
### Download entire YouTube playlist in MP3 format
|
||||
### 以 MP3 格式下载整个 YouTube 播放列表
|
||||
|
||||
Yes, you can totally do that. The main thing is to get the URL of the playlist here. It is typically in the following format:
|
||||
是的,你完全可以这样做。最主要的是要在这里得到播放列表的 URL。它通常是以下格式:
|
||||
|
||||
```
|
||||
https://www.youtube.com/playlist?list=XXXXXXXXXXXXXXXXXXX
|
||||
```
|
||||
|
||||
To get the URL of a playlist, click on its name when the playlist is being displayed in the right sidebar.
|
||||
要获得一个播放列表的 URL,当播放列表显示在右边栏时,点击其名称。
|
||||
|
||||
![Click on the playlist title][4]
|
||||
|
||||
It will take you to the playlist page and you can copy the URL here.
|
||||
它将带你到播放列表页面,你可以在这里复制 URL。
|
||||
|
||||
![Grab the playlist URL][5]
|
||||
|
||||
Now that you have the playlist URL, you can use it to download the audio files in MP3 format in the following fashion:
|
||||
现在你有了播放列表的 URL,你可以用它来下载 MP3 格式的音频文件,方法如下:
|
||||
|
||||
```
|
||||
youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" playlist_URL
|
||||
```
|
||||
|
||||
That scary looking `-o "%(title)s.%(ext)s"` specifies the output file (with option -o) and instructs it to use the title of the video and the extension (mp3 in this case) for naming the audio files.
|
||||
那个看起来很可怕的 `-o "%(title)s.%(ext)s"` 指定了输出文件(选项 `-o`),并指示它使用视频的标题和扩展名(本例为 mp3)来命名音频文件。
|
||||
|
||||
![][6]
|
||||
|
||||
I hope you find this quick tip helpful. Enjoy the audio files :)
|
||||
我希望你觉得这个技巧对你有帮助。享受音频文件吧。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -99,8 +101,8 @@ via: https://itsfoss.com/youtube-dl-audio-only/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,172 @@
|
||||
[#]: subject: "10 Things to Do After Installing elementary OS 6 “Odin”"
|
||||
[#]: via: "https://www.debugpoint.com/2021/08/10-things-to-do-after-install-elementary-os-6/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "anine09"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13749-1.html"
|
||||
|
||||
安装 elementary OS 6 “Odin” 后要做的 10 件事
|
||||
======
|
||||
|
||||
> 一个精心准备的在安装 elementary OS 6 “Odin” 后要做的事情的列表。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202109/04/081345bf9co7ot40szdytg.jpg)
|
||||
|
||||
在经过两年多的开发后 [elementary OS 6 “Odin”][1] 于不久前发布,此次版本更新在核心模块、 Pantheon 桌面、原生应用方面带来了一大批新特性。elementary OS 6 “Odin” 是基于 Ubuntu 20.04 LTS 的。
|
||||
|
||||
如果你完成了安装,你可能想要尝试通过一些特定的设置来使你的系统更加的个性化。这里描述的选项是通用的,在某些情况下可能对你没有用,但是我们觉得有必要列出一些基本的东西,让你有合适的方式来探索这个漂亮的 elementary OS。
|
||||
|
||||
### 安装完 elementary OS 6 “Odin” 后要做的事情
|
||||
|
||||
准备步骤:
|
||||
|
||||
首先确保你已经连上了互联网,你可以在顶部的通知区域查看可用的网络列表
|
||||
|
||||
#### 1、更改主机名
|
||||
|
||||
这可能不是你想做的第一件事。但是我不知道为什么在安装过程中没有给出更改主机名的选项。例如,见下图的终端提示, 这个主机名是 elementary OS 的默认硬件配置。在我看来这一点都不好。
|
||||
|
||||
![主机名修改之前][2]
|
||||
|
||||
打开终端并运行下列命令以更改主机名:
|
||||
|
||||
```
|
||||
hostnamectl set-hostname your-new-hostname
|
||||
```
|
||||
|
||||
示例:
|
||||
|
||||
![修改主机名][3]
|
||||
|
||||
![主机名修改之后][4]
|
||||
|
||||
#### 2、升级你的系统
|
||||
|
||||
在安装任何 Linux 发行版后,你应该做的第一件事就是确保系统处于最新的软件包和安全更新状态。
|
||||
|
||||
你可以通过打开应用中心来检查或者安装更新。
|
||||
|
||||
或者打开终端运行下列命令:
|
||||
|
||||
```
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
```
|
||||
|
||||
#### 3、安装 Pantheon Tweaks
|
||||
|
||||
Pantheon Tweaks 是 elementary OS 的必备应用。它提供了一些无法通过系统原生设置程序修改的额外的设置和配置选项,请打开终端并运行以下命令以安装 Pantheon Tweaks。注意:先前版本的 Tweak 工具叫做 elementary Tweaks,从 Odin 版本开始更名为 Pantheon Tweaks。
|
||||
|
||||
```
|
||||
sudo apt install software-properties-common
|
||||
sudo add-apt-repository -y ppa:philip.scott/pantheon-tweaks
|
||||
sudo apt install -y pantheon-tweaks
|
||||
```
|
||||
|
||||
安装后打开系统设置,你可以在那里找到 “<ruby>调整<rt>Tweaks</rt></ruby>” 选项。
|
||||
|
||||
[这里][5] 提供了更详细的安装指南(如果你需要了解更多信息)。
|
||||
|
||||
### 4、配置 Dock
|
||||
|
||||
Dock 是整个桌面的中心。老实说,Dock 中默认包含的应用并不常用,因此你可以通过以下步骤配置 Dock 中的项目。
|
||||
|
||||
* 移除:右键单击并取消 “<ruby>在 Dock 中驻留<rt>Keep in Dock</rt></ruby>” 选项。
|
||||
* 添加新的项目:单击顶部的应用程序。然后右键单击你想要放在 Dock 的应用图标。选择 “<ruby>添加到 Dock<rt>Add to Dock</rt></ruby>”。
|
||||
|
||||
在我看来,你应该至少把文件管理、截图工具、Firefox 、计算器,以及其他的一些应用添加到 Dock。然后移除 Dock 上那些你不需要的应用。
|
||||
|
||||
#### 5、更改外观
|
||||
|
||||
elementary OS 6 Odin 改进了桌面的整体外观,为整个桌面和应用程序提供了自带的强调色和原生的夜间模式,同时,系统自带了许多漂亮的壁纸。你可以通过 “应用 > 系统设置 > 桌面” 来定制壁纸、外观、面板和多任务视图。
|
||||
|
||||
![elementary OS 6 Odin 桌面设置界面][6]
|
||||
|
||||
按照你希望的样子来配置你系统的外观。
|
||||
|
||||
你也可以基于日出和日落的时间来设置夜间模式。
|
||||
|
||||
#### 6、安装其他的应用
|
||||
|
||||
自带的应用中心非常适合这个系统,我发现它是 Linux 桌面最好的应用商店之一。然而,有时候需要安装没有预装的必要应用(大多数是知名的应用)。下面是个新系统推荐安装的软件列表。(说真的,为什么 LibreOffice 没有预装?)
|
||||
|
||||
* firefox
|
||||
* gimp
|
||||
* gedit
|
||||
* inkscape
|
||||
* obs-studio
|
||||
* libreoffice
|
||||
|
||||
#### 7、一些针对笔记本电脑的省电贴士
|
||||
|
||||
有许多方法可以配置你的 elementary OS(或者一般的 Linux 桌面),以达到延长电池寿命的目的。记住,电池寿命取决于你的笔记本硬件,以及电池和笔记本的使用年限。所以,遵循下面的一些建议,最大限度的利用你的笔记本电池。
|
||||
|
||||
* 安装 [tlp][8]。`tlp` 是一个简单易用的命令行程序,用来帮你在 Linux 上延长电池寿命。你只需要安装它,默认情况下,它会处理好其他的设置。安装命令:
|
||||
|
||||
```
|
||||
sudo add-apt-repository ppa:linrunner/tlp
|
||||
sudo apt update
|
||||
sudo apt-get install tlp
|
||||
sudo tlp start
|
||||
```
|
||||
|
||||
* 关闭蓝牙,默认情况下,蓝牙是开启状态。在需要的时候再启动它。
|
||||
|
||||
* 通过下面的命令安装 `thermald`。这个实用程序(实际是个守护进程)控制着你的 CPU 的 P-States 和 T-States 的温度以及 CPU 发热。
|
||||
|
||||
```
|
||||
sudo apt install thermald
|
||||
```
|
||||
|
||||
* 根据你的需要将亮度调到最小。
|
||||
|
||||
#### 8、安装磁盘实用程序
|
||||
|
||||
在很多情况下,你发现你需要格式化 USB 或者向 USB 中写入一些东西。默认情况下,系统没有安装任何相关的应用。你可以安装以下这些易用的应用。
|
||||
|
||||
* gnome-disk-utility
|
||||
* gparted
|
||||
|
||||
#### 9、启用最大化和最小化选项
|
||||
|
||||
许多用户喜欢在窗口标题栏左边或者右边使用最大化、最小化的按钮,elementary OS 默认只提供关闭和恢复两个选项。这没什么问题,因为这就是它的设计理念。然而你可以通过使用 Pantheon Tweaks 来开启最大化和最小化按钮,具体的方式是:“调整 > 外观 > 窗口控制”。
|
||||
|
||||
![在 elementary OS 中启动最大化和最小化设置][9]
|
||||
|
||||
#### 10、在 Odin 中学习新的多点触控手势
|
||||
|
||||
如果你是笔记本用户,并且使用 elementary OS “Odin”,那么你一定要看看这些超酷的新触控手势。三根手指向上滑动,就会平滑的打开多任务视图,展示打开的应用程序和工作空间。用三根手指向左或向右滑动,就能在动态工作空间之间流畅的切换,使任务之间的切换更快。
|
||||
|
||||
用两根手指也可以在原生应用中实现类似的功能。
|
||||
|
||||
### 结束语
|
||||
|
||||
我希望这篇安装 elementary OS 6 “Odin” 后要做的 10 件事能帮助到你,让你可以上手使用 elementary OS 6 “Odin”,尽管这些事情完全是用户的偏好,因此这些事情有可能适合你也有可能不适用于你,但总的来说,这些都是一般用户喜欢的预期调整。
|
||||
|
||||
如果你觉得有更多的东西应该添加到列表中,请在下面的评论中告诉我。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2021/08/10-things-to-do-after-install-elementary-os-6/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[anine09](https://github.com/anine09)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.debugpoint.com/2021/08/elementary-os-6/
|
||||
[2]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/hostname-change-before.jpeg
|
||||
[3]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/changing-hostname.jpeg
|
||||
[4]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/changed-hostname.jpeg
|
||||
[5]: https://www.debugpoint.com/2021/07/elementary-tweaks-install/
|
||||
[6]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/elementary-OS-6-Odin-settings-window-Desktop.jpeg
|
||||
[7]: https://www.debugpoint.com/2020/09/elementary-os-6-odin-new-features-release-date/
|
||||
[8]: https://linrunner.de/tlp/
|
||||
[9]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/enable-minimize-maximize-buttons-elementary-OS-1024x501.png
|
||||
|
99
published/20210821 How to set up your printer on Linux.md
Normal file
99
published/20210821 How to set up your printer on Linux.md
Normal file
@ -0,0 +1,99 @@
|
||||
[#]: subject: "How to set up your printer on Linux"
|
||||
[#]: via: "https://opensource.com/article/21/8/add-printer-linux"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "fisherue"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13740-1.html"
|
||||
|
||||
如何在 Linux 系统设置打印机
|
||||
======
|
||||
|
||||
> 如果系统没有自动检测到你的打印机,这篇文章教你如何在 Linux 系统手动添加打印机。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202109/01/104541gvvxvriei677o76v.jpg)
|
||||
|
||||
即使未来已来,<ruby>电子墨水<rt>e-ink</rt></ruby>和 AR 技术可以现实应用,我们还是会用到打印机的。打印机制造商还不能做到让自己的专利打印机可以与各种计算机完全标准化传递信息,以至于我们需要各种打印机驱动程序,在任何操作系统上都是如此。电子电气工程师协会信息科学与技术处(IEEE-ISTO)下属的打印机工作组(PWG)和开放打印技术组织(OpenPrinting.org)长期合作致力于让人们可以(使用任何型号打印机)轻松打印。带来的便利就是,很多打印机可以不需要用户进行配置就可以自动被识别使用。
|
||||
|
||||
如果系统没有自动检测到你的打印机,你可以在这篇文章中找到如何在 Linux 系统手动添加打印机。文中假定你使用的是 GNOME 图形桌面系统,其设置流程同样适用于 KDE 或其他大多数桌面系统。
|
||||
|
||||
### 打印机驱动程序
|
||||
|
||||
在你尝试用打印机打印文件时,要先确认你的 Linux 系统上是不是已经安装了更新的打印机驱动程序。
|
||||
|
||||
可以尝试安装的打印机驱动程序有三大类:
|
||||
|
||||
* 作为安装包提供的,捆绑在你的 Linux 系统上的开源 [Gutenprint 驱动程序][2]
|
||||
* 打印机制造商提供的专用驱动程序
|
||||
* 第三方开发提供的打印机驱动程序
|
||||
|
||||
开源打印机驱动程序库可以驱动 700 多种打印机,值得安装,这里面可能就有你的打印机的驱动,说不定可以自动设置好你的打印机(,你就可以使用它了)。
|
||||
|
||||
### 安装开源驱动程序包(库)
|
||||
|
||||
有些 Linux 发行版已经预装了开源打印机驱动程序包,如果没有,你可以用包管理器来安装。比如说,在 Fedora、CentOS、Magela 等类似发行版的 Linux 系统上,执行下面命令来安装:
|
||||
|
||||
```
|
||||
$ sudo dnf install gutenprint
|
||||
```
|
||||
|
||||
惠普(HP)系列的打印机,还需要安装惠普的 Linux 图形及打印系统软件包(HPLIP)。如在 Debian、Linux Mint 等类似的系统上,可以使用下面的命令:
|
||||
|
||||
```
|
||||
$ sudo apt install hplip
|
||||
```
|
||||
|
||||
### 安装制造商提供的驱动程序
|
||||
|
||||
很多时候因为打印机制造商使用了非标准的接口协议,这种情况开源打印机驱动程序就不能驱动打印机。另外的情况就是,开源驱动程序可以驱动打印机工作,但是会缺少供应商特有的某些性能。这些情况,你需要访问制造商的网站,找到适合你的打印机型号的 Linux 平台驱动。安装过程各异,仔细阅读安装指南逐步安装。
|
||||
|
||||
如果你的打印机根本不被厂商支持,你或许也只能尝试第三方提供的该型号打印机的驱动软件了。这类第三方驱动程序不是开源的,但大多数打印机的专用驱动程序也不是。如果你需要额外花费从供应商那里获取帮助服务才能安装好驱动并使用你的打印机,那是很心疼,或者你索性把这台打印机扔掉,至少你知道下次再也不会购买这个品牌的打印机了。
|
||||
|
||||
### 通用打印驱动系统(CUPS)
|
||||
|
||||
<ruby>通用打印驱动系统<rt>Common Unix Printing System</rt></ruby>(CUPS)是由 Easy Software Products 公司于 1997 年开发的,2007 年被苹果公司收购。这是 Linux 平台打印的开源基础软件包,大多数现代发行版都为它提供了一个定制化的界面。得益于 CUPS 技术,你可以发现通过 USB 接口连接到电脑的打印机,甚至连接在同一网络的共享打印机。
|
||||
|
||||
一旦你安装了需要的驱动程序包,你就能手工添加你的打印机了。首先,把打印机连接到运行的电脑上,并打开打印机电源。然后从“活动”屏幕或者应用列表中找到并打开“打印机”设置。
|
||||
|
||||
![printer settings][4]
|
||||
|
||||
基于你已经安装的驱动包,你的 Linux 系统有可能自动检测识别到你的打印机型号,不需要额外的设置就可以使用你的打印机了。
|
||||
|
||||
![printer settings][5]
|
||||
|
||||
一旦你在列表中找到你的打印机型号,设置使用这个驱动,恭喜你就可以在 Linux 系统上用它打印了。
|
||||
|
||||
(如果你的打印机没有被自动识别,)你需要自行添加打印机。在“打印机”设置界面,点击右上角的解锁按钮,输入管理用户密码,按钮转换成“添加打印机”按钮。
|
||||
|
||||
然后点击这个“添加打印机”按钮,电脑会搜索已经连接的本地打印机型号并匹配相应驱动程序。如果要添加网络共享打印机,在搜索框输入打印机或者其服务器机的 IP 地址。
|
||||
|
||||
![searching for a printer][6]
|
||||
|
||||
选中你想添加的打印机型号,点击“添加”按钮把打印机驱动加入系统,就可以使用它了。
|
||||
|
||||
### 在 Linux 系统上打印
|
||||
|
||||
在 Linux 系统上打印很容易,不管你是在使用本地打印机还是网络打印机。如果你计划购买打印机,建议查看开放打印技术组织的(可支持打印机)数据库([OpenPrinting.org][7]),看看你想购买的打印机是不是有相应的开源驱动程序。如果你已经拥有一台打印机,你现在也知道怎样在你的 Linux 系统上使用你的打印机了。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/8/add-printer-linux
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[fisherue](https://github.com/fisherue)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/happy-printer.png?itok=9J44YaDs "printing on Linux"
|
||||
[2]: http://gimp-print.sourceforge.net/
|
||||
[3]: https://www.turboprint.info/
|
||||
[4]: https://opensource.com/sites/default/files/system-settings-printer_0.png "printer settings"
|
||||
[5]: https://opensource.com/sites/default/files/settings-printer.png "printer settings"
|
||||
[6]: https://opensource.com/sites/default/files/printer-search.png "searching for a printer"
|
||||
[7]: http://www.openprinting.org/printers/
|
||||
|
@ -0,0 +1,124 @@
|
||||
[#]: subject: "Ulauncher: A Super Useful Application Launcher for Linux"
|
||||
[#]: via: "https://itsfoss.com/ulauncher/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13743-1.html"
|
||||
|
||||
Ulauncher:一个超级实用的 Linux 应用启动器
|
||||
======
|
||||
|
||||
> Ulauncher 是一个快速应用启动器,支持扩展和快捷方式,帮助你在 Linux 中快速访问应用和文件。
|
||||
|
||||
应用启动器可以让你快速访问或打开一个应用,而无需在应用菜单图标上徘徊。
|
||||
|
||||
在默认情况下,我发现 Pop!_OS 的应用启动器超级方便。但是,并不是每个 Linux 发行版都提供开箱即用的应用启动器。
|
||||
|
||||
幸运的是,有一个你可以在大多数流行的发行版中添加应用启动器的方案。
|
||||
|
||||
### Ulauncher:开源应用启动器
|
||||
|
||||
![][1]
|
||||
|
||||
Ulauncher 是一个使用 Python 还有 GTK+ 构建的快速应用启动器。
|
||||
|
||||
它提供了相当数量的自定义和控制选项来进行调整。总的来说,你可以调整它的行为和体验以适应你的喜好。
|
||||
|
||||
让我来说一下你可以期待它的一些功能。
|
||||
|
||||
### Ulauncher 功能
|
||||
|
||||
Ulauncher 中的选项非常非常易于访问且易于定制。一些关键的亮点包括:
|
||||
|
||||
* 模糊搜索算法可以让你即使拼错了,也能找到应用
|
||||
* 可以记住你在同一会话中最后搜索的应用
|
||||
* 显示经常使用的应用(可选)
|
||||
* 自定义颜色主题
|
||||
* 预设颜色主题,包括一个黑暗主题
|
||||
* 召唤启动器的快捷方式可以轻松定制
|
||||
* 浏览文件和目录
|
||||
* 支持扩展,以获得额外的功能(表情符号、天气、速度测试、笔记、密码管理器等)
|
||||
* 浏览谷歌、维基百科和 Stack Overflow 等网站的快捷方式
|
||||
|
||||
它几乎提供了你在一个应用启动器中所期望的所有有用的能力,甚至更好。
|
||||
|
||||
### 如何在 Linux 中使用 Ulauncher?
|
||||
|
||||
默认情况下,首次从应用菜单中打开应用启动器后,你需要按 `Ctrl + Space` 打开应用启动器。
|
||||
|
||||
输入以搜索一个应用。如果你正在寻找一个文件或目录,输入以 `~` 或者 `/` 开始。
|
||||
|
||||
![][2]
|
||||
|
||||
有一些默认的快捷键,如 `g XYZ`,其中 “XYZ” 是你想在谷歌中搜索的搜索词。
|
||||
|
||||
![][3]
|
||||
|
||||
同样,你可以通过 `wiki` 和 `so` 快捷键,直接在维基百科或 Stack Overflow 搜索。
|
||||
|
||||
在没有任何扩展的情况下,你也可以直接计算内容,并将结果直接复制到剪贴板。
|
||||
|
||||
![][4]
|
||||
|
||||
这在快速计算时应该很方便,不需要单独启动计算器应用。
|
||||
|
||||
你可以前往它的 [扩展页面][5],浏览有用的扩展,以及指导你如何使用它的截图。
|
||||
|
||||
要改变它的工作方式,启用显示经常使用的应用,并调整主题,请点击启动器右侧的齿轮图标。
|
||||
|
||||
![][6]
|
||||
|
||||
你可以把它设置为自动启动。但是,如果它在你的支持 Systemd 的发行版上不工作,你可以参考它的 GitHub 页面,把它添加到服务管理器中。
|
||||
|
||||
这些选项是非常直观,且易于定制,如下图所示。
|
||||
|
||||
![][7]
|
||||
|
||||
### 在 Linux 中安装 Ulauncher
|
||||
|
||||
Ulauncher 为基于 Debian 或 Ubuntu 的发行版提供了一个 deb 包。如果你是 Linux 新手,你可以了解一下 [如何安装 Deb 文件][8] 。
|
||||
|
||||
在这两种情况下,你也可以添加它的 PPA,并通过终端按照下面的命令来安装它:
|
||||
|
||||
```
|
||||
sudo add-apt-repository ppa:agornostal/ulauncher
|
||||
sudo apt update
|
||||
sudo apt install ulauncher
|
||||
```
|
||||
|
||||
你也可以在 [AUR][9] 中找到它,用于 Arch 和 Fedora 的默认仓库。
|
||||
|
||||
对于更多信息,你可以前往其官方网站或 [GitHub 页面][10]。
|
||||
|
||||
- [Ulauncher][11]
|
||||
|
||||
Ulauncher 应该是任何 Linux 发行版中一个令人印象深刻的补充。特别是,如果你想要一个像 Pop!_OS 提供的快速启动器的功能,这是一个值得考虑的奇妙选择。
|
||||
|
||||
你试过 Ulauncher了吗?欢迎你就如何帮助你快速完成工作分享你的想法。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/ulauncher/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/ulauncher.png?resize=800%2C512&ssl=1
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/ulauncher-directory.png?resize=800%2C503&ssl=1
|
||||
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/ulauncher-google.png?resize=800%2C449&ssl=1
|
||||
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/ulauncher-calculator.png?resize=800%2C429&ssl=1
|
||||
[5]: https://ext.ulauncher.io
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/ulauncher-gear-icon.png?resize=800%2C338&ssl=1
|
||||
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/ulauncher-settings.png?resize=800%2C492&ssl=1
|
||||
[8]: https://itsfoss.com/install-deb-files-ubuntu/
|
||||
[9]: https://itsfoss.com/aur-arch-linux/
|
||||
[10]: https://github.com/Ulauncher/Ulauncher/
|
||||
[11]: https://ulauncher.io
|
@ -0,0 +1,82 @@
|
||||
[#]: subject: "Elementary OS 6 Odin Review – Late Arrival but a Solid One"
|
||||
[#]: via: "https://www.debugpoint.com/2021/08/elementary-os-6-odin-review/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "imgradeone"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13739-1.html"
|
||||
|
||||
elementary OS 6 Odin 评测:迟到的新版本,但也实至名归
|
||||
======
|
||||
|
||||
> 这篇 elementary OS 6 的评测将为你呈现该系统在旧款测试设备上的表现。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202109/01/095116zk73wcc4g5clnvq8.jpg)
|
||||
|
||||
elementary OS 的粉丝们焦急等待 elementary OS 6 Odin 发布已经将近两年了。如此焦急的原因,主要在于早期版本 elementary OS 5.1 的内核和软件包在 2021 年来说过于陈旧。而且,这一旧版本基于 Ubuntu 18.04 LTS 构建。因此,用户都急切地等待着基于 Ubuntu 20.04 LTS 的全新版本 —— 最重要的是,Ubutnu 20.04 LTS 已经发布一年,接下来也将有下一个 LTS 版本发布。
|
||||
|
||||
你应该也明白的,过长的等待时间,很可能导致用户跳槽到其他发行版。
|
||||
|
||||
但即便如此,新版本终于还是 [在 8 月发布了][1],它在用户和粉丝群体很受欢迎。
|
||||
|
||||
于是,我在一周前为一台旧设备(我知道新设备的体验会更好)安装了 elementary OS 6 Odin,下面就是测评。
|
||||
|
||||
![elementary OS 6 Odin 的桌面][2]
|
||||
|
||||
### elementary OS 6 Odin 测评
|
||||
|
||||
测试设备:
|
||||
|
||||
* CPU – Intel Core i3,4 GB 运行内存
|
||||
* 硬盘 – SSD 固态硬盘
|
||||
* 显卡 – Nvidia GeForce(340)
|
||||
|
||||
#### 安装
|
||||
|
||||
在这一版本中,elementary 团队针对他们自制的 elementary OS 安装器做了易用性优化。新安装器减少了安装前的准备步骤,虽然它还是需要依赖 GParted 进行分区操作(当然 GParted 本身是一款不错的工具)。
|
||||
|
||||
在前述测试设备中,安装过程大约花费了 10 分钟,没有任何报错。安装完之后,GRUB 也正常更新,没有任何意外。这是一个安装在老式 BIOS 上多引导系统。
|
||||
|
||||
#### 初见印象
|
||||
|
||||
如果你刚听说 elementary OS 和 Pantheon 桌面,或者从其他传统的菜单型桌面环境迁移过来,你可能需要一两天时间来适应这款桌面。当然,如果你已经是 elementary OS 的老用户的话,那么你将获得一致的体验,外加性能和外观的优化。
|
||||
|
||||
你应该可以察觉到一些明显可见的 [elementary OS 6 的新特性][3],像是强调色、原生暗黑模式,以及一组不错的新壁纸。
|
||||
|
||||
#### 稳定性与性能
|
||||
|
||||
我已经使用 elementary OS 6 Odin 超过一周的时间。在日常使用后,我只能说,它很稳定,没有突然的崩溃和意外。其他(通过 `apt` 单独安装的)额外软件也运作正常,性能也没有降低。
|
||||
|
||||
在近乎闲置的情况下,CPU 使用率处在 5%-10% 之间,内存占用约为 900 MB。CPU / 内存的消耗主要分配在 Gala(Pantheon 的窗口管理器)、Wingpanel(顶栏)和应用中心。
|
||||
|
||||
![elementary OS 6 的系统性能][5]
|
||||
|
||||
考虑到系统的视觉效果,我认为这些占用数据也十分合理。不过,当你打开更多软件,例如 LibreOffice、Chrome、Kdenlive 之后,消耗的资源肯定会更多。
|
||||
|
||||
#### 应用程序与应用中心
|
||||
|
||||
elementary OS 的应用程序列表经过精选,几乎所有类型的软件都可以从应用中心获取,包括 Flatpak 应用。不过,elementary OS 默认并没有预装一些重要的应用程序,像是 Firefox、LibreOffice、Torrent 客户端、硬盘分区工具、照片编辑器之类 —— 这些重要的程序需要在安装系统后再自行安装。我认为预装软件这一块有很大的改进空间。
|
||||
|
||||
### 结束语
|
||||
|
||||
在这一周的测试中,我也多次遇到了一个 bug,Wi-Fi 有时会突然断开,不过这完全是上游 Ubuntu 20.04 的问题 —— 多年以来,它一直有奇怪的 Wi-Fi 问题。抛开这个问题,elementary OS 确实是一款稳定、优秀的 Linux 发行版。如果 elementary OS 有滚动更新的版本,也许会更好。因此,这是一款值得推荐的发行版,尤其适合那些从 macOS 迁移过来的人。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2021/08/elementary-os-6-odin-review/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[imgradeone](https://github.com/imgradeone)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://blog.elementary.io/elementary-os-6-odin-released/
|
||||
[2]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/elementary-OS-6-ODIN-Desktop-1024x576.jpeg
|
||||
[3]: https://www.debugpoint.com/2021/08/elementary-os-6/
|
||||
[4]: https://www.debugpoint.com/2020/09/elementary-os-6-odin-new-features-release-date/
|
||||
[5]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/System-performance-of-elementary-OS-6.jpeg
|
135
published/20210827 Linux kernel modules we can-t live without.md
Normal file
135
published/20210827 Linux kernel modules we can-t live without.md
Normal file
@ -0,0 +1,135 @@
|
||||
[#]: subject: "Linux kernel modules we can't live without"
|
||||
[#]: via: "https://opensource.com/article/21/8/linux-kernel-module"
|
||||
[#]: author: "Jen Wike Huger https://opensource.com/users/jen-wike"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13747-1.html"
|
||||
|
||||
我们离不开的 Linux 内核模块
|
||||
======
|
||||
|
||||
> 开源爱好者们对他们所喜爱的 Linux 内核模块进行了评价。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202109/03/065649hik5hjiiy3htj589.jpg)
|
||||
|
||||
Linux 内核今年就要满 30 岁了! 如果你像我们一样对此特别重视,那么让我们本周用几个特别的文章来庆祝 Linux。
|
||||
|
||||
今天,我们先来看看来自社区对“**你不能没有哪个 Linux 内核模块?为什么?**”的回答,让我们听听这 10 位爱好者是怎么说的。
|
||||
|
||||
### #1
|
||||
|
||||
我猜一些内核开发者听到我的回答后会尖叫着跑开。不过,我还是在这里列出了两个最具争议性的模块:
|
||||
|
||||
* 第一个是 NVIDIA,因为我的工作笔记本和个人台式机上都有 NVIDIA 显卡。
|
||||
* 另一个可能产生的仇恨较少。VMware 的 VMNET 和 VMMON 模块,以便能够运行 VMware Workstation。
|
||||
|
||||
— [Peter Czanik][2]
|
||||
|
||||
### #2
|
||||
|
||||
我最喜欢的是 [zram][3] 模块。它在内存中创建了一个压缩块设备,然后它可以作为交换分区使用。在内存有限的情况下(例如,在虚拟机上),还有如果你担心频繁的 I/O 操作会磨损你的 SSD 或者甚至更糟糕的基于闪存的存储,那么使用基于 zram 的交换分区是非常理想的。
|
||||
|
||||
— [Stephan Avenwedde][4]
|
||||
|
||||
### #3
|
||||
|
||||
最有用的内核模块无疑是 snd-hda-intel,因为它支持大多数集成声卡。我可以一边听音乐,一边在 Linux 桌面上编码一个音频编曲器。
|
||||
|
||||
— [Joël Krähemann][5]
|
||||
|
||||
### #4
|
||||
|
||||
如果没有我用 Broadcom 文件生成的 kmod-wl,我的笔记本就没有价值了。我有时会收到关于内核污染的信息,但没有无线网络的笔记本电脑有什么用呢?
|
||||
|
||||
— [Gregory Pittman][6]
|
||||
|
||||
### #5
|
||||
|
||||
我不能没有蓝牙。没有它,我的鼠标、键盘、扬声器和耳机除了用来挡住门板还有啥用?
|
||||
|
||||
— [Gary Smith][7]
|
||||
|
||||
### #6
|
||||
|
||||
我要冒昧地说 _全_ 都是。 说真的,我们已经到了随机拿一块硬件,插入它,它就可以工作的地步。
|
||||
|
||||
* USB 串行适配器能正常工作
|
||||
* 显卡可以使用(尽管可能不是最好的)
|
||||
* 网卡正常工作
|
||||
* 声卡正常工作
|
||||
|
||||
所有这些模块整体带来大量可以工作的驱动程序,令人印象深刻。我记得在过去那些糟糕的日子里,我们曾经大喊 xrandr 魔法字符串才能来使投影仪工作。而现在,是的,当设备基本不能正常工作时,才真的罕见。
|
||||
|
||||
如果我不得不把它归结为一个,那就是 raid6。
|
||||
|
||||
— [John 'Warthog9' Hawley][8]
|
||||
|
||||
### #7
|
||||
|
||||
对于这个问题,我想回到 20 世纪 90 年代末。我是一家小公司的 Unix 系统管理员(兼任 IS 经理)。我们的磁带备份系统死了,由于“小公司”预算有限,我们没有急于更换或现场维修。所以我们必须得把它送去维修。
|
||||
|
||||
在那两个星期里,我们没有办法进行磁带备份。没有一个系统管理员愿意处于这种境地。
|
||||
|
||||
但后来我想起了读过的 [如何使用软盘磁带机][9],我们刚好有一台刚换下来的塔式电脑,它有一个软盘磁带机。
|
||||
|
||||
于是我用 Linux 重新安装了它,设置了 ftape 内核驱动模块,进行了一些备份/恢复测试,然后将我们最重要的备份运行到 QIC 磁带上。在这两个星期里,我们依靠 ftape 备份重要数据。
|
||||
|
||||
所以,对于那些让软盘磁带机在 1990 年代的 Linux 上工作的无名英雄,你真是太厉害了!
|
||||
|
||||
— [Jim Hall][10]
|
||||
|
||||
### #8
|
||||
|
||||
嗯,这很简单。是 kvm 内核模块。就个人而言,我无法想象在没有虚拟机的情况下完成日常工作。我愿意相信我们大多数人都是这样。kvm 模块在使 Linux 成为云战略的核心方面也发挥了很大作用。
|
||||
|
||||
— [Gaurav Kamathe][11]
|
||||
|
||||
### #9
|
||||
|
||||
对我来说,是 dm-crypt,它是用于 LUKS 的。参见:
|
||||
|
||||
* <https://www.redhat.com/sysadmin/disk-encryption-luks>
|
||||
* <https://manpages.debian.org/unstable/cryptsetup-bin/cryptsetup.8.en.html>
|
||||
|
||||
知道别人无法看到你的磁盘上的内容是非常棒的,例如,如果你的笔记本丢失或被盗时。
|
||||
|
||||
— [Maximilian Kolb][12]
|
||||
|
||||
### #10
|
||||
|
||||
对于密码学基础,很难超越 crypto 模块和它的 C API,它是如此简洁明了。
|
||||
|
||||
在日常生活中,还有什么比蓝牙提供的即插即用更有价值的吗?
|
||||
|
||||
— [Marty Kalin][13]
|
||||
|
||||
在评论中与我们分享。你的生活中不能没有什么 Linux 内核模块?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/8/linux-kernel-module
|
||||
|
||||
作者:[Jen Wike Huger][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/jen-wike
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer)
|
||||
[2]: https://opensource.com/users/czanik
|
||||
[3]: https://en.wikipedia.org/wiki/Zram
|
||||
[4]: https://opensource.com/users/hansic99
|
||||
[5]: https://opensource.com/users/joel2001k
|
||||
[6]: https://opensource.com/users/greg-p
|
||||
[7]: https://opensource.com/users/greptile
|
||||
[8]: https://opensource.com/users/warthog9
|
||||
[9]: https://tldp.org/HOWTO/Ftape-HOWTO.html
|
||||
[10]: https://opensource.com/users/jim-hall
|
||||
[11]: https://opensource.com/users/gkamathe
|
||||
[12]: https://opensource.com/users/kolb
|
||||
[13]: https://opensource.com/users/mkalindepauledu
|
@ -0,0 +1,130 @@
|
||||
[#]: sub·ject: "Position text on your screen in Linux with ncurses"
|
||||
[#]: via: "https://opensource.com/article/21/8/ncurses-linux"
|
||||
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "perfiffer"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13756-1.html"
|
||||
|
||||
使用 ncurses 在你的 Linux 屏幕上定位文本
|
||||
======
|
||||
|
||||
> 使用 ncurses 在 Linux 屏幕上的特定位置放置文本,可以带来更友好的用户界面体验。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202109/06/085908qrdrrv5dru6pcucr.jpg)
|
||||
|
||||
大多数的 Linux 实用程序仅仅只在屏幕的底部滚动文本。如果你想在屏幕中放置你的文本,例如一个游戏或者一个数据展示,你可以试试 ncurses。
|
||||
|
||||
curses 是一个旧的 Unix 库,它可以在文本终端界面控制光标。curses 的名称就来自于术语 “<ruby>光标控制<rt>cursor control</rt></ruby>”。多年以后,其他人编写了新的 curses 版本用来添加新的功能,新版本被叫做 “new curses” 或者 “ncurses”。你可以在每个流行的 Linux 发行版中找到 ncurses。尽管默认情况下可能未安装开发库、头文件和文档。例如,在 Fedora 上,你需要使用以下命令安装 `ncurses-devel` 包:
|
||||
|
||||
```
|
||||
$ sudo dnf install ncurses-devel
|
||||
```
|
||||
|
||||
### 在程序中使用 ncurses
|
||||
|
||||
要在屏幕上直接寻址,你首先需要初始化 `ncurses` 库。大部分程序会通过以下三行来做到这一点:
|
||||
|
||||
* `initscr()`:初始化窗口对象和 ncurses 代码,返回代表整个屏幕的窗口对象
|
||||
* `cbreak()`:禁用缓冲并使键入的输入立即可用
|
||||
* `noecho()`:关闭回显,因此用户输入不会显示在屏幕上
|
||||
|
||||
这些函数定义在 `curses.h` 头文件中,你需要在你的程序中通过以下方式将其包含进来:
|
||||
|
||||
```
|
||||
#include <curses.h>
|
||||
```
|
||||
|
||||
初始化终端后,你可以自由使用任何 ncurses 函数,我们将在示例程序中探讨其中的一些函数。
|
||||
|
||||
当你使用完 ncurses 并想返回到常规终端模式下时,使用 `endwin()` 重置一切。此命令可以重置任何屏幕颜色,将光标移动到屏幕的左下角,并使光标可见。通常在退出程序之前执行此操作。
|
||||
|
||||
### 在屏幕上寻址
|
||||
|
||||
关于 ncurses 首先需要知道的是屏幕的坐标分为行和列,左上角的是 `0,0` 点。ncurses 定义了两个全局变量来帮助你识别屏幕:`LINES` 是屏幕的行数,`COLS` 是屏幕的列数。屏幕右下角的位置是 `LINES-1,COLS-1`。
|
||||
|
||||
例如,如果你想要移动光标到第 10 行和第 30 列,你可以使用 `move()` 函数,移动到此坐标:
|
||||
|
||||
```
|
||||
move(10, 30);
|
||||
```
|
||||
|
||||
之后显示的任何文本都将从屏幕的该位置开始。要显示单个字符,请对单个字符使用 `addch(c)` 函数。要显示字符串,将对字符串使用 `addstr(s)` 函数。对于类似于 `printf` 的格式化输出,请使用带有常用选项的 `printw(fmt, ...)`。
|
||||
|
||||
移动到屏幕指定位置和显示文本是一件很常见的事情,ncurses 提供了同时执行这两项操作的快捷方式。`mvaddch(row, col, c)` 函数将在屏幕第 `row` 行,第 `col` 列的位置显示一个字符。而 `mvaddstr(row, col, s)` 函数将在屏幕第 `row` 行,第 `col` 列的位置显示一个字符串。举个更直接的例子,在程序中使用 `mvaddstr(10, 30, "Welcome to ncurses");` 函数将从屏幕的第 `10` 行和第 `30` 列开始显示文本 `Welcome to ncurses`。使用 `mvaddch(0, 0, '+')` 函数将在屏幕的左上角第 `0` 行和第 `0` 列处显示一个加号(`+`)。
|
||||
|
||||
在终端屏幕上绘制文本会对某些系统产生性能影响,尤其是在较旧的硬件终端上。因此 ncurses 允许你“堆叠”一堆文本以显示在屏幕上,然后使用 `refresh()` 函数使所有这些更改对用户可见。
|
||||
|
||||
让我们来看一个将以上所有内容整合在一起的简单示例:
|
||||
|
||||
```
|
||||
#include <curses.h>
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
initscr();
|
||||
cbreak();
|
||||
noecho();
|
||||
|
||||
mvaddch(0, 0, '+');
|
||||
mvaddch(LINES - 1, 0, '-');
|
||||
mvaddstr(10, 30, "press any key to quit");
|
||||
refresh();
|
||||
|
||||
getch();
|
||||
|
||||
endwin();
|
||||
}
|
||||
```
|
||||
|
||||
程序的开始初始化了一个终端窗口,然后在屏幕的左上角打印了一个加号,在左下角打印了一个减号,在第 `10` 行和第 `30` 列打印了 `press any key to quit` 文本。程序通过使用 `getch()` 函数接收了键盘输入的单个字符,接着,使用 `endwin()` 函数在程序完全退出前重置了终端。
|
||||
|
||||
`getch()` 是一个很有用的函数,你可以使用它来做很多事情。我经常使用它在我退出程序前用来暂停。与大多数 ncurses 函数一样,还有一个名为 `mvgetch(row, col)` 的 `getch()` 版本,用于在等待字符输入之前移动到屏幕位置的第 `row` 行,第 `col` 列。
|
||||
|
||||
### 使用 ncurses 编译
|
||||
|
||||
如果你尝试以通常的方式编译该示例程序,例如 `gcc pause.c`,你可能会从链接器中获得大量错误列表。那是因为 GNU C 编译器不会自动链接 `ncurses` 库。相反,你需要使用 `-l ncurses` 命令行选项加载它以进行链接。
|
||||
|
||||
```
|
||||
$ gcc -o pause pause.c -lncurses
|
||||
```
|
||||
|
||||
运行新程序将打印一条简单的 `press any key to quit`消息,该消息差不多位于屏幕中央:
|
||||
|
||||
![centered message in a program window][2]
|
||||
|
||||
*图 1:程序中居中的 “press any key to quit” 消息。*
|
||||
|
||||
### 使用 ncurses 构建更好的程序
|
||||
|
||||
探索 `ncurses` 库函数以了解在屏幕上显示文本的其它方法。你可以在 `ncurses` 的手册页中找到所有 `ncurses` 函数的列表。这给出了 ncurses 的一般概述,并提供了不同 `ncurses` 函数的类似表格的列表,并参考了包含完整详细信息的手册页。例如,在 `curs_printw(3X)` 手册页中描述了 `printw`,可以通过以下方式查看:
|
||||
|
||||
```
|
||||
$ man 3x curs_printw
|
||||
```
|
||||
|
||||
更简单点:
|
||||
|
||||
```
|
||||
$ man curs_printw
|
||||
```
|
||||
|
||||
使用 ncurses,你可以创建更多有趣的程序。通过在屏幕上的特定位置打印文本,你可以创建在终端中运行的游戏和高级实用程序。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/8/ncurses-linux
|
||||
|
||||
作者:[Jim Hall][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[perfiffer](https://github.com/perfiffer)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/jim-hall
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop)
|
||||
[2]: https://opensource.com/sites/default/files/press-key_0.png
|
@ -0,0 +1,99 @@
|
||||
[#]: subject: "Zulip: An Interesting Open-Source Alternative to Slack"
|
||||
[#]: via: "https://itsfoss.com/zulip/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13750-1.html"
|
||||
|
||||
Zulip:一个不错的开源的 Slack 替代品
|
||||
======
|
||||
|
||||
> Zulip 是一个开源的协作平台,它把自己定位为一个更好的 Slack 替代品。让我们来了解一下。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202109/04/083746lbheeynx13jmn3xn.jpg)
|
||||
|
||||
当涉及到你的工作时,消息和协作平台有很大的不同。
|
||||
|
||||
虽然有几个选择,但 Slack 是许多组织使用的一个流行选择。但是,可以自托管的 Slack 的开源替代方案如何呢?
|
||||
|
||||
Zulip 就是这样一个软件。
|
||||
|
||||
### Zulip:开源的协作消息应用
|
||||
|
||||
![][1]
|
||||
|
||||
如果你想多了解,我必须提到还有更多的 [Slack 开源替代品][2]。
|
||||
|
||||
但在这里,我重点介绍 Zulip。
|
||||
|
||||
Zulip 是一个自由而开源的消息应用,有付费托管选项和自托管的能力。
|
||||
|
||||
它旨在提供与 Slack 类似的体验,同时努力帮助你利用话题提高对话的有效性。
|
||||
|
||||
与 Slack 中的频道相比,Zulip 聊天添加了话题(类似标签),以快速过滤与你有关的对话。
|
||||
|
||||
### Zulip 的特点
|
||||
|
||||
![][3]
|
||||
|
||||
你可以通过 Zulip 获得大部分的基本功能。这里列出主要的亮点,你可以发现:
|
||||
|
||||
* 支持 Markdown
|
||||
* 频道的主题
|
||||
* 支持拖放文件
|
||||
* 代码块
|
||||
* 集成 GitHub 来跟踪问题
|
||||
* 支持电子邮件通知
|
||||
* 自托管选项
|
||||
* 信息编辑
|
||||
* 集成 GIPHY
|
||||
* 用 Zoom、Jitsi 或 BigBlueButton 进行视频通话
|
||||
|
||||
除了上述功能外,你可以预期得到你通常在 Slack 和其他方面得到的基本选项。
|
||||
|
||||
此外,如果你愿意,你还可以将它与 Matrix 和 IRC 整合。
|
||||
|
||||
![][4]
|
||||
|
||||
在我简短的测试使用中,其用户界面对于有效的沟通来说是足够好的。然而,我没能找到任何黑暗模式或改变主题的能力。
|
||||
|
||||
它看起来比 Slack 更简单直白,这样可以改善用户体验方面的问题。
|
||||
|
||||
### 在 Linux 中安装 Zulip
|
||||
|
||||
Zulip 在其官方网站上以 AppImage 文件的形式提供。如果你需要帮助,可以参考我们关于 [在 Linux 中使用 AppImage][5] 的指南。
|
||||
|
||||
它也有一个 Snap 包。所以,你可以在任何一个 Linux 发行版上使用它们中的任何一个。
|
||||
|
||||
你也可以使用 APT 通过终端为基于 Ubuntu/Debian 的发行版安装它。如果你想这样做,请看它的 [官方说明][6]。
|
||||
|
||||
Zulip 可用于 Windows、Mac 和 Linux。你也应该发现它可用于 Android 和 iOS 手机。
|
||||
|
||||
- [Zulip][7]
|
||||
|
||||
你可以在网络、桌面和智能手机上使用 Zulip,所以可以把它当做 Slack 的合适替代品。
|
||||
|
||||
你试过了吗?你用什么消息平台来进行工作协作?欢迎在评论中分享你的想法。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/zulip/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/zulip-chat-new.png?resize=800%2C551&ssl=1
|
||||
[2]: https://itsfoss.com/open-source-slack-alternative/
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/zulip-chat-screenshot.png?resize=800%2C550&ssl=1
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/zulip-settings.png?resize=800%2C546&ssl=1
|
||||
[5]: https://itsfoss.com/use-appimage-linux/
|
||||
[6]: https://zulip.com/help/desktop-app-install-guide
|
||||
[7]: https://zulip.com/
|
244
published/20210901 20 essential Linux commands for every user.md
Normal file
244
published/20210901 20 essential Linux commands for every user.md
Normal file
@ -0,0 +1,244 @@
|
||||
[#]: subject: "20 essential Linux commands for every user"
|
||||
[#]: via: "https://opensource.com/article/21/9/essential-linux-commands"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "unigeorge"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13759-1.html"
|
||||
|
||||
用户必会的 20 个 Linux 基础命令
|
||||
======
|
||||
|
||||
> 无论新手老手,这 20 个 Linux 命令都能让你的操作更轻松。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202109/07/082525n7amf7gejo16zaxx.jpg)
|
||||
|
||||
在黝黑的终端窗口中输入命令,这样的方式对某些人群来说可能好像过时了,但对许多专业计算机人员来说,这几乎是计算机完成能够执行的所有任务的最有效、最简便和最清晰的方式。如今,一些项目将开源命令引入了 macOS 和 Windows 等非开放平台,因此终端命令不仅仅是针对 Linux 和 BSD 用户,更是与每个人都息息相关。你可能会惊讶地发现,在一台普通的 [POSIX][2] 计算机上安装了数千个命令,当然,其中很多命令并不是真的有用,至少不是直接或经常性被使用。而其中的一部分命令虽然不是有效终端必须使用的命令,但相比其他命令而言使用频率较高,值得大家学习一下。
|
||||
|
||||
以下是终端用户最可能会使用的前 20 个命令:
|
||||
|
||||
### cd
|
||||
|
||||
在终端外,你可以单击图标从一个文件夹移动到另一个文件夹,但在终端中,你需要使用 `cd`。`cd` 命令代表<ruby>变更目录<rt>change directory</rt></ruby>,是用户在 Linux 系统中移动的方式。这是 Linux 中从一个地方到另一个地方最快、最直接的路线。
|
||||
|
||||
例如,在桌面上,当你想从你的主目录(你保存所有文件夹的地方)移动到一个名为 `presentations` 的文件夹时,你首先要打开你的 `Documents` 文件夹,然后打开一个名叫 `work` 的文件夹,然后是 `projects` 文件夹,然后是 `conference` 文件夹,最后是 `presentations` 文件夹,里面存放的是 LibreOffice Impress 幻灯片。这个过程包含了很多次的双击操作。同时屏幕上还需要许多鼠标移动动作,这取决于新窗口出现的位置,以及大脑需要跟踪的许多路径点。许多人通过将 _所有文件_ 都放在桌面上来避免这个看似微不足道的任务。
|
||||
|
||||
而终端用户只需键入以下内容即可避免此问题:
|
||||
|
||||
```
|
||||
$ cd ~/Documents/work/projects/conference/presentations
|
||||
```
|
||||
|
||||
一些有经验的终端用户甚至都懒得输入所有这些,而是使用 `Tab` 键自动完成单词填充。更甚者,有时你都不必依赖自动完成,而是改用通配符:
|
||||
|
||||
```
|
||||
$ cd ~/Doc*/work/*/conf*/p*
|
||||
```
|
||||
|
||||
### pwd
|
||||
|
||||
用 Buckaroo Banzai 的话来说:“无论你走到哪里,你就在那里。”
|
||||
|
||||
当你想弄清楚确切位置时,就可以使用 `pwd` 命令。`pwd` 代表<ruby>打印工作目录<rt>print working directory</rt></ruby>,这正是它的作用。`--physical`(在某些情况时缩写为 `-P`)显示解析所有符号链接后的确切位置。
|
||||
|
||||
```
|
||||
$ pwd
|
||||
/home/tux/presentation
|
||||
|
||||
$ pwd --physical
|
||||
/home/tux/Documents/work/projects/conference/presentations
|
||||
```
|
||||
|
||||
### sed
|
||||
|
||||
流编辑器 `sed` 更广为人知的是一个强大的批量 _查找和替换_ 命令,但它同时也是一个正当合理的文本编辑器。你可以通过阅读我的 [介绍性文章][3] 来学习使用它,然后通过我的 [高级教程和备忘录][4] 成为老手。
|
||||
|
||||
### grep
|
||||
|
||||
`grep` 命令使用很普遍,以至于经常被用作动词(例如 “我会对一些文件进行 grep”)和动名词(例如 “grep 一些输出”)。无论是查看日志文件还是解析其他命令的输出,它都是在 shell 中解析文本时的关键组件。这是忙碌的用户专注于特定信息的一种方式。考虑一下计算世界中的数据量,`grep` 命令的流行就见怪不怪了。你可以通过阅读我的 [介绍性文章][5] 了解 `grep`,然后下载 [备忘录][6] 学习。
|
||||
|
||||
### file
|
||||
|
||||
当你需要知道文件包含什么类型的数据时,请使用 `file` 命令:
|
||||
|
||||
```
|
||||
$ file example.foo
|
||||
example.foo: RIFF (little-endian) data, Web/P image [...]
|
||||
|
||||
$ file example.bar
|
||||
example.bar: ELF 64-bit LSB executable, x86-64 [...]
|
||||
```
|
||||
|
||||
当然,`file` 命令并不神奇。它只不过是根据文件如何标识自身而进行输出的,并且文件可能是错误的、损坏的或伪装的。使用 [hexdump][7] 进行严格检查的方式确定性更强,但对于日常使用而言,`file` 命令非常方便。
|
||||
|
||||
### awk
|
||||
|
||||
`awk` 不仅仅是一个命令,它还是一种字面意义上的 [编程语言][8]。[点此下载我们的免费 Awk 电子书][9] 进行学习,你可能会写出远超你想象的脚本。
|
||||
|
||||
### curl
|
||||
|
||||
`curl` 命令是用于终端的 [非交互式 Web 浏览器][10]。它是面向 Web 和 API 开发人员的 [开发工具][11]。它是一个复杂灵活的命令,但如果你想从你的终端顺利地与 Web 服务交互,该命令是很值得学习的。
|
||||
|
||||
下载我们免费的 [curl 备忘录][12],你可以从中学会 `curl` 的许多选项。
|
||||
|
||||
### ps
|
||||
|
||||
管理系统资源主要由内核负责,当你更喜欢或更需要手动管理时,可以使用 `ps` 命令。读者可以在我的 [使用 procps-ng 监控 Linux 系统][13] 文章中了解 `ps`。
|
||||
|
||||
### cat
|
||||
|
||||
[cat 命令][14] 是<ruby>连接<rt>concatenate</rt></ruby>的缩写,它曾因为能将若干小文件合并而显得非常有用,这些小文件可能是由于大小限制而(使用 `split` 命令)拆分的。如今,`cat` 主要是用来将文本文件的内容转储到终端中以供快速阅读,除非你为此专门去使用 `head`、`tail`、`more` 或 `less` 等命令。
|
||||
|
||||
尽管它的原始用途几乎已被弃用,并且其他几个命令也主要提供了其次要功能,但 `cat` 仍然是一个有用的工具。例如,它可以是复制(`cp`)命令的替代品:
|
||||
|
||||
```
|
||||
$ cat myfile.ogg > /backups/myfile.ogg
|
||||
```
|
||||
|
||||
它可以显示文件中不便观察的隐形字符。例如,使用 `--show-tabs` 选项,分割 [YAML][15] 的 `Tab` 字符就会显示为 `^I`:
|
||||
|
||||
```
|
||||
$ cat --show-tabs my.yaml
|
||||
|
||||
---
|
||||
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Make sure the current version of 'sysstat' is installed.
|
||||
dnf:
|
||||
name:
|
||||
^I- sysstat
|
||||
^I- httpd
|
||||
^I- mariadb-server
|
||||
state: latest
|
||||
```
|
||||
|
||||
它还可以用 `--show-nonprinting` 显示非打印字符,用 `--show-ends` 标记行尾,用 `--number` 提供行号,等等。
|
||||
|
||||
### find
|
||||
|
||||
`find` 命令可以用来查找文件,但它还有许多选项,这些选项可以帮助你通过各种过滤器和参数查找文件。读者可以从我的 [介绍性文章][16] 中学习该命令的基础知识。
|
||||
|
||||
如果你一直想知道为什么最基本的、不起眼的 [ls 命令][17],不在本文列表中,那是因为 `find` 的灵活性。它不仅可以列表文件:
|
||||
|
||||
```
|
||||
$ find .
|
||||
./bar.txt
|
||||
./baz.xml
|
||||
./foo.txt
|
||||
[...]
|
||||
```
|
||||
|
||||
它还可以提供包含详细信息的长列表功能:
|
||||
|
||||
```
|
||||
$ find . -ls
|
||||
3014803 464 -rw-rw-r-- 1 tux users 473385 Jul 26 07:25 ./foo.txt
|
||||
3014837 900 -rwxrwxr-x 1 tux users 918217 Nov 6 2019 ./baz.xml
|
||||
3026891 452 -rw-rw-r-- 1 tux users 461354 Aug 10 13:41 ./foo.txt
|
||||
[...]
|
||||
```
|
||||
|
||||
这是一个技术问题,但也是很一个巧妙的技巧。
|
||||
|
||||
### tar
|
||||
|
||||
人们有时会引用 BSD 的 `tar` 语法来拿 Linux 命令开玩笑。尽管有这样的名声,但 `tar` 命令实际上非常直观。读者可以阅读我的 [如何解压缩 tar.gz 文件][18] 文章,了解在需要时使用 `tar` 命令的简单知识。
|
||||
|
||||
### more、less 和 most
|
||||
|
||||
这些统称为分页命令。分页命令与 `cat` 类似,但前者会在屏幕底部暂停输出,直到你向下滚动查看更多内容。这些命令比较简单,但每个之间都有细微差别。用户是用箭头键还是空格键滚动?是必须手动退出,还是在显示的文件末尾自动退出?用户的首选搜索行为是什么样的?选择你最喜欢的分页命令并将其设置在 `.bashrc` 中吧!
|
||||
|
||||
### ssh 和 scp
|
||||
|
||||
OpenSSH 不仅有助于保护与远程系统的连接安全,还可以用于启用其他命令。例如,对于许多用户来说,有了 `.ssh` 目录,他们才能与 Git 存储库顺利交互、将更新发布到网站、登录云控制平台。
|
||||
|
||||
### mv
|
||||
|
||||
`mv` 命令有双重作用:它既可以 [移动文件][19] 又可以 [重命名文件][20]。它有几个可用的保护措施,例如 `--interactive` 和 `--no-clobber` 选项避免破坏现有文件,`--backup` 命令确保数据在新位置验证之前被保留,以及 `--update` 选项确保旧版本不会替换新版本文件。
|
||||
|
||||
### sudo
|
||||
|
||||
当某个用户账户的用户名已知,且具有 _全部_ 系统权限时,该用户很快就会成为黑客攻击的目标。`sudo` 命令消除了对字面上 `root` 用户的需求,从而优雅地移除了有关系统的重要信息。不过这还不是全部,使用 `sudo` 你还可以轻松地管理单个命令、用户和组的权限。你可以在选定的命令上启用无密码执行、记录用户会话、使用摘要验证来验证命令,[等等][21]。
|
||||
|
||||
### alias
|
||||
|
||||
使用 `alias` 命令将长命令变成易于记忆的快捷方式:
|
||||
|
||||
```
|
||||
$ alias ls='ls --classify --almost-all --ignore-backups --color'
|
||||
```
|
||||
|
||||
### clear
|
||||
|
||||
有时终端会显得很混乱,输入 `clear`(或在某些 shell 中按 `Ctrl+L`)后,你就能得到漂亮、刷新的屏幕了。
|
||||
|
||||
### setfacl
|
||||
|
||||
传统上,POSIX 文件权限由 `chown` 和 `chmod` 决定。然而,如今系统变得更加复杂,因此有一个灵活性更高的命令。`setfacl` 命令允许创建一个 [访问控制列表(ACL)][22],可以配置任意用户所需权限,并可以为文件夹及其中创建的内容设置默认权限。
|
||||
|
||||
### netcat
|
||||
|
||||
可能需要使用 `netcat`(`nc`)的人不多,但这些使用它的人确离不开它。`nc` 命令是一个通用的网络连接工具。
|
||||
|
||||
它可以连接到一个端口,类似于 `telnet` 命令:
|
||||
|
||||
```
|
||||
$ nc -u 192.168.0.12 80
|
||||
```
|
||||
|
||||
它可以 ping 一个端口,类似于 `ping` 命令:
|
||||
|
||||
```
|
||||
$ nc -zvn 192.168.0.12 25
|
||||
```
|
||||
|
||||
它可以探测开放端口,类似于 `nmap` 命令:
|
||||
|
||||
```
|
||||
$ nc -zv 192.168.0.12 25-80
|
||||
```
|
||||
|
||||
以上仅是该命令的一小部分用途。
|
||||
|
||||
### 你自己构建的命令
|
||||
|
||||
在某种程度上,Linux 终端是一个创造性解决问题的平台。当你学习命令时,你也在学习可用于创建自己的命令的组块。我的 [shell 历史][23] 中的许多命令都是自己编写的 shell 脚本,从而实现了根据自己想要的工作方式定制工作流程。你为自己的效率和舒适度而设计的命令也可以作为 shell 中的基本命令。花些时间了解一些很棒的命令,然后试着构建自己的命令吧。当你构建出的命令非常好用时,把它开源,这样就可以与他人分享你的想法啦!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/9/essential-linux-commands
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[unigeorge](https://github.com/unigeorge)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/command_line_prompt.png?itok=wbGiJ_yg (Command line prompt)
|
||||
[2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains
|
||||
[3]: https://opensource.com/article/20/12/sed
|
||||
[4]: https://opensource.com/article/21/3/sed-cheat-sheet
|
||||
[5]: https://opensource.com/article/21/3/grep-cheat-sheet
|
||||
[6]: https://opensource.com/downloads/grep-cheat-sheet
|
||||
[7]: https://opensource.com/article/19/8/dig-binary-files-hexdump
|
||||
[8]: https://opensource.com/article/21/1/learn-awk
|
||||
[9]: https://opensource.com/article/20/9/awk-ebook
|
||||
[10]: https://opensource.com/article/20/5/curl-cheat-sheet
|
||||
[11]: https://www.redhat.com/sysadmin/use-curl-api
|
||||
[12]: https://opensource.com/downloads/curl-command-cheat-sheet
|
||||
[13]: https://opensource.com/article/21/8/linux-procps-ng
|
||||
[14]: https://opensource.com/article/19/2/getting-started-cat-command
|
||||
[15]: https://www.redhat.com/sysadmin/yaml-beginners
|
||||
[16]: https://opensource.com/article/21/8/find-files-and-directories-find
|
||||
[17]: https://opensource.com/article/19/7/master-ls-command
|
||||
[18]: https://opensource.com/article/17/7/how-unzip-targz-file
|
||||
[19]: https://opensource.com/article/21/8/move-files-linux
|
||||
[20]: https://opensource.com/article/21/8/rename-file-linux-terminal
|
||||
[21]: https://opensource.com/article/19/10/know-about-sudo
|
||||
[22]: https://opensource.com/article/20/3/external-drives-linux
|
||||
[23]: https://opensource.com/article/18/6/history-command
|
@ -0,0 +1,81 @@
|
||||
[#]: subject: "“Apps for GNOME” is a New Web Portal to Showcase Best Linux Apps for GNOME"
|
||||
[#]: via: "https://news.itsfoss.com/apps-for-gnome-portal/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
“Apps for GNOME” is a New Web Portal to Showcase Best Linux Apps for GNOME
|
||||
======
|
||||
|
||||
There are several apps built for GNOME. Most of the stock (default) GNOME apps do not get enough spotlight as a separate mention.
|
||||
|
||||
While Flathub as a platform helps highlight some fantastic applications for GNOME, it limits to Flatpak apps only.
|
||||
|
||||
Also, it is not just dedicated to GNOME, of course.
|
||||
|
||||
Hence, there is a new website to focus more on the GNOME ecosystem and highlight the best GNOME apps.
|
||||
|
||||
### Apps for GNOME
|
||||
|
||||
![][1]
|
||||
|
||||
A [blog post][2] by Sophie Herold on Planet GNOME announced the availability of the platform.
|
||||
|
||||
[apps.gnome.org][3] is where you can find all the GNOME apps, both default and third-party applications tailored primarily for the GNOME environment.
|
||||
|
||||
With this portal, they aim to encourage users to participate and contribute to the development of such applications.
|
||||
|
||||
When you head to explore an app on the platform, you will be presented with plenty of information that includes where to submit feedback for the app, help translate, and contribute financially.
|
||||
|
||||
![][4]
|
||||
|
||||
It is not something out-of-the-box, but it presents all the information related to a GNOME app in a single place.
|
||||
|
||||
You get a complete picture for a GNOME app starting with the description, screenshots, latest version, information about the maintainers, and translation status.
|
||||
|
||||
![][5]
|
||||
|
||||
Not just limited to desktop GNOME apps, but you will also find applications marked with a mobile icon if it is supported on GNOME mobile devices.
|
||||
|
||||
In addition to the key GNOME apps, it also aims to feature applications that do not offer a flatpak package but suits well for the GNOME platform.
|
||||
|
||||
[Apps for GNOME][3]
|
||||
|
||||
### Making Information More Accessible
|
||||
|
||||
I find it much more insightful than what Flathub seems to provide. And, I think this is not just going to help highlight GNOME apps, but it should help new users get to know more about the applications they use.
|
||||
|
||||
Of course, it should also encourage users to get involved, which is the primary focus.
|
||||
|
||||
While KDE already had an [application portal][6], it might need an upgrade if they take Apps for GNOME as an example to improve.
|
||||
|
||||
_What do you think about the Apps for GNOME initiative?_ _Feel free to share your thoughts in the comments._
|
||||
|
||||
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
|
||||
|
||||
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
|
||||
|
||||
I'm not interested
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/apps-for-gnome-portal/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU2MiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[2]: https://blogs.gnome.org/sophieh/2021/08/26/apps-gnome-org-is-online/
|
||||
[3]: https://apps.gnome.org
|
||||
[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI4MiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ3OSIgd2lkdGg9Ijc0NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[6]: https://apps.kde.org
|
@ -0,0 +1,122 @@
|
||||
[#]: subject: "Open Source Video Editor OpenShot 2.6 Released With AI Effects & Major Improvements"
|
||||
[#]: via: "https://news.itsfoss.com/openshot-2-6-release/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Open Source Video Editor OpenShot 2.6 Released With AI Effects & Major Improvements
|
||||
======
|
||||
|
||||
OpenShot is one of the most popular [open-source video editors][1] out there.
|
||||
|
||||
It is not just for Linux, but it is an impressive free video editor for Windows and Mac users as well.
|
||||
|
||||
While it was already a functional, easy-to-use, feature-rich video editor, it stepped up a notch with the latest release.
|
||||
|
||||
Here, we discuss some key additions in OpenShot 2.6.0 release.
|
||||
|
||||
### OpenShot 2.6.0 Released: What’s New?
|
||||
|
||||
![][2]
|
||||
|
||||
The primary highlight of this release is the inclusion of AI and computer vision effects. But, there is more to it than meets the eye.
|
||||
|
||||
Here are the highlights for OpenShot 2.6.0 changes:
|
||||
|
||||
* New AI and computer vision effects
|
||||
* New audio effects
|
||||
* New zoom slider
|
||||
* Improved transform tool
|
||||
* Improved video effects
|
||||
* Improved snapping
|
||||
* More emoji support
|
||||
* Improved performance
|
||||
* Bug fixes
|
||||
|
||||
|
||||
|
||||
Considering the fundamental changes, OpenShot is now a more compelling option for professional video editors.
|
||||
|
||||
![Official YouTube video for OpenShot 2.6][3]
|
||||
|
||||
### AI Effects
|
||||
|
||||
Taking the help of an AI to process images/videos is becoming increasingly common these days.
|
||||
|
||||
Hence, OpenShot adds the support for AI effects to make it easier to enhance and edit videos.
|
||||
|
||||
One of the features includes eliminating any shake/motion in a video by calculating it.
|
||||
|
||||
![][4]
|
||||
|
||||
You can also track particular objects in a video. This is undoubtedly helpful for animation or any other creative work where you need to follow a specific element of the video.
|
||||
|
||||
Like a real-time feed where the camera detects vehicles, it can also identify objects in the video. While this feature is in beta, it should be fun to experiment with it.
|
||||
|
||||
### Audio Effects
|
||||
|
||||
OpenShot video editor featured most of the essential audio effects. And, in this release, some more important audio effects have been added that include:
|
||||
|
||||
* Compressor
|
||||
* Expander
|
||||
* Echo
|
||||
* Delay
|
||||
* Distortion
|
||||
* Noise
|
||||
* EQ
|
||||
* Robotic voice and whispering voice effects
|
||||
|
||||
|
||||
|
||||
### New & Improved Tools
|
||||
|
||||
![][5]
|
||||
|
||||
Vital tools in snapping and transform mode have been improved.
|
||||
|
||||
The improved transform tool lets you resize, rotate, and work seamlessly to create complex animations.
|
||||
|
||||
Furthermore, when trimming the clip, the snapping tool allows you better align the edges of the clips.
|
||||
|
||||
A new zoom slider tool has been added to give you better control over the timeline. You can easily drag and work with a specific portion of the timeline as needed.
|
||||
|
||||
### Other Improvements
|
||||
|
||||
In addition to the essential changes, you can find performance improvements and numerous bug fixes.
|
||||
|
||||
You can find the latest version as an AppImage file as of now. It should reflect soon in the Flathub repository and other sources as well. Consider reading [how to use AppImage files][6] if you are not aware of it.
|
||||
|
||||
[Download OpenShot 2.6.0][7]
|
||||
|
||||
To explore more about the release, you may refer to the [official release announcement][8].
|
||||
|
||||
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
|
||||
|
||||
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
|
||||
|
||||
I'm not interested
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/openshot-2-6-release/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/open-source-video-editors/
|
||||
[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYwOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[3]: https://i0.wp.com/i.ytimg.com/vi/06sgvsYB378/hqdefault.jpg?w=780&ssl=1
|
||||
[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM2MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[6]: https://itsfoss.com/use-appimage-linux/
|
||||
[7]: https://www.openshot.org/download/
|
||||
[8]: https://www.openshot.org/blog/2021/08/25/new_openshot_release_260/
|
@ -0,0 +1,154 @@
|
||||
[#]: subject: "Linux Kernel 5.14 Released Right After the 30th Anniversary of Linux"
|
||||
[#]: via: "https://news.itsfoss.com/kernel-5-14-release/"
|
||||
[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Linux Kernel 5.14 Released Right After the 30th Anniversary of Linux
|
||||
======
|
||||
|
||||
Back in June, I looked at [Linux Kernel 5.13][1], where we received preliminary support for the M1, RISC-V improvements, and support for new GPUs.
|
||||
|
||||
Now, Linux kernel 5.14 is here! Linus Torvalds just [announced it on the kernel mailing list][2]:
|
||||
|
||||
![Kernel 5.14 announcement mail][3]
|
||||
|
||||
While this release is not quite as large as the aforementioned one, it still has many improvements, especially for ARM devices.
|
||||
|
||||
Let us take a quick look at the key highlights of this release.
|
||||
|
||||
### Linux Kernel 5.14: What’s New?
|
||||
|
||||
Linux kernel 5.14 contains a wide variety of new features, especially for ARM-based systems. This is all happening despite Linus Torvalds claiming that this is a relatively small release in the initial [kernel announcement][4].
|
||||
|
||||
Fast forward to its release candidate v7 before its final release, Linus mentioned:
|
||||
|
||||
> Most of the changes here are drivers (GPU and networking stand out),
|
||||
>
|
||||
> and the rest is pretty random stuff: arch, tracing, core networking, a
|
||||
>
|
||||
> couple of VM fixes..
|
||||
|
||||
Linus Torvalds, Linux kernel 5.14 RC7 announcement
|
||||
|
||||
This release contains a variety of new features. Here is a list of the key new features present in Linux kernel 5.14:
|
||||
|
||||
* The [Raspberry Pi 400][5] can now work completely with this kernel, thanks to the work done for the past couple of months.
|
||||
* The [Rockchip RK3568 SoC][6] is now supported
|
||||
* Initial support for the Sony Xperia 1/1II and 5/5II
|
||||
* Various updates added for Microsoft Surface Duo
|
||||
* Updates to DIY BananaPi M5 board added
|
||||
* [Important updates][7] for RISC-V
|
||||
* Improved support for Intel Alder Lake P and Alder Lake M graphics cards
|
||||
* New hot-unplug support on AMD Radeon graphics cards
|
||||
* ‘Secret’ memory areas introduced with a new system called ‘memfd_secret’
|
||||
* Improvements to [lower the latency of its USB audio driver][8]s
|
||||
* Improved support for USB4
|
||||
* Initial groundwork to support Intel Alder lake processors
|
||||
|
||||
|
||||
|
||||
In this article, we will be looking at what these features are, and what they mean for the end user.
|
||||
|
||||
#### Raspberry Pi 400
|
||||
|
||||
Last year, the Raspberry Pi Foundation launched the [Raspberry Pi 400][5], a keyboard computer similar to those of the 1980s. Unfortunately, this computer requires a custom kernel version to function due to non-mainline drivers.
|
||||
|
||||
However, with the kernel 5.14 release, this appears to have changed. After months of development, the Raspberry Pi 400 can now be booted using the Linux kernel 5.14. While it is unfortunate for support to take this long, it is much better late than never.
|
||||
|
||||
#### RK35xx SoC Support
|
||||
|
||||
This year has truly been a glorious year for [Rockchip][9]. They started off by launching their rk35xx series of SoCs, with many manufacturers integrating the newly-released SoCs into their products.
|
||||
|
||||
One of the most notable uses of the RK35xx series is in the Quartz64, an SBC developed by [Pine64][10] (which I am currently helping mainline). And Linux 5.14 brings support for one of these SoCs, the RK3568.
|
||||
|
||||
For all the upcoming boards based on this SoC, this inclusion is extremely important as it greatly simplifies distro porting.
|
||||
|
||||
#### Initial Support for Sony Xperia 1/1II and 5/5II
|
||||
|
||||
[Sony][11] is one of the few mobile phone manufacturers that actively support running Linux on their phones. This is demonstrated through their compatibility with operating systems such as [Sailfish OS][12] and [Ubuntu Touch][13].
|
||||
|
||||
Now, with the Sony Xperia 1/1II and 5/5II being mainlined, it should be much easier to get an even wider variety of distributions booted. However, it should be also be kept in mind that this is only initial support, much like Linux 5.13’s M1 support.
|
||||
|
||||
#### RISC-V Updates
|
||||
|
||||
One of the trends I have noticed over the past few kernel updates is the ever-improving support for [RISC-V][14] processors. Last update, we got some significant build system improvements, a re-arranged kernel memory map, and support for the kernel debugging module KProbes.
|
||||
|
||||
This time, it appears that this trend is continuing, with the addition of a few RISC-V-specific improvements. These include:
|
||||
|
||||
* Support for transparent huge pages
|
||||
* An optimized copy_{to,from}_user.
|
||||
* Generic PCI resources mapping support
|
||||
* Support for KFENCE (Kernel Electric Fence) for memory safety error detection/validation
|
||||
|
||||
|
||||
|
||||
While mostly minor, these updates should pave the way for future RISC-V based devices.
|
||||
|
||||
#### Radeon Hot-Unplug
|
||||
|
||||
Perhaps my favorite feature of this release, AMD Radeon cards are getting a new hot-unplug feature. Previously, ripping your GPU out while your system was running would result in a kernel panic. Now, you can remove your (Radeon) GPU at any time and your system will continue to function normally, at least in theory.
|
||||
|
||||
I just hope that this feature works better on Linux than my experience with it on Windows. While I wouldn’t recommend randomly pulling your GPU out of your system mid-update, it is still a nice feature to see, and it will be interesting to see what people do with it.
|
||||
|
||||
#### USB 4 Support
|
||||
|
||||
As we see an increasing number of new laptops shipping with USB 4, it has become more and more important for Linux to start supporting it. Fortunately, the Linux kernel 5.14 has a wide variety of improvements for USB 4 users.
|
||||
|
||||
These include:
|
||||
|
||||
* More USB 4 support added to the thunderbolt core
|
||||
* Build warning fixes all over the place
|
||||
* USB-serial driver updates and new device support
|
||||
* A wide variety of driver updates
|
||||
* Lots of other tiny things
|
||||
|
||||
|
||||
|
||||
While not game-changing, these improvements should help many current and future users of USB 4.
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
Between the improved USB support, multitude of updates for ARM and RISC-V devices, and minor GPU upgrades, this release is looking pretty good. As I mentioned before, I am most excited about the Radeon hot-unplug support, as this should make GPU swapping that little bit easier.
|
||||
|
||||
Similarly to last time, I’d recommend waiting for your distribution to offer official updates before upgrading to Linux kernel 5.14. Fortunately, users of distributions such as Arch and Manjaro should receive the updates very shortly. [Advanced Ubuntu users can install the latest mainline Kernel][15] with some effort though it should be avoided.
|
||||
|
||||
_What do you think about the improvements in Linux Kernel 5.14? Let me know down in the comments!_
|
||||
|
||||
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
|
||||
|
||||
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
|
||||
|
||||
I'm not interested
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/kernel-5-14-release/
|
||||
|
||||
作者:[Jacob Crume][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/jacob/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://news.itsfoss.com/linux-kernel-5-13-release/
|
||||
[2]: https://lkml.org/lkml/2021/8/29/382
|
||||
[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ1NiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[4]: http://lkml.iu.edu/hypermail/linux/kernel/2107.1/02943.html
|
||||
[5]: https://www.raspberrypi.org/products/raspberry-pi-400/
|
||||
[6]: https://www.96rocks.com/blog/2020/11/28/introduce-rockchip-rk3568/
|
||||
[7]: https://lore.kernel.org/lkml/mhng-423e8bdb-977e-4b99-a1bb-b8c530664a51@palmerdabbelt-glaptop/
|
||||
[8]: http://lkml.iu.edu/hypermail/linux/kernel/2107.1/00919.html
|
||||
[9]: https://www.rock-chips.com/a/en/index.html
|
||||
[10]: http://pine64.org
|
||||
[11]: https://electronics.sony.com/c/mobile
|
||||
[12]: https://sailfishos.org/
|
||||
[13]: https://ubuntu-touch.io/
|
||||
[14]: https://riscv.org/
|
||||
[15]: https://itsfoss.com/upgrade-linux-kernel-ubuntu/
|
@ -0,0 +1,76 @@
|
||||
[#]: subject: "Ransomware Disguised as Open-Source Krita Painting App Promo Video"
|
||||
[#]: via: "https://news.itsfoss.com/krita-email-scam/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Ransomware Disguised as Open-Source Krita Painting App Promo Video
|
||||
======
|
||||
|
||||
Ransomware attacks are exponentially increasing. And, the way it gets distributed evolves every day.
|
||||
|
||||
One of the most effective ways is by using reputable brand names to lure users into downloading malicious files that may end up encrypting your files and demand a ransom.
|
||||
|
||||
And, in this case, some scammers have started using Krita’s name to deceive users through email.
|
||||
|
||||
### Spreading Malware via Email as Krita Officials
|
||||
|
||||
The attackers disguise themselves as the team for Krita, one of the best [digital open-source painting app][1].
|
||||
|
||||
The email mentions that Krita wants to collaborate with your YouTube channel or your social media space to share promotional videos about their software/product.
|
||||
|
||||
And, they mention that this is a paid advertising campaign, so you think you are getting a reward for promoting Krita.
|
||||
|
||||
Here’s how the email looks like (as shared by [Krita on Twitter][2]):
|
||||
|
||||
![][3]
|
||||
|
||||
Once you show interest in promoting Krita, they send you a follow-up mail instructing you to download a press kit containing screenshots, videos, and other materials.
|
||||
|
||||
The link may look similar to the official one like _krita.io, krita.net_, etc.
|
||||
|
||||
In a detailed video shared by a Twitter user, you can see that the link they share is malicious and sometimes goes undetected by Google’s safe browsing feature:
|
||||
|
||||
> Recently, I received the same email. Though I know this is likely a scam, I decided to proceed further just to see how far will they take us. They asked me to download some files and you can watch the full video here: <https://t.co/Mv2p9z3HCa> [pic.twitter.com/P1K2tlHiT4][4]
|
||||
>
|
||||
> — Inside Electronics (@InsideElectro) [August 29, 2021][5]
|
||||
|
||||
While I agree that this is not the best attempt to distribute malware, not everyone is as attentive as this user here.
|
||||
|
||||
### Never Trust an Email Without Proper Verification
|
||||
|
||||
It is easy for attackers to send you emails that you expect or something that may spark an interest in your work.
|
||||
|
||||
Scammers do their homework to know what you like, but always stay cautious no matter what or who appears to be sending the email.
|
||||
|
||||
If an email explicitly asks to enter your personal information, download an attachment, or visit a website to download a file, you need to double-check if it comes from an official source.
|
||||
|
||||
Generally, officials do not ask you to download any file or personal information unless you took action first. So, it is always wise to think twice and run a background check for what you interact with via emails.
|
||||
|
||||
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
|
||||
|
||||
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
|
||||
|
||||
I'm not interested
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/krita-email-scam/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/open-source-paint-apps/
|
||||
[2]: https://twitter.com/Krita_Painting/status/1432295734074880003
|
||||
[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI3OSIgd2lkdGg9IjU4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[4]: https://t.co/P1K2tlHiT4
|
||||
[5]: https://twitter.com/InsideElectro/status/1431938502862663680?ref_src=twsrc%5Etfw
|
@ -0,0 +1,77 @@
|
||||
[#]: subject: "Linux Lite Moves to Pay What You Want Model With Version 5.6 Release"
|
||||
[#]: via: "https://news.itsfoss.com/linux-lite-5-6-release/"
|
||||
[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Linux Lite Moves to Pay What You Want Model With Version 5.6 Release
|
||||
======
|
||||
|
||||
[Linux Lite][1] has just announced Linux lite 5.6, the fourth installment in their 5.x series of releases. This release brings some major changes, especially in the download process. Other, more subtle tweaks are also shown throughout the OS.
|
||||
|
||||
Here, we will be looking at what is new, what has changed, and how these changes may affect the future of Linux Lite.
|
||||
|
||||
### What Has Changed in Linux Lite 5.6?
|
||||
|
||||
![][2]
|
||||
|
||||
Alongside the new download model, there a few key changes. These include:
|
||||
|
||||
* New features in the Lite Tweaks app
|
||||
* Updated icon theme
|
||||
* New wallpapers
|
||||
|
||||
|
||||
|
||||
While this list is relatively short, there are a couple of meaningful changes.
|
||||
|
||||
### Pay Want You Want Download Model
|
||||
|
||||
Definitely the most impactful change, Linux Lite has moved to a “Pay what you want” download model. For those not familiar with the term, it is a system where the user is encouraged to pay to obtain a download link. Users can still enter $0 to get the download link for free, but it is not immediately clear and does not support the distro.
|
||||
|
||||
This move follows the footsteps of other popular distros, including ElementryOS. While I can see many users being annoyed at this change, it has also been made clear that Linux Lite would die without this change.
|
||||
|
||||
> “This is a road I’d never thought I’d go down, but we have no choice. Either we stagnate and accept the big G’s ever-changing algorithms, or we boldly go where others have dared.”
|
||||
|
||||
Jerry Bezencon
|
||||
|
||||
In hindsight, this change was inevitable, as there is almost no other way for distributions to reasonably sustain themselves (aside from donations). Now we need to see how this change pays off for the developers of Linux Lite.
|
||||
|
||||
### Updated Lite Tweaks App
|
||||
|
||||
With this update, the Lite Tweaks app gets a few improvements. One of these is the ability to completely clear the cache of the Brave web browser. It also has a new option to set Brave as the default web browser.
|
||||
|
||||
The second update within the Lite Tweaks app is a fix for GRUB. This tweak changes the grub entry from “Ubuntu” to “Linux Lite”. However, it should be noted that this option is only available when GRUB is controlled by Linux Lite.
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
If you want to try Linux Lite for yourself, you can [download it from its website][3]. If you are already running Linux Lite, you can update to version 5.6 using the instructions found on the [release announcement][4].
|
||||
|
||||
While minor, this release does have a few improvements scattered around the OS. Most importantly, however, is the fact that Linux Lite can now be self-sustaining, meaning that we will continue to see more features added with every release. I think this is much better that the distro dying, don’t you?
|
||||
|
||||
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
|
||||
|
||||
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
|
||||
|
||||
I'm not interested
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/linux-lite-5-6-release/
|
||||
|
||||
作者:[Jacob Crume][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/jacob/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.linuxliteos.com/
|
||||
[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0MCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[3]: https://www.linuxliteos.com/download.php
|
||||
[4]: https://www.linuxliteos.com/forums/release-announcements/linux-lite-5-6-final-released/
|
@ -1,71 +0,0 @@
|
||||
[#]: subject: "A guide to understanding your team's implicit values and needs"
|
||||
[#]: via: "https://opensource.com/open-organization/21/8/leadership-cultural-social-norms"
|
||||
[#]: author: "Ron McFarland https://opensource.com/users/ron-mcfarland"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
A guide to understanding your team's implicit values and needs
|
||||
======
|
||||
To enhance team dynamics, open leaders can study the implicit social
|
||||
norms that guide members' behaviors and decisions.
|
||||
![Working meetings can be effective meetings][1]
|
||||
|
||||
Culture matters in [open organizations][2]. But "culture" seems like such a large, complicated concept to address. How can we help open organization teams better understand it?
|
||||
|
||||
One solution might come from [Michele J. Gelfand][3], author of [_Rule Makers, Rule Breakers_][4]_: Tight and Loose Cultures and the Secret Signals That Direct Our Lives_. Gelfand organizes all countries and cultures into two very simple groups: those with "tight" cultures and those with "loose" ones. Then she explains the characteristics and social norms of both, offering their relative strengths and weaknesses. By studying both, one might overcome the divisions and conflicts that separate people in and across teams, organizations, and countries.
|
||||
|
||||
In this two-part review of _Rule Makers, Rule Breakers_, I'll explain Gelfand's argument and discuss the ways it's useful to people working in open organizations.
|
||||
|
||||
### Know your social norms
|
||||
|
||||
Gelfand believes that our behavior is very strongly dependent on whether we live in a "tight" or "loose" community culture, because each of these cultures has social norms that differ from the other. These norms—and the strictness with which they are enforced—will determine our behavior in the community. They give us our identity. They help us coordinate with each other. In short, they're the glue that holds communities together.
|
||||
|
||||
They also impact our worldviews, the ways we build our environments, and even the processing in our brains. "Countless studies have shown that social norms are critical for uniting communities into cooperative, well-coordinated groups that can accomplish great feats," Gelfand writes. Throughout history, communities have put their citizens through the seemingly craziest of rituals for no other reason than to maintain group cohesion and cooperation. The rituals result in greater bonding, which has kept people alive (particularly in times of hunting, foraging, and warfare).
|
||||
|
||||
Social norms include rules we all tend to follow automatically, what Gelfand calls a kind of "normative autopilot." These are things we do without thinking about them—for example, being quiet in libraries, cinemas, elevators, or airplanes. We do these things automatically. "From the outside," Gelfand says, "our social norms often seem bizarre, but from the inside, we take them for granted." She explains that social norms can be codified into regulations and laws ("obey stop signs" and "don't steal"). Others are largely unspoken ("don't stare at people on the train" or "cover your mouth when you sneeze"). And, of course, they vary by context.
|
||||
|
||||
The challenge is that most social norms are invisible, and we don't know how much these social norms control us.
|
||||
|
||||
The challenge is that most social norms are invisible, and we don't know how much these social norms control us. Without knowing it, we often just follow the groups in our surroundings. This is called "groupthink," in which people will follow along with their identifying group, even if the group is wrong. They don't want to stand out.
|
||||
|
||||
### Organizations, tight and loose
|
||||
|
||||
Gelfand organizes social norms into various groupings. She argues that some norms are characteristic of "tight" cultures, while others are characteristic of "loose" cultures. To do this, Gelfand researched and sampled approximately seven thousand people from more than 30 countries across five continents and with a wide range of occupations, genders, ages, religions, sects, and social classes in order to learn where those communities positioned themselves (and how strongly their social norms were enforced officially and by the communities/neighborhoods in general). Differences between tight and loose cultures vary between nations, within countries (like within the United States and its various regions), within organizations, within social classes and even within households.
|
||||
|
||||
Because organizations have cultures, they too have their own social norms (after all, if an organization is unable to coordinate its members and influence their behavior, it won't be able to survive). So organizations can also reflect and instill the "light" or "loose" cultural characteristics Gelfand describes. And if we have a strong ability to identify these differences, we can predict and address conflict more successfully. Then, armed with greater awareness of those social norms, we can put open organization principles to work.
|
||||
|
||||
Gelfand describes the difference between tight and loose cultures this way:
|
||||
|
||||
> Broadly speaking, loose cultures tend to be open, but they're also much more disorderly. On the flip side, tight cultures have a comforting order and predictability, but they're less tolerant. This is the tight-loose trade-off: advantages in one realm coexist with drawbacks in another.
|
||||
|
||||
Tight societies, she concludes, maintain strict social order, synchrony and self-regulation; loose societies take pride in being highly tolerant, creative and open to change.
|
||||
|
||||
Although not true in every case, tight and loose cultures generally exhibit some trade-offs; each has its own strengths and weaknesses. See Figure 1 below.
|
||||
|
||||
![][5]
|
||||
|
||||
The work of successfully applying the five open organization principles in these two environments can vary greatly. To be successful, community commitment is vital, and if the social norms are different, the reasons for commitment would be different as well. Organizational leaders must know what the community's values are. Only then can that person adequately inspire others.
|
||||
|
||||
In the next part of this review, I'll explain more thoroughly the characteristics of tight and loose cultures, so leaders can get a better sense of how they can put open organization principles to work on their teams.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/open-organization/21/8/leadership-cultural-social-norms
|
||||
|
||||
作者:[Ron McFarland][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/ron-mcfarland
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/leader-team-laptops-conference-meeting.png?itok=ztoA0E6f (Working meetings can be effective meetings)
|
||||
[2]: https://theopenorganization.org/definition/
|
||||
[3]: https://www.michelegelfand.com/
|
||||
[4]: https://www.michelegelfand.com/rule-makers-rule-breakers
|
||||
[5]: https://opensource.com/sites/default/files/images/open-org/rule-makers-breakers-1.png
|
@ -0,0 +1,64 @@
|
||||
[#]: subject: "How my team built an open source learning experience platform"
|
||||
[#]: via: "https://opensource.com/article/21/8/open-source-lms"
|
||||
[#]: author: "Tesh Patel https://opensource.com/users/tesh"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How my team built an open source learning experience platform
|
||||
======
|
||||
Open source powers innovation through community and shared experiences.
|
||||
![Student desk for open education][1]
|
||||
|
||||
Learning is based on the open exchange of ideas and experiences. By sharing, testing, and practicing what we've learned with others, we're able to develop in our lives and careers. It follows that openness is the ideal state for any successful learning organization.
|
||||
|
||||
I am passionate about learning, building teams, and technology. At Red Hat, we believe that open source powers innovation and results in better solutions. Five years ago, our learning management system was proprietary and closed. All of our learning platforms existed as islands with limited integration and provided a mediocre user experience. Over the past five years, our team has embraced the open source ethos. We've built and implemented new open source platforms, integrated our disparate learning platforms allowing us to freely exchange data and create a superior user experience.
|
||||
|
||||
If you're a fellow member of a learning organization, I hope you might find it helpful to hear about our experience so far and perhaps even join us as we seek to influence the future of learning.
|
||||
|
||||
### Unlocking potential
|
||||
|
||||
Our previous LMS served as the primary back-office system, system of record, and front-end experience for our learners. To put it plainly, it didn't serve any of those functions well. Our data was locked up in the vendor's vault. We had to live with the LMS's limited reporting capability or extract the data and manually manipulate it in spreadsheets. Perhaps worst of all, our learners faced a mediocre front-end system with a less-than-intuitive user experience. To live with our LMS, we had to create inefficient processes and workarounds.
|
||||
|
||||
And so, in 2016, we began our journey to open source learning by replacing our proprietary LMS with [Totara Learn, an open source LMS][2].
|
||||
|
||||
By moving to Totara Learn, we unlocked our data and turned our attention to improving the user experience for our learners.
|
||||
|
||||
### Identifying the ecosystem
|
||||
|
||||
Our learning ecosystem consists of more than just an LMS. In addition to our own content, we have access to content from third-party libraries, user-generated video content, virtual classroom tools for delivering online classes, and virtualized labs.
|
||||
|
||||
We knew we needed a single interface to disguise our complex learning platforms and tools and deliver one seamless experience to the learner. Initially, we tried customizing Totara Learn for this purpose. It's a great platform, but we eventually realized it wasn't cost-effective for us to remodel it from the ground up. What we needed was a platform designed for our unique requirements.
|
||||
|
||||
### Focusing on the learner
|
||||
|
||||
In 2017, as my team pondered our learning ecosystem challenges, an emerging category of products called learning experience platforms (LXP) emerged. I found several LXP vendors who claimed to solve problems with the learning experience. Many described their platform's experience as the "Netflix of learning."
|
||||
|
||||
In my experience, I've found that learning isn't suited to a Netflix-like environment. The notion of randomly perusing learning, enrolling in a program, and then abandoning as it gets more challenging or less interesting—as you do with Netflix shows—is the antithesis of what our continuous learning philosophy encourages. Real learning that builds skills and capabilities requires an intentional focus and an ongoing commitment with a learn, practice, reflection, feedback loop.
|
||||
|
||||
As my team compiled the requirements for an LXP, we quickly realized we were just at the beginning of determining what we'd need to build to create the best learning experience for our users. The requirements would continue to grow and evolve, so we needed a platform that could do the same. The idea for the Open Learning Platform (OLP) was born.
|
||||
|
||||
### Our open invitation
|
||||
|
||||
The OLP is a learning experience platform (LXP) that provides a personalized, online learning experience for users—typically employees at large enterprises. It consolidates disparate learning resources into a single portal. These days, learning can happen anywhere and in many forms. An LXP helps employees discover learning opportunities—offering ways to enhance them and manages their education. We've spent three years developing and building the OLP to meet the learning needs of users and educators. The OLP has come a long way, but we also know we're very much still on the journey.
|
||||
|
||||
Since the inception of the OLP, we knew we wanted it to be an open source project. Why invest time and energy in open sourcing the platform we've built over several years? Simple. We want to learn from the experiences and innovation of others and form a community that will help determine what the LMS and LXP of the future should be. We want to move past a cost-per-user licensing model and the limitations in thinking when the sole focus is to monetize a product. If even one other learning organization benefits from our open source project, then it will have been worth the investment of our time. We welcome you to join the conversation at[ Open Learning Platform][3].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/8/open-source-lms
|
||||
|
||||
作者:[Tesh Patel][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/tesh
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003588_01_rd3os.combacktoschoolseriesgen_rh_032x_0.png?itok=cApG9aB4 (Student desk for open education)
|
||||
[2]: https://github.com/totara
|
||||
[3]: https://www.openlearningplatform.org/
|
@ -1,265 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (chunibyo-wly)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Deploy a deep learning model on Kubernetes)
|
||||
[#]: via: (https://opensource.com/article/20/9/deep-learning-model-kubernetes)
|
||||
[#]: author: (Chaimaa Zyani https://opensource.com/users/chaimaa)
|
||||
|
||||
Deploy a deep learning model on Kubernetes
|
||||
======
|
||||
Learn how to deploy, scale, and manage a deep learning model that serves
|
||||
up image recognition predictions with Kubermatic Kubernetes Platform.
|
||||
![Brain on a computer screen][1]
|
||||
|
||||
As enterprises increase their use of artificial intelligence (AI), machine learning (ML), and deep learning (DL), a critical question arises: How can they scale and industrialize ML development? These conversations often focus on the ML model; however, this is only one step along the way to a complete solution. To achieve in-production application and scale, model development must include a repeatable process that accounts for the critical activities that precede and follow development, including getting the model into a public-facing deployment.
|
||||
|
||||
This article demonstrates how to deploy, scale, and manage a deep learning model that serves up image recognition predictions using [Kubermatic Kubernetes Platform][2].
|
||||
|
||||
Kubermatic Kubernetes Platform is a production-grade, open source Kubernetes cluster-management tool that offers flexibility and automation to integrate with ML/DL workflows with full cluster lifecycle management.
|
||||
|
||||
### Get started
|
||||
|
||||
This example deploys a deep learning model for image recognition. It uses the [CIFAR-10][3] dataset that consists of 60,000 32x32 color images in 10 classes with the [Gluon][4] library in [Apache MXNet][5] and NVIDIA GPUs to accelerate the workload. If you want to use a pre-trained model on the CIFAR-10 dataset, check out the [getting started guide][6].
|
||||
|
||||
The model was trained over a span of 200 epochs, as long as the validation error kept decreasing slowly without causing the model to overfit. This plot shows the training process:
|
||||
|
||||
![Deep learning model training plot][7]
|
||||
|
||||
(Chaimaa Zyami, [CC BY-SA 4.0][8])
|
||||
|
||||
After training, it's essential to save the model's parameters so they can be loaded later:
|
||||
|
||||
|
||||
```
|
||||
file_name = "net.params"
|
||||
net.save_parameters(file_name)
|
||||
```
|
||||
|
||||
Once the model is ready, wrap your prediction code in a Flask server. This allows the server to accept an image as an argument to its request and return the model's prediction in the response:
|
||||
|
||||
|
||||
```
|
||||
from gluoncv.model_zoo import get_model
|
||||
import matplotlib.pyplot as plt
|
||||
from mxnet import gluon, nd, image
|
||||
from mxnet.gluon.data.vision import transforms
|
||||
from gluoncv import utils
|
||||
from PIL import Image
|
||||
import io
|
||||
import flask
|
||||
app = flask.Flask(__name__)
|
||||
|
||||
@app.route("/predict",methods=["POST"])
|
||||
def predict():
|
||||
if flask.request.method == "POST":
|
||||
if flask.request.files.get("img"):
|
||||
img = Image.open(io.BytesIO(flask.request.files["img"].read()))
|
||||
transform_fn = transforms.Compose([
|
||||
transforms.Resize(32),
|
||||
transforms.CenterCrop(32),
|
||||
transforms.ToTensor(),
|
||||
transforms.Normalize([0.4914, 0.4822, 0.4465], [0.2023, 0.1994, 0.2010])])
|
||||
img = transform_fn(nd.array(img))
|
||||
net = get_model('cifar_resnet20_v1', classes=10)
|
||||
net.load_parameters('net.params')
|
||||
pred = net(img.expand_dims(axis=0))
|
||||
class_names = ['airplane', 'automobile', 'bird', 'cat', 'deer',
|
||||
'dog', 'frog', 'horse', 'ship', 'truck']
|
||||
ind = nd.argmax(pred, axis=1).astype('int')
|
||||
prediction = 'The input picture is classified as [%s], with probability %.3f.'%
|
||||
(class_names[ind.asscalar()], nd.softmax(pred)[0][ind].asscalar())
|
||||
return prediction
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host='0.0.0.0')
|
||||
```
|
||||
|
||||
### Containerize the model
|
||||
|
||||
Before you can deploy your model to Kubernetes, you need to install Docker and create a container image with your model.
|
||||
|
||||
1. Download, install, and start Docker: [code]
|
||||
|
||||
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
|
||||
|
||||
sudo yum-config-manager --add-repo <https://download.docker.com/linux/centos/docker-ce.repo>
|
||||
|
||||
sudo yum install docker-ce
|
||||
|
||||
sudo systemctl start docker
|
||||
|
||||
```
|
||||
2. Create a directory where you can organize your code and dependencies: [code]
|
||||
|
||||
mkdir kubermatic-dl
|
||||
cd kubermatic-dl
|
||||
```
|
||||
|
||||
3. Create a `requirements.txt` file to contain the packages the code needs to run: [code]
|
||||
|
||||
flask
|
||||
gluoncv
|
||||
matplotlib
|
||||
mxnet
|
||||
requests
|
||||
Pillow
|
||||
|
||||
```
|
||||
4. Create the Dockerfile that Docker will read to build and run the model: [code]
|
||||
|
||||
FROM python:3.6
|
||||
WORKDIR /app
|
||||
COPY requirements.txt /app
|
||||
RUN pip install -r ./requirements.txt
|
||||
COPY app.py /app
|
||||
CMD ["python", "app.py"]~
|
||||
|
||||
[/code] This Dockerfile can be broken down into three steps. First, it creates the Dockerfile and instructs Docker to download a base image of Python 3. Next, it asks Docker to use the Python package manager `pip` to install the packages in `requirements.txt`. Finally, it tells Docker to run your script via `python app.py`.
|
||||
|
||||
5. Build the Docker container: [code]`sudo docker build -t kubermatic-dl:latest .`[/code] This instructs Docker to build a container for the code in your current working directory, `kubermatic-dl`.
|
||||
|
||||
6. Check that your container is working by running it on your local machine: [code]`sudo docker run -d -p 5000:5000 kubermatic-dl`
|
||||
```
|
||||
|
||||
7. Check the status of your container by running `sudo docker ps -a`:
|
||||
|
||||
![Checking the container's status][9]
|
||||
|
||||
(Chaimaa Zyami, [CC BY-SA 4.0][8])
|
||||
|
||||
|
||||
|
||||
|
||||
### Upload the model to Docker Hub
|
||||
|
||||
Before you can deploy the model on Kubernetes, it must be publicly available. Do that by adding it to [Docker Hub][10]. (You will need to create a Docker Hub account if you don't have one.)
|
||||
|
||||
1. Log into your Docker Hub account: [code]`sudo docker login`
|
||||
```
|
||||
2. Tag the image so you can refer to it for versioning when you upload it to Docker Hub: [code]
|
||||
|
||||
sudo docker tag <your-image-id> <your-docker-hub-name>/<your-app-name>
|
||||
|
||||
sudo docker push <your-docker-hub-name>/<your-app-name>
|
||||
```
|
||||
|
||||
![Tagging the image][11]
|
||||
|
||||
(Chaimaa Zyami, [CC BY-SA 4.0][8])
|
||||
|
||||
3. Check your image ID by running `sudo docker images`.
|
||||
|
||||
|
||||
|
||||
|
||||
### Deploy the model to a Kubernetes cluster
|
||||
|
||||
1. Create a project on the Kubermatic Kubernetes Platform, then create a Kubernetes cluster using the [quick start tutorial][12].
|
||||
|
||||
![Create a Kubernetes cluster][13]
|
||||
|
||||
(Chaimaa Zyami, [CC BY-SA 4.0][8])
|
||||
|
||||
2. Download the `kubeconfig` used to configure access to your cluster, change it into the download directory, and export it into your environment:
|
||||
|
||||
![Kubernetes cluster example][14]
|
||||
|
||||
(Chaimaa Zyami, [CC BY-SA 4.0][8])
|
||||
|
||||
3. Using `kubectl`, check the cluster information, such as the services that `kube-system` starts on your cluster: [code]`kubectl cluster-info`
|
||||
```
|
||||
![Checking the cluster info][15]
|
||||
|
||||
(Chaimaa Zyami, [CC BY-SA 4.0][8])
|
||||
|
||||
4. To run the container in the cluster, you need to create a deployment (`deployment.yaml`) and apply it to the cluster: [code]
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: kubermatic-dl-deployment
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: kubermatic-dl
|
||||
replicas: 3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: kubermatic-dl
|
||||
spec:
|
||||
containers:
|
||||
- name: kubermatic-dl
|
||||
image: kubermatic00/kubermatic-dl:latest
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
|
||||
[/code] [code]`kubectl apply -f deployment.yaml`
|
||||
```
|
||||
|
||||
5. To expose your deployment to the outside world, you need a service object that will create an externally reachable IP for your container: [code]`kubectl expose deployment kubermatic-dl-deployment --type=LoadBalancer --port 80 --target-port 5000`
|
||||
```
|
||||
6. You're almost there! Check your services to determine the status of your deployment and get the IP address to call your image recognition API: [code]`kubectl get service`
|
||||
```
|
||||
|
||||
![Get the IP address to call your image recognition API][16]
|
||||
|
||||
(Chaimaa Zyami, [CC BY-SA 4.0][8])
|
||||
|
||||
7. Test your API with these two images using the external IP:
|
||||
|
||||
![Horse][17]
|
||||
|
||||
(Chaimaa Zyami, [CC BY-SA 4.0][8])
|
||||
|
||||
![Dog][18]
|
||||
|
||||
(Chaimaa Zyami, [CC BY-SA 4.0][8])
|
||||
|
||||
![Testing the API][19]
|
||||
|
||||
(Chaimaa Zyami, [CC BY-SA 4.0][8])
|
||||
|
||||
|
||||
|
||||
|
||||
### Summary
|
||||
|
||||
In this tutorial, you created a deep learning model to be served as a [REST API][20] using Flask. It put the application inside a Docker container, uploaded the container to Docker Hub, and deployed it with Kubernetes. Then, with just a few commands, Kubermatic Kubernetes Platform deployed the app and exposed it to the world.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/9/deep-learning-model-kubernetes
|
||||
|
||||
作者:[Chaimaa Zyani][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/chaimaa
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/brain_computer_solve_fix_tool.png?itok=okq8joti (Brain on a computer screen)
|
||||
[2]: https://www.loodse.com/products/kubermatic/
|
||||
[3]: https://www.cs.toronto.edu/~kriz/cifar.html
|
||||
[4]: https://gluon.mxnet.io/
|
||||
[5]: https://mxnet.apache.org/
|
||||
[6]: https://gluon-cv.mxnet.io/build/examples_classification/demo_cifar10.html
|
||||
[7]: https://opensource.com/sites/default/files/uploads/trainingplot.png (Deep learning model training plot)
|
||||
[8]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[9]: https://opensource.com/sites/default/files/uploads/containerstatus.png (Checking the container's status)
|
||||
[10]: https://hub.docker.com/
|
||||
[11]: https://opensource.com/sites/default/files/uploads/tagimage.png (Tagging the image)
|
||||
[12]: https://docs.kubermatic.com/kubermatic/v2.13/installation/install_kubermatic/_installer/
|
||||
[13]: https://opensource.com/sites/default/files/uploads/kubernetesclusterempty.png (Create a Kubernetes cluster)
|
||||
[14]: https://opensource.com/sites/default/files/uploads/kubernetesexamplecluster.png (Kubernetes cluster example)
|
||||
[15]: https://opensource.com/sites/default/files/uploads/clusterinfo.png (Checking the cluster info)
|
||||
[16]: https://opensource.com/sites/default/files/uploads/getservice.png (Get the IP address to call your image recognition API)
|
||||
[17]: https://opensource.com/sites/default/files/uploads/horse.jpg (Horse)
|
||||
[18]: https://opensource.com/sites/default/files/uploads/dog.jpg (Dog)
|
||||
[19]: https://opensource.com/sites/default/files/uploads/testapi.png (Testing the API)
|
||||
[20]: https://www.redhat.com/en/topics/api/what-is-a-rest-api
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (YungeG)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,124 +0,0 @@
|
||||
[#]: subject: (Apps for daily needs part 2: office suites)
|
||||
[#]: via: (https://fedoramagazine.org/apps-for-daily-needs-part-2-office-suites/)
|
||||
[#]: author: (Arman Arisman https://fedoramagazine.org/author/armanwu/)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
Apps for daily needs part 2: office suites
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
Photo by [Brooke Cagle][2] on [Unsplash][3]
|
||||
|
||||
Today, almost every family has a desktop computer or laptop. That’s because the computer has become a very important requirement. Moreover, many people have to create documents and presentations in digital format for work or study. Therefore, the office suites are must-have application on almost all computers. This article will introduce some of the open source office suites that you can use on Fedora Linux. You may need to install the software mentioned. If you are unfamiliar with how to add software packages in Fedora Linux, see my earlier article [Things to do after installing Fedora 34 Workstation][4]. Here is the list of apps for daily needs in the office suites category.
|
||||
|
||||
### LibreOffice
|
||||
|
||||
LibreOffice is the most popular office suite among GNU/Linux users. It has a user interface and user experience similar to Microsoft Office. This makes LibreOffice easy to learn for those who have just migrated from Microsoft Office. LibreOffice has complete features to meet your needs working on documents and presentations. It consists of six applications: Writer, Calc, Impress, Draw, Math, and Base.
|
||||
|
||||
The first application is Writer that is used to create various kinds of documents, such as letters, faxes, agendas, minutes, etc. It is a full-featured word processing and desktop publishing tool. The second application is Calc which is a spreadsheet program that is perfect for presenting data and documenting it in tabular format. Calc can create simple tables or do professional data analysis. The third application is Impress which is an easy-to-use presentation application. You can easily choose what you features want in your presentation slides, such as text, images, tables, diagrams, etc.
|
||||
|
||||
![LibreOffice Writer][5]
|
||||
|
||||
![LibreOffice Calc][6]
|
||||
|
||||
![LibreOffice Impress][7]
|
||||
|
||||
The three LibreOffice applications mentioned earlier are the most commonly used applications in creating documents and presentations. However, LibreOffice provides three other applications that are also very useful. The first is Draw which can be used to create drawings and diagrams, ranging from simple to complex. The next application is Math which can help us make perfectly formatted mathematical and scientific formulas. The last is Base which is an application for processing databases.
|
||||
|
||||
![LibreOffice Draw][8]
|
||||
|
||||
![LibreOffice Math][9]
|
||||
|
||||
![LibreOffice Base][10]
|
||||
|
||||
More information is available at this link: <https://www.libreoffice.org/>
|
||||
|
||||
* * *
|
||||
|
||||
### ONLYOFFICE
|
||||
|
||||
ONLYOFFICE is an office suite application that is highly compatible with Microsoft Office. Therefore we do not have to worry about collaborating with colleagues who use Microsoft Office because it can read various file formats such as docx, xlsx, and pptx.
|
||||
|
||||
ONLYOFFICE provides three applications with a clean and modern look. We can easily find the features and tools that we need. Although the features are not as complete as LibreOffice, they are very sufficient to help us create good documents and presentations.
|
||||
|
||||
The first application is Documents Editor which has the same function as Writer from LibreOffice. It has all the basic features needed in a word processor, such as managing fonts and styles, formatting text, adjusting line and paragraph spacing, inserting headers and footers, customizing page layout, and setting margins. The second application is Spreadsheet Editor which is an application for processing data and creating it as a document in tabular format. It is an application with the same functionality as Calc. The last one is Presentations Editor which is a presentation application with functions similar to Impress.
|
||||
|
||||
Unfortunately ONLYOFFICE is not available in the official Fedora Linux repositories. But you can still install it on Fedora Linux using Flatpak or Appimages.
|
||||
|
||||
![ONLYOFFICE Documents Editor][11]
|
||||
|
||||
![ONLYOFFICE Spreadsheets Editor][12]
|
||||
|
||||
![ONLYOFFICE Presentations Editor][13]
|
||||
|
||||
More information is available at this link: <https://www.onlyoffice.com/desktop.aspx>
|
||||
|
||||
* * *
|
||||
|
||||
### Calligra
|
||||
|
||||
Calligra is an office suite created by KDE. Therefore, this application is actually more suitable for users of the KDE Plasma desktop environment. But it can still run well on other desktop environments, such as Fedora Workstation using GNOME.
|
||||
|
||||
Calligra provides several applications with a slightly different look from LibreOffice or ONLYOFFICE. It may take some adjustment for those who are used to mainstream office suite applications. However, Calligra is still a reliable office suite to support our daily needs.
|
||||
|
||||
The first application is Words which is an intuitive word processor with desktop publishing features. It has a full range of features to help us in document creation. The second application is Sheets which has the same functionality as Calc and Spreadsheet Editors as a fully-featured spreadsheet application. The third application is Stage which can help us in making presentation slides.
|
||||
|
||||
![Calligra Words][14]
|
||||
|
||||
![Calligra Sheets][15]
|
||||
|
||||
![Calligra Stage][16]
|
||||
|
||||
The three Calligra applications are the most commonly used applications for creating documents and presentations. There are three other applications that are also very useful. The first is Karbon which can be used to create drawings and diagrams, ranging from simple to complex. The next application is Plan which is project management application that can help in managing moderately large projects with multiple resources. The last is KEXI which is a visual database application creator.
|
||||
|
||||
![Calligra Karbon][17]
|
||||
|
||||
![Calligra Plan][18]
|
||||
|
||||
![Calligra Kexi][19]
|
||||
|
||||
More information is available at this link: <https://calligra.org/>
|
||||
|
||||
* * *
|
||||
|
||||
### Conclusion
|
||||
|
||||
This article presented 3 office suites for your daily needs that you can use on Fedora Linux. If you want a complete set of features in your office suite, then LibreOffice may be the right choice. For good compatibility with Microsoft Office, then you may choose ONLYOFFICE. However, if you want a different user interface and experience in creating documents and presentations, you can try Calligra. Hopefully this article can help you to choose the right office suite. If you have experience in using these applications, please share your experience in the comments.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/apps-for-daily-needs-part-2-office-suites/
|
||||
|
||||
作者:[Arman Arisman][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://fedoramagazine.org/author/armanwu/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2021/07/FedoraMagz-Apps-2-Office-816x345.jpg
|
||||
[2]: https://unsplash.com/@brookecagle?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
||||
[3]: https://unsplash.com/s/photos/meeting-on-cafe-computer?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
||||
[4]: https://fedoramagazine.org/things-to-do-after-installing-fedora-34-workstation/
|
||||
[5]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-libre-writer-1-1024x575.png
|
||||
[6]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-libre-calc-1-1024x575.png
|
||||
[7]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-libre-impress-1-1024x575.png
|
||||
[8]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-libre-draw-1-1024x575.png
|
||||
[9]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-libre-math-1-1024x575.png
|
||||
[10]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-libre-base-1-1024x575.png
|
||||
[11]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-only-doc-1024x575.png
|
||||
[12]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-only-sheet-1024x575.png
|
||||
[13]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-only-presentation-1024x575.png
|
||||
[14]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-calligra-words-1024x575.png
|
||||
[15]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-calligra-sheets-1024x575.png
|
||||
[16]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-calligra-stage-1024x575.png
|
||||
[17]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-calligra-karbon-1-1024x575.png
|
||||
[18]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-calligra-plan-1024x575.png
|
||||
[19]: https://fedoramagazine.org/wp-content/uploads/2021/07/office-calligra-kexi-1024x575.png
|
@ -1,404 +0,0 @@
|
||||
[#]: subject: (Analyze the Linux kernel with ftrace)
|
||||
[#]: via: (https://opensource.com/article/21/7/linux-kernel-ftrace)
|
||||
[#]: author: (Gaurav Kamathe https://opensource.com/users/gkamathe)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (mengxinayan)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
Analyze the Linux kernel with ftrace
|
||||
======
|
||||
Ftrace is a great way to learn more about the internal workings of the
|
||||
Linux kernel.
|
||||
![Linux keys on the keyboard for a desktop computer][1]
|
||||
|
||||
An operating system's kernel is one of the most elusive pieces of software out there. It's always there running in the background from the time your system gets turned on. Every user achieves their computing work with the help of the kernel, yet they never interact with it directly. The interaction with the kernel occurs by making system calls or having those calls made on behalf of the user by various libraries or applications that they use daily.
|
||||
|
||||
I've covered how to trace system calls in an earlier article using `strace`. However, with `strace`, your visibility is limited. It allows you to view the system calls invoked with specific parameters and, after the work gets done, see the return value or status indicating whether they passed or failed. But you had no idea what happened inside the kernel during this time. Besides just serving system calls, there's a lot of other activity happening inside the kernel that you're oblivious to.
|
||||
|
||||
### Ftrace Introduction
|
||||
|
||||
This article aims to shed some light on tracing the kernel functions by using a mechanism called `ftrace`. It makes kernel tracing easily accessible to any Linux user, and with its help you can learn a lot about Linux kernel internals.
|
||||
|
||||
The default output generated by the `ftrace` is often massive, given that the kernel is always busy. To save space, I've kept the output to a minimum and, in many cases truncated the output entirely.
|
||||
|
||||
I am using Fedora for these examples, but they should work on any of the latest Linux distributions.
|
||||
|
||||
### Enabling ftrace
|
||||
|
||||
`Ftrace` is part of the Linux kernel now, and you no longer need to install anything to use it. It is likely that, if you are using a recent Linux OS, `ftrace` is already enabled. To verify that the `ftrace` facility is available, run the mount command and search for `tracefs`. If you see output similar to what is below, `ftrace` is enabled, and you can easily follow the examples in this article:
|
||||
|
||||
|
||||
```
|
||||
$ sudo mount | grep tracefs
|
||||
none on /sys/kernel/tracing type tracefs (rw,relatime,seclabel)
|
||||
```
|
||||
|
||||
To make use of `ftrace`, you first must navigate to the special directory as specified in the mount command above, from where you'll run the rest of the commands in the article:
|
||||
|
||||
|
||||
```
|
||||
`$ cd /sys/kernel/tracing`
|
||||
```
|
||||
|
||||
### General work flow
|
||||
|
||||
First of all, you must understand the general workflow of capturing a trace and obtaining the output. If you're using `ftrace` directly, there isn't any special `ftrace-`specific commands to run. Instead, you basically write to some files and read from some files using standard command-line Linux utilities.
|
||||
|
||||
The general steps:
|
||||
|
||||
1. Write to some specific files to enable/disable tracing.
|
||||
2. Write to some specific files to set/unset filters to fine-tune tracing.
|
||||
3. Read generated trace output from files based on 1 and 2.
|
||||
4. Clear earlier output or buffer from files.
|
||||
5. Narrow down to your specific use case (kernel functions to trace) and repeat steps 1, 2, 3, 4.
|
||||
|
||||
|
||||
|
||||
### Types of available tracers
|
||||
|
||||
There are several different kinds of tracers available to you. As mentioned earlier, you need to be in a specific directory before running any of these commands because the files of interest are present there. I use relative paths (as opposed to absolute paths) in my examples.
|
||||
|
||||
You can view the contents of the `available_tracers` file to see all the types of tracers available. You can see a few listed below. Don't worry about all of them just yet:
|
||||
|
||||
|
||||
```
|
||||
$ pwd
|
||||
/sys/kernel/tracing
|
||||
|
||||
$ sudo cat available_tracers
|
||||
hwlat blk mmiotrace function_graph wakeup_dl wakeup_rt wakeup function nop
|
||||
```
|
||||
|
||||
Out of all the given tracers, I focus on three specific ones: `function` and `function_graph` to enable tracing, and `nop` to disable tracing.
|
||||
|
||||
### Identify current tracer
|
||||
|
||||
Usually, by default, the tracer is set to `nop`. That is, "No operation" in the special file `current_tracer`, which usually means tracing is currently off:
|
||||
|
||||
|
||||
```
|
||||
$ pwd
|
||||
/sys/kernel/tracing
|
||||
|
||||
$ sudo cat current_tracer
|
||||
nop
|
||||
```
|
||||
|
||||
### View Tracing output
|
||||
|
||||
Before you enable any tracing, take a look at the file where the tracing output gets stored. You can view the contents of the file named `trace` using the [cat][2] command:
|
||||
|
||||
|
||||
```
|
||||
$ sudo cat trace
|
||||
# tracer: nop
|
||||
#
|
||||
# entries-in-buffer/entries-written: 0/0 #P:8
|
||||
#
|
||||
# _-----=> irqs-off
|
||||
# / _----=> need-resched
|
||||
# | / _---=> hardirq/softirq
|
||||
# || / _--=> preempt-depth
|
||||
# ||| / delay
|
||||
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
|
||||
# | | | |||| | |
|
||||
```
|
||||
|
||||
### Enable function tracer
|
||||
|
||||
You can enable your first tracer called `function` by writing `function` to the file `current_tracer` (its earlier content was `nop`, indicating that tracing was off.) Think of this operation as a way of enabling tracing:
|
||||
|
||||
|
||||
```
|
||||
$ pwd
|
||||
/sys/kernel/tracing
|
||||
|
||||
$ sudo cat current_tracer
|
||||
nop
|
||||
$ echo function > current_tracer
|
||||
$
|
||||
$ cat current_tracer
|
||||
function
|
||||
```
|
||||
|
||||
### View updated tracing output for function tracer
|
||||
|
||||
Now that you've enabled tracing, it's time to view the output. If you view the contents of the `trace` file, you see a lot of data being written to it continuously. I've piped the output and am currently viewing only the top 20 lines to keep things manageable. If you follow the headers in the output on the left, you can see which task and Process ID are running on which CPU. Toward the right side of the output, you see the exact kernel function running, followed by its parent function. There is also time stamp information in the center:
|
||||
|
||||
|
||||
```
|
||||
$ sudo cat trace | head -20
|
||||
# tracer: function
|
||||
#
|
||||
# entries-in-buffer/entries-written: 409936/4276216 #P:8
|
||||
#
|
||||
# _-----=> irqs-off
|
||||
# / _----=> need-resched
|
||||
# | / _---=> hardirq/softirq
|
||||
# || / _--=> preempt-depth
|
||||
# ||| / delay
|
||||
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
|
||||
# | | | |||| | |
|
||||
<idle>-0 [000] d... 2088.841739: tsc_verify_tsc_adjust <-arch_cpu_idle_enter
|
||||
<idle>-0 [000] d... 2088.841739: local_touch_nmi <-do_idle
|
||||
<idle>-0 [000] d... 2088.841740: rcu_nocb_flush_deferred_wakeup <-do_idle
|
||||
<idle>-0 [000] d... 2088.841740: tick_check_broadcast_expired <-do_idle
|
||||
<idle>-0 [000] d... 2088.841740: cpuidle_get_cpu_driver <-do_idle
|
||||
<idle>-0 [000] d... 2088.841740: cpuidle_not_available <-do_idle
|
||||
<idle>-0 [000] d... 2088.841741: cpuidle_select <-do_idle
|
||||
<idle>-0 [000] d... 2088.841741: menu_select <-do_idle
|
||||
<idle>-0 [000] d... 2088.841741: cpuidle_governor_latency_req <-menu_select
|
||||
```
|
||||
|
||||
Remember that tracing is on, which means the output of tracing continues to get written to the trace file until you turn tracing off.
|
||||
|
||||
### Turn off tracing
|
||||
|
||||
Turning off tracing is simple. All you have to do is replace `function` tracer with `nop` in the `current_tracer` file and tracing gets turned off:
|
||||
|
||||
|
||||
```
|
||||
$ sudo cat current_tracer
|
||||
function
|
||||
|
||||
$ sudo echo nop > current_tracer
|
||||
|
||||
$ sudo cat current_tracer
|
||||
nop
|
||||
```
|
||||
|
||||
### Enable function_graph tracer
|
||||
|
||||
Now try the second tracer, called `function_graph`. You can enable this using the same steps as before: write `function_graph` to the `current_tracer` file:
|
||||
|
||||
|
||||
```
|
||||
$ sudo echo function_graph > current_tracer
|
||||
|
||||
$ sudo cat current_tracer
|
||||
function_graph
|
||||
```
|
||||
|
||||
### Tracing output of function_graph tracer
|
||||
|
||||
Notice that the output format of the `trace` file has changed. Now, you can see the CPU ID and the duration of the kernel function execution. Next, you see curly braces indicating the beginning of a function and what other functions were called from inside it:
|
||||
|
||||
|
||||
```
|
||||
$ sudo cat trace | head -20
|
||||
# tracer: function_graph
|
||||
#
|
||||
# CPU DURATION FUNCTION CALLS
|
||||
# | | | | | | |
|
||||
6) | n_tty_write() {
|
||||
6) | down_read() {
|
||||
6) | __cond_resched() {
|
||||
6) 0.341 us | rcu_all_qs();
|
||||
6) 1.057 us | }
|
||||
6) 1.807 us | }
|
||||
6) 0.402 us | process_echoes();
|
||||
6) | add_wait_queue() {
|
||||
6) 0.391 us | _raw_spin_lock_irqsave();
|
||||
6) 0.359 us | _raw_spin_unlock_irqrestore();
|
||||
6) 1.757 us | }
|
||||
6) 0.350 us | tty_hung_up_p();
|
||||
6) | mutex_lock() {
|
||||
6) | __cond_resched() {
|
||||
6) 0.404 us | rcu_all_qs();
|
||||
6) 1.067 us | }
|
||||
```
|
||||
|
||||
### Enable trace settings to increase the depth of tracing
|
||||
|
||||
You can always tweak the tracer slightly to see more depth of the function calls using the steps below. After which, you can view the contents of the `trace` file and see that the output is slightly more detailed. For readability, the output of this example is omitted:
|
||||
|
||||
|
||||
```
|
||||
$ sudo cat max_graph_depth
|
||||
0
|
||||
$ sudo echo 1 > max_graph_depth
|
||||
$ # or
|
||||
$ sudo echo 2 > max_graph_depth
|
||||
|
||||
$ sudo cat trace
|
||||
```
|
||||
|
||||
### Finding functions to trace
|
||||
|
||||
The steps above are sufficient to get started with tracing. However, the amount of output generated is enormous, and you can often get lost while trying to find out items of interest. Often you want the ability to trace specific functions only and ignore the rest. But how do you know which processes to trace if you don't know their exact names? There is a file that can help you with this—`available_filter_functions` provides you with a list of available functions for tracing:
|
||||
|
||||
|
||||
```
|
||||
$ sudo wc -l available_filter_functions
|
||||
63165 available_filter_functions
|
||||
```
|
||||
|
||||
### Search for general kernel functions
|
||||
|
||||
Now try searching for a simple kernel function that you are aware of. User-space has `malloc` to allocate memory, while the kernel has its `kmalloc` function, which provides similar functionality. Below are all the `kmalloc` related functions:
|
||||
|
||||
|
||||
```
|
||||
$ sudo grep kmalloc available_filter_functions
|
||||
debug_kmalloc
|
||||
mempool_kmalloc
|
||||
kmalloc_slab
|
||||
kmalloc_order
|
||||
kmalloc_order_trace
|
||||
kmalloc_fix_flags
|
||||
kmalloc_large_node
|
||||
__kmalloc
|
||||
__kmalloc_track_caller
|
||||
__kmalloc_node
|
||||
__kmalloc_node_track_caller
|
||||
[...]
|
||||
```
|
||||
|
||||
### Search for kernel module or driver related functions
|
||||
|
||||
From the output of `available_filter_functions`, you can see some lines ending with text in brackets, such as `[kvm_intel]` in the example below. These functions are related to the kernel module `kvm_intel`, which is currently loaded. You can run the `lsmod` command to verify:
|
||||
|
||||
|
||||
```
|
||||
$ sudo grep kvm available_filter_functions | tail
|
||||
__pi_post_block [kvm_intel]
|
||||
vmx_vcpu_pi_load [kvm_intel]
|
||||
vmx_vcpu_pi_put [kvm_intel]
|
||||
pi_pre_block [kvm_intel]
|
||||
pi_post_block [kvm_intel]
|
||||
pi_wakeup_handler [kvm_intel]
|
||||
pi_has_pending_interrupt [kvm_intel]
|
||||
pi_update_irte [kvm_intel]
|
||||
vmx_dump_dtsel [kvm_intel]
|
||||
vmx_dump_sel [kvm_intel]
|
||||
|
||||
$ lsmod | grep -i kvm
|
||||
kvm_intel 335872 0
|
||||
kvm 987136 1 kvm_intel
|
||||
irqbypass 16384 1 kvm
|
||||
```
|
||||
|
||||
### Trace specific functions only
|
||||
|
||||
To enable tracing of specific functions or patterns, you can make use of the `set_ftrace_filter` file to specify which functions from the above output you want to trace.
|
||||
This file also accepts the `*` pattern, which expands to include additional functions with the given pattern. As an example, I am using the `ext4` filesystem on my machine. I can specify `ext4` specific kernel functions to trace using the following commands:
|
||||
|
||||
|
||||
```
|
||||
$ sudo mount | grep home
|
||||
/dev/mapper/fedora-home on /home type ext4 (rw,relatime,seclabel)
|
||||
|
||||
$ pwd
|
||||
/sys/kernel/tracing
|
||||
|
||||
$ sudo cat set_ftrace_filter
|
||||
#### all functions enabled ####
|
||||
$
|
||||
$ echo ext4_* > set_ftrace_filter
|
||||
$
|
||||
$ cat set_ftrace_filter
|
||||
ext4_has_free_clusters
|
||||
ext4_validate_block_bitmap
|
||||
ext4_get_group_number
|
||||
ext4_get_group_no_and_offset
|
||||
ext4_get_group_desc
|
||||
[...]
|
||||
```
|
||||
|
||||
Now, when you see the tracing output, you can only see functions `ext4` related to kernel functions for which you had set a filter earlier. All the other output gets ignored:
|
||||
|
||||
|
||||
```
|
||||
$ sudo cat trace |head -20
|
||||
# tracer: function
|
||||
#
|
||||
# entries-in-buffer/entries-written: 3871/3871 #P:8
|
||||
#
|
||||
# _-----=> irqs-off
|
||||
# / _----=> need-resched
|
||||
# | / _---=> hardirq/softirq
|
||||
# || / _--=> preempt-depth
|
||||
# ||| / delay
|
||||
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
|
||||
# | | | |||| | |
|
||||
cupsd-1066 [004] .... 3308.989545: ext4_file_getattr <-vfs_fstat
|
||||
cupsd-1066 [004] .... 3308.989547: ext4_getattr <-ext4_file_getattr
|
||||
cupsd-1066 [004] .... 3308.989552: ext4_file_getattr <-vfs_fstat
|
||||
cupsd-1066 [004] .... 3308.989553: ext4_getattr <-ext4_file_getattr
|
||||
cupsd-1066 [004] .... 3308.990097: ext4_file_open <-do_dentry_open
|
||||
cupsd-1066 [004] .... 3308.990111: ext4_file_getattr <-vfs_fstat
|
||||
cupsd-1066 [004] .... 3308.990111: ext4_getattr <-ext4_file_getattr
|
||||
cupsd-1066 [004] .... 3308.990122: ext4_llseek <-ksys_lseek
|
||||
cupsd-1066 [004] .... 3308.990130: ext4_file_read_iter <-new_sync_read
|
||||
```
|
||||
|
||||
### Exclude functions from being traced
|
||||
|
||||
You don't always know what you want to trace but, you surely know what you don't want to trace. For that, there is this file aptly named `set_ftrace_notrace`—notice the "no" in there. You can write your desired pattern in this file and enable tracing, upon which everything except the mentioned pattern gets traced. This is often helpful to remove common functionality that clutters our output:
|
||||
|
||||
|
||||
```
|
||||
$ sudo cat set_ftrace_notrace
|
||||
#### no functions disabled ####
|
||||
```
|
||||
|
||||
### Targetted tracing
|
||||
|
||||
So far, you've been tracing everything that has happened in the kernel. But that won't help us if you wish to trace events related to a specific command. To achieve this, you can turn tracing on and off on-demand and, and in between them, run our command of choice so that you do not get extra output in your trace output. You can enable tracing by writing `1` to `tracing_on`, and `0` to turn it off:
|
||||
|
||||
|
||||
```
|
||||
$ sudo cat tracing_on
|
||||
0
|
||||
|
||||
$ sudo echo 1 > tracing_on
|
||||
$ sudo cat tracing_on
|
||||
1
|
||||
|
||||
$ # Run some specific command that we wish to trace here
|
||||
|
||||
$ sudo echo 0 > tracing_on
|
||||
|
||||
$ cat tracing_on
|
||||
0
|
||||
```
|
||||
|
||||
### Tracing specific PID
|
||||
|
||||
If you want to trace activity related to a specific process that is already running, you can write that PID to a file named `set_ftrace_pid` and then enable tracing. That way, tracing is limited to this PID only, which is very helpful in some instances:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo echo $PID > set_ftrace_pid`
|
||||
```
|
||||
|
||||
### Conclusion
|
||||
|
||||
`Ftrace` is a great way to learn more about the internal workings of the Linux kernel. With some practice, you can learn to fine-tune `ftrace` and narrow down your searches. To understand `ftrace` in more detail and its advanced usage, see these excellent articles written by the core author of `ftrace` himself—Steven Rostedt.
|
||||
|
||||
* [Debugging the Linux kernel, part 1][3]
|
||||
* [Debugging the Linux kernel, part 2][4]
|
||||
* [Debugging the Linux kernel, part 3][5]
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/7/linux-kernel-ftrace
|
||||
|
||||
作者:[Gaurav Kamathe][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[萌新阿岩](https://github.com/mengxinayan)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/gkamathe
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer)
|
||||
[2]: https://opensource.com/article/19/2/getting-started-cat-command
|
||||
[3]: https://lwn.net/Articles/365835/
|
||||
[4]: https://lwn.net/Articles/366796/
|
||||
[5]: https://lwn.net/Articles/370423/
|
@ -2,7 +2,7 @@
|
||||
[#]: via: (https://opensource.com/article/21/7/linux-kernel-trace-cmd)
|
||||
[#]: author: (Gaurav Kamathe https://opensource.com/users/gkamathe)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (mengxinayan)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
@ -364,7 +364,7 @@ via: https://opensource.com/article/21/7/linux-kernel-trace-cmd
|
||||
|
||||
作者:[Gaurav Kamathe][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[萌新阿岩](https://github.com/mengxinayan)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,247 +0,0 @@
|
||||
[#]: subject: (Brave vs. Firefox: Your Ultimate Browser Choice for Private Web Experience)
|
||||
[#]: via: (https://itsfoss.com/brave-vs-firefox/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
Brave vs. Firefox: Your Ultimate Browser Choice for Private Web Experience
|
||||
======
|
||||
|
||||
Web browsers have evolved over the years. From downloading files to accessing a full-fledged web application, we have come a long way.
|
||||
|
||||
For a lot of users, the web browser is the only thing they need to get their work done these days.
|
||||
|
||||
Hence, choosing the right browser becomes an important task that could help improve your workflow over the years.
|
||||
|
||||
### Brave vs. Firefox Browser
|
||||
|
||||
Brave and Mozilla’s Firefox are two of the most popular web browsers for privacy-conscious users and open-source enthusiasts.
|
||||
|
||||
Considering that both focus heavily on privacy and security, let us look at what exactly they have to offer, to help you decide what you should go with.
|
||||
|
||||
Here are the comparison pointers that I’ve used, you can directly navigate to any of them:
|
||||
|
||||
* [User Interface][1]
|
||||
* [Performance][2]
|
||||
* [Browser Engine][3]
|
||||
* [Ad & Tracking Blocking Capabilities][4]
|
||||
* [Containers][5]
|
||||
* [Rewards][6]
|
||||
* [Cross-Platform Availability][7]
|
||||
* [Synchronization][8]
|
||||
* [Service Integrations][9]
|
||||
* [Customizability][10]
|
||||
* [Extension Support][11]
|
||||
|
||||
|
||||
|
||||
### User Interface
|
||||
|
||||
The user interface is what makes the biggest difference with the workflow and experience when using the browser.
|
||||
|
||||
Of course, you can have your personal preferences, but the easier, snappier, and cleaner it looks, the better it is.
|
||||
|
||||
![Brave browser][12]
|
||||
|
||||
To start with, Brave shares a similar look and feel to Chrome and Microsoft Edge. It offers a clean experience with minimal UI elements and all the essential options accessible through the browser menu.
|
||||
|
||||
It offers a black theme as well. The subtle animations make the interaction a pleasant experience.
|
||||
|
||||
To customize it, you can choose to use themes available from the chrome web store.
|
||||
|
||||
When it comes to Mozilla Firefox, it has had a couple of major redesigns over the years, and the latest user interface tries to offer a closer experience to Chrome.
|
||||
|
||||
![Firefox browser][13]
|
||||
|
||||
The Firefox design looks impressive and provides a clean user experience. It also lets you opt for a dark theme if needed and there are several theme options to download/apply as well.
|
||||
|
||||
Both web browsers offer a good user experience.
|
||||
|
||||
If you want a familiar experience, but with a pinch of uniqueness, Mozilla’s Firefox can be a good pick.
|
||||
|
||||
But, if you want a snappier experience with a better feel for the animations, Brave gets the edge.
|
||||
|
||||
### Performance
|
||||
|
||||
Practically, I find Brave loading web pages faster. Also, the overall user experience feels snappy.
|
||||
|
||||
Firefox is not terribly slow, but it definitely felt slower than Brave.
|
||||
|
||||
To give you some perspective, I also utilized [Basemark][14] to run a benchmark to see if that is true on paper.
|
||||
|
||||
You can check with other browser benchmark tools available, but Basemark performs a variety of tests, so we’ll go with that for this article.
|
||||
|
||||
![Firefox benchmark score][15]
|
||||
|
||||
![Brave benchmark score][16]
|
||||
|
||||
Firefox managed to score **630** and Brave pulled it off better with ~**792**.
|
||||
|
||||
Do note that these benchmarks were run with default browser settings without any browser extensions installed.
|
||||
|
||||
Of course, synthetic scores may vary depending on what you have going on in the background and the hardware configuration of your system.
|
||||
|
||||
This is what I got with **i5-7400, 16 GB RAM, and GTX 1050ti GPU** on my desktop.
|
||||
|
||||
In general, Brave browser is a fast browser compared to most of the popular options available.
|
||||
|
||||
Both utilize a decent chunk of system resources and that varies to a degree with the number of tabs, types of webpages accessed, and the kind of blocking extension used.
|
||||
|
||||
For instance, Brave blocks aggressively by default but Firefox does not block display advertisements by default. And, this affects the system resource usage.
|
||||
|
||||
### Browser Engine
|
||||
|
||||
Firefox utilizes its own Gecko engine as the foundation and is using components on top of that from [servo research project][17] to improve.
|
||||
|
||||
Currently, it is essentially an improved Gecko engine dubbed by a project name “Quantum” which was introduced with the release of Firefox Quantum.
|
||||
|
||||
On the other hand, Brave uses Chromium’s engine.
|
||||
|
||||
While both are capable enough to handle modern web experiences, Chromium-based engine is just more popular and web developers often tailor their sites for the best experience on Chrome-based browsers
|
||||
|
||||
Also, some services happen to exclusively support Chrome-based browsers.
|
||||
|
||||
### Ad & Tracker Blocking Capabilities
|
||||
|
||||
![][18]
|
||||
|
||||
As I have mentioned before, Brave is aggressive in blocking trackers and advertisements. By default, it comes with the blocking feature enabled.
|
||||
|
||||
Firefox also enables the enhanced privacy protection by default but does not block display advertisements.
|
||||
|
||||
You will have to opt for the “**Strict**” privacy protection mode with Firefox if you want to get rid of display advertisements.
|
||||
|
||||
With that being said, Firefox enforces some unique tracking protection technology that includes Total Cookie Protection which isolates cookies for each site and prevents cross-site cookie tracking.
|
||||
|
||||
![][19]
|
||||
|
||||
This was introduced with [Firefox 86][20] and to use it, you need to enable a strict privacy protection mode.
|
||||
|
||||
Overall, Brave might look like a better option out of the box, and Mozilla Firefox offers better privacy protection features.
|
||||
|
||||
### Containers
|
||||
|
||||
Firefox also offers a way to isolate site activity when you use Facebook with help of a container. In other words, it prevents Facebook from tracking your offsite activity.
|
||||
|
||||
You can also use containers to organize your tabs and separate sessions when needed.
|
||||
|
||||
Brave does not offer anything similar but it does block cross-site trackers and cookies out-of-the-box.
|
||||
|
||||
### Rewards
|
||||
|
||||
![][21]
|
||||
|
||||
Unlike Firefox, Brave offers its own advertising network by blocking other advertisements on the web.
|
||||
|
||||
When you opt in to display privacy-friendly ads by Brave, you get rewarded with tokens to a crypto wallet. And you can use these tokens to give back to your favorite websites.
|
||||
|
||||
While this is a good business strategy to get away from mainstream advertising, for users who do not want any kind of advertisements, it may not be useful.
|
||||
|
||||
So, Brave offers an alternative in the form of rewards to help websites even if you block advertisements. If it is something you appreciate, Brave will be a good pick for you.
|
||||
|
||||
### Cross-Platform Availability
|
||||
|
||||
You will find both Brave and Firefox available for Linux, Windows, and macOS. Mobile apps are also available for iOS and Android.
|
||||
|
||||
For Linux users, Firefox comes baked in with most of the Linux distributions. And, you can also find it available in the software center. In addition to that, there is also a [Flatpak][22] package available.
|
||||
|
||||
Brave is not available through default repositories and the software center. Hence, you need to follow the official instructions to add the private repository and then [get Brave installed in your Linux distro][23].
|
||||
|
||||
### Synchronization
|
||||
|
||||
With Mozilla Firefox, you get to create a Firefox account to sync all your data cross-platform.
|
||||
|
||||
![][24]
|
||||
|
||||
Brave also lets you sync cross-platform but you need access to one of the devices in order to successfully do it.
|
||||
|
||||
![][25]
|
||||
|
||||
Hence, Firefox sync is more convenient.
|
||||
|
||||
Also, you get access to Firefox’s VPN, data breach monitor, email relay, and password manager with the Firefox account.
|
||||
|
||||
### Service Integrations
|
||||
|
||||
Right off the bat, Firefox offers more service integrations that include Pocket, VPN, password manager, and also some of its new offerings like Firefox relay.
|
||||
|
||||
If you want access to these services through your browser, Firefox will be the convenient option for you.
|
||||
|
||||
While Brave does offer crypto wallets, it is not for everyone.
|
||||
|
||||
![][26]
|
||||
|
||||
Similarly, if you like using [Brave Search][27], you may have a seamless experience when using it with Brave browser because of the user experience.
|
||||
|
||||
### Customizability & Security
|
||||
|
||||
Firefox shines when it comes to customizability. You get more options to tweak the experience and also take control of the privacy/security of your browser.
|
||||
|
||||
The ability to customize lets you make Firefox more secure than the Brave browser.
|
||||
|
||||
While hardening Firefox is a separate topic which we’ll talk about. To give you an example, [Tor Browser][28] is just a customized Firefox browser.
|
||||
|
||||
However, that does not make Brave less secure. It is a secure browser overall but you do get more options with Firefox.
|
||||
|
||||
### Extension Support
|
||||
|
||||
There’s no doubt that the Chrome web store offers way more extensions.
|
||||
|
||||
So, Brave gets a clear edge over Firefox if you are someone who utilizes a lot of extensions (or constantly try new ones).
|
||||
|
||||
Firefox may not have the biggest catalog of extensions, it does support most of the extensions. For common use-cases, you will rarely find an extension that is not available as an addon for Firefox.
|
||||
|
||||
### What Should You Choose?
|
||||
|
||||
If you want the best compatibility with the modern web experience and want access to more extensions, Brave browser seems to make more sense.
|
||||
|
||||
On the other hand, Firefox is an excellent choice for everyday browsing with industry-first privacy features, and a convenient sync option for non-tech savvy users.
|
||||
|
||||
You will have a few trade-offs when selecting either of them. So, your will have to prioritize what you want the most.
|
||||
|
||||
Let me know about your final choice for your use case in the comments down below!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/brave-vs-firefox/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: tmp.5yJseRG2rb#ui
|
||||
[2]: tmp.5yJseRG2rb#perf
|
||||
[3]: tmp.5yJseRG2rb#engine
|
||||
[4]: tmp.5yJseRG2rb#ad
|
||||
[5]: tmp.5yJseRG2rb#container
|
||||
[6]: tmp.5yJseRG2rb#reward
|
||||
[7]: tmp.5yJseRG2rb#cp
|
||||
[8]: tmp.5yJseRG2rb#sync
|
||||
[9]: tmp.5yJseRG2rb#service
|
||||
[10]: tmp.5yJseRG2rb#customise
|
||||
[11]: tmp.5yJseRG2rb#extensions
|
||||
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/brave-ui-new.jpg?resize=800%2C450&ssl=1
|
||||
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/firefox-ui.jpg?resize=800%2C450&ssl=1
|
||||
[14]: https://web.basemark.com
|
||||
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/firefox-basemark.png?resize=800%2C598&ssl=1
|
||||
[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/basemark-brave.png?resize=800%2C560&ssl=1
|
||||
[17]: https://servo.org
|
||||
[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/brave-blocker.png?resize=800%2C556&ssl=1
|
||||
[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/firefox-blocker.png?resize=800%2C564&ssl=1
|
||||
[20]: https://news.itsfoss.com/firefox-86-release/
|
||||
[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/brave-rewards.png?resize=800%2C560&ssl=1
|
||||
[22]: https://itsfoss.com/what-is-flatpak/
|
||||
[23]: https://itsfoss.com/brave-web-browser/
|
||||
[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/firefox-sync.png?resize=800%2C651&ssl=1
|
||||
[25]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/brave-sync.png?resize=800%2C383&ssl=1
|
||||
[26]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/brave-crypto-wallet.png?resize=800%2C531&ssl=1
|
||||
[27]: https://itsfoss.com/brave-search-features/
|
||||
[28]: https://itsfoss.com/install-tar-browser-linux/
|
@ -2,7 +2,7 @@
|
||||
[#]: via: "https://opensource.com/article/21/8/linux-terminal"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: translator: "fisherue "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
@ -108,7 +108,7 @@ via: https://opensource.com/article/21/8/linux-terminal
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[译者ID][c]
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
@ -127,3 +127,4 @@ via: https://opensource.com/article/21/8/linux-terminal
|
||||
[10]: https://opensource.com/article/21/7/terminal-basics-copying-files-linux-terminal
|
||||
[11]: https://opensource.com/article/21/7/terminal-basics-removing-files-and-folders-linux-terminal
|
||||
[12]: https://opensource.com/downloads/bash-scripting-ebook
|
||||
[c]: https://github.com/fisherue
|
||||
|
@ -1,182 +0,0 @@
|
||||
[#]: subject: "Debian vs Ubuntu: What’s the Difference? Which One Should You Use?"
|
||||
[#]: via: "https://itsfoss.com/debian-vs-ubuntu/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "perfiffer"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Debian vs Ubuntu: What’s the Difference? Which One Should You Use?
|
||||
======
|
||||
|
||||
You can [use apt-get commands][1] for managing applications in both Debian and Ubuntu. You can install DEB packages in both distributions as well. Many times, you’ll find common package installation instructions for both distributions.
|
||||
|
||||
So, what’s the difference between the two, if they are so similar?
|
||||
|
||||
Debian and Ubuntu belong to the same side of the distribution spectrum. Debian is the original distribution created by Ian Murdock in 1993. Ubuntu was created in 2004 by Mark Shuttleworth and it is based on Debian.
|
||||
|
||||
### Ubuntu is based on Debian: What does it mean?
|
||||
|
||||
While there are hundreds of Linux distributions, only a handful of them are independent ones, created from scratch. [Debian][2], Arch, Red Hat are some of the biggest distributions that do not derive from any other distribution.
|
||||
|
||||
Ubuntu is derived from Debian. It means that Ubuntu uses the same APT packaging system as Debian and shares a huge number of packages and libraries from Debian repositories. It utilizes the Debian infrastructure as base.
|
||||
|
||||
![Ubuntu uses Debian as base][3]
|
||||
|
||||
That’s what most ‘derived’ distributions do. They use the same package management system and share packages as the base distribution. But they also add some packages and changes of their own. And that is how Ubuntu is different from Debian despite being derived from it.
|
||||
|
||||
### Difference between Ubuntu and Debian
|
||||
|
||||
So, Ubuntu is built on Debian architecture and infrastructure and uses .DEB packages same as Debian.
|
||||
|
||||
Does it mean using Ubuntu is the same as using Debian? Not quite so. There are many more factors involved that distinguish one distribution from the other.
|
||||
|
||||
Let me discuss these factors one by one to compare Ubuntu and Debian. Please keep in mind that some comparisons are applicable to desktop editions while some apply to the server editions.
|
||||
|
||||
![][4]
|
||||
|
||||
#### 1\. Release cycle
|
||||
|
||||
Ubuntu has two kinds of releases: LTS and regular. [Ubuntu LTS (long term support) release][5] comes out every two years and they get support for five years. You have the option to upgrade to the next available LTS release. The LTS releases are considered more stable.
|
||||
|
||||
There are also non-LTS releases, every six months. These releases are supported for nine months only, but they have newer software versions and features. You have to upgrade to the next Ubuntu versions when the current on reaches end of life.
|
||||
|
||||
So basically, you have the option to choose between stability and new features based on these releases.
|
||||
|
||||
On the other hand, Debian has three different releases: Stable, Testing and Unstable. Unstable is for actual testing and should be avoided.
|
||||
|
||||
The testing branch is not that unstable. It is used for preparing the next stable branch. Some Debian users prefer the testing branch to get newer features.
|
||||
|
||||
And then comes the stable branch. This is the main Debian release. It may not have the latest software and feature but when it comes to stability, Debian Stable is rock solid.
|
||||
|
||||
There is a new stable release every two years and it is supported for a total of three years. After that, you have to upgrade to the next available stable release.
|
||||
|
||||
#### 2\. Software freshness
|
||||
|
||||
![][6]
|
||||
|
||||
Debian’s focus on stability means that it does not always aim for the latest versions of the software. For example, the latest Debian 11 features GNOME 3.38, not the latest GNOME 3.40.
|
||||
|
||||
The same goes for other software like GIMP, LibreOffice, etc. This is a compromise you have to make with Debian. This is why “Debian stable = Debian stale” joke is popular in the Linux community.
|
||||
|
||||
Ubuntu LTS releases also focus on stability. But they usually have more recent versions of the popular software.
|
||||
|
||||
You should note that for _some software_, installing from developer’s repository is also an option. For example, if you want the latest Docker version, you can add Docker repository in both Debian and Ubuntu.
|
||||
|
||||
Overall, software in Debian Stable often have older versions when compared to Ubuntu.
|
||||
|
||||
#### 3\. Software availability
|
||||
|
||||
Both Debian and Ubuntu has a huge repository of software. However, [Ubuntu also has PPA][7] (Personal Package Archive). With PPA, installing newer software or getting the latest software version becomes a bit more easy.
|
||||
|
||||
![][8]
|
||||
|
||||
You may try using PPA in Debian but it won’t be a smooth experience. You’ll encounter issues most of the time.
|
||||
|
||||
#### 4\. Supported platforms
|
||||
|
||||
Ubuntu is available on 64-bit x86 and ARM platforms. It does not provide 32-bit ISO anymore.
|
||||
|
||||
Debian, on the other hand, supports both 32 bit and 64 bit architecture. Apart from that Debian also supports 64-bit ARM (arm64), ARM EABI (armel), ARMv7 (EABI hard-float ABI, armhf), little-endian MIPS (mipsel), 64-bit little-endian MIPS (mips64el), 64-bit little-endian PowerPC (ppc64el) and IBM System z (s390x).
|
||||
|
||||
No wonder it is called the ‘universal operating system’.
|
||||
|
||||
#### 5\. Installation
|
||||
|
||||
[Installing Ubuntu][9] is a lot easier than installing Debian. I am not kidding. Debian could be confusing even for intermediate Linux user.
|
||||
|
||||
When you download Debian, it provides a minimal ISO by default. This ISO has no non-free (not open source) firmware. You go on to install it and realize that your network adapters and other hardware won’t be recognized.
|
||||
|
||||
There is a separate non-free ISO that contains firmware but it is hidden and if you do not know that, you are in for a bad surprise.
|
||||
|
||||
![Getting non-free firmware is a pain in Debian][10]
|
||||
|
||||
Ubuntu is a lot more forgiving when it comes to including proprietary drivers and firmware in the default ISO.
|
||||
|
||||
Also, the Debian installer looks old whereas Ubuntu installer is modern looking. Ubuntu installer also recognizes other installed operating systems on the disk and gives you the option to install Ubuntu alongside the existing ones (dual boot). I have not noticed it with Debian installer in my testing.
|
||||
|
||||
![Installing Ubuntu is smoother][11]
|
||||
|
||||
#### 6\. Out of the box hardware support
|
||||
|
||||
As mentioned earlier, Debian focuses primarily on [FOSS][12] (free and open source software). This means that the kernel provided by Debian does not include proprietary drivers and firmware.
|
||||
|
||||
It’s not that you cannot make it work but you’ll have to do add/enable additional repositories and install it manually. This could be discouraging, specially for the beginners.
|
||||
|
||||
Ubuntu is not perfect but it is a lot better than Debian for providing drivers and firmware out of the box. This means less hassle and a more complete out-of-the-box experience.
|
||||
|
||||
#### 7\. Desktop environment choices
|
||||
|
||||
Ubuntu uses a customized GNOME desktop environment by default. You may install [other desktop environments][13] on top of it or opt for [various desktop based Ubuntu flavors][14] like Kubuntu (for KDE), Xubuntu (for Xfce) etc.
|
||||
|
||||
Debian also installs GNOME by default. But its installer gives you choice to install desktop environment of your choice during the installation process.
|
||||
|
||||
![][15]
|
||||
|
||||
You may also get [DE specific ISO images from its website][16].
|
||||
|
||||
#### 8\. Gaming
|
||||
|
||||
Gaming on Linux has improved in general thanks to Steam and its Proton project. Still, gaming depends a lot on hardware.
|
||||
|
||||
And when it comes to hardware compatibility, Ubuntu is better than Debian for supporting proprietary drivers.
|
||||
|
||||
Not that it cannot be done in Debian but it will require some time and effort to achieve that.
|
||||
|
||||
#### 9\. Performance
|
||||
|
||||
There is no clear ‘winner’ in the performance section, whether it is on the server or on the desktop. Both Debian and Ubuntu are popular as desktop as well as server operating systems.
|
||||
|
||||
The performance depends on your system’s hardware and the software component you use. You can tweak and control your system in both operating systems.
|
||||
|
||||
#### 10\. Community and support
|
||||
|
||||
Debian is a true community project. Everything about this project is governed by its community members.
|
||||
|
||||
Ubuntu is backed by [Canonical][17]. However, it is not entirely a corporate project. It does have a community but the final decision on any matter is in Canonical’s hands.
|
||||
|
||||
As far the support goes, both Ubuntu and Debian have dedicated forums where users can seek help and advice.
|
||||
|
||||
Canonical also offers professional support for a fee to its enterprise clients. Debian has no such features.
|
||||
|
||||
### Conclusion
|
||||
|
||||
Both Debian and Ubuntu are solid choices for desktop or server operating systems. The apt package manager and DEB packaging is common to both and thus giving a somewhat similar experience.
|
||||
|
||||
However, Debian still needs a certain level of expertise, specially on the desktop front. If you are new to Linux, sticking with Ubuntu will be a better choice for you. In my opinion, you should gain some experience, get familiar with Linux in general and then try your hands on Debian.
|
||||
|
||||
It’s not that you cannot jump onto the Debian wagon from the start, but it is more likely to be an overwhelming experience for Linux beginners.
|
||||
|
||||
**Your opinion on this Debian vs Ubuntu debate is welcome.**
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/debian-vs-ubuntu/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/apt-get-linux-guide/
|
||||
[2]: https://www.debian.org/
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/Debian-ubuntu-upstream.png?resize=800%2C400&ssl=1
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/debian-vs-ubuntu.png?resize=800%2C450&ssl=1
|
||||
[5]: https://itsfoss.com/long-term-support-lts/
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/apt-cache-policy.png?resize=795%2C456&ssl=1
|
||||
[7]: https://itsfoss.com/ppa-guide/
|
||||
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/03/ffmpeg_add_ppa.jpg?resize=800%2C222&ssl=1
|
||||
[9]: https://itsfoss.com/install-ubuntu/
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/Debian-firmware.png?resize=800%2C600&ssl=1
|
||||
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/choose-something-else-installing-ubuntu.png?resize=800%2C491&ssl=1
|
||||
[12]: https://itsfoss.com/what-is-foss/
|
||||
[13]: https://itsfoss.com/best-linux-desktop-environments/
|
||||
[14]: https://itsfoss.com/which-ubuntu-install/
|
||||
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/debian-install-desktop-environment.png?resize=640%2C479&ssl=1
|
||||
[16]: https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/
|
||||
[17]: https://canonical.com/
|
@ -1,119 +0,0 @@
|
||||
[#]: subject: "Check file status on Linux with the stat command"
|
||||
[#]: via: "https://opensource.com/article/21/8/linux-stat-file-status"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Check file status on Linux with the stat command
|
||||
======
|
||||
All the information you need about any file or file system is just one
|
||||
Linux command away.
|
||||
![Hand putting a Linux file folder into a drawer][1]
|
||||
|
||||
The `stat` command, included in the GNU `coreutils` package, provides a variety of metadata, including file size, inode location, access permissions and SELinux context, and creation and modification times, about files and filesystems. It's a convenient way to gather information that you usually need several different commands to acquire.
|
||||
|
||||
### Installing stat on Linux
|
||||
|
||||
On Linux, you probably already have the `stat` command installed because it's part of a core utility package that's generally bundled with Linux distributions by default.
|
||||
|
||||
In the event that you don't have `stat` installed, you can install `coreutils` with your package manager.
|
||||
|
||||
Alternately, you can [compile coreutils from source code][2].
|
||||
|
||||
### Getting the status of a file
|
||||
|
||||
Running `stat` provides easy to read output about a specific file or directory.
|
||||
|
||||
|
||||
```
|
||||
$ stat planets.xml
|
||||
File: planets.xml
|
||||
Size: 325 Blocks: 8 IO Block: 4096 regular file
|
||||
Device: fd03h/64771d Inode: 140217 Links: 1
|
||||
Access: (0664/-rw-rw-r--) Uid: (1000/tux) Gid: (100/users)
|
||||
Context: unconfined_u:object_r:user_home_t:s0
|
||||
Access: 2021-08-17 18:26:57.281330711 +1200
|
||||
Modify: 2021-08-17 18:26:58.738332799 +1200
|
||||
Change: 2021-08-17 18:26:58.738332799 +1200
|
||||
Birth: 2021-08-17 18:26:57.281330711 +1200
|
||||
```
|
||||
|
||||
It may be easy to read, but it's still a lot of information. Here's what `stat` is covering:
|
||||
|
||||
* **File**: the file name
|
||||
* **Size**: the file size in bytes
|
||||
* **Blocks**: the number of blocks on the hard drive reserved for this file
|
||||
* **IO Block**: the size of a block of the filesystem
|
||||
* **regular file**: the type of file (regular file, directory, filesystem)
|
||||
* **Device**: the device where the file is located
|
||||
* **Inode**: the inode number where the file is located
|
||||
* **Links**: the number of links to the file
|
||||
* **Access, UID, GID**: file permissions, user, and group owner
|
||||
* **Context**: SELinux context
|
||||
* **Access, Modify, Change, Birth**: the timestamp of when the file was accessed, modified, changed status, and created
|
||||
|
||||
|
||||
|
||||
### Terse output
|
||||
|
||||
For people who know the output well, or want to parse the output with other utilities like [awk][3], there's the `--terse` (`-t` for short) option, which formats the output without headings or line breaks.
|
||||
|
||||
|
||||
```
|
||||
$ stat --terse planets.xml
|
||||
planets.xml 325 8 81b4 100977 100 fd03 140217 1 0 0 1629181617 1629181618 1629181618 1629181617 4096 unconfined_u:object_r:user_home_t:s0
|
||||
```
|
||||
|
||||
### Choosing your own format
|
||||
|
||||
You can define your own format for output using the `--printf` option and a syntax similar to [printf][4]. Each attribute reported by `stat` has a format sequence (`%C` for SELinux context, `%n` for file name, and so on), so you can choose what you want to see in a report.
|
||||
|
||||
|
||||
```
|
||||
$ stat --printf="%n\n%C\n" planets.xml
|
||||
planets.xml
|
||||
unconfined_u:object_r:user_home_t:s0
|
||||
$ $ stat --printf="Name: %n\nModified: %y\n" planets.xml
|
||||
Name: planets.xml
|
||||
Modified: 2021-08-17 18:26:58.738332799 +1200
|
||||
```
|
||||
|
||||
Here are some common format sequences:
|
||||
|
||||
* **%a** access rights
|
||||
* **%F** file type
|
||||
* **%n** file name
|
||||
* **%U** user name
|
||||
* **%u** user ID
|
||||
* **%g** group ID
|
||||
* **%w** time of birth
|
||||
* **%y** modification time
|
||||
|
||||
|
||||
|
||||
A full listing of format sequences is available in the `stat` man page and the `coreutils` info pages.
|
||||
|
||||
### File information
|
||||
|
||||
If you've ever tried to parse the output of `ls -l`, then you'll appreciate the flexibility of the `stat` command. You don't always need every bit of the default information that `stat` provides, but the command is invaluable when you do need some or all of it. Whether you read its output in its default format, or you create your own queries, the `stat` command gives you easy access to the data about your data.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/8/linux-stat-file-status
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/yearbook-haff-rx-linux-file-lead_0.png?itok=-i0NNfDC (Hand putting a Linux file folder into a drawer)
|
||||
[2]: https://www.gnu.org/software/coreutils/
|
||||
[3]: https://opensource.com/article/20/9/awk-ebook
|
||||
[4]: https://opensource.com/article/20/8/printf
|
@ -1,185 +0,0 @@
|
||||
[#]: subject: "10 Things to Do After Installing elementary OS 6 “Odin”"
|
||||
[#]: via: "https://www.debugpoint.com/2021/08/10-things-to-do-after-install-elementary-os-6/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
10 Things to Do After Installing elementary OS 6 “Odin”
|
||||
======
|
||||
A curated list of things to do after installing the latest elementary OS
|
||||
6 code-named “Odin”._Pre-step_Applications > System Settings > Desktop
|
||||
The [elementary OS 6 “Odin” released][1] a while back after more than two years in development. It brings a huge set of new features across its core modules, Pantheon desktop, native applications. This release is based on the Ubuntu 20.04 LTS.
|
||||
|
||||
That said, if you already completed the installation, there are certain customization that you might want to try out to personalize your system. The options those described here are generic and may not be useful for you at certain cases, but we feel it’s worth to list down some basics and give you a path to explore more of this beautiful elementary OS.
|
||||
|
||||
### Things to Do After Installing elementary OS 6 “Odin”
|
||||
|
||||
Make sure you connect to the internet first. You can get the list of networks available in the notification area at the top.
|
||||
|
||||
#### 1\. Change hostname
|
||||
|
||||
This might not be the first thing you would like to do. However, I am not sure why an option not given changing the hostname during installation itself. For example, see below terminal prompt, the hostname is the default hardware configuration set by elementary OS. Which is not looking good at all in my opinion.
|
||||
|
||||
![hostname change before][2]
|
||||
|
||||
To change the hostname, open a terminal and run the below command.
|
||||
|
||||
```
|
||||
hostnamectl set-hostname your-new-hostname
|
||||
```
|
||||
|
||||
example:
|
||||
|
||||
![changing hostname][3]
|
||||
|
||||
![changed hostname][4]
|
||||
|
||||
#### 2\. Update your system
|
||||
|
||||
The very first thing you should do after installing any Linux distribution is to make sure the system is up-to-date with packages and security updates.
|
||||
|
||||
To do that here, you can open App Center and check/install for updates.
|
||||
|
||||
Or, open the Terminal and run the below commands.
|
||||
|
||||
```
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
```
|
||||
|
||||
#### 3\. Install Pantheon Tweaks
|
||||
|
||||
Pantheon Tweaks is a must-have application in elementary OS. It provides additional settings and configuration options that is not available via standard system settings app. To install Pantheon Tweaks, open a terminal and run the below commands. Note: The earlier tweak tool was elementary Tweaks, which is renamed with Pantheon Tweaks from Odin onwards.
|
||||
|
||||
```
|
||||
sudo apt install software-properties-common
|
||||
sudo add-apt-repository -y ppa:philip.scott/pantheon-tweaks
|
||||
sudo apt install -y pantheon-tweaks
|
||||
```
|
||||
|
||||
After installation, open System Settings and you can find Tweaks option there.
|
||||
|
||||
A detailed installation guide is [available here][5] (if you need more information).
|
||||
|
||||
#### 4\. Configure Dock
|
||||
|
||||
Dock is the center of the desktop. And honestly, the default apps that is included in the dock are not that popular. So, you can always configure the dock items using the below steps.
|
||||
|
||||
* To remove: Right click and uncheck the **Keep in Dock** option.
|
||||
* To add new items: Click on Application at the top. Then right-click on the application icon which you want in dock. Select **Add to Dock**.
|
||||
|
||||
|
||||
|
||||
In my opinion, you should add at least – File manager, screenshot tool, Firefox, Calculator – among other things. And remove the ones you don’t need.
|
||||
|
||||
#### 5\. Change the look and feel
|
||||
|
||||
The elementary OS 6 Odin revamped the overall look of the desktop with pre-loaded accent color, native dark mode for entire desktop and applications. Also, pre-loads nice wallpapers. You can customize all these via . There you will have options for Wallpaper, Appearance, Panels and Multitasking.
|
||||
|
||||
![elementary OS 6 Odin settings window – Desktop][6]
|
||||
|
||||
Configure the look as you wish.
|
||||
|
||||
[][7]
|
||||
|
||||
SEE ALSO: elementary OS 6 Odin: New Features and Release Date
|
||||
|
||||
Oh, you can also schedule the Dark and Light mode based on Sunset and Sunrise!
|
||||
|
||||
#### 6\. Install Additional Applications
|
||||
|
||||
The native AppCenter is great for this OS. I find it one of the best curated app store available in Linux desktop. However, sometimes It’s also better to install necessary applications (mostly the known ones) those are not pre-loaded. Here’s a quick list of applications which you can install in a fresh system. _(Seriously, why LibreOffice is not preloaded?)_
|
||||
|
||||
* firefox
|
||||
* gimp
|
||||
* gedit
|
||||
* inkscape
|
||||
* obs-studio
|
||||
* libreoffice
|
||||
|
||||
|
||||
|
||||
#### 7\. Some Battery Saver Tips (Laptop)
|
||||
|
||||
There are many ways which you can configure your elementary OS (or Linux desktop in general) to save battery life. Remember that battery life depends on your Laptop hardware, how old the battery/Laptop is among other things. So, following some of the below tips to get the maximum out of your Laptop battery.
|
||||
|
||||
* Install [tlp][8]. The tlp is a simple to use, terminal based utility to help you to save Battery Life in Linux. You need to just install it, and it will take care of the other settings by default. Installation commands:
|
||||
|
||||
|
||||
|
||||
```
|
||||
sudo add-apt-repository ppa:linrunner/tlp
|
||||
sudo apt update
|
||||
sudo apt-get install tlp
|
||||
sudo tlp start
|
||||
```
|
||||
|
||||
* Turn off Bluetooth, which is turned on by default. Enable it when required.
|
||||
|
||||
|
||||
* Install thermald via below command. This utility (actually a daemon) controls the P-States, T-States of your CPU for temperature and controls the heating.
|
||||
|
||||
|
||||
|
||||
```
|
||||
sudo apt install thermald
|
||||
```
|
||||
|
||||
* Control brightness to minimum as per your need.
|
||||
|
||||
|
||||
|
||||
#### 8\. Install a Disk Utility
|
||||
|
||||
More often, you can find that you need to format a USB or write something to USB. By default, there are no application installed. The best applications with easy usage are the below ones. You can install them.
|
||||
|
||||
```
|
||||
gnome-disk-utility
|
||||
gparted
|
||||
```
|
||||
|
||||
#### 9\. Enable Minimize and Maximize Option
|
||||
|
||||
Many users prefer to have the Maximize, Minimize window buttons at the left or right of the window title bar. The elementary OS only gives you close and restore options by default. Which is completely fine because of the way it’s designed. However, you can use Pantheon Tweaks to enable it via Tweaks > Appearance > Window Controls.
|
||||
|
||||
![enable minimize maximize buttons elementary OS][9]
|
||||
|
||||
#### 10\. Learn the new multi-touch gestures in Odin
|
||||
|
||||
If you are a Laptop user, and using elementary OS Odin, then you definitely check out the super cool new gestures. A three-finger swipe up smoothly opens the Multitasking View, exposing open apps and workspaces. A three-finger swipe left or right smoothly switches between the dynamic workspaces, making it even faster to jump between tasks.
|
||||
|
||||
And with two fingers you can achieve similar feature inside native applications as well.
|
||||
|
||||
### Closing Notes
|
||||
|
||||
I hope these 10 things to do after installing elementary OS 6 helps you and get you started with elementary OS 6 Odin. Although, these are completely user preference; hence these may or may not apply to you. But in general, these are expected tweaks that the average user prefers.
|
||||
|
||||
Let me know in the comments below if there are some more tweaks you feel that should be added in the list.
|
||||
|
||||
* * *
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2021/08/10-things-to-do-after-install-elementary-os-6/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.debugpoint.com/2021/08/elementary-os-6/
|
||||
[2]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/hostname-change-before.jpeg
|
||||
[3]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/changing-hostname.jpeg
|
||||
[4]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/changed-hostname.jpeg
|
||||
[5]: https://www.debugpoint.com/2021/07/elementary-tweaks-install/
|
||||
[6]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/elementary-OS-6-Odin-settings-window-Desktop.jpeg
|
||||
[7]: https://www.debugpoint.com/2020/09/elementary-os-6-odin-new-features-release-date/
|
||||
[8]: https://linrunner.de/tlp/
|
||||
[9]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/enable-minimize-maximize-buttons-elementary-OS-1024x501.png
|
@ -1,109 +0,0 @@
|
||||
[#]: subject: "How to set up your printer on Linux"
|
||||
[#]: via: "https://opensource.com/article/21/8/add-printer-linux"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "fisherue "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to set up your printer on Linux
|
||||
======
|
||||
In the event that your printer isn't auto-detected, this article teaches
|
||||
you how to add a printer on Linux manually.
|
||||
![printing on Linux][1]
|
||||
|
||||
Even though it's the future now and we're all supposed to be using e-ink and AR, there are still times when a printer is useful. Printer manufacturers have yet to standardize how their peripherals communicate with computers, so there's a necessary maze of printer drivers out there, regardless of what platform you're on. The IEEE-ISTO Printer Working Group (PWG) and the OpenPrinting.org site are working tirelessly to make printing as easy as possible, though. Today, many printers are autodetected with no interaction from the user.
|
||||
|
||||
In the event that your printer isn't auto-detected, this article teaches you how to add a printer on Linux manually. This article assumes you're on the GNOME desktop, but the basic workflow is the same for KDE and most other desktops.
|
||||
|
||||
### Printer drivers
|
||||
|
||||
Before attempting to interface with a printer from Linux, you should first verify that you have updated printer drivers.
|
||||
|
||||
There are three varieties of printer drivers:
|
||||
|
||||
* Open source [Gutenprint drivers][2] bundled with Linux and as an installable package
|
||||
* Drivers provided by the printer manufacturer
|
||||
* Drivers created by a third party
|
||||
|
||||
|
||||
|
||||
It's worth installing the open source drivers because there are over 700 of them, so having them available increases the chance of attaching a printer and having it automatically configured for you.
|
||||
|
||||
### Installing open source drivers
|
||||
|
||||
Your Linux distribution probably already has these installed, but if not, you can install them with your package manager. For example, on Fedora, CentOS, Mageia, and similar:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install gutenprint`
|
||||
```
|
||||
|
||||
For HP printers, also install Hewlett-Packard's Linux Imaging and Printing (HPLIP) project. For example, on Debian, Linux Mint, and similar:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo apt install hplip`
|
||||
```
|
||||
|
||||
### Installing vendor drivers
|
||||
|
||||
Sometimes a printer manufacturer uses non-standard protocols, so the open source drivers don't work. Other times, the open source drivers work but may lack special vendor-only features. When that happens, you must visit the manufacturer's website and search for a Linux driver for your printer model. The install process varies, so read the install instructions carefully.
|
||||
|
||||
In the event that your printer isn't supported at all by the vendor, there are [third-party driver authors][3] that may support your printer. These drivers aren't open source, but neither are most vendor drivers. It's frustrating to have to spend an extra $45 to get support for a printer, but the alternative is to throw the printer into the rubbish, and now you know at least one brand to avoid when you purchase your next printer!
|
||||
|
||||
### Common Unix Printing System (CUPS)
|
||||
|
||||
The Common Unix Printing System (CUPS) was developed in 1997 by Easy Software Products, and purchased by Apple in 2007. It's the open source basis for printing on Linux, but most modern distributions provide a customized interface for it. Thanks to CUPS, your computer can find printers attached to it by a USB cable and even a shared printer over a network.
|
||||
|
||||
Once you've gotten the necessary drivers installed, you can add your printer manually. First, attach your printer to your computer and power them both on. Then open the **Printers** application from the **Activities** screen or application menu.
|
||||
|
||||
![printer settings][4]
|
||||
|
||||
CC BY-SA Opensource.com
|
||||
|
||||
There's a possibility that your printer is autodetected by Linux, by way of the drivers you've installed, and that no further configuration is required.
|
||||
|
||||
![printer settings][5]
|
||||
|
||||
CC BY-SA Opensource.com
|
||||
|
||||
Provided that you see your printer listed, you're all set, and you can already print from Linux!
|
||||
|
||||
If you see that you need to add a printer, click the **Unlock** button in the top right corner of the **Printers** window. Enter your administrative password and the button transforms into an **Add** button.
|
||||
|
||||
Click the **Add** button.
|
||||
|
||||
Your computer searches for attached printers (also called a _local_ printer). To have your computer look for a shared network printer, enter the IP address of the printer or its host.
|
||||
|
||||
![searching for a printer][6]
|
||||
|
||||
CC BY-SA Opensource.com
|
||||
|
||||
Select the printer you want to add to your system and click the **Add** button.
|
||||
|
||||
### Print from Linux
|
||||
|
||||
Printing from Linux is as easy as printing can be, whether you're using a local or networked printer. If you're looking for a printer to purchase, then check the [OpenPrinting.org database][7] to confirm that a printer has an open source driver before you spend your money. If you already have a printer, you now know how to use it on your Linux computer.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/8/add-printer-linux
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[fisherue](https://github.com/fisherue)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/happy-printer.png?itok=9J44YaDs (printing on Linux)
|
||||
[2]: http://gimp-print.sourceforge.net/
|
||||
[3]: https://www.turboprint.info/
|
||||
[4]: https://opensource.com/sites/default/files/system-settings-printer_0.png (printer settings)
|
||||
[5]: https://opensource.com/sites/default/files/settings-printer.png (printer settings)
|
||||
[6]: https://opensource.com/sites/default/files/printer-search.png (searching for a printer)
|
||||
[7]: http://www.openprinting.org/printers/
|
@ -1,87 +0,0 @@
|
||||
[#]: subject: "Apps for daily needs part 4: audio editors"
|
||||
[#]: via: "https://fedoramagazine.org/apps-for-daily-needs-part-4-audio-editors/"
|
||||
[#]: author: "Arman Arisman https://fedoramagazine.org/author/armanwu/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Apps for daily needs part 4: audio editors
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
Photo by [Brooke Cagle][2] on [Unsplash][3]
|
||||
|
||||
Audio editor applications or digital audio workstations (DAW) were only used in the past by professionals, such as record producers, sound engineers, and musicians. But nowadays many people who are not professionals also need them. These tools are used for narration on presentations, video blogs, and even just as a hobby. This is especially true now since there are so many online platforms that facilitate everyone sharing audio works, such as music, songs, podcast, etc. This article will introduce some of the open source audio editors or DAW that you can use on Fedora Linux. You may need to install the software mentioned. If you are unfamiliar with how to add software packages in Fedora Linux, see my earlier article [Things to do after installing Fedora 34 Workstation][4]. Here is a list of a few apps for daily needs in the audio editors or DAW category.
|
||||
|
||||
### Audacity
|
||||
|
||||
I’m sure many already know Audacity. It is a popular multi-track audio editor and recorder that can be used for post-processing all types of audio. Most people use Audacity to record their voices, then do editing to make the results better. The results can be used as a podcast or a narration for a video blog. In addition, people also use Audacity to create music and songs. You can record live audio through a microphone or mixer. It also supports 32 bit sound quality.
|
||||
|
||||
Audacity has a lot of features that can support your audio works. It has support for plugins, and you can even write your own plugin. Audacity provides many built-in effects, such as noise reduction, amplification, compression, reverb, echo, limiter, and many more. You can try these effects while listening to the audio directly with the real-time preview feature. The built in plugin-manager lets you manage frequently used plugins and effects.
|
||||
|
||||
![][5]
|
||||
|
||||
More information is available at this link: <https://www.audacityteam.org/>
|
||||
|
||||
* * *
|
||||
|
||||
### LMMS
|
||||
|
||||
LMMS or Linux MultiMedia Studio is a comprehensive music creation application. You can use LMMS to produce your music from scratch with your computer. You can create melodies and beats according to your creativity, and make it better with selection of sound instruments and various effects. There are several built-in features related to musical instruments and effects, such as 16 built-in sythesizers, embedded ZynAddSubFx, drop-in VST effect plug-in support, bundled graphic and parametric equalizer, built-in analyzer, and many more. LMMS also supports MIDI keyboards and other audio peripherals.
|
||||
|
||||
![][6]
|
||||
|
||||
More information is available at this link: <https://lmms.io/>
|
||||
|
||||
* * *
|
||||
|
||||
### Ardour
|
||||
|
||||
Ardour has capabilities similar to LMMS as a comprehensive music creation application. It says on its website that Ardour is a DAW application that is the result of collaboration between musicians, programmers, and professional recording engineers from around the world. Ardour has various functions that are needed by audio engineers, musicians, soundtrack editors, and composers.
|
||||
|
||||
Ardour provides complete features for recording, editing, mixing, and exporting. It has unlimited multichannel tracks, non-linear editor with unlimited undo/redo, a full featured mixer, built-in plugins, and much more. Ardour also comes with video playback tools, so it is also very helpful in the process of creating and editing soundtracks for video projects.
|
||||
|
||||
![][7]
|
||||
|
||||
More information is available at this link: <https://ardour.org/>
|
||||
|
||||
* * *
|
||||
|
||||
### TuxGuitar
|
||||
|
||||
TuxGuitar is a tablature and score editor. It comes with a tablature editor, score viewer, multitrack display, time signature management, and tempo management. It includes various effects, such as bend, slide, vibrato, etc. While TuxGuitar focuses on the guitar, it allows you to write scores for other instruments. It can also serve as a basic MIDI editor. You need to have an understanding of tablature and music scoring to be able to use it.
|
||||
|
||||
![][8]
|
||||
|
||||
More information is available at this link: <http://www.tuxguitar.com.ar/>
|
||||
|
||||
* * *
|
||||
|
||||
### Conclusion
|
||||
|
||||
This article presented four audio editors as apps for your daily needs and use on Fedora Linux. Actually there are many other audio editors, or DAW, that you can use on Fedora Linux. You can also use Mixxx, Rosegarden, Kwave, Qtractor, MuseScore, musE, and many more. Hopefully this article can help you investigate and choose the right audio editor or DAW. If you have experience using these applications, please share your experiences in the comments.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/apps-for-daily-needs-part-4-audio-editors/
|
||||
|
||||
作者:[Arman Arisman][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://fedoramagazine.org/author/armanwu/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2021/07/FedoraMagz-Apps-4-Audio-816x345.jpg
|
||||
[2]: https://unsplash.com/@brookecagle?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
||||
[3]: https://unsplash.com/s/photos/meeting-on-cafe-computer?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
||||
[4]: https://fedoramagazine.org/things-to-do-after-installing-fedora-34-workstation/
|
||||
[5]: https://fedoramagazine.org/wp-content/uploads/2021/08/audio-audacity-1024x575.png
|
||||
[6]: https://fedoramagazine.org/wp-content/uploads/2021/08/audio-lmms-1024x575.png
|
||||
[7]: https://fedoramagazine.org/wp-content/uploads/2021/08/audio-ardour-1024x592.png
|
||||
[8]: https://fedoramagazine.org/wp-content/uploads/2021/08/audio-tuxguitar-1024x575.png
|
@ -1,126 +0,0 @@
|
||||
[#]: subject: "Ulauncher: A Super Useful Application Launcher for Linux"
|
||||
[#]: via: "https://itsfoss.com/ulauncher/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Ulauncher: A Super Useful Application Launcher for Linux
|
||||
======
|
||||
|
||||
_**Brief:**_ _Ulauncher is a fast application launcher with extension and shortcut support to help you quickly access application and files in Linux._
|
||||
|
||||
An application launcher lets you quickly access or open an app without hovering over the application menu icons.
|
||||
|
||||
By default, I found the application launcher with Pop!_OS super handy. But, not every Linux distribution offers an application launcher out-of-the-box.
|
||||
|
||||
Fortunately, there is a solution with which you can add the application launcher to most of the popular distros out there.
|
||||
|
||||
### Ulauncher: Open Source Application Launcher
|
||||
|
||||
![][1]
|
||||
|
||||
Ulauncher is a quick application launcher built using Python while utilizing GTK+.
|
||||
|
||||
It gives a decent amount of customization and control options to tweak. Overall, you can adjust its behavior and experience to suit your taste.
|
||||
|
||||
Let me highlight some of the features that you can expect with it.
|
||||
|
||||
### Ulauncher Features
|
||||
|
||||
The options that you get with Ulauncher are super accessible and easy to customize. Some key highlights include:
|
||||
|
||||
* Fuzzy search algorithm, which lets you find applications even if you misspell them
|
||||
* Remembers your last searched application in the same session
|
||||
* Frequently used apps display (optional)
|
||||
* Custom color themes
|
||||
* Preset color themes that include a dark theme
|
||||
* Shortcut to summon the launcher can be easily customized
|
||||
* Browse files and directories
|
||||
* Support for extensions to get extra functionality (emoji, weather, speed test, notes, password manager, etc.)
|
||||
* Shortcuts for browsing sites like Google, Wikipedia, and Stack Overflow
|
||||
|
||||
|
||||
|
||||
It provides almost every helpful ability that you may expect in an application launcher, and even better.
|
||||
|
||||
### How to Use Ulauncher in Linux?
|
||||
|
||||
By default, you need to press **Ctrl + Space** to get the application launcher after you open it from the application menu for the first time.
|
||||
|
||||
Start typing in to search for an application. And, if you are looking for a file or directory, start typing with “**~**” or “**/**” (ignoring the quotes).
|
||||
|
||||
![][2]
|
||||
|
||||
There are default shortcuts like “**g XYZ**” where XYZ is the search term you want to search for in Google.
|
||||
|
||||
![][3]
|
||||
|
||||
Similarly, you can search for something directly taking you to Wikipedia or Stack Overflow, with “**wiki**” and “**so**” shortcuts, respectively.
|
||||
|
||||
Without any extensions, you can also calculate things on the go and copy the results directly to the keyboard.
|
||||
|
||||
![][4]
|
||||
|
||||
This should come in handy for quick calculations without needing to launch the calculator app separately.
|
||||
|
||||
You can head to its [extensions page][5] and browse for useful extensions along with screenshots that should instruct you how to use it.
|
||||
|
||||
To change how it works, enable frequent applications display, and adjust the theme — click on the gear icon on the right side of the launcher.
|
||||
|
||||
![][6]
|
||||
|
||||
You can set it to auto-start. But, if it does not work on your Systemd enabled distro, you can refer to its GitHub page to add it to the service manager.
|
||||
|
||||
The options are self-explanatory and are easy to customize, as shown in the screenshot below.
|
||||
|
||||
![][7]
|
||||
|
||||
### Installing Ulauncher in Linux
|
||||
|
||||
Ulauncher provides a **.deb** package for Debian or Ubuntu-based distributions. You can explore [how to install Deb][8] [f][8][iles][8] if you’re new to Linux.
|
||||
|
||||
In either case, you can also add its PPA and install it via terminal by following the commands below:
|
||||
|
||||
```
|
||||
sudo add-apt-repository ppa:agornostal/ulauncher
|
||||
sudo apt update
|
||||
sudo apt install ulauncher
|
||||
```
|
||||
|
||||
You can also find it available in the [AUR][9] for Arch and Fedora’s default repositories.
|
||||
|
||||
For more information, you can head to its official website or the [GitHub page][10].
|
||||
|
||||
[Ulauncher][11]
|
||||
|
||||
Ulauncher should be an impressive addition to any Linux distro. Especially, if you want the functionality of a quick launcher like Pop!_OS offers, this is a fantastic option to consider.
|
||||
|
||||
_Have you tried Ulauncher yet? You are welcome to share your thoughts on how this might help you get things done quickly._
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/ulauncher/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/ulauncher.png?resize=800%2C512&ssl=1
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/ulauncher-directory.png?resize=800%2C503&ssl=1
|
||||
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/ulauncher-google.png?resize=800%2C449&ssl=1
|
||||
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/ulauncher-calculator.png?resize=800%2C429&ssl=1
|
||||
[5]: https://ext.ulauncher.io
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/ulauncher-gear-icon.png?resize=800%2C338&ssl=1
|
||||
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/ulauncher-settings.png?resize=800%2C492&ssl=1
|
||||
[8]: https://itsfoss.com/install-deb-files-ubuntu/
|
||||
[9]: https://itsfoss.com/aur-arch-linux/
|
||||
[10]: https://github.com/Ulauncher/Ulauncher/
|
||||
[11]: https://ulauncher.io
|
@ -1,87 +0,0 @@
|
||||
[#]: subject: "Elementary OS 6 Odin Review – Late Arrival but a Solid One"
|
||||
[#]: via: "https://www.debugpoint.com/2021/08/elementary-os-6-odin-review/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "imgradeone"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Elementary OS 6 Odin Review – Late Arrival but a Solid One
|
||||
======
|
||||
We review the elementary OS 6 Odin and give you some glimpse on how it
|
||||
went for our test drive.
|
||||
For almost two years, the elementary OS fans was waiting for elementary OS 6 Odin release. Because, the earlier version elementary OS 5.1 was too old in terms of Kernel, packages in 2021. It was based on Ubuntu 18.04 LTS. So, the users was waiting to get a flavor based on Ubuntu 20.04 LTS – which is already in 2nd year, and we have another LTS coming up.
|
||||
|
||||
You get the idea. Sometimes the wait was too long, probably some users jumped ship to other distributions.
|
||||
|
||||
However, the release [was done in August][1], and it was a hit among the users and fanboys.
|
||||
|
||||
So, I ran elementary OS 6 Odin for a week on an old hardware (I know newer hardware would do just fine), and this is the review.
|
||||
|
||||
![elementary OS 6 ODIN Desktop][2]
|
||||
|
||||
### Elementary OS 6 Odin review
|
||||
|
||||
Test Hardware
|
||||
|
||||
* CPU – Intel Core i3 with RAM 4GB
|
||||
* Disk – SSD
|
||||
* Graphics – Nvidia GeForce (340)
|
||||
|
||||
|
||||
|
||||
#### Installation
|
||||
|
||||
In this release, the team made some usability changes to the elementary Installer, which is a homegrown tool. It reduced the steps require to begin the installation. Although it still depends on gparted for partition (which is a great tool itself anyway).
|
||||
|
||||
The installation took around 10 minutes in above hardware and went without any error. Post installation, the Grub is updated properly and no surprises there. It was a triple boot system with Legacy Bios.
|
||||
|
||||
#### First Impression
|
||||
|
||||
If you are new to elementary OS or Pantheon desktop, and coming from traditional menu-driven desktops, then you might need a day or two to be familiar to the way this desktop is set up. Otherwise, if you are a long time elementary user, you feel the same with some performance benefits and looks.
|
||||
|
||||
Couple of [new features of elementary OS 6][3] you might notice as they are visible. The accent color, native dark mode, a setup of nice wallpapers.
|
||||
|
||||
[][4]
|
||||
|
||||
SEE ALSO: elementary OS 6 Odin: New Features and Release Date
|
||||
|
||||
#### Stability and performance
|
||||
|
||||
I have used elementary OS Odin for more than a week. After using it daily, I must say it is very stable. No sudden crash or surprises. Additional applications (those installed separately via apt) are working well with no loss to performance.
|
||||
|
||||
In almost idle state, the CPU usage is around 5% to 10% and memory is consumed around 900 MB. The CPU/Memory mostly consumed by Gala – Pantheon’s window manager, Wingpanel and AppCenter.
|
||||
|
||||
![System performance of elementary OS 6][5]
|
||||
|
||||
Considering the look and feel it provides, I guess the above numbers are well justified. But remember, if you open more applications such as LibreOffice, Chrome, or Kdenlive for example, it will definitely consume more resources.
|
||||
|
||||
#### Applications and AppCenter
|
||||
|
||||
The application list of elementary OS is well curated and almost all types of apps are available from AppCenter including the Flatpak apps. However, elementary doesn’t include some important applications pre-loaded in default install. For example, Firefox, LibreOffice, Torrent client, disk formatter, photo editor – some important ones you need to manually install after a fresh installation. This is one of the improvement areas for the team, I feel.
|
||||
|
||||
### Final Notes
|
||||
|
||||
I have encountered one bug multiple times in my week long test run. The Wi-Fi was disconnecting randomly sometimes. But that is totally on Ubuntu 20.04 which has weird Wi-Fi problems over the years. Apart from that, it is a very stable and good Linux distribution. I wish there is a rolling-release of elementary, that would have been awesome. That said, it’s a recommended distro for all, specially for those coming from macOS.
|
||||
|
||||
* * *
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2021/08/elementary-os-6-odin-review/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://blog.elementary.io/elementary-os-6-odin-released/
|
||||
[2]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/elementary-OS-6-ODIN-Desktop-1024x576.jpeg
|
||||
[3]: https://www.debugpoint.com/2021/08/elementary-os-6/
|
||||
[4]: https://www.debugpoint.com/2020/09/elementary-os-6-odin-new-features-release-date/
|
||||
[5]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/System-performance-of-elementary-OS-6.jpeg
|
@ -0,0 +1,80 @@
|
||||
[#]: subject: "Automatically Light Up a Sign When Your Webcam is in Use"
|
||||
[#]: via: "https://fedoramagazine.org/automatically-light-up-a-sign-when-your-webcam-is-in-use/"
|
||||
[#]: author: "John Boero https://fedoramagazine.org/author/boeroboy/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Automatically Light Up a Sign When Your Webcam is in Use
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
Automatic WFH sign tells others when you're in a conference.
|
||||
|
||||
At the beginning of COVID lockdown and multiple people working from home it was obvious there was a need to let others know when I’m in a meeting or on a live webcam. So naturally it took me one year to finally do something about it. Now I’m here to share what I learned along the way. You too can have your very own “do not disturb” sign automatically light up outside your door to tell people not to walk in half-dressed on laundry day.
|
||||
|
||||
At first I was surprised Zoom doesn’t have this kind of feature built in. But then again I might use Teams, Meet, Hangouts, WebEx, Bluejeans, or any number of future video collaboration apps. Wouldn’t it make sense to just use a system-wide watch for active webcams or microphones? Like most problems in life, this one can be helped with the Linux kernel. A simple check of the _uvcvideo_ module will show if a video device is in use. Without using events all that is left is to poll it for changes. I chose to build a taskbar icon for this. I would normally do this with my trusty C++. But I decided to step out of my usual comfort zone and use Python in case someone wanted to port it to other platforms. I also wanted to renew my lesser Python-fu and face my inner white space demons. I came up with the following ~90 lines of practical and simple but insecure Python:
|
||||
|
||||
<https://github.com/jboero/livewebcam/blob/main/livewebcam>
|
||||
|
||||
Aside from the icon bits, a daemon thread performs the following basic check every 1s, calling scripts as changed:
|
||||
|
||||
```
|
||||
def run(self):
|
||||
while True:
|
||||
val=subprocess.check_output(['lsmod | grep \'^uvcvideo\' | awk \'{print $3}\''], shell=True, text=True).strip()
|
||||
if val != self.status:
|
||||
self.status = val
|
||||
if val == '0':
|
||||
val=subprocess.check_output(['~/bin/webcam_deactivated.sh'])
|
||||
else:
|
||||
val=subprocess.check_output(['~/bin/webcam_activated.sh'])
|
||||
time.sleep(1)
|
||||
```
|
||||
|
||||
Rather than implement the parsing of modules, just using a hard-coded shell command got the job done. Now whatever scripts you choose to put in ~/bin/ will be used when at least one webcam activates or deactivates. I recently had a futile go at the kernel maintainers regarding a bug in usb_core triggered by uvcvideo. I would just as soon not go a step further and attempt an events patch to uvcvideo. Also, this leaves room for Mac or Windows users to port their own simple checks.
|
||||
|
||||
Now that I had a happy icon that sits in my KDE system tray I could implement scripts for on and off. This is where things got complicated. At first I was going to stick a magnetic bluetooth LED badge on my door to flash “LIVE” whenvever I was in a call. These things are ubiquitous on the internet and cost about $10 for basically an embedded ARM Cortex-M0 with an LED screen, bluetooth, and battery. They are basically a full Raspberry Pi Pico kit but soldered onto the board.
|
||||
|
||||
![These Bluetooth LED badges with 48Mhz ARM Cortex-M0 chips have a lot of potential, but they need custom firmware to be any use.][2]
|
||||
|
||||
Unfortunately these badges use a fixed firmware that is either listening to Bluetooth transmissions or showing your message – it doesn’t do both which is silly. Many people have posted feedback that they should be so much more. Sure enough someone has already tinkered with [custom firmware][3]. Unfortunately the firmware was for older USB variants and I’m not about to de-solder or buy an ISP programmer to flash eeprom just for this. That would be a super interesting project for later and would be a great Rpi alternative but all I want right now is a remote controlled light outside my door. I looked at everything including WiFi [smart bulbs][4] to replace my recessed lighting bulbs, to [BTLE candles][5] which are an interesting option. Along the way I learned a lot about Bluetooth Low Energy including how a kernel update can waste 4 hours of weekend with bluetooth stack crashes. BTLE is really interesting and makes a lot more sense after reading up on it. Sure enough there is Python that can set the display [message on your LED badge][6] across the room, but once it is set, Bluetooth will stop listening for you to change it or shut it off. Darn. I guess I should just make do with USB, which actually has a standard command to control power to ports. Let’s see if something exists for this already.
|
||||
|
||||
![A programmable Bluetooth LED sign costs £10 or for £30 you can have a single LED up to 59 inches away.][7]
|
||||
|
||||
It looked like there are options out there even if they’re not ideal. Then suddenly I found it. Neon sign “ON AIR” for £15 and it’s as dumb as they come – just using 5v from USB power. Perfect.
|
||||
|
||||
![Bingo – now all I needed to do was control the power to it.][8]
|
||||
|
||||
The command to control USB power is _uhubctl_ which is in Fedora repos. Unfortunately most USB hubs don’t support this command. In fact very few support it [going back 20 years][9] which seems silly. Hubs will happily report that power has been disconnected even though no such disconnection has been made. I assume it’s just a few cents extra to build in this feature but I’m not a USB hub manufacturer. Therefore I needed to source a pre-owned one. In the end I found a BYTECC BT-UH340 from the US. This was all I needed to finalize it. Adding udev rules to allow the _wheel_ group to control USB power, I can now perform a simple _uhubctl -a off -l 1-1 -p 1_ to turn anything off.
|
||||
|
||||
![The BYTECC BT-UH340 is one of few hubs I could actually find to support uhubctl power.][10]
|
||||
|
||||
Now with a spare USB extension cable lead to my door I finally have a complete solution. There is an “ON AIR” sign on the outside of my door that lights up automatically whenever any of my webcams are in use. I would love to see a Mac port or improvements in pull requests. I’m sure it can all be better. Even further I would love to hone my IoT skills and sort out flashing those Bluetooth badges. If anybody wants to replicate this please be my guest, and suggestions are always welcome.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/automatically-light-up-a-sign-when-your-webcam-is-in-use/
|
||||
|
||||
作者:[John Boero][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://fedoramagazine.org/author/boeroboy/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2021/08/onair-1890x800-1-816x345.jpg
|
||||
[2]: https://fedoramagazine.org/wp-content/uploads/2021/03/IMG_20210322_164346-1024x768.jpg
|
||||
[3]: https://github.com/Effix/LedBadge
|
||||
[4]: https://www.amazon.co.uk/AvatarControls-Dimmable-Bluetooth-Connection-2700K-6100K/dp/B08P21MSTW/ref=sr_1_6_mod_primary_lightning_deal?dchild=1&keywords=bluetooth+bulb+spot&qid=1616345349&sbo=Tc8eqSFhUl4VwMzbE4fw%2Fw%3D%3D&smid=A2GE8P68TQ1YXI&sr=8-6
|
||||
[5]: http://nilhcem.com/iot/reverse-engineering-simple-bluetooth-devices
|
||||
[6]: http://nilhcem.com/iot/reverse-engineering-bluetooth-led-name-badge
|
||||
[7]: https://fedoramagazine.org/wp-content/uploads/2021/03/image-7-1024x416.png
|
||||
[8]: https://fedoramagazine.org/wp-content/uploads/2021/03/IMG_20210322_163624-1024x768.jpg
|
||||
[9]: https://github.com/mvp/uhubctl#compatible-usb-hubs
|
||||
[10]: https://c1.neweggimages.com/ProductImage/17-145-089-02.jpg
|
@ -0,0 +1,172 @@
|
||||
[#]: subject: "Calculate date and time ranges in Groovy"
|
||||
[#]: via: "https://opensource.com/article/21/8/groovy-date-time"
|
||||
[#]: author: "Chris Hermansen https://opensource.com/users/clhermansen"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Calculate date and time ranges in Groovy
|
||||
======
|
||||
Use Groovy date and time to discover and display time increments.
|
||||
![clock][1]
|
||||
|
||||
Every so often, I need to do some calculations related to dates. A few days ago, a colleague asked me to set up a new project definition in our (open source, of course!) project management system. This project is to start on the 1st of August and finish on the 31st of December. The service to be provided is budgeted at 10 hours per week.
|
||||
|
||||
So, yeah, I had to figure out how many weeks between 2021-08-01 and 2021-12-31 inclusive.
|
||||
|
||||
This is the perfect sort of problem to solve with a tiny [Groovy][2] script.
|
||||
|
||||
### Install Groovy on Linux
|
||||
|
||||
Groovy is based on Java, so it requires a Java installation. Both a recent and decent version of Java and Groovy might be in your Linux distribution's repositories. Alternately, you can install Groovy by following the instructions on the [groovy-lang.org][2].
|
||||
|
||||
A nice alternative for Linux users is [SDKMan][3], which can be used to get multiple versions of Java, Groovy, and many other related tools. For this article, I'm using my distro's OpenJDK11 release and SDKMan's latest Groovy release.
|
||||
|
||||
### Solving the problem with Groovy
|
||||
|
||||
Since Java 8, time and date calculations have been folded into a new package called **java.time**, and Groovy provides access to that. Here’s the script:
|
||||
|
||||
|
||||
```
|
||||
import java.time.*
|
||||
|
||||
import java.time.temporal.*
|
||||
|
||||
def start = LocalDate.parse('2021-08-01','yyyy-MM-dd')
|
||||
|
||||
def end = LocalDate.parse('2022-01-01','yyyy-MM-dd')
|
||||
|
||||
println "${ChronoUnit.WEEKS.between(start,end)} weeks between $start and $end"
|
||||
```
|
||||
|
||||
Copy this code into a file called **wb.groovy** and run it on the command line to see the results:
|
||||
|
||||
|
||||
```
|
||||
$ groovy wb.groovy
|
||||
21 weeks between 2021-08-01 and 2022-01-01
|
||||
```
|
||||
|
||||
Let’s review what’s going on.
|
||||
|
||||
### Date and time
|
||||
|
||||
The [**java.time.LocalDate** class][4] provides many useful static methods (like **parse()** shown above, which lets us convert from a string to a **LocalDate** instance according to a pattern, in this case, **‘yyyy-MM-dd’**). The format characters are explained in quite a number of places–for example, the documentation for [**java.time.format.DateTimeFormat**][5]. Notice that **M** represents “month,” not **m**, which represents “minute.” So this pattern defines a date formatted as a four-digit year, followed by a hyphen, followed by a two-digit month number (1-12), followed by another hyphen, followed by a two-digit day-of-month number (1-31).
|
||||
|
||||
Notice as well that in Java, **parse()** requires an instance of **DateTimeFormat**:
|
||||
|
||||
|
||||
```
|
||||
`parse(CharSequence text, DateTimeFormatter formatter)`
|
||||
```
|
||||
|
||||
As a result, parsing becomes a two-step operation, whereas Groovy provides an additional version of **parse()** that accepts the format string directly in place of the **DateTimeFormat** instance.
|
||||
|
||||
The [**java.time.temporal.ChronoUnit** class][6], actually an **Enum**, provides several **Enum constants**, like **WEEKS** (or **DAYS**, or **CENTURIES**...) which in turn provide the **between()** method that allows us to calculate the interval of those units between two **LocalDates** (or other similar date or time data types). Note that I used January 1, 2022, as the value for **end**; this is because **between()** spans the time period starting on the first date given up to but not including the second date given.
|
||||
|
||||
### More date arithmetic
|
||||
|
||||
Every so often, I need to know how many working days are in a specific time frame (like, say, a month). This handy script will calculate that for me:
|
||||
|
||||
|
||||
```
|
||||
import java.time.*
|
||||
|
||||
def holidaySet = [LocalDate.parse('2021-01-01'), LocalDate.parse('2021-04-02'),
|
||||
LocalDate.parse('2021-04-03'), LocalDate.parse('2021-05-01'),
|
||||
LocalDate.parse('2021-05-15'), LocalDate.parse('2021-05-16'),
|
||||
LocalDate.parse('2021-05-21'), LocalDate.parse('2021-06-13'),
|
||||
LocalDate.parse('2021-06-21'), LocalDate.parse('2021-06-28'),
|
||||
LocalDate.parse('2021-06-16'), LocalDate.parse('2021-06-18'),
|
||||
LocalDate.parse('2021-08-15'), LocalDate.parse('2021-09-17'),
|
||||
LocalDate.parse('2021-09-18'), LocalDate.parse('2021-09-19'),
|
||||
LocalDate.parse('2021-10-11'), LocalDate.parse('2021-10-31'),
|
||||
LocalDate.parse('2021-11-01'), LocalDate.parse('2021-11-21'),
|
||||
LocalDate.parse('2021-12-08'), LocalDate.parse('2021-12-19'),
|
||||
LocalDate.parse('2021-12-25')] as [Set][7]
|
||||
|
||||
def weekendDaySet = [DayOfWeek.SATURDAY,DayOfWeek.SUNDAY] as [Set][7]
|
||||
|
||||
int calcWorkingDays(start, end, holidaySet, weekendDaySet) {
|
||||
(start..<end).inject(0) { subtotal, d ->
|
||||
if (!(d in holidaySet || DayOfWeek.from(d) in weekendDaySet))
|
||||
subtotal + 1
|
||||
else
|
||||
subtotal
|
||||
}
|
||||
}
|
||||
|
||||
def start = LocalDate.parse('2021-08-01')
|
||||
def end = LocalDate.parse('2021-09-01')
|
||||
|
||||
println "${calcWorkingDays(start,end,holidaySet,weekendDaySet)} working day(s) between $start and $end"
|
||||
```
|
||||
|
||||
Copy this code into a file called **wdb.groovy** and run it from the command line to see the results:
|
||||
|
||||
|
||||
```
|
||||
$ groovy wdb.groovy
|
||||
22 working day(s) between 2021-08-01 and 2021-09-01
|
||||
```
|
||||
|
||||
Let’s review this.
|
||||
|
||||
First, I create a set of holiday dates (these are Chile’s “días feriados” for 2021, in case you wondered) called holidaySet. Note that the default pattern for **LocalDate.parse()** is ‘**yyyy-MM-dd**’, so I’ve left the pattern out here. Note as well that I’m using the Groovy shorthand **[a,b,c]** to create a **List** and then coercing it to a **Set**.
|
||||
|
||||
Next, I want to skip Saturdays and Sundays, so I create another set incorporating two **enum** values of [**java.time.DayOfWeek**][8]–**SATURDAY** and **SUNDAY**.
|
||||
|
||||
Then I define a method **calcWorkingDays()** that takes as arguments the start date, the end date (which following the previous example of **between()** is the first value outside the range I want to consider), the holiday set, and the weekend day set. Line by line, this method:
|
||||
|
||||
* Defines a range between **start** and **end**, open on the **end**, (that’s what **<end** means) and executes the closure argument passed to the **inject()** method (**inject()** implements the 'reduce' operation on **List** in Groovy) on the successive elements **d** in the range:
|
||||
* As long as **d** is neither in the **holidaySet** nor in the **weekendDaySet**, increments the **subtotal** by 1
|
||||
* Returns the value of the result returned by **inject()**
|
||||
|
||||
|
||||
|
||||
Next, I define the **start** and **end** dates between which I want to calculate working days.
|
||||
|
||||
Finally, I call **println** using a Groovy [**GString**][9] to evaluate the **calcWorkingDays()** method and display the result.
|
||||
|
||||
Note that I could have used the **each** closure instead of **inject**, or even a **for** loop. I could have also used Java Streams rather than Groovy ranges, lists, and closures. Lots of options.
|
||||
|
||||
### But why not use groovy.Date?
|
||||
|
||||
Some of you old Groovy users may be wondering why I’m not using good old [**groovy.Date**][10]. The answer is, I could use it. But Groovy Date is based on Java Date, and there are some good reasons for moving to **java.time**, even though Groovy Date added quite a few nice things to Java Date.
|
||||
|
||||
For me, the main reason is that there are some not-so-great design decisions buried in the implementation of Java Date, the worst being that it is unnecessarily mutable. I spent a while tracking down a weird bug that arose from my poor understanding of the **clearTime()** method on Groovy Date. I learned it actually clears the time field of the date instance, rather than returning the date value with the time part set to ‘00:00:00’.
|
||||
|
||||
Date instances also aren’t thread-safe, which can be kind of challenging for multithreaded applications.
|
||||
|
||||
Finally, having both date and time wrapped up in a single field isn’t always convenient and can lead to some weird data modeling contortions. Think, for instance, of a day on which multiple events occur: Ideally, the _date_ field would be on the day, and the _time_ field would be on each event; but that’s not easy to do with Groovy Date.
|
||||
|
||||
### Groovy is groovy
|
||||
|
||||
Groovy is an Apache project, and it provides a simplified syntax for Java so you can use it for quick and simple scripts in addition to complex applications. You retain the power of Java, but you access it with an efficient toolset. [Try it soon][11], and see if you find your groove with Groovy.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/8/groovy-date-time
|
||||
|
||||
作者:[Chris Hermansen][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/clhermansen
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/clock_1.png?itok=lbyiCJWV (clock)
|
||||
[2]: https://groovy-lang.org/
|
||||
[3]: https://sdkman.io/
|
||||
[4]: https://docs.groovy-lang.org/latest/html/groovy-jdk/java/time/LocalDate.html
|
||||
[5]: https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
|
||||
[6]: https://docs.oracle.com/javase/8/docs/api/java/time/temporal/ChronoUnit.html
|
||||
[7]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+set
|
||||
[8]: https://docs.oracle.com/javase/8/docs/api/java/time/DayOfWeek.html
|
||||
[9]: https://docs.groovy-lang.org/latest/html/api/groovy/lang/GString.html
|
||||
[10]: https://docs.groovy-lang.org/latest/html/groovy-jdk/java/util/Date.html
|
||||
[11]: https://groovy.apache.org/download.html
|
252
sources/tech/20210827 How to Easily Install Debian Linux.md
Normal file
252
sources/tech/20210827 How to Easily Install Debian Linux.md
Normal file
@ -0,0 +1,252 @@
|
||||
[#]: subject: "How to Easily Install Debian Linux"
|
||||
[#]: via: "https://itsfoss.com/install-debian-easily/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "guevaraya "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Easily Install Debian Linux
|
||||
======
|
||||
|
||||
Installing Debian could be easy or complicated depending upon the ISO you choose.
|
||||
|
||||
If you go with the default ISO provided by the Debian website, you’ll have a hard time installing Debian. You’ll be stuck at a screen that asks for network drivers to be installed from external removable media.
|
||||
|
||||
![Installing Debian from default ISO is problematic for new users][1]
|
||||
|
||||
You may, of course, troubleshoot that, but it makes things unnecessarily complicated.
|
||||
|
||||
Don’t worry. Let me show the steps for installing Debian comfortably and easily.
|
||||
|
||||
### The easy way of installing Debian as a desktop
|
||||
|
||||
Before you see the steps, please have a look at things you need.
|
||||
|
||||
* A USB key (pen drive) with at least 4 GB in size.
|
||||
* A system with internet connection (could be the same system where it will be installed).
|
||||
* A system where you’ll be installing Debian. It will wipe out everything on this system so please copy your important data on some other external disk.
|
||||
|
||||
|
||||
|
||||
What kind of system specification you should have for Debian? It depends on the [desktop environment][2] you are going to use. For example, GNOME desktop environment could work on 4 GB RAM but it will work a lot better on an 8 GB RAM. If you have 4 GB or less, try using KDE, Cinnamon or Xfce desktops.
|
||||
|
||||
Debian also has both [32-bit and 64-bit architecture][3] support. You’ll have to get the Debian ISO according to your processor architecture.
|
||||
|
||||
Your system should have at least 25 GB of disk space to function. The more, the merrier.
|
||||
|
||||
Warning!
|
||||
|
||||
This method removes all the other operating systems along with the data present on the disk.
|
||||
|
||||
You may save your personal files, documents, pictures etc on an external USB disk or cloud storage if you want to use it later.
|
||||
|
||||
In this tutorial, I am going to show the steps for installing Debian 11 Bullseye with GNOME desktop environment. The steps should be the same even if you choose some other desktop environment.
|
||||
|
||||
_**This tutorial is tested on a UEFI system with GPT partitioning. If you have [MBR instead of GPT][4] or [legacy BIOS instead of UEFI][5], the live USB creation step will be different.**_
|
||||
|
||||
#### Step 1: Getting the correct Debian ISO
|
||||
|
||||
Half of the battle in installing Debian is choosing the correct ISO. Surprisingly, it is really difficult to navigate through its website and find that ISO which is the easiest for a new Debian user.
|
||||
|
||||
If you click the Download button on the [homepage of Debian website][6], it downloads a minimal net install file which will be super complicate for a regular user. Please DO NOT use this.
|
||||
|
||||
Instead, you should go for the live ISO. But here is a catch, there are separate live versions with non-free software (includes drivers for your networking hardware).
|
||||
|
||||
You should download this non-free live ISO. Another problem here is that you won’t get it mentioned prominently on the website and there are various URLs for torrents or direct downloads for various architecture.
|
||||
|
||||
Let me link them here.
|
||||
|
||||
[Main repo for 32 and 64 bit][7]
|
||||
|
||||
[Debian 11 Direct][8]
|
||||
|
||||
[Debian 11 Torrent][9]
|
||||
|
||||
You’ll see several files with the of desktop environment mentioned in the filename. Choose the one with desktop environment of your choice. For direct downloads, click on the links that end with .iso.
|
||||
|
||||
![Downloading the Debian Live Non-free ISO][10]
|
||||
|
||||
Once you have the appropriate ISO downloaded, the rest is standard procedure that you may have experienced with other Linux distributions.
|
||||
|
||||
#### Step 2: Creating live USB of Debian
|
||||
|
||||
Plug in the USB into your system. It will be wise to format it just for the sake of it. It will be formatted anyway.
|
||||
|
||||
You can use any live USB creation tool of your choice. If you are using Windows, go with Rufus. I am going to use Etcher here because it is available for both Windows and Linux.
|
||||
|
||||
Download Etcher from its website.
|
||||
|
||||
[Download Etcher][11]
|
||||
|
||||
I have a dedicated [tutorial on using Etcher in Linux][12] and thus I am not going to go in detail here. Just run the downloaded executable file, browse to the Debian ISO, make sure that correct USB is selected and then hit the Flash button.
|
||||
|
||||
![Creating Live Debian USB with Etcher][13]
|
||||
|
||||
It may take a couple of minutes to create the live USB. Once that is ready, it is time to boot from it.
|
||||
|
||||
#### Step 3: Boot from the live USB
|
||||
|
||||
Restart the system where you want to install Debian. When it is showing the manufacturer’s logo, press F2/F10 or F12 key to access the boot settings. You may also [access the UEFI firmware settings from Windows.][14]
|
||||
|
||||
Some systems do not allow booting from live USB if secure boot is enabled. If that is the case, please [disable secure boot from the BIOS settings][15].
|
||||
|
||||
The screen may look different for different manufacturers.
|
||||
|
||||
![][16]
|
||||
|
||||
Once you make the change, press F10 to save and exit. Your system will boot once again.
|
||||
|
||||
Again, press F2/F10 or F12 to access the boot settings when it shows the manufacturer’s logo. You should see the option to boot from the USB. Select it.
|
||||
|
||||
![][17]
|
||||
|
||||
It takes a little bit of time and then you should see a screen like this. Go with the first option here.
|
||||
|
||||
![Debian live boot screen][18]
|
||||
|
||||
#### Step 4: Start Debian installation
|
||||
|
||||
When you enter the live Debian session, it may show some welcome screen with option to choose your keyboard and language if you are using GNOME desktop. Just hit next when you see those screens.
|
||||
|
||||
![Debian live welcome screen][19]
|
||||
|
||||
Once you are past the welcome screen, press the Windows/Super key to bring the activity area. You should see the Debian install button here.
|
||||
|
||||
![Start Debian Installation][20]
|
||||
|
||||
It opens the friendly [Calamares graphical installer][21]. Things are pretty straightforward from here.
|
||||
|
||||
![Debian 11 Calamares graphical installer][22]
|
||||
|
||||
It asks you to select your geographical location and time zone.
|
||||
|
||||
![Select your location and time zone][23]
|
||||
|
||||
On the next screen, you’ll be asked to select the keyboard. Please **pay attention** here. Your keyboard is automatically selected based on your location. For example, I had used India as my location and it automatically set the default Indian keyboard with Hindi language. I had to change it to English India.
|
||||
|
||||
![Choosing keyboard layout][24]
|
||||
|
||||
The next screen is about the disk partition and where you would like to install Debian. In this case, you are going to install Debian as the only operating system on your computer.
|
||||
|
||||
The easiest option would to go with ‘Erase disk’ option. Debian will put everything under root except the mandatory ESP partition and Swap space. In fact, it shows what your disk would like after your chosen installation method.
|
||||
|
||||
![Disk partitioning][25]
|
||||
|
||||
If you want to take matter in your hands, you may also opt for manual partitioning and choose how much you want to allot to root, home, boot or swap. Only do that when you know what you are doing.
|
||||
|
||||
On the next screen, you have to provide the username and password. It does not set root password and keeps it empty.
|
||||
|
||||
![Set Username and password][26]
|
||||
|
||||
This also means that you can use sudo with the newly created user. In the ‘complicated Debian install’, you could also set root password but then you’ll have to add the normal user to sudoer list manually. See, this installation method is easier for beginners, right?
|
||||
|
||||
Before it goes on with the actual installation, it presents you with a summary of the choices you have made. If things look good, hit the install button.
|
||||
|
||||
![Summary of your installation choices][27]
|
||||
|
||||
Now it is just a matter of waiting for the installation to finish.
|
||||
|
||||
![Installing Debian][28]
|
||||
|
||||
It takes a few minutes to complete the installation. When the installation finishes, it asks for a restart.
|
||||
|
||||
![Finished Debian installation][29]
|
||||
|
||||
Restart your system and if everything goes well, you should see the grub screen with Debian.
|
||||
|
||||
![Debian boot screen][30]
|
||||
|
||||
### Troubleshooting tip (if your system does not boot into Debian)
|
||||
|
||||
In my case, my Dell system did not recognize any operating system to boot. This was weird because I had see Debian creating an ESP partition.
|
||||
|
||||
If it is the same case with you, go to BIOS settings. Check the boot sequence. If you do not see anything, click on the Add boot option.
|
||||
|
||||
![Add new boot option][31]
|
||||
|
||||
It should give you an option to add an EFI file.
|
||||
|
||||
![Browse to EFi file][32]
|
||||
|
||||
Since Debian created ESP partition during installation, there is an EFI directory created with necessary files.
|
||||
|
||||
![Select EFI directory][33]
|
||||
|
||||
It should show a Debian folder along with some other folders. Select Debian folder.
|
||||
|
||||
![Select Debian][34]
|
||||
|
||||
In this Debian folder, you’ll find files like grubx64.efi, shimx64.efi. Select shimx64.efi.
|
||||
|
||||
![Select shim.efi][35]
|
||||
|
||||
You may give this file an appropriate name. The final screen may look like this.
|
||||
|
||||
![Adding the new boot option with efi file][36]
|
||||
|
||||
Now, you should have this boot option. Since I named it Debian, it shows two Debian boot options (one of them coming from the efi file I guess). Press F10 to save and exit the BIOS settings.
|
||||
|
||||
![New boot option added][37]
|
||||
|
||||
When your system boots now, you should see the grub screen with Debian boot option. You can start enjoying Debian now.
|
||||
|
||||
![][30]
|
||||
|
||||
### Were you able to install Debian?
|
||||
|
||||
I hope I made things simpler here. It is not that you cannot install Debian from the default net installer ISO. It just takes (a lot) more effort.
|
||||
|
||||
Was this tutorial helpful for you in installing Debian? Are you still facing issues? Please let me know in the comment section and I’ll try to help you out.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-debian-easily/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/Debian-firmware.png?resize=800%2C600&ssl=1
|
||||
[2]: https://itsfoss.com/what-is-desktop-environment/
|
||||
[3]: https://itsfoss.com/32-bit-64-bit-ubuntu/
|
||||
[4]: https://itsfoss.com/check-mbr-or-gpt/
|
||||
[5]: https://itsfoss.com/check-uefi-or-bios/
|
||||
[6]: https://www.debian.org/
|
||||
[7]: https://cdimage.debian.org/images/unofficial/non-free/images-including-firmware/11.0.0-live+nonfree/
|
||||
[8]: https://cdimage.debian.org/images/unofficial/non-free/images-including-firmware/11.0.0-live+nonfree/amd64/iso-hybrid/
|
||||
[9]: https://cdimage.debian.org/images/unofficial/non-free/images-including-firmware/11.0.0-live+nonfree/amd64/bt-hybrid/
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/downloading-Debian-live-non-free-iso.png?resize=800%2C490&ssl=1
|
||||
[11]: https://www.balena.io/etcher/
|
||||
[12]: https://itsfoss.com/install-etcher-linux/
|
||||
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/creating-live-debian-usb-with-etcher-800x518.png?resize=800%2C518&ssl=1
|
||||
[14]: https://itsfoss.com/access-uefi-settings-windows-10/
|
||||
[15]: https://itsfoss.com/disable-secure-boot-windows/
|
||||
[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2014/05/Disable_Secure_Boot_Windows8.jpg?resize=700%2C525&ssl=1
|
||||
[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/boot-from-windows-disk-ventoy.jpg?resize=800%2C611&ssl=1
|
||||
[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/debian-live-boot-screen.png?resize=617%2C432&ssl=1
|
||||
[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/debian-live-welcome-screen.png?resize=800%2C450&ssl=1
|
||||
[20]: https://itsfoss.com/wp-content/uploads/2021/08/start-Debian-installation-800x473.webp
|
||||
[21]: https://calamares.io/
|
||||
[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/Installing-Debian-1.png?resize=800%2C441&ssl=1
|
||||
[23]: https://itsfoss.com/wp-content/uploads/2021/08/Installing-Debian-2-800x441.webp
|
||||
[24]: https://itsfoss.com/wp-content/uploads/2021/08/Installing-Debian-4-800x441.webp
|
||||
[25]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/Installing-Debian-5.png?resize=800%2C441&ssl=1
|
||||
[26]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/Installing-Debian-6.png?resize=800%2C441&ssl=1
|
||||
[27]: https://itsfoss.com/wp-content/uploads/2021/08/Installing-Debian-7-800x500.webp
|
||||
[28]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/Installing-Debian-8.png?resize=800%2C500&ssl=1
|
||||
[29]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/Installing-Debian-9.png?resize=800%2C500&ssl=1
|
||||
[30]: https://itsfoss.com/wp-content/uploads/2021/08/debian-boot-screen.webp
|
||||
[31]: https://itsfoss.com/wp-content/uploads/2021/08/add-new-boot-option.webp
|
||||
[32]: https://itsfoss.com/wp-content/uploads/2021/08/add-efi-file-for-boot-option.webp
|
||||
[33]: https://itsfoss.com/wp-content/uploads/2021/08/select-efi-file-boot-option.webp
|
||||
[34]: https://itsfoss.com/wp-content/uploads/2021/08/select-debian-folder-for-uefi.webp
|
||||
[35]: https://itsfoss.com/wp-content/uploads/2021/08/select-shim-boot.webp
|
||||
[36]: https://itsfoss.com/wp-content/uploads/2021/08/new-boot-option.webp
|
||||
[37]: https://itsfoss.com/wp-content/uploads/2021/08/new-boot-option-added.webp
|
184
sources/tech/20210828 Parse command-line options in Groovy.md
Normal file
184
sources/tech/20210828 Parse command-line options in Groovy.md
Normal file
@ -0,0 +1,184 @@
|
||||
[#]: subject: "Parse command-line options in Groovy"
|
||||
[#]: via: "https://opensource.com/article/21/8/parsing-command-options-groovy"
|
||||
[#]: author: "Chris Hermansen https://opensource.com/users/clhermansen"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Parse command-line options in Groovy
|
||||
======
|
||||
Learn to add options to your Groovy applications.
|
||||
![Woman sitting in front of her computer][1]
|
||||
|
||||
A recent article provided an [introduction to parsing command-line options in Java][2]. Because I really like Groovy, and because Groovy is well suited for scripting, and because it's fun to compare Java and Groovy solutions, I decided to paraphrase Seth's article, but using Groovy.
|
||||
|
||||
### Install Groovy
|
||||
|
||||
Groovy is based on Java, so it requires a Java installation. Both a recent and decent version of Java and Groovy might be in your Linux distribution's repositories. Alternately, you can install Groovy by following the instructions on the [groovy-lang.org][3].
|
||||
|
||||
A nice alternative for Linux users is [SDKMan][4], which can be used to get multiple versions of Java, Groovy, and many other related tools. For this article, I'm using my distro's OpenJDK11 release and SDKMan's latest Groovy release.
|
||||
|
||||
### Parsing command-line options in Groovy
|
||||
|
||||
When we create a script—a kind of short, often informal program—to be run from the command line, we normally follow the practice of passing arguments to the script on the command line. A good example of this is the `ls` command, used to list all the files and subfolders in a given folder, perhaps showing attributes and sorted in reverse order of last modification date, as in:
|
||||
|
||||
|
||||
```
|
||||
`$ ls -lt /home/me`
|
||||
```
|
||||
|
||||
To show the contents of my home folder like this:
|
||||
|
||||
|
||||
```
|
||||
total 252
|
||||
drwxr-xr-x 5 me me 4096 Aug 10 12:23 Downloads
|
||||
drwx------ 11 me me 4096 Aug 10 08:59 Dropbox
|
||||
drwxr-xr-x 27 me me 12288 Aug 9 11:58 Pictures
|
||||
-rw-rw-r-- 1 me me 235 Jul 28 16:22 wb.groovy
|
||||
drwxr-xr-x 2 me me 4096 Jul 20 22:04 Desktop
|
||||
drwxrwxr-x 2 me me 4096 Jul 20 15:16 Fixed
|
||||
drwxr-xr-x 2 me me 16384 Jul 19 08:49 Music
|
||||
-rw-rw-r-- 1 me me 433 Jul 7 13:24 foo
|
||||
drwxr-xr-x 6 me me 4096 Jun 29 10:25 Documents
|
||||
drwxr-xr-x 2 me me 4096 Jun 14 22:15 Templates
|
||||
-rw-rw-r-- 1 me me 803 Jun 14 11:33 bar
|
||||
```
|
||||
|
||||
Of course, arguments to commands can be handled by inspecting them and deciding what to do in each case; but this ends up being a duplication of effort that can be avoided by using a library designed for that purpose.
|
||||
|
||||
Seth's Java article introduces the [Apache Commons CLI library][5], a great API for handling command-line options. In fact, this library is so great that the good people who develop Groovy make it available by default in the Groovy installation. Therefore, once you have Groovy installed, you have access to this library through [**groovy.cli.picocli.CliBuilder**][6], which is already imported for you by default.
|
||||
|
||||
Here's a Groovy script that uses this CLI builder to achieve the same results as Seth's Java program:
|
||||
|
||||
|
||||
```
|
||||
1 def cli = new CliBuilder(usage: 'ho.groovy [-a] -c')
|
||||
2 cli.with {
|
||||
3 a longOpt: 'alpha', 'Activate feature alpha'
|
||||
4 c longOpt: 'config', args:1, argName: 'config', required: true, 'Set config file'
|
||||
5 }
|
||||
6 def options = cli.parse(args)
|
||||
7 if (!options) {
|
||||
8 return
|
||||
9 }
|
||||
10 if (options.a) {
|
||||
11 println' Alpha activated'
|
||||
12 }
|
||||
13 if (options.c) {
|
||||
14 println "Config set to ${options.c}"
|
||||
15 }
|
||||
```
|
||||
|
||||
I've included line numbers here to facilitate the discussion. Save this script without the line numbers in a file called **ho.groovy**.
|
||||
|
||||
On line 1, we define the variable **cli** and set it to a new instance of **CliBuilder** with a defined **usage** attribute. This is a string that will be printed if the **usage()** method is called.
|
||||
|
||||
On lines 2-5, we use [the **with()** method][7] that Groovy adds to objects, together with the DSL defined by **CliBuilder**, to set up the option definitions.
|
||||
|
||||
On line 3, we define the option '**a**', setting its **longOpt** field to '**alpha**' and its description to '**Activate feature alpha**'.
|
||||
|
||||
Similarly, on line 4, we define the option '**c**', setting its **longOpt** field to '**config**' and specifying that this option takes one argument whose name is '**config**'. Moreover, this is a **required** option (sounds funny, I know), and its description is '**Set config file**'.
|
||||
|
||||
Pausing briefly here for a bit of background, you can read all about these various options at the **CliBuilder** link above. More generally, things written in the form **longOpt: 'alpha'** are Groovy notation for key-value entries to be put in a **Map** instance, which you can read about [here][8]. Each key, in this case, corresponds to a method of the same name provided by the CliBuilder. If you're wondering what's going on with a line like:
|
||||
|
||||
|
||||
```
|
||||
`a longOpt: 'alpha', 'Activate feature alpha'`
|
||||
```
|
||||
|
||||
then it may be useful to mention that Groovy allows us to drop parentheses in certain circumstances; so the above is equivalent to:
|
||||
|
||||
|
||||
```
|
||||
`a(longOpt: 'alpha', 'Activate feature alpha')`
|
||||
```
|
||||
|
||||
i.e., it's a method call. Moreover, Groovy allows both positional and named parameters, the latter using that key: value syntax.
|
||||
|
||||
Onward! On lines 6-9, we call the **parse()** method of the **CliBuilder** instance **cli**, passing the **args—**an array of **String** values created by the Groovy run-time and containing the arguments from the command line. This method returns a **Map** of the options where the keys are the short-form of the predefined options—in this case, '**a**' and '**c**'. If the parsing fails, then **parse()** emits the **usage** message, a reasonable error message, and returns a null value, so we don't have to use a try-catch block (which one doesn't see as often in Groovy). So here—line 8—we just return since all our work is done for us.
|
||||
|
||||
On lines 10-12, we check to see if option '_a_' was included on the command line and if it is, print a message saying so.
|
||||
|
||||
Similarly, on lines 13-15, we check to see if option '**c**' was included on the command line and if so, print a message showing the argument provided to it.
|
||||
|
||||
### Running the command
|
||||
|
||||
Let’s run the script a few times; first with no arguments:
|
||||
|
||||
|
||||
```
|
||||
$ groovy ho.groovy
|
||||
error: Missing required option: c
|
||||
usage: ho.groovy [-a] -c
|
||||
-a,--alpha Activate feature alpha
|
||||
-c,--config <config> [Set][9] config file
|
||||
$
|
||||
```
|
||||
|
||||
Notice the complaint about missing the required option '**c**'.
|
||||
|
||||
Then with the '**c**' option but no argument:
|
||||
|
||||
|
||||
```
|
||||
$ groovy ho.groovy -c
|
||||
error: Missing argument for option: c
|
||||
usage: ho.groovy [-a] -c
|
||||
-a,--alpha
|
||||
Activate feature alpha
|
||||
-c,--config <config> [Set][9] config file
|
||||
$
|
||||
```
|
||||
|
||||
Cool, the **CliBuilder** instance method **parse()** noticed no argument was provided to '**c**'.
|
||||
|
||||
Finally, let's try with both options and an argument to '**c**', in their long form:
|
||||
|
||||
|
||||
```
|
||||
$ groovy ho.groovy --alpha --config bar
|
||||
Alpha activated
|
||||
Config set to bar
|
||||
$
|
||||
```
|
||||
|
||||
Looks good!
|
||||
|
||||
Since the idea of the '**c**' option is to provide a config file, we could also tell the **CliBuilder** instance that the type of this argument is File, and it will return that instead of a String. But we'll leave that for another day.
|
||||
|
||||
So, there you have it—command-line option parsing in Groovy.
|
||||
|
||||
### Groovy resources
|
||||
|
||||
The Groovy website has a lot of great documentation. Another great Groovy resource is [Mr. Haki][10], and specifically [this lovely article on CliBuilder][11].
|
||||
|
||||
Another great reason to learn Groovy is [Grails][12], a wonderfully productive full-stack web framework built on top of excellent components like Hibernate, Spring Boot, and Micronaut.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/8/parsing-command-options-groovy
|
||||
|
||||
作者:[Chris Hermansen][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/clhermansen
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_3.png?itok=qw2A18BM (Woman sitting in front of her computer)
|
||||
[2]: https://opensource.com/article/21/8/java-commons-cli
|
||||
[3]: https://groovy-lang.org/
|
||||
[4]: https://sdkman.io/
|
||||
[5]: https://commons.apache.org/proper/commons-cli/
|
||||
[6]: https://docs.groovy-lang.org/latest/html/gapi/groovy/cli/picocli/CliBuilder.html
|
||||
[7]: https://objectpartners.com/2014/07/09/groovys-with-and-multiple-assignment/
|
||||
[8]: https://www.baeldung.com/groovy-maps
|
||||
[9]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+set
|
||||
[10]: https://blog.mrhaki.com/
|
||||
[11]: https://blog.mrhaki.com/2009/09/groovy-goodness-parsing-commandline.html
|
||||
[12]: https://grails.org/
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user