Merge pull request #5 from LCTT/master

Update form LCTT
This commit is contained in:
CN-QUAN 2022-01-20 13:25:44 +08:00 committed by GitHub
commit 020c6ac11f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 1113 additions and 591 deletions

View File

@ -0,0 +1,79 @@
[#]: via: (https://theartofmachinery.com/2021/07/04/pricing_as_contractor_101.html)
[#]: author: (Simon Arneaud https://theartofmachinery.com)
[#]: collector: (lujun9972)
[#]: translator: (CN-QUAN)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-14196-1.html)
将自己作为承包商而定价的基础原则
======
![](https://img.linux.net.cn/data/attachment/album/202201/20/095355ib1k816i22fieoeh.jpg)
我职业生涯的大部分时间都是自由职业者。有时候,我也会和一些想要辞掉全职工作去做一些承包或服务业务的人聊天。到目前为止,我们新手最常犯的错误就是为自己定价。
以 [这篇有用的博客文章为例,它分析了美国雇员与自由职业者的收入间的对比][1]。据估计,在美国,作为一名自由职业者,你需要获得 14 万美元的收入,才能获得相当于 10 万美元的雇员薪酬。我记得当我第一次创业时,我发现这样的计算非常有用。而,有些人看到结果会想:“哎呀,如果我是自由职业者,我得赚 1.4 倍的钱。我真的能做到吗?”
不,不,不,这种想法是落后的。
### 如何给自己定价
让我们举个例子。假设你是一名全职软件工程师,年收入 10 万美元,你正考虑转成承保。
当你是自由职业者时候,你必须像做企业一样思考,因为这就是你的谋生方式。所以,你必须把所有的成本加起来,并计算出如何收回这些成本。电子表格的口碑很差(有一些很好的理由),但它们实际上非常有用,尤其是对这些东西(以及作为企业主要进行的许多其他计算)。
第一个要加入统计的成本是那 10 万美元。如果这听起来很奇怪,那就是所谓的“机会成本”。你本可以继续工作以赚到 10 万美元;而没有赚到这 10 万美元,实际上是在规划业务时的一种成本。把这一费用和其他你实际使用的任何其它就业福利一起记下来。如果你的雇主提供工作日午餐,那就加上一年中每个工作日午餐的费用。如果你的雇主为员工提供健身软件的折扣,但你却没有使用该软件,那么不要将该福利作为机会成本。
其他费用取决于你在做什么和你住在哪里。员工医疗保险在澳大利亚不像在美国那么重要。另一方面,强制性养老金支付(类似于美国的 401(K) 计划)是一个大问题。我有自己的公司,我的主要非工资成本是保险、会计/档案、法律(合同审查等)、债务催收和各种在线服务成本。如果你在计算一些耐用的东西(比如一张桌子),把成本除以你预计使用该东西的年数。
总之,到目前为止,这基本上就是 Caleb 的博客文章中的内容,所以为了简单起见,我将假设同样的 10 万美元的名义工资和 14 万美元的等效业务成本。(当然,一切都要根据自己的情况进行调整。)现在你需要想办法收回这笔成本。澳大利亚一年大约有 255 个工作日,所以如果你能把它们全部外包出去,你每天要收取 550 美元(外加销售税)。在现实中,你不可能为一整年的工作计费。我采取了一种风险更高的方法,在我目前从事自营职业的过去 6 年里,我的平均回报率约为 60%-70%。[埃森哲的年度财务报告][2] 说他们的承包商的“利用率”大约为 90%,我想这意味着他们付费了 90% 的总工作日的费用。让我们假设你的工作适度75% 的工作日都有付账。这意味着你可以在 255 天的 75%(即 191 天) 里收回了 14 万美元的成本,每天开出 730 美元的账单(加上销售税)。
### 误区
刚接触合同的人通常会对这样的数字做出反应,并会想,“见鬼?!这么高啊!”。这只是一个计算示例,但服务价格通常相当于你天真猜测的全职雇员工资的两倍或两倍以上。然而,这日薪是通过一个简单的计算得出的,那就是你需要收取多少钱才能获得相当于 10 万美元的工资。这是一回事。不这样想才是关键的错误。
新的承包商往往还不敢确定,他们要求那么多,听起来是不是很贪婪?如果你的客户有考虑采购你,他们也在做大致相同的计算。“我可以付给 Gentle Blog Reader 每天 730 美元,只要我愿意,我也可以花大约 14 万美元雇佣一个我甚至不是每天都真正需要的全职雇员。”从雇主的角度来看10 万美元的薪水实际上也不是 10 万美元。把价格建立在名义基本工资的基础上是没有意义的。即使你是在销售 B2C 产品,你的潜在竞争对手也不会降价,至少不会持续降价。
### 为什么这很重要
这个具体的例子是针对承包的,但这是商业经济学的一条基本规则:除非你正在尝试一些风险极高的高收入行为(我们知道 [Pets.com][3] 的结果),否则你需要计算出你的成本,并设定足够高的价格来弥补这些成本。
一些人仍然对他们需要设定的价格感到不安,他们认为降低价格是合理的。也许他们会这样想:“我是个很好的人,如果我每天只收 400 美元,我的客户会更高兴。”问题是你得不到同样的客户。那些愿意为雇员支付 10 万美元年薪的客户,不会为承包商支付 400 美元一天来做同样的工作。相反,在实践中,你可能会得到一些好客户,他们只是没有每天 730 美元的预算,但同时你也会得到一大堆非常糟糕的客户。想想看。如果一个陌生人以 50 美元的价格卖给你一枚看起来很精美的钻戒,你会付钱吗?还是宁愿以正常价格买另一枚戒指?
我要强调的是,我只是从 Caleb 的博客文章中提取了数据,而且一切都是相对的。用你自己的数字代替吧。在世界上大多数地区,每天 400 美元可能是一个令人难以置信的价格。然而,如果你是硅谷的一名高级金融科技开发人员,每天收费 400 美元只会让你成为吸引糟糕客户的磁铁。大多数优秀的人都会知道有些事情不对劲,他们会被吓跑。
我说的糟糕客户是什么意思?浏览一下 [“来自地狱的客户”博客][4] 吧。它包括很多基本的烦恼,比如客户永远不会得到满足,或者提出无理要求,或者浪费你的时间,一直到彻头彻尾的辱骂,或者让你按规格工作,然后辩称自己不应该付钱,因为“我不想要”。有些客户根本就不付钱。
如果你不够重视你自己的产品,也不要因为你的客户不够重视你的产品而感到震惊。
不过,情况会变得更糟。好客户倾向于与其他好客户合作。如果你总是按时做到,你会和那些浪费你时间的人一起工作吗?如果你尊重他人,你会和那些不讲道理、辱骂他人的人一起工作吗?一般来说,你的好客户会把你介绍给其他好客户。糟糕的客户则恰恰相反,如果他们甚至会感激地把你推荐给任何人的话。因此,如果你的价格合适,你的生意会随着你的声誉而增长。如果你收费过低,你会发现自己陷入了一个恶性循环,你不仅会赔钱,而且会发现越来越难获得适当的报酬。
这些都只是平均水平,如果你幸运的话,低收费也能吸引到好客户,如果你不幸的话,价格合理也仍然会得到坏客户。然而,如果你的收入已经很低了,那么每一个坏客户都会对你造成伤害。希望超越平均水平不是一个好计划。
### “但没人付那么多钱!”
假设你是一名经验丰富的全职工程师,你决定尝试独立工作。你可能会发现,你的计算比率似乎比你在自由职业网站上看到的要高。这是因为在自由职业网站上建立声誉很难。自由职业者网站对于那些主要想要低价的临时买家来说是最有用的。
我想,很多聪明的工程师都认为,职业社交是很难的,而且需要非常外向的性格,所以他们不得不依靠自由职业网站来工作。坏消息是,你需要建立良好的声誉才能拿到高薪。好消息是,只要他们拥有所需的技能,大多数人都可以做到。社交并不是去参加所谓的“社交活动”(实际上,这些活动对社交来说都很糟糕)。建立关系网的技巧可以写一篇全新的博客文章,但关键是在他们的日常生活中找到好客户,并做一些让他们不断回头的事情,甚至可能让你找到其他好客户。
在任何情况下,不要让自由职业网站或其他任何东西把你的价格定在你可以从全职工资中拿到的等价物以下。事实上,[你甚至可能比你现在的工资还高][5],这就是为什么这是 “定价基础原则”。收费过低会扼杀你的自主创业生涯。
--------------------------------------------------------------------------------
via: https://theartofmachinery.com/2021/07/04/pricing_as_contractor_101.html
作者:[Simon Arneaud][a]
选题:[lujun9972][b]
译者:[CN-QUAN](https://github.com/CN-QUAN)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://theartofmachinery.com
[b]: https://github.com/lujun9972
[1]: https://calebporzio.com/making-100k-as-an-employee-versus-being-self-employed
[2]: https://www.accenture.com/au-en/about/company/annual-report
[3]: https://en.wikipedia.org/wiki/Pets.com
[4]: https://clientsfromhell.net/
[5]: https://theartofmachinery.com/2018/10/07/payrise_by_switching_jobs.html

View File

@ -0,0 +1,245 @@
[#]: subject: "Bash Shell Scripting for beginners (Part 2)"
[#]: via: "https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-2/"
[#]: author: "Matthew Darnell https://fedoramagazine.org/author/zexcon/"
[#]: collector: "lujun9972"
[#]: translator: "unigeorge"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14198-1.html"
Bash Shell 脚本新手指南(二)
======
![][1]
欢迎来到面向初学者的 Bash Shell 脚本知识第二部分。本篇将就 Bash 脚本一些更独特的方面进行深入探讨。我们会用到一些 [上篇][5] 中已经熟悉的命令(如果遇到新命令,会给出讲解),进而涵盖一些标准输出、标准输入、标准错误、“管道”和数据重定向的相关知识。
### 使用 # 添加注释
随着脚本变得愈加复杂和实用,我们需要添加注释,以便记住程序在做什么。如果与其他人分享你的脚本,注释也将帮助他们理解思考过程,以及更好理解你的脚本实现的功能。想一想上篇文章中的数学方程,我们在新版脚本中添加了一些注释。注意,在 `learnToScript.sh` 文件(如下所示)中,注释是前面带有 `#` 号的行。当脚本运行时,这些注释行并不会出现。
```
#!/bin/bash
#Let's pick up from our last article. We
#learned how to use mathematical equations
#in bash scripting.
echo $((5+3))
echo $((5-3))
echo $((5*3))
echo $((5/3))
```
```
[zexcon ~]$ ./learnToScript.sh
8
2
15
1
```
### 管道符 |
我们将使用另一个名为 `grep` 的工具来介绍管道运算符。
> `grep` 可以在输入文件中搜索可以匹配指定模式的行。默认情况下,`grep` 会输出相应的匹配行。
>
> <https://www.gnu.org/software/grep/>
Paul W. Frields 在 《Fedora 杂志》上的文章很好地介绍了关于 _grep_ 的知识。
> [命令行快速小技巧:使用 grep 进行搜索][4]
管道键在键盘上位于回车键上方,可以在英文状态下按 `Shift + \` 输入。
现在你已经略微熟悉了 `grep`,接下来看一个使用管道命令的示例。在命令行输入 `ls -l | grep learn`
```
[zexcon ~]$ ls -l | grep learn
-rwxrw-rw-. 1 zexcon zexcon 70 Sep 17 10:10 learnToScript.sh
```
通常 `ls -l` 命令会在屏幕上显示文件列表。这里 `ls -l` 命令的完整结果通过管道传送到搜索字符串 `learn``grep` 命令中。你可以将管道命令想象成一个过滤器。先运行一个命令(本例中为 `ls -l`,结果会给出目录中的文件),这些结果通过管道命令给到 `grep`,后者会在其中搜索 `learn`,并且只显示符合条件的目标行。
下面再看一个例子以巩固相关知识。`less` 命令可以让用户查看超出一个屏幕尺寸的命令结果。以下是命令手册页中关于 `less` 的简要说明。
> `less` 是一个类似于 `more` 的程序,但它允许在文件中向后或向前进行翻页移动。此外,`less` 不必在开始之前读取整个输入文件,因此对于大型输入文件而言,它比 `vi` 等文本编辑器启动更快。该命令较少使用 termcap或某些系统上的 terminfo因此可以在各种终端上运行。甚至还在一定程度上支持用于硬拷贝终端的端口。在硬拷贝终端上显示在屏幕顶部的行会以插入符号为前缀。
>
> Fedora 34 手册页
下面让我们看看管道命令和 `less` 命令结合使用会是什么样子。
```
[zexcon ~]$ ls -l /etc | less
```
```
total 1504
drwxr-xr-x. 1 root root 126 Jul 7 17:46 abrt
-rw-r--r--. 1 root root 18 Jul 7 16:04 adjtime
-rw-r--r--. 1 root root 1529 Jun 23 2020 aliases
drwxr-xr-x. 1 root root 70 Jul 7 17:47 alsa
drwxr-xr-x. 1 root root 14 Apr 23 05:58 cron.d
drwxr-xr-x. 1 root root 0 Jan 25 2021 cron.daily
:
:
```
为便于阅读,此处对结果进行了修剪。用户可以使用键盘上的箭头键向上或向下滚动,进而控制显示。如果使用命令行,结果超出屏幕的话,用户可能会看不到结果的开头行。要退出 `less` 屏幕,只需点击 `q` 键。
### 标准输出stdout重定向 >、>>、1>、1>>
`>``>>` 符号之前的命令输出结果,会被写入到紧跟的文件名对应的文件中。`>` 和 `1>` 具有相同的效果,因为 `1` 就代表着标准输出。如果不显式指定 `1`,则默认为标准输出。`>>` 和 `1>>` 将数据附加到文件的末尾。使用 `>``>>` 时,如果文件不存在,则会创建对应文件。
例如,如果你想查看 `ping` 命令的输出,以查看它是否丢弃了数据包。与其关注控制台,不如将输出结果重定向到文件中,这样你就可以稍后再回来查看数据包是否被丢弃。下面是使用 `>` 的重定向测试。
```
[zexcon ~]$ ls -l ~ > learnToScriptOutput
```
该命令会获取本应输出到终端的结果(`~` 代表家目录),并将其重定向到 `learnToScriptOutput` 文件。注意,我们并未手动创建 `learnToScriptOutput`,系统会自动创建该文件。
```
total 128
drwxr-xr-x. 1 zexcon zexcon 268 Oct 1 16:02 Desktop
drwxr-xr-x. 1 zexcon zexcon 80 Sep 16 08:53 Documents
drwxr-xr-x. 1 zexcon zexcon 0 Oct 1 15:59 Downloads
-rw-rw-r--. 1 zexcon zexcon 685 Oct 4 16:00 learnToScriptAllOutput
-rw-rw-r--. 1 zexcon zexcon 23 Oct 4 12:42 learnToScriptInput
-rw-rw-r--. 1 zexcon zexcon 0 Oct 4 16:42 learnToScriptOutput
-rw-rw-r--. 1 zexcon zexcon 52 Oct 4 16:07 learnToScriptOutputError
-rwxrw-rw-. 1 zexcon zexcon 477 Oct 4 15:01 learnToScript.sh
drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Videos
```
### 标准错误stderr重定向 `2>`、`2>>`
`>``>>` 符号之前命令的错误信息输出,会被写入到紧跟的文件名对应的文件中。`2>` 和 `2>>` 具有相同的效果,但 `2>>` 是将数据追加到文件末尾。你可能会想,这有什么用?不妨假象一下用户只想捕获错误信息的场景,然后你就会意识到 `2>``2>>` 的作用。数字 `2` 表示本应输出到终端的标准错误信息输出。现在我们试着追踪一个不存在的文件,以试试这个知识点。
```
[zexcon ~]$ ls -l /etc/invalidTest 2> learnToScriptOutputError
```
这会生成错误信息,并将错误信息重定向输入到 `learnToScriptOutputError` 文件中。
```
ls: cannot access '/etc/invalidTest': No such file or directory
```
### 所有输出重定向 &>、&>>、|&
如果你不想将标准输出(`stdout`)和标准错误信息(`stderr`)写入不同的文件,那么在 Bash 5 中,你可以使用 `&>` 将标准输出和标准错误重定向到同一个文件,或者使用 `&>>` 追加到文件末尾。
```
[zexcon ~]$ ls -l ~ &>> learnToScriptAllOutput
[zexcon ~]$ ls -l /etc/invalidTest &>> learnToScriptAllOutput
```
运行这些命令后,两者的输出都会进入同一个文件中,而不会区分是错误信息还是标准输出。
```
total 128
drwxr-xr-x. 1 zexcon zexcon 268 Oct 1 16:02 Desktop
drwxr-xr-x. 1 zexcon zexcon 80 Sep 16 08:53 Documents
drwxr-xr-x. 1 zexcon zexcon 0 Oct 1 15:59 Downloads
-rw-rw-r--. 1 zexcon zexcon 685 Oct 4 16:00 learnToScriptAllOutput
-rw-rw-r--. 1 zexcon zexcon 23 Oct 4 12:42 learnToScriptInput
-rw-rw-r--. 1 zexcon zexcon 0 Oct 4 16:42 learnToScriptOutput
-rw-rw-r--. 1 zexcon zexcon 52 Oct 4 16:07 learnToScriptOutputError
-rwxrw-rw-. 1 zexcon zexcon 477 Oct 4 15:01 learnToScript.sh
drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Videos
ls: cannot access '/etc/invalidTest': No such file or directory
```
如果你直接使用命令行操作,并希望将所有结果通过管道传输到另一个命令,可以选择使用 `|&` 实现。
```
[zexcon ~]$ ls -l |& grep learn
-rw-rw-r--. 1 zexcon zexcon 1197 Oct 18 09:46 learnToScriptAllOutput
-rw-rw-r--. 1 zexcon zexcon 343 Oct 14 10:47 learnToScriptError
-rw-rw-r--. 1 zexcon zexcon 0 Oct 14 11:11 learnToScriptOut
-rw-rw-r--. 1 zexcon zexcon 348 Oct 14 10:27 learnToScriptOutError
-rwxr-x---. 1 zexcon zexcon 328 Oct 18 09:46 learnToScript.sh
[zexcon ~]$
```
### 标准输入stdin
在本篇和上篇文章中我们已经多次使用过标准输入stdin因为在每次使用键盘输入时我们都在使用标准输入。为了区别通常意义上的“键盘即标准输入”这次我们尝试在脚本中使用 `read` 命令。下面的脚本中就使用了 `read` 命令,字面上就像“读取标准输入”。
```
#!/bin/bash
#Here we are asking a question to prompt the user for standard input. i.e.keyboard
echo 'Please enter your name.'
#Here we are reading the standard input and assigning it to the variable name with the read command.
read name
#We are now going back to standard output, by using echo and printing your name to the command line.
echo "With standard input you have told me your name is: $name"
```
这个示例通过标准输出给出提示,提醒用户输入信息,然后从标准输入(键盘)获取信息,使用 `read` 将其存储在 `name` 变量中,并通过标准输出显示出 `name` 中的值。
```
[zexcon@fedora ~]$ ./learnToScript.sh
Please enter your name.
zexcon
With standard input you have told me your name is: zexcon
[zexcon@fedora ~]$
```
### 在脚本中使用
现在我们把学到的东西放入脚本中,学习一下如何实际应用。下面是增加了几行后的新版本 `learnToScript.sh` 文件。它用追加的方式将标准输出、标准错误信息,以及两者混合后的信息,分别写入到三个不同文件。它将标准输出写入 `learnToScriptStandardOutput`,标准错误信息写入 `learnToScriptStandardError`,二者共同都写入 `learnToScriptAllOutput` 文件。
```
#!/bin/bash
#As we know this article is about scripting. So let's
#use what we learned in a script.
#Let's get some information from the user and add it to our scripts with stanard input and read
echo "What is your name? "
read name
#Here standard output directed to append a file to learnToScirptStandardOutput
echo "$name, this will take standard output with append >> and redirect to learnToScriptStandardOutput." 1>> learnToScriptStandardOutput
#Here we are taking the standard error and appending it to learnToScriptStandardError but to see this we need to #create an error.
eco "Standard error with append >> redirect to learnToScriptStandardError." 2>> learnToScriptStandardError
#Here we are going to create an error and a standard output and see they go to the same place.
echo "Standard output with append >> redirect to learnToScriptAllOutput." &>> learnToScriptAllOutput
eco "Standard error with append >> redirect to learnToScriptAllOutput." &>> learnToScriptAllOutput
```
脚本在同一目录中创建了三个文件。命令 `echo` 故意输入错误LCTT 译注:缺少了字母 h以产生错误信息。如果查看三个文件你会在 `learnToScriptStandardOutput` 中看到一条信息,在 `learnToScriptStandardError` 中看到一条信息,在 `learnToScriptAllOutput` 中看到两条信息。另外,该脚本还会再次提示输入的 `name` 值,再将其写入 `learnToScriptStandardOutput` 中。
### 结语
至此你应该能够明确,可以在命令行中执行的操作,都可以在脚本中执行。在编写可能供他人使用的脚本时,文档非常重要。如果继续深入研究脚本,标准输出会显得更有意义,因为你将会控制它们的生成。在脚本中,你可以与命令行中操作时应用相同的内容。下一篇文章我们会讨论函数、循环,以及在此基础上进一步构建的结构。
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-2/
作者:[Matthew Darnell][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://fedoramagazine.org/author/zexcon/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2021/10/bash_shell_scripting_pt2-816x345.jpg
[2]: https://unsplash.com/@nbandana?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[3]: https://unsplash.com/s/photos/shell-scripting?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[4]: https://fedoramagazine.org/command-line-quick-tips-searching-with-grep/
[5]: https://linux.cn/article-14131-1.html

View File

@ -0,0 +1,72 @@
[#]: subject: "Linux Mints Brand New Edge ISO is Available to Download!"
[#]: via: "https://news.itsfoss.com/linux-mint-20-3-edge-iso/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14197-1.html"
Linux Mint 全新的 Edge ISO 已经可以下载了!
======
> Linux Mint 20.3 现在为 Cinnamon 版提供了一个单独的 Edge ISO以帮助用户使用最新一代的硬件
![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/mint-edge-iso.png?w=1200&ssl=1)
[Linux Mint 20.3][1] 带来了一些改进。然而,它是由 Linux 内核 5.4 LTS 驱动的。
因此,使用较新硬件的用户可能会发现启动时很麻烦,或者遇到其他与旧的 Linux 内核不兼容的问题。
幸运的是Linux Mint 20.3 现在有一个提供了 Linux 内核 5.13.0-25 的 Edge ISO。
### 带有 Linux 内核 5.13 的 Linux Mint 20.3
[Linux 内核 5.13][2] 通过 HDMI 引入了对 AMD GPU FreeSync 的支持,以及许多其他硬件改进。
因此,举例来说,如果你有一个 AMD GPU并且在 Linux Mint 20.3 上遇到了问题Edge ISO 可以派上用场。
是的,如果你有较新的硬件在使用 Linux Mint 20.3 时有问题,你可以试试 Edge ISO。
然而Linux 内核 5.13 并不完全支持所有现代硬件,如英特尔 Alder Lake 处理器。
考虑到英特尔的第 12 代产品系列已经可以供消费者使用,一个更新的 Linux 内核可能是一个更好的选择,但有总比没有好。
因此,有必要指出,使用 Edge ISO 不会神奇地解决最新一代硬件的问题。你必须了解了 [Linux 内核 5.13][2] 的详细变化/支持,然后再进行尝试。
### 下载 Linux Mint 20.3 Edge ISO
你可以选择下载单独的 Edge ISO 或从更新管理器中更新 Linux 内核。
![][3]
前往 “更新管理器”,然后从“查看”菜单中导航到 Linux 内核选项。你可以注意到,你可以安装其他可用的 Linux 内核(根据你的要求),如果需要,可以删除旧的内核。
建议不要删除旧的内核,除非你确定较新的版本能按预期工作。
![][4]
在进行内核升级之前,你应该备份你的重要文件,以防万一。
Edge ISO 只限于 Cinnamon 版。所以,你需要前往 Linux Mint 20.3 Cinnamon 页面下载该 ISO。
- [Linux Mint 20.3 CinnamonEdge版][5]
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/linux-mint-20-3-edge-iso/
作者:[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://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://news.itsfoss.com/linux-mint-20-3-una-release/
[2]: https://news.itsfoss.com/linux-kernel-5-13-release/
[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/linux-mint-edge-kernel.png?w=829&ssl=1
[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/update-manager-edge-kernel.png?w=825&ssl=1
[5]: https://www.linuxmint.com/edition.php?id=296

View File

@ -1,68 +0,0 @@
[#]: subject: "Linux Mints Brand New Edge ISO is Available to Download!"
[#]: via: "https://news.itsfoss.com/linux-mint-20-3-edge-iso/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Linux Mints Brand New Edge ISO is Available to Download!
======
[Linux Mint 20.3 release][1] brings in several improvements. However, it is powered by Linux Kernel 5.4 LTS.
So, users with newer hardware may find it troublesome to boot or run into other incompatibility issues with an older Linux Kernel.
Fortunately, Linux Mint 20.3 now has an Edge ISO featuring Linux Kernel 5.13.0-25.
### Linux Kernel 5.13 With Linux Mint 20.3
[Linux Kernel 5.13][2] introduced support for AMD GPU FreeSync via HDMI along with many other hardware improvements.
So, for instance, if you have an AMD GPU and have issues with Linux Mint 20.3, the Edge ISO can come in handy.
Yes, if you have newer hardware having trouble with Linux Mint 20.3, you can try the Edge ISO.
However, Linux Kernel 5.13 did not fully support all the modern hardware like Intel Alder Lake processors.
Considering that Intels 12th Gen lineup is already available for consumers, a more recent Linux Kernel could have been a better choice, but its better than nothing.
So, it is essential to note that using the Edge ISO would not magically resolve issues with the latest-gen hardware. You will have to go through the detailed changes/support with [Linux Kernel 5.13][2] and then proceed to try it out.
### Download Linux Mint 20.3 Edge ISO
You can choose to download the separate Edge ISO or update the Linux Kernel from the update manager.
![][3]
Head to the “**Update Manager**” and then navigate to the Linux Kernels option from the View menu. As you can notice, you can install other available Linux Kernels (as per your requirements) and remove the older ones, if needed.
It is recommended not to remove an older kernel unless youre sure that the newer version works as expected.
![][4]
Before proceeding with a kernel upgrade, you might want to back up your important files, just in case.
The Edge ISO is limited to the Cinnamon edition. So, you will need to head to Linux Mint 20.3 Cinnamon page to download the ISO.
[Linux Mint 20.3 Cinnamon (Edge) Edition][5]
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/linux-mint-20-3-edge-iso/
作者:[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://news.itsfoss.com/linux-mint-20-3-una-release/
[2]: https://news.itsfoss.com/linux-kernel-5-13-release/
[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUyMyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjIzMyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[5]: https://www.linuxmint.com/edition.php?id=296

View File

@ -1,72 +0,0 @@
[#]: subject: "Why now is a great time to consider a career in open source hardware"
[#]: via: "https://opensource.com/article/21/11/open-source-hardware-careers"
[#]: author: "Joshua Pearce https://opensource.com/users/jmpearce"
[#]: collector: "lujun9972"
[#]: translator: "zengyi1001"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Why now is a great time to consider a career in open source hardware
======
Open source hardware is now a field of its own and it is growing
rapidly.
![open source hardware shaking hands][1]
It has become commonplace in the software industry for programmers of all flavors to build careers writing code that releases to the commons with open source licenses. Industry headhunters often demand access to the code to vet future employees. Those that focus their career on open source development get rewarded. According to payscale.com, Linux sysadmins earn more than their Windows counterparts, indicating better pay and job security for jobs in open source software. There's also a good feeling (maybe even karma) that comes with sharing your work. You know you are creating value literally for the entire world. Historically, such opportunities did not exist for those of us that work in open hardware. 
Twenty years or so ago, almost no one even knew what open source hardware was, let alone planned a career around it. In 2000, for example, out of the more than 2 million academic papers published that year in the entire world, only seven articles even mentioned "open source hardware" at all. When I first wrote [_Open-Source Lab_][2], I'd collected every example (only a few dozen) and could easily keep up and read every open hardware article that got published to post them on a wiki. I am happy to report that is no longer physically possible. There have already been over 1,500 articles that discuss "open source hardware" this year, and I am sure many more will be out by year's end. Open source hardware is now a field of its own, with a few journals dedicated to it specifically (for example, [_HardwareX_][3] and the [_Journal of Open Hardware_][4]). In a wide range of fields, dozens of traditional journals now routinely cover the latest open hardware developments.
![Smart open source 3-D printing][5]
Developing smart open source 3-D printing (Joshua Pearce, [GNU-FDL][6])
Even a decade ago, stressing open source hardware development was somewhat of a risk from a career perspective. I remember downplaying it on my resume for my last job and stressing my more conventional work. Supervisors in industry and academia had difficulty figuring out how you'd capture value if designs were given away and got manufactured elsewhere. This has all been changing. Like free and open source software, open source hardware development is faster and, dare I say, superior to proprietary approaches.
![Open source recycle bot][7]
(Joshua Pearce, [GNU-FDL][6])
There are plenty of successful [open hardware business models][8] for every kind of enterprise. With the rise of digital manufacturing (largely due to open source development), the lines have blurred between open source software and open source hardware. Open source software like [FreeCAD][9] enables open designs to be made and then used in built-in CAM to get fabricated on open source laser cutters, CNC mills, or 3-D printers. [OpenSCAD][10], an open source script-based CAD package, in particular, really blurs the lines between software and hardware so much that code and physical design become synonymous. Many of us started speaking out about open hardware openly. I made it a core thrust of my research program, first making my own equipment open source and then working on open hardware development for others. I was far from alone. As a community, we had gained enough critical mass that the [Open Source Hardware Association][11] (OSHWA) got founded in 2012. Today, almost a decade later, career prospects in open source hardware are totally different: Hundreds of open source hardware companies exist, the Internet is swimming with millions (millions!) of open source designs, and the interest in open source hardware in the academic literature has been rising exponentially. 
![Open source production for solar photovoltaics][12]
Developing open source production for solar photovoltaics (Joshua Pearce, [GNU-FDL][6])
There are even jobs meant to push a faster transition to ubiquitous open source hardware. For example, the Internet of Production (IoP) Alliance in developing Open Data Standards and growing the community of users of these standards has [positions open now][13] for Operations &amp; Communications Officer, Data standards Community Support Manager, and DevOps engineer. I was just hired into a tenured endowed chair at [Western University in Canada,][14] a top 1% global university, **because** of my open source hardware work, not in spite of it. The position is cross-pointed with the [Ivey Business School,][15] the #1 business school in Canada. My job is to help the University rapidly evolve to take advantage of open source technology development opportunities. To put my money where my mouth is, I am [currently hiring][16] graduate students at the masters and PhD levels, including a full-tuition scholarship and a living stipend. These [Free Appropriate Sustainability Technology (FAST) Lab][17] graduate engineering positions are specifically reserved for developing open source hardware for a range of applications covering solar photovoltaic systems, distributed recycling, and emergency food production. This type of work gets more frequently financed by funders who want to maximize [return on their investment for research][18]. Entire nations are moving in this direction. The latest good example is France, which just published its [second plan for Open Science][19]. I have noticed a marked uptick in the number of "open source" keyword grants listed on [GrantForward][20] for open source funding in the US. Many foundations have already received the open source memo loud and clear—so there is a growing deluge of opportunities in open source R&amp;D.
So if you have not already, maybe it is time for you to consider open source as a career, even if you are an engineer that likes to develop hardware.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/11/open-source-hardware-careers
作者:[Joshua Pearce][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/jmpearce
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open-source-hardware.png?itok=vS4MBRSh (shaking hands open source hardware)
[2]: https://www.appropedia.org/Open-source_Lab
[3]: https://www.hardware-x.com/
[4]: https://openhardware.metajnl.com/
[5]: https://opensource.com/sites/default/files/uploads/smart-open-source-3d-printing.png (Smart open source 3-D printing)
[6]: https://www.gnu.org/licenses/fdl-1.3.en.html
[7]: https://opensource.com/sites/default/files/pictures/open-source-recyclebot_0.jpg (Open source recycle bot)
[8]: https://doi.org/10.5334/joh.4
[9]: https://www.freecadweb.org/
[10]: https://openscad.org/
[11]: https://www.oshwa.org/
[12]: https://opensource.com/sites/default/files/uploads/open-source-solar-photovoltaics.png (Open source production for solar photovoltaics)
[13]: https://www.internetofproduction.org/hiring
[14]: https://www.uwo.ca/
[15]: https://www.ivey.uwo.ca/
[16]: https://www.appropedia.org/FAST_application_process
[17]: https://www.appropedia.org/Category:FAST
[18]: https://www.academia.edu/13799962/Return_on_Investment_for_Open_Source_Hardware_Development
[19]: https://www.ouvrirlascience.fr/wp-content/uploads/2021/10/Second_French_Plan-for-Open-Science_web.pdf
[20]: https://www.grantforward.com/index

View File

@ -1,281 +0,0 @@
[#]: subject: "Bash Shell Scripting for beginners (Part 2)"
[#]: via: "https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-2/"
[#]: author: "Matthew Darnell https://fedoramagazine.org/author/zexcon/"
[#]: collector: "lujun9972"
[#]: translator: "unigeorge"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Bash Shell Scripting for beginners (Part 2)
======
![][1]
Photo by [N Bandaru][2] on [Unsplash][3]
Welcome to part 2 of Bash Shell Scripting at a beginner level. This article will dive into some more unique aspects of bash scripting. It will continue to use familiar commands, with an explain of anything new, and cover standard output standard input, standard error, the “pipe”, and data redirection.
### Adding comments #
As your scripts get more complicated and functional you will need to add comments to remember what you were doing. If you share your scripts with others, comments will help them understand the thought process and what you intended for your script to do. From the last article recall there were mathematical equations. Some comments have been added in the new version. Notice that in the _learnToScript.sh_ file (reproduced below) the comments are the lines with the hash sign before them. When the script runs these lines do not appear.
```
#!/bin/bash
#Let's pick up from our last article. We
#learned how to use mathematical equations
#in bash scripting.
echo $((5+3))
echo $((5-3))
echo $((5*3))
echo $((5/3))
```
```
[zexcon ~]$ ./learnToScript.sh
8
2
15
1
```
### Pipe Operator |
We will use another tool called _grep_ to introduce the pipe operator.
> Grep searches one or more input files for lines containing a match to a specified pattern. By default, Grep outputs the matching lines.
>
> <https://www.gnu.org/software/grep/>
Paul W. Frields article in the Fedora Magazine provides a good background on _grep_.
> [Command line quick tips: Searching with grep][4]
You will find the pipe key above the Enter key. Enter it by pressing Shift + \\. (English Keyboard)
Now that you are all freshened up on grep, look at an example of the use of the pipe command. At the command line type in _ls -l | grep_ _learn_
```
[zexcon ~]$ ls -l | grep learn
-rwxrw-rw-. 1 zexcon zexcon 70 Sep 17 10:10 learnToScript.sh
```
Normally the _ls -l_ command would provide a list of the files on your screen. Here the full results of the _ls_ _-l_ command are piped into the grep command which searches for the string _learn_. Think of the pipe command like a filter. A command is run, in this case _ls -l_, and the results are limited to the files inside your directory. These results are sent via the pipe command to _grep_ which searches for the work _learn_ and only that line appears.
Look at one more example to try and nail this home. The _less_ command will allow you to see the results of a command that would extend beyond one screen size. Here is a quick description from the man pages for the _less_ command.
> Less  is a program similar to more(1), but which allows backward movement in the file as well as
> forward movement.  Also, less does not have to read the entire input file  before  starting,  so
> with  large input files it starts up faster than text editors like vi(1).  Less uses termcap (or
> terminfo on some systems), so it can run on a variety of terminals.  There is even limited  sup
> port  for hardcopy terminals.  (On a hardcopy terminal, lines which should be printed at the top
> of the screen are prefixed with a caret.)
>
> Fedora 34 Manual(man) Pages
So lets see what it looks like utilizing the pipe and the _less_ command
```
[zexcon ~]$ ls -l /etc | less
```
```
total 1504
drwxr-xr-x. 1 root root 126 Jul 7 17:46 abrt
-rw-r--r--. 1 root root 18 Jul 7 16:04 adjtime
-rw-r--r--. 1 root root 1529 Jun 23 2020 aliases
drwxr-xr-x. 1 root root 70 Jul 7 17:47 alsa
drwxr-xr-x. 1 root root 14 Apr 23 05:58 cron.d
drwxr-xr-x. 1 root root 0 Jan 25 2021 cron.daily
:
:
```
The results have been trimmed, here, for readability. Use the arrow keys on the keyboard to scroll up or down. Unlike the command line, where you might miss the top of the results if they scroll off screen, you can control the display. To get out of the _less_ screen tap the _q_ key.
### Standard Output (stdout), &gt;, &gt;&gt;, 1&gt;, and 1&gt;&gt;
The output of a command preceding the &gt; or &gt;&gt; is sent to a file whose name follows. Keep in mind that &gt; and 1&gt; have the same results since the 1 stands for stdout (the standard output). Stdout is assumed if it does not appear. The &gt;&gt; and 1&gt;&gt; will append the data to the end of the file. In each case (&gt; or &gt;&gt;) the file is created if it does not exist.
As an example, say you want to watch the ping command output to see if it dropped a packet. Rather than sit and watch the console, redirect the output to a file. You can come back later and see if packets were dropped. Here is a test of the redirect using _&gt;_.
```
[zexcon ~]$ ls -l ~ > learnToScriptOutput
```
This takes the normal results you see in the terminal (recall ~ is your home directory) and redirects it to the _learnToScriptOutput_ file. Did you notice that _learnToScriptOutput_ was never created but now the file exists? Kind of cool.
```
total 128
drwxr-xr-x. 1 zexcon zexcon 268 Oct 1 16:02 Desktop
drwxr-xr-x. 1 zexcon zexcon 80 Sep 16 08:53 Documents
drwxr-xr-x. 1 zexcon zexcon 0 Oct 1 15:59 Downloads
-rw-rw-r--. 1 zexcon zexcon 685 Oct 4 16:00 learnToScriptAllOutput
-rw-rw-r--. 1 zexcon zexcon 23 Oct 4 12:42 learnToScriptInput
-rw-rw-r--. 1 zexcon zexcon 0 Oct 4 16:42 learnToScriptOutput
-rw-rw-r--. 1 zexcon zexcon 52 Oct 4 16:07 learnToScriptOutputError
-rwxrw-rw-. 1 zexcon zexcon 477 Oct 4 15:01 learnToScript.sh
drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Videos
```
### Standard Error (stderr), 2&gt;, and 2&gt;&gt;
The error output of a command preceding the &gt; or &gt;&gt; is sent to a file whose name follows. Keep in mind that 2&gt; and 2&gt;&gt; have the same result but the 2&gt;&gt; will append the data to the end of the file. So what is the purpose of these? What if you only want to catch an error. Then the 2&gt; or 2&gt;&gt; is here to help. The 2 indicates the output that would normally go to stderr (standard error). Now put this into practice by listing a non-existent file.
```
[zexcon ~]$ ls -l /etc/invalidTest 2> learnToScriptOutputError
```
This takes the error results and redirects it to the _learnToScriptOutputError_ file.
```
ls: cannot access '/etc/invalidTest': No such file or directory
```
### All Output &amp;&gt;, &amp;&gt;&gt; and |&amp;
If you are thinking, I dont want to write both standard output (stdout) and standard error (stderr) to different files. You are in luck. In Bash 5 the preferred way to redirect both stdout and stderr to the same file is to use &amp;&gt; or, as you might guess, &amp;&gt;&gt; to append to a file.
```
[zexcon ~]$ ls -l ~ &>> learnToScriptAllOutput
[zexcon ~]$ ls -l /etc/invalidTest &>> learnToScriptAllOutput
```
After running these commands, the output of both appear in the same file without identifying error or a standard output.
```
total 128
drwxr-xr-x. 1 zexcon zexcon 268 Oct 1 16:02 Desktop
drwxr-xr-x. 1 zexcon zexcon 80 Sep 16 08:53 Documents
drwxr-xr-x. 1 zexcon zexcon 0 Oct 1 15:59 Downloads
-rw-rw-r--. 1 zexcon zexcon 685 Oct 4 16:00 learnToScriptAllOutput
-rw-rw-r--. 1 zexcon zexcon 23 Oct 4 12:42 learnToScriptInput
-rw-rw-r--. 1 zexcon zexcon 0 Oct 4 16:42 learnToScriptOutput
-rw-rw-r--. 1 zexcon zexcon 52 Oct 4 16:07 learnToScriptOutputError
-rwxrw-rw-. 1 zexcon zexcon 477 Oct 4 15:01 learnToScript.sh
drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Videos
ls: cannot access '/etc/invalidTest': No such file or directory
```
If you are working directly from the command line and looking to pipe all results to another command, you can use |&amp; for this purpose.
```
[zexcon ~]$ ls -l |& grep learn
-rw-rw-r--. 1 zexcon zexcon 1197 Oct 18 09:46 learnToScriptAllOutput
-rw-rw-r--. 1 zexcon zexcon 343 Oct 14 10:47 learnToScriptError
-rw-rw-r--. 1 zexcon zexcon 0 Oct 14 11:11 learnToScriptOut
-rw-rw-r--. 1 zexcon zexcon 348 Oct 14 10:27 learnToScriptOutError
-rwxr-x---. 1 zexcon zexcon 328 Oct 18 09:46 learnToScript.sh
[zexcon ~]$
```
### Standard Input (stdin)
You have used standard input (stdin) numerous times throughout articles 1 and 2 since your keyboard uses standard input every time you type a key. To give a bit of a change to the usual “its your keyboard”, lets use the _read_ command in a script. The _read_ command, used in the script below, does what it sounds like, reads standard input.
```
#!/bin/bash
#Here we are asking a question to prompt the user for standard input. i.e.keyboard
echo 'Please enter your name.'
#Here we are reading the standard input and assigning it to the variable name with the read command.
read name
#We are now going back to standard output, by using echo and printing your name to the command line.
echo "With standard input you have told me your name is: $name"
```
This example prompts for input via standard output, for information it obtains from standard input(keyboard), storing it in a variable called _name_ using _read_ and displays the value in _name_ via standard output.
```
[zexcon@fedora ~]$ ./learnToScript.sh
Please enter your name.
zexcon
With standard input you have told me your name is: zexcon
[zexcon@fedora ~]$
```
### Into the script…
Now put what has been learned in a script to see how it can be used. The following is a new version of the previous learnToScript.sh file. There are a few added lines. It uses the append options for standard output, standard error and both into one file. It will write the standard output into learnToScriptStandardOutput, standard error into learnToScriptStandardError and both output and error into learnToScriptAllOutput
```
#!/bin/bash
#As we know this article is about scripting. So let's
#use what we learned in a script.
#Let's get some information from the user and add it to our scripts with stanard input and read
echo "What is your name? "
read name
#Here standard output directed to append a file to learnToScirptStandardOutput
echo "$name, this will take standard output with append >> and redirect to learnToScriptStandardOutput." 1>> learnToScriptStandardOutput
#Here we are taking the standard error and appending it to learnToScriptStandardError but to see this we need to #create an error.
eco "Standard error with append >> redirect to learnToScriptStandardError." 2>> learnToScriptStandardError
#Here we are going to create an error and a standard output and see they go to the same place.
echo "Standard output with append >> redirect to learnToScriptAllOutput." &>> learnToScriptAllOutput
eco "Standard error with append >> redirect to learnToScriptAllOutput." &>> learnToScriptAllOutput
```
This example creates three files in the same directory. The command _echo_ is intentionally typed incorrectly to generate an error. If you check out all three files, you will see one message in learnToScriptStandardOutput, one in learnToScriptStandardError and two in learnToScriptAllOutput. Also notice the script prompts for a name which it writes to the learnToScriptStandardOutput.
# Conclusion
At this point it should start to be clear that anything you can do on the command line you can also do in a script. When writing a script that others might use, documentation is extremely important. Continuing the dive into scripting, the standard output will make more sense as you will be the one generating them. Inside a script you can use the same things used from the command line. The next article will get into functions, loops and things that will continue to build on this foundation.
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-2/
作者:[Matthew Darnell][a]
选题:[lujun9972][b]
译者:[unigeorge](https://github.com/unigeorge)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/author/zexcon/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2021/10/bash_shell_scripting_pt2-816x345.jpg
[2]: https://unsplash.com/@nbandana?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[3]: https://unsplash.com/s/photos/shell-scripting?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[4]: https://fedoramagazine.org/command-line-quick-tips-searching-with-grep/

View File

@ -1,91 +0,0 @@
[#]: subject: "Try FreeDOS in 2022"
[#]: via: "https://opensource.com/article/22/1/try-freedos"
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Try FreeDOS in 2022
======
15 resources for new users and longtime fans of this free operating
system.
![Puzzle pieces coming together to form a computer screen][1]
Throughout the 1980s and into the 1990s, DOS was king of the desktop. Not satisfied with a proprietary version of DOS, programmers worldwide worked together to create an open source version of DOS called FreeDOS, which first became available in 1994. [The FreeDOS Project][2] continues to grow in 2021 and beyond.
We've run several articles about FreeDOS on Opensource.com to help new users get started with FreeDOS and learn new programs. Here are a few of our most popular FreeDOS articles from the last year:
### New to FreeDOS
Are you new to FreeDOS? If you'd like to learn the basics of how to boot and run FreeDOS, check out these articles:
* [Get started with FreeDOS][3]: It looks like retro computing, but FreeDOS is a modern OS you can use to get things done.
* [How FreeDOS boots][4]: Learn how your computer boots up and starts FreeDOS, from power on to the command-line prompt.
* [Configure FreeDOS in plain text][5]: Learn how to configure FreeDOS with the `fdconfig.sys` file.
* [How to navigate FreeDOS with CD and DIR][6]: Armed with just two commands, `DIR` and `CD`, you can navigate your FreeDOS system from the command line.
* [Set and use environment variables in FreeDOS][7]: Environment variables are helpful in almost every command-line environment, including FreeDOS.
### FreeDOS for Linux users
If you're already familiar with the Linux command line, you might like to try these commands and programs that create a similar environment on FreeDOS:
* [FreeDOS commands for Linux fans][8]: If you're already familiar with the Linux command line, try these commands to help ease into FreeDOS.
* [Edit text like Emacs in FreeDOS][9]: If you're already familiar with GNU Emacs, you should feel right at home in Freemacs.
* [Copy files between Linux and FreeDOS][10]: Learn how to transfer files between a FreeDOS virtual machine and a Linux desktop system.
* [How to archive files on FreeDOS][11]: There's a version of ****`tar` on FreeDOS, but the standard way to archive on DOS is Zip and Unzip.
* [Use this nostalgic text editor on FreeDOS][12]: Reminiscent of Linux ed(1), Edlin is a joy to use when you want to edit text the old-school way.
### Using FreeDOS
Once you've booted into FreeDOS, you can use these great tools and apps to get work done or to install other software:
* [How to use the FreeDOS text editor][13]: FreeDOS provides a user-friendly text editor called FreeDOS Edit.
* [Listen to music on FreeDOS][14]: Mplayer is an open source media player usually found on Linux, Windows, Mac, and DOS.
* [Install and remove software packages on FreeDOS][15]: Learn how to use FDIMPLES, the FreeDOS package manager, to install and remove packages on your FreeDOS system.
* [Why I love programming on FreeDOS with GW-BASIC][16]: BASIC was my entry into computer programming. I haven't written BASIC code in years, but I'll always have a fondness for BASIC and GW-BASIC.
* [Program on FreeDOS with Bywater BASIC][17]: Install Bywater BASIC on your FreeDOS system and start experimenting with BASIC programming.
Throughout its nearly 30-year journey, FreeDOS has tried to be a modern DOS. If you'd like to learn more, you can read about the origins and development of FreeDOS in [A brief history of FreeDOS][18]. Also, check out Don Watkins' interview about FreeDOS in [How a college student founded a free and open source operating system][19].
If you'd like to try FreeDOS, download FreeDOS 1.3 RC5, released in December 2021. This version has a ton of new changes and improvements, including an updated kernel and command shell, new programs and games, better international support, and network support. Download FreeDOS 1.3 RC5 from the [FreeDOS website][2].
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/1/try-freedos
作者:[Jim Hall][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/jim-hall
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen)
[2]: https://www.freedos.org/
[3]: https://opensource.com/article/21/6/get-started-freedos
[4]: https://opensource.com/article/21/6/freedos-boots
[5]: https://opensource.com/article/21/6/freedos-fdconfigsys
[6]: https://opensource.com/article/21/6/navigate-freedos-cd-dir
[7]: https://opensource.com/article/21/6/freedos-environment-variables
[8]: https://opensource.com/article/21/6/freedos-linux-users
[9]: https://opensource.com/article/21/6/freemacs
[10]: https://opensource.com/article/21/6/copy-files-linux-freedos
[11]: https://opensource.com/article/21/6/archive-files-freedos
[12]: https://opensource.com/article/21/6/edlin-freedos
[13]: https://opensource.com/article/21/6/freedos-text-editor
[14]: https://opensource.com/article/21/6/listen-music-freedos
[15]: https://opensource.com/article/21/6/freedos-package-manager
[16]: https://opensource.com/article/21/6/freedos-gw-basic
[17]: https://opensource.com/article/21/6/freedos-bywater-basic
[18]: https://opensource.com/article/21/6/history-freedos
[19]: https://opensource.com/article/21/6/freedos-founder

View File

@ -2,7 +2,7 @@
[#]: via: "https://opensource.com/article/22/1/record-terminal-session-asciinema"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "

View File

@ -0,0 +1,259 @@
[#]: subject: "Manage your passwords in the Linux terminal"
[#]: via: "https://opensource.com/article/22/1/manage-passwords-linux-terminal"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Manage your passwords in the Linux terminal
======
Pass is a classic UNIX-style password management system that uses GnuPG
(GPG) for encryption, and the terminal as its primary interface.
![Linux keys on the keyboard for a desktop computer][1]
These days, we all have a few dozen passwords. Fortunately, the bulk of those passwords are probably for websites, and you probably access most websites through your internet browser, and most browsers have a built-in password manager. The most common internet browsers also have a synchronization feature to help you distribute your passwords between the browsers you run across all your devices, so you're never without your login information when you need it. If that's not enough for you, there are excellent open source projects like [BitWarden][2] that can host your encrypted passwords, ensuring that only you have the key to unlock them. These solutions help make maintaining unique passwords easy, and I use these convenient systems for a selection of passwords. But my main vault of password storage is a lot simpler than any of these methods. I primarily use [pass][3], a classic UNIX-style password management system that uses GnuPG (GPG) for encryption, and the terminal as its primary interface.
### Install pass
You can install the `pass` command from your distribution repository.
On Fedora, Mageia, and similar distributions, you can install it with your package manager:
```
`$ sudo dnf install pass`
```
On Elementary, Mint, and other Debian-based distributions:
```
`$ sudo apt install pass`
```
On macOS, you can install it using [Homebrew][4]:
```
`$ brew install pass`
```
### Configuring GnuPG
Before you can use `pass`, you need a valid PGP ("Pretty Good Privacy") key. If you already maintain a PGP key, you can skip this step, or you can choose to create a new key exclusively for use with `pass`. The most common open source PGP implementation is GnuPG (GPG), which ships with Linux, and you can install it on macOS from [gpgtools.org][5], Homebrew, or [Macports][6]. To create a GnuPG key, run this command:
```
`$ gpg --generate-key`
```
You're prompted for your name and email address and create a password for the key. Your key is a digital file, and your password is known only to you. Combined, these two things can lock and unlock encrypted information, such as a file containing a password.
A GPG key is much like a house key or a car key. Should you lose it, anything locked by it becomes unobtainable. Just knowing your password is not enough.
If you already manage several SSH keys, you're probably used to this. If you're new to digital encryption keys, it can take some getting used to. Backup your `~/.gnupg` directory, so you don't accidentally erase it the next time you decide to try an exciting new distro on a whim.
Make a backup and keep the backup safe.
### Configuring pass
To start using `pass`, you must initialize a _password store_, which is defined as a storage location configured to use a specific encryption key. You can indicate what GPG key you want to use for your password store by either the name associated with the key or the digital fingerprint. Your own name is usually the easier option:
```
$ pass init seth
mkdir: created directory '/home/seth/.password-store/'
Password store initialized for seth
```
If you've managed to forget your name, you can see the digital fingerprint and name associated with your key with the `gpg` command:
```
$ gpg --list-keys
gpg --list-keys
/home/seth/.gnupg/pubring.kbx
\-----------------------------
pub  ed25519 2022-01-06 [SC] [expires: 2024-01-06]
     2BFF94286461216C907CBA52F067996F13EF10D8
uid  [ultimate] Seth Kenlon &lt;[seth@example.com][7]&gt;
sub  cv25519 2022-01-06 [E] [expires: 2024-01-06]
```
Initializing a password store with the fingerprint is basically the same as with your name:
```
`$ pass init 2BFF94286461216C907CBA52F067996F13EF10D8`
```
### Store a password
Add a password to your password store with the `pass add` command:
```
$ pass add [www.example.com][8]
Enter password for [www.example.com][8]:
```
Enter the password you want to add when prompted.
The password now gets stored in your password store. You can take a look for yourself:
```
$ ls /root/.password-store/
[www.example.com.gpg][9]
```
Of course, the file is unreadable, and if you attempt to run `cat` or `less` on it, you'll get unprintable characters in your terminal (use `reset` to fix your terminal if its display gets too untidy.)
### Edit a password with pass
I use different user names for different activities online, so the username for a site is often just as important as the password. The `pass` system allows for this, even though it doesn't prompt you for it by default. You can add a user name to a password file using the `pass edit` command:
```
`$ pass edit www.example.com`
```
This opens a text editor (specifically the editor you have set as your `EDITOR` or `VISUAL` [environment variable][10]) displaying the contents of the `www.example.com` file. Currently, that's just a password, but you can add a user name and even another URL or any information you want. It's an encrypted file, so you're free to keep what you want in it.
```
bd%dc$3a49af49498bb6f31bc964718C
user: seth123
url: example.com
```
Save the file and close it.
### Get a password from pass
To see the contents of a password file, use the `pass show` command:
```
$ pass show [www.example.com][8]
bd%dc$3a49af49498bb6f31bc964718C
user: seth123
url: [www.example.org][11]
```
### Search for a password
Sometimes it's tough to remember whether a password is filed under `www.example.com` or just `example.com` or even something like `app.example.com`. Furthermore, some website infrastructures use different URLs for different site functions, so you might file a password away under `www.example.com` even though you also use the same login information for the partner site `www.example.org`.
When in doubt, use `grep`. The `pass grep` command shows all instances of a search term, either in a file name or in the contents of a file:
```
$ pass grep example
[www.example.com][8]:
url: [www.example.org][11]
```
### Using pass with a browser
I use `pass` for information beyond just internet passwords, but websites are where I most often need passwords. I usually have a terminal open somewhere on my computer, so it's not much trouble to **Alt+Tab** to a terminal and get the information I need with `pass`. But that's not what I do because there are plugins to integrate `pass` with web browsers.
#### Pass host script
First, install the `pass` host script:
```
`$ curl -sSL github.com/passff/passff-host/release/latest/download/install_host_app.sh`
```
This install script places a Python script that helps your browser access your password store and GPG keys. Run it along with the name of the browser you use (or nothing, to see all options):
```
`$ bash ./install_host_app.sh firefox`
```
If you use multiple browsers, you can install it for each.
#### Pass Add-on
Once you've installed the host application, you can install an add-on or extension for your browser. Search for the `PassFF` plugin in your browser's add-on or extension manager.
![PassFF][12]
(Seth Kenlon, [CC BY-SA 4.0][13])
Install the add-on, and then close and re-launch your browser.
Navigate to a site you've got a password for in your password store. There's now a small **P** icon in the right of your login text fields.
![PassFF browser prompt][14]
(Seth Kenlon, [CC BY-SA 4.0][13])
Click on the **P** button to see a list of matching site names in your password store.
![PassFF browser menu][15]
(Seth Kenlon, [CC BY-SA 4.0][13])
Click the pen-and-paper icon to fill in the form or the paper-airplane icon to fill and auto-submit the form.
Easy password management and fully integrated!
### Try pass as your Linux password manager
The `pass` command is a great option for users who want to manage passwords and personal information using tools they already use on a daily basis. If you rely on GPG and a terminal already, then you may enjoy the `pass` system. It's also an important option for users who don't want their passwords tied to a specific application. Maybe you don't use just one browser, or you don't like the idea that it might be difficult to extract your passwords from an application if you decide to stop using it. With `pass`, you maintain control of your secrets in a UNIX-like and straightforward system.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/1/manage-passwords-linux-terminal
作者:[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/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer)
[2]: http://bitwarden.com
[3]: https://www.passwordstore.org/
[4]: https://opensource.com/article/20/6/homebrew-mac
[5]: https://gpgtools.org/
[6]: https://opensource.com/article/20/11/macports
[7]: mailto:seth@example.com
[8]: http://www.example.com
[9]: http://www.example.com.gpg
[10]: https://opensource.com/article/19/8/what-are-environment-variables
[11]: http://www.example.org
[12]: https://opensource.com/sites/default/files/uploads/passff.jpg (PassFF)
[13]: https://creativecommons.org/licenses/by-sa/4.0/
[14]: https://opensource.com/sites/default/files/uploads/passff-button-web.jpg (PassFF browser prompt)
[15]: https://opensource.com/sites/default/files/uploads/passff-menu-web.jpg (PassFF browser menu)

View File

@ -0,0 +1,293 @@
[#]: subject: "Protect your PHP website from bots with this open source tool"
[#]: via: "https://opensource.com/article/22/1/php-website-bouncer-crowdsec"
[#]: author: "Philippe Humeau https://opensource.com/users/philippe-humeau"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Protect your PHP website from bots with this open source tool
======
The CrowdSec bouncer is designed to be included in any PHP application
to help block attackers.
![Security monster][1]
PHP is a widely-used programming language on the web, and it's estimated that nearly 80% of all websites use it. My team at [CrowdSec][2] decided that we needed to provide server admins with a PHP bouncer to help ward away bots and bad actors who may attempt to interact with PHP files.
CrowdSec bouncers can be set up at various levels of an applicative stack: [web server, firewall, CDN][3], and so on. This article looks at one more layer: setting up remediation directly at the application level.
Remediation directly in the application can be helpful for various reasons:
* It provides a business-logic answer to potential security threats.
* It gives freedom about how to respond to security issues.
While CrowdSec already publishes a WordPress bouncer, this PHP library is designed to be included in _any_ PHP application (Drupal, for example). The bouncer helps block attackers, challenging them with CAPTCHA to let humans through while blocking bots.
### Prerequisites
This tutorial assumes that you are running Drupal on a Linux server with [Apache as a web server.][4]
The first step is to [install CrowdSec][5] on your server. You can do this with an [official install script][6]. If you're on Fedora, CentOS, or similar, download the RPM version:
```
`$ curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh`
```
On Debian and Debian-based systems, download the DEB version:
```
`$ curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh`
```
These scripts are simple, so read through the one you download to verify that it imports a GPG key and configures a new repository. Once you're comfortable with what it does, execute it and then install.
```
`$ sudo dnf install crowdsec || sudo apt install crowdsec`
```
CrowdSec detects all the existing services on its own, so there should be no further configuration to get an immediately functional setup.
### Test the initial setup
Now that you have CrowdSec installed, launch a web application vulnerability scanner, such as [Nikto][7], and see how it behaves:
```
`$ ./nikto.pl -h http://<ip_or_domain>`
```
![nikto scan][8]
(Philippe Humeau, CC BY-SA 4.0)
The IP address has been detected and triggers various scenarios, the last one being **crowdsecurity/http-crawl-non_statics**.
![detected scan][9]
(Philippe Humeau, CC BY-SA 4.0)
However, CrowdSec only detects issues, and a bouncer is needed to apply remediation. Here comes the PHP bouncer.
### Remediate with the PHP bouncer
Now that you can detect malicious behaviors, you need to block the IP at the website level. At this time, there is no Drupal bouncer available. However, you can use the PHP bouncer directly.
How does it work? The PHP bouncer (like any other bouncer) makes an API call to the CrowdSec API and checks whether it should ban incoming IPs, send them a CAPTCHA, or allow them to pass.
The web server is Apache, so you can use the [install script for Apache][10].
```
$ git clone <https://github.com/crowdsecurity/cs-php-bouncer.git>
$ cd cs-php-bouncer/
$ ./install.sh --apache
```
![apache install script][11]
(Philippe Humeau, CC BY-SA 4.0)
The bouncer is configured to protect the whole website. Secure a specific part of the site by adapting the Apache configuration.
### Try to access the website
The PHP bouncer is installed and configured. You're banned due to the previous web vulnerability scan actions, but you can try to access the website:
![site access attempt][12]
(Philippe Humeau, CC BY-SA 4.0)
The bouncer successfully blocked your traffic. If you were not banned following a previous web vulnerability scan, you could add a manual decision with:
```
`$ cscli decisions add -i <your_ip>`
```
For the remaining tests, remove the current decisions:
```
`$ cscli decisions delete -i <your_ip>`
```
### Going further
I blocked the IP trying to mess with the PHP website. Its nice, but what about IPs trying to scan, crawl, or DDoS it? Those kinds of detections can lead to false positives, so why not return a CAPTCHA challenge to check whether it is an actual user (rather than a bot) instead of blocking the IP?
#### Detect crawlers and scanners
I dislike crawlers and bad user agents and there are various scenarios available on the [Hub][13] to spot them.
Ensure the `base-http-scenarios` collections from the Hub are downloaded with `cscli`:
```
$ cscli collections list | grep base-http-scenarios
crowdsecurity/base-http-scenarios  ✔️ enabled  /etc/crowdsec/collections/base-http-scenarios.yaml
```
If it is not the case, install it, and reload CrowdSec:
```
$ sudo cscli collections install crowdsecurity/base-http-scenarios
$ sudo systemctl reload crowdsec
```
#### Remedy with a CAPTCHA
Since detecting DDoS, crawlers, or malevolent user agents can lead to false positives, I prefer to return a CAPTCHA for any IP address triggering those scenarios to avoid blocking real users.
To achieve this, modify the `profiles.yaml` file.
Add this YAML block at the beginning of your profile in `/etc/crowdsec/profiles.yaml`:
```
\---
# /etc/crowdsec/profiles.yaml
name: crawler_captcha_remediation
filter: Alert.Remediation == true &amp;&amp; Alert.GetScenario() in ["crowdsecurity/http-crawl-non_statics", "crowdsecurity/http-bad-user-agent"]
decisions:
  - type: captcha
    duration: 4h
on_success: break
```
With this profile, a CAPTCHA is enforced (for four hours) on any IP address that triggers the scenarios `crowdsecurity/http-crawl-non_statics` or `crowdsecurity/http-bad-user-agent`.
Next, reload CrowdSec:
```
`$ sudo systemctl reload crowdsec`
```
#### Try the custom remediations
Relaunching a web vulnerability scanner would trigger many scenarios, so you would ultimately be banned again. Instead, you can just craft an attack that triggers the `bad-user-agent` scenario (the list of known bad user-agents is [here][14]). Please note that you must activate the rule twice to get banned.
```
$ curl --silent -I -H "User-Agent: Cocolyzebot" <http://example.com> &gt; /dev/null
$ curl -I -H "User-Agent: Cocolyzebot" <http://example.com>
HTTP/1.1 200 OK
Date: Tue, 05 Oct 2021 09:35:43 GMT
Server: Apache/2.4.41 (Ubuntu)
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Cache-Control: no-cache, must-revalidate
X-Content-Type-options: nosniff
Content-Language: en
X-Frame-Options: SAMEORIGIN
X-Generator: Drupal 7 (<http://drupal.org>)
Content-Type: text/html; charset=utf-8
```
You can, of course, see that you get caught for your actions.
```
`$ sudo cscli decisions list`
```
![detected scan][15]
(Philippe Humeau, CC BY-SA 4.0)
If you try to access the website, instead of being simply blocked, you receive a CAPTCHA:
![CAPTCHA prompt][16]
(Philippe Humeau, CC BY-SA 4.0)
Once you solve it, you can reaccess the website.
Next, unban myself again:
```
`$ cscli decisions delete -i <your_ip>`
```
Launch the vulnerability scanner:
```
`$ ./nikto.pl -h http://example.com`
```
Unlike the last time, you can now see that you've triggered several decisions:
![scan detected][17]
(Philippe Humeau, CC BY-SA 4.0)
When trying to access the website, the ban decision has the priority:
![site access attempt][18]
(Philippe Humeau, CC BY-SA 4.0)
### Wrap up
This is a quick way to help block attackers from PHP websites and applications. This article contains only one example. Remediations can be easily extended to fit additional needs. To find out more about installing and using the CrowdSec agent, [check this how-to guide][19] to get started.
To download the PHP bouncer, go to [the CrowdSec Hub][20] or [GitHub][21].
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/1/php-website-bouncer-crowdsec
作者:[Philippe Humeau][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/philippe-humeau
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security_password_chaos_engineer_monster.png?itok=J31aRccu (Security monster)
[2]: https://opensource.com/article/20/10/crowdsec
[3]: https://hub.crowdsec.net/browse/#bouncers
[4]: https://opensource.com/article/18/2/how-configure-apache-web-server
[5]: https://doc.crowdsec.net/docs/getting_started/install_crowdsec
[6]: https://packagecloud.io/crowdsec/crowdsec/install
[7]: https://github.com/sullo/nikto
[8]: https://opensource.com/sites/default/files/1nikto_0.png (nikto scan)
[9]: https://opensource.com/sites/default/files/2decisions.png (detected scan)
[10]: https://github.com/crowdsecurity/cs-php-bouncer/blob/main/install.sh
[11]: https://opensource.com/sites/default/files/3bouncer.png (apache install script)
[12]: https://opensource.com/sites/default/files/4blocked.png (site access attempt)
[13]: https://hub.crowdsec.net/
[14]: https://raw.githubusercontent.com/crowdsecurity/sec-lists/master/web/bad_user_agents.txt
[15]: https://opensource.com/sites/default/files/7decisions-again.png (detected scan)
[16]: https://opensource.com/sites/default/files/8sitedeny.png (CAPTCHA prompt)
[17]: https://opensource.com/sites/default/files/10decisionsagain.png (scan detected)
[18]: https://opensource.com/sites/default/files/11sitedeny.png (site access attempt)
[19]: https://crowdsec.net/tutorial-crowdsec-v1-1/
[20]: https://hub.crowdsec.net/author/crowdsecurity/bouncers/cs-php-bouncer
[21]: https://github.com/crowdsecurity/cs-php-bouncer

View File

@ -1,78 +0,0 @@
[#]: via: (https://theartofmachinery.com/2021/07/04/pricing_as_contractor_101.html)
[#]: author: (Simon Arneaud https://theartofmachinery.com)
[#]: collector: (lujun9972)
[#]: translator: (CN-QUAN)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
作为承包商为自己以101的方式标价
======
我职业生涯的大部分时间都是自由职业者。有时候,我也会和一些想要辞掉全职工作去做一些承包或服务业务的人聊天。到目前为止,我们新手最常犯的错误就是自我定价。
以[这篇有用的博客文章为例,它分析了美国员工收入与自由职业者收入的对比][1]。据估计在美国作为一名自由职业者你需要获得14万美元的收入才能获得相当于10万美元的员工薪酬。我记得当我第一次创业时我发现这样的计算非常有用。而有些人看到结果会想:“哎呀如果我是自由职业者我得赚1.4倍的钱。我真的能做到吗?”
不,不,不,这种想法是落后的。
### 如何给自己定价
让我们举个例子。假设你是一名全职软件工程师年收入10万美元你正考虑转用合同制。
当你是自由职业者时候,你必须像做生意一样思考,因为这就是你的谋生方式。所以,你必须把所有的成本加起来,并计算出如何收回这些成本。电子表格的口碑很差(出于一些好的原因),但它们实际上对这些东西非常有用(以及作为企业主将进行的许多其他计算)。
第一个要增加的成本是10万美元。如果这听起来很奇怪那就是所谓的“机会成本”。如果你继续工作你本可以赚到10万美元在规划业务时不这样做实际上是一种成本。把这笔费用和其他你实际使用的就业福利一起标记下来。如果你的雇主提供工作日午餐那就加上一年中每个工作日午餐的费用。如果你的雇主为员工提供健身软件的折扣但你却没有使用该软件那么不要将该福利作为机会成本。
其他成本取决于你在做什么和你住在哪里。员工医疗保险在澳大利亚不像在美国那么重要。另一方面强制性养老金支付类似于美国的401K计划是一件大事。我有自己的公司我的主要非工资成本是保险、会计/备案、法律(合同审查等)、债务催收和各种在线服务成本。如果你在计算一些耐用的东西(比如一张桌子),把成本除以你预计使用该东西的年数。
总之到目前为止这基本上就是Caleb的博客文章中的内容所以为了简单起见我将假设10万美元的名义工资和14万美元的等效业务成本不变。(当然,一切都要根据自己的情况进行调整。)现在你需要想办法收回这笔成本。澳大利亚一年大约有255个工作日所以如果你能把它们全部外包出去你每天要收取550美元(外加销售税)。在现实中你将无法支付一整年的账单。我采取了一种风险更高的方法在我目前从事自营职业的过去6年里我的平均回报率约为60%-70%。[埃森哲的年度财务报告][2]说他们从承包商那里得到了大约90%的“利用率”我想这意味着他们收取了总工作日的90%的费用。让我们假设你是一个中等收入者并且在75%的工作日里都要付账。这意味着你可以在255天或191天的75%内通过每天730美元的账单加上销售税收回14万美元的成本。
### 误区
刚接触合同的人通常会对这样的数字做出反应并会想“见鬼这可是件大事“。这只是一个计算示例但服务价格通常是相当于全职员工工资的两倍或两倍以上。然而这一天的工资是通过一个简单的计算得出的那就是你需要收取多少钱才能获得相当于10万美元的工资。这是一回事。不这样想才是关键的错误。
新承包商往往还不确定。他们要求那么多,听起来是不是很贪婪?如果你的客户有任何线索他们也在做大致相同的计算。“我可以付给Gentle Blog Reader每天730美元只要我愿意我也可以花14万美元买一个我甚至不是每天都真正需要的全职雇员。”从雇主的角度来看10万美元的薪水实际上也不是10万美元。把价格建立在名义基本工资的基础上是没有意义的。即使你是在销售B2C产品你的潜在竞争对手也不会降价至少不会持续降价。
### 为什么这很重要
这个具体的例子是为了承包,但这是商业经济学的一条基本规则:除非你正在尝试一些风险极高的高收入行为(我们知道[Pets.com][3]的结果),否则你需要计算出你的成本,并设定足够高的价格来弥补这些成本。
一些人仍然对他们需要设定的价格感到不安,他们认为降低价格是合理的。也许他们会这样想:“我是个很好的人如果我每天只收400美元我的客户会更高兴。”问题是你得不到同样的客户。聪明的客户愿意为员工支付10万美元的基本工资他们不会为承包商每天支付400美元来做同样的工作。相反在实践中你可能会得到一些好客户他们只是没有每天730美元的预算但同时你也会得到一大堆非常糟糕的客户。想想看。如果一个陌生人以50美元的价格卖给你一枚看起来很花哨的钻戒你会付钱吗还是愿意以正常价格再买一枚戒指
我要强调的是我只是从凯莱布的帖子中获取数据而且一切都是相对的。用你自己的数字代替。在世界上大多数地区每天400美元可能是一个令人难以置信的价格。然而如果你是硅谷的一名高级金融科技开发人员每天收费400美元只会让你成为吸引糟糕客户的磁铁。大多数优秀的人都会知道有些事情不对劲他们会被吓跑。
我说的坏客户是什么意思?浏览一下[来自地狱的客户博客][4]。它包括很多基本的烦恼,比如客户永远不会得到满足,或者提出无理要求,或者浪费你的时间,一直到彻头彻尾的辱骂,或者让你按规格工作,然后辩称自己不应该付钱,因为“我不想要”。有些客户根本就不付钱。
如果你不够重视你自己的产品,也不要因为你的客户不够重视你的产品而感到震惊。
不过,情况变得更糟了。好客户倾向于与其他好客户合作。如果你说你会随时待命,你会和那些浪费你时间的人一起工作吗?如果你尊重他人,你会和那些不讲道理、辱骂他人的人一起工作吗?一般来说,你的好客户会把你介绍给其他好客户。糟糕的客户则恰恰相反,如果他们甚至感激地把你推荐给任何人的话。因此,如果你的价格合适,你的生意会随着你的声誉而增长。如果你收费过低,你会发现自己陷入了一个恶性循环,你不仅会赔钱,而且会发现越来越难获得适当的报酬。
这些都只是平均水平,如果你幸运的话,低收费也能吸引到好客户,如果你不幸的话,价格合理也仍然会得到坏客户。然而,如果你的收入已经很低了,那么每一个坏客户都会对你造成伤害。希望超越平均水平不是一个好计划。
### “但没人付那么多钱!”
假设你是一名经验丰富的全职工程师,你决定尝试独立工作。你可能会发现,你的计算比率似乎比你在自由职业网站上看到的要高。这是因为在自由职业网站上建立声誉很难。自由职业者网站对于那些主要想要低价的临时买家来说是最有用的。
我想,很多聪明的工程师都认为,职业社交是很难的,而且需要非常外向的性格,所以他们不得不依靠自由职业网站来工作。坏消息是,你需要建立良好的声誉才能拿到高薪。好消息是,只要他们拥有所需的技能,大多数人都可以做到。社交并不是去参加所谓的“社交活动”(实际上,这些活动对社交来说都很糟糕)。社交技巧会让你写一篇全新的博客文章,但关键是在他们的日常生活中找到好客户,并做一些让他们不断回头的事情,甚至可能让你找到其他好客户。
在任何情况下,不要让自由职业网站或其他任何东西把你的价格定在你可以从全职工资中拿到的等价物以下。事实上,[你甚至可能比你现在的工资还高][5]这就是为什么这是“定价101”。然而收费过低会扼杀你的自主创业生涯。
--------------------------------------------------------------------------------
via: https://theartofmachinery.com/2021/07/04/pricing_as_contractor_101.html
作者:[Simon Arneaud][a]
选题:[lujun9972][b]
译者:[CN-QUAN](https://github.com/CN-QUAN)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://theartofmachinery.com
[b]: https://github.com/lujun9972
[1]: https://calebporzio.com/making-100k-as-an-employee-versus-being-self-employed
[2]: https://www.accenture.com/au-en/about/company/annual-report
[3]: https://en.wikipedia.org/wiki/Pets.com
[4]: https://clientsfromhell.net/
[5]: https://theartofmachinery.com/2018/10/07/payrise_by_switching_jobs.html

View File

@ -0,0 +1,74 @@
[#]: subject: "Why now is a great time to consider a career in open source hardware"
[#]: via: "https://opensource.com/article/21/11/open-source-hardware-careers"
[#]: author: "Joshua Pearce https://opensource.com/users/jmpearce"
[#]: collector: "lujun9972"
[#]: translator: "zengyi1001"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Why now is a great time to consider a career in open source hardware
为什么说现在是考虑从事开源硬件职业的好时机
======
开源硬件现在有了自己的专属领域并且正在快速的成长中。
![open source hardware shaking hands][1]
在软件行业中,各种风格的程序员通过编写代码并且使用开源许可发布到公共场所来构建自己的职业生涯,已经变得司空见惯。产业界的猎头们通常要求访问他们未来员工候选人的代码。哪些将自己职业生涯专注在开源项目开发的人得到了回报。从 payscale.com 网站得知Linux 系统管理员的收入比他们的 Windows 管理员同行要高,说明从事开源软件领域可以获得更高的报酬和更稳定的工作机会。分享你的工作会让你感觉非常好(这甚至可能是一种因果报应),你知道自己正在为整个世界创造价值。历史上,这样的机会可从来没有为我们这些工作在开源硬件领域的人存在过。
大约20年前没有人知道开源硬件是什么更别说围绕它规划自己的职业生涯了。举例而言在2000年全世界发表了超过200万篇学术论文却只有7篇文章提到过“开源硬件”。在我第一次写 [_Open-Source Lab_][2]的时候我收集了每一个案例其实也就几十个并且可以轻松的跟上和阅读每一篇发布的关于开源硬件的文章还把它们发布到一个维基上。我很高兴的报告大家这种情况现在已经在物理上成为了不可能。今年已经有超过1500篇文章在讨论“开源硬件”而且我相信年底的时候还会有更多的文章发表出来。开源硬件现在已经发展出来了自己的领域有一些专门报导它的杂志比如说 [_HardwareX_][3] 和 [_Journal of Open Hardware_][4])。在广泛的领域,数十种传统杂志现在也会定期报道最新的开源硬件的发展。
![Smart open source 3-D printing][5]
开发智能开源硬件 3-D 打印 (Joshua Pearce, [GNU-FDL][6])
即使是在十年前,从职业生涯的角度看,着重于开源硬件开发在某种程度上也是一种冒险。我记得在我上一份工作的简历中,我淡化了和它相关的内容,更多的强调了我的传统工作。工业界和学术界的管理人员难以明白如果这些设计被赠与出去并在其他地方生产制造,你又怎样获得收益。这一切都在改变。和自由与开源的软件一样开源硬件开发要更快,而且我敢说,会优于私有开发模式。
![Open source recycle bot][7]
(Joshua Pearce, [GNU-FDL][6])
对于每一种企业,都有大量成功的[开放硬件商业模式][8]。随着数字制造的兴起(主要是由于开源开发),开源软件和开源硬件之间的界限变得模糊。像 [FreeCAD][9] 这样的开源软件可以制作开放式设计,然后在内置 CAM 中使用以便在开源激光切割机、CNC 铣床或 3D 打印机上进行制造。 [OpenSCAD][10] 是一个基于开源脚本的 CAD 包,尤其是它确实模糊了软件和硬件之间的界限,以至于代码和物理设计成为同义词。我们中的许多人开始公开谈论开放硬件。我把它作为我研究计划的核心推动力,首先让我自己的设备开源,然后为其他人开发开放硬件。我并不孤单。作为一个社区,我们已经获得了足够的临界质量,以至于 [开源硬件协会][11] (OSHWA) 于 2012 年成立。如今,差不多十年后,开源硬件的职业前景完全不同:数百个开源硬件硬件公司存在,互联网上涌现出数百万(数百万!)个开源设计,学术文献中对开源硬件的兴趣呈指数级增长。
![Open source production for solar photovoltaics][12]
太阳能光伏产业的开源生产
为太阳能光伏开发开源产品。(Joshua Pearce, [GNU-FDL][6])
甚至有些工作的目标就是促进更快过渡到无处不在的开源硬件。例如,开发开放数据标准和发展这些标准的用户社区的互联网产业 (IoP) 联盟现在已经为运营通信员、数据标准社区支持经理和 DevOps 工程师提供了[职位][13]。正是由于**我在开源硬件上方面的工作**,我刚被聘为[加拿大西部大学][14],这所世界排名前 1% 的大学的终身讲席主席。该职位与加拿大排名第一的商学院 [Ivey Business School,][15] 相交叉。我的工作是帮助大学快速发展,抓住开源技术发展机会。说到做到,我现在正[招聘][16]硕士和博士水平的毕业生,包含全额奖学金和生活津贴。这些[免费适用的可持续性技术 (FAST) 实验室][17] 的研究生工程职位专门用于开发开源硬件,用于太阳能光伏系统、分布式回收和紧急食品生产等一系列应用。这种工作得到了那些想要最大化[他们的研究投资回报][18]的资助者的更频繁的资助。整个国家都在朝着这个方向前进。最近的好例子是法国,它刚刚发布了[第二个开放科学计划][19]。我注意到 [GrantForward][20] 上列出的,用于美国开源资金的“开源”关键字资助的数量显着增加。许多基金会已经大声而清晰地收到了开源备忘录——因此开源研发的机会越来越多。
因此,如果你还没开始的话,也许是时候考虑将开源作为一种职业,即使您是一名喜欢开发硬件的工程师。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/11/open-source-hardware-careers
作者:[Joshua Pearce][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/zengyi1001)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jmpearce
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open-source-hardware.png?itok=vS4MBRSh (shaking hands open source hardware)
[2]: https://www.appropedia.org/Open-source_Lab
[3]: https://www.hardware-x.com/
[4]: https://openhardware.metajnl.com/
[5]: https://opensource.com/sites/default/files/uploads/smart-open-source-3d-printing.png (Smart open source 3-D printing)
[6]: https://www.gnu.org/licenses/fdl-1.3.en.html
[7]: https://opensource.com/sites/default/files/pictures/open-source-recyclebot_0.jpg (Open source recycle bot)
[8]: https://doi.org/10.5334/joh.4
[9]: https://www.freecadweb.org/
[10]: https://openscad.org/
[11]: https://www.oshwa.org/
[12]: https://opensource.com/sites/default/files/uploads/open-source-solar-photovoltaics.png (Open source production for solar photovoltaics)
[13]: https://www.internetofproduction.org/hiring
[14]: https://www.uwo.ca/
[15]: https://www.ivey.uwo.ca/
[16]: https://www.appropedia.org/FAST_application_process
[17]: https://www.appropedia.org/Category:FAST
[18]: https://www.academia.edu/13799962/Return_on_Investment_for_Open_Source_Hardware_Development
[19]: https://www.ouvrirlascience.fr/wp-content/uploads/2021/10/Second_French_Plan-for-Open-Science_web.pdf
[20]: https://www.grantforward.com/index

View File

@ -0,0 +1,90 @@
[#]: subject: "Try FreeDOS in 2022"
[#]: via: "https://opensource.com/article/22/1/try-freedos"
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
在 2022 年尝试 FreeDOS
======
为这个免费操作系统的新用户和老用户提供 15 种资源。
![Puzzle pieces coming together to form a computer screen][1]
在整个 80 年代和 90 年代DOS 是桌面之王。世界各地的程序员不满足于 DOS 的专利版本,他们共同创建了一个名为 FreeDOS 的开源版本,该版本于 1994 年首次推出。[FreeDOS 项目][2] 在 2021 年及以后继续发展。
我们在 Opensource.com 上发表了几篇关于 FreeDOS 的文章,以帮助新用户开始使用 FreeDOS 和学习新程序。以下是去年我们最受欢迎的几篇 FreeDOS 文章。
### 初学 FreeDOS
你是 FreeDOS 的新手吗?如果你想了解如何启动和运行 FreeDOS 的基本知识,请查看这些文章:
* [开始使用 FreeDOS][3]:它看起来像复古的计算机,但 FreeDOS 是一个现代的操作系统,你可以用它来完成事情。
* [FreeDOS 如何启动][4]:了解你的计算机是如何引导和启动 FreeDOS 的,从开机到命令行提示。
* [用纯文本配置 FreeDOS][5]:学习如何用 `fdconfig.sys` 文件来配置 FreeDOS。
* [如何用 CD 和 DIR 浏览 FreeDOS][6]:只需掌握两个命令,`DIR` 和 `CD`,你就可以在命令行中浏览你的 FreeDOS 系统。
* [在 FreeDOS 中设置和使用环境变量][7]:环境变量在几乎所有的命令行环境中都有帮助,包括 FreeDOS。
### Linux 用户的 FreeDOS
如果你已经熟悉了 Linux 的命令行,你可能想试试这些在 FreeDOS 上创造类似环境的命令和程序:
* [给 Linux 爱好者的 FreeDOS命令][8]:如果你已经熟悉了 Linux 的命令行,可以试试这些命令来帮助你轻松进入 FreeDOS。
* [在 FreeDOS 中像 Emacs 一样编辑文本][9]:如果你已经熟悉了 GNU Emacs你应该在 Freemacs 中感到很自在。
* [在 Linux 和 FreeDOS 之间复制文件][10]:学习如何在 FreeDOS 虚拟机和 Linux 桌面系统之间传输文件。
* [如何在 FreeDOS 上归档文件][11]:在 FreeDOS 版本的 **`tar`**,但在 DOS 上归档的标准方法是 Zip 和 Unzip。
* [在 FreeDOS 上使用这个怀旧的文本编辑器][12]:让人联想到 Linux ed(1)当你想用老式的方法编辑文本时Edlin 是一种乐趣。
### 使用 FreeDOS
当你启动进入 FreeDOS你可以使用这些很棒的工具和应用来完成工作或安装其他软件
* [如何使用 FreeDOS 的文本编辑器][13]FreeDOS 提供了一个用户友好的文本编辑器,叫做 FreeDOS Edit。
* [在 FreeDOS 上听音乐][14]Mplayer 是一个开源的媒体播放器,通常可以在 Linux、Windows、Mac 和 DOS 上找到。
* [在 FreeDOS 上安装和删除软件包][15]:了解如何使用 FDIMPLES即 FreeDOS 包管理器,在你的 FreeDOS 系统上安装和删除软件包。
* [为什么我喜欢用 GW-BASIC 在 FreeDOS 上编程][16]BASIC 是我进入计算机编程的起点。我已经很多年没有写过 BASIC 代码了,但我对 BASIC 和 GW-BASIC 永远怀有好感。
* [用 Bywater BASIC 在 FreeDOS 上编程][17]:在你的 FreeDOS 系统上安装 Bywater BASIC并开始尝试使用 BASIC 编程。
在其近 30 年的历程中FreeDOS 一直试图成为一个现代 DOS。如果你想了解更多你可以在 [FreeDOS 简史][18]中阅读关于 FreeDOS 的起源和发展。另外,请看 Don Watkins 关于 FreeDOS 的采访:[一个大学生是如何创立一个自由和开源的操作系统][19]。
如果你想尝试 FreeDOS请下载 2021 年 12 月发布的 FreeDOS 1.3 RC5。这个版本有大量的新变化和改进包括更新的内核和命令 shell新的程序和游戏更好的国际支持以及网络支持。从[FreeDOS 网站][2]下载 FreeDOS 1.3 RC5。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/1/try-freedos
作者:[Jim Hall][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [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/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen)
[2]: https://www.freedos.org/
[3]: https://opensource.com/article/21/6/get-started-freedos
[4]: https://opensource.com/article/21/6/freedos-boots
[5]: https://opensource.com/article/21/6/freedos-fdconfigsys
[6]: https://opensource.com/article/21/6/navigate-freedos-cd-dir
[7]: https://opensource.com/article/21/6/freedos-environment-variables
[8]: https://opensource.com/article/21/6/freedos-linux-users
[9]: https://opensource.com/article/21/6/freemacs
[10]: https://opensource.com/article/21/6/copy-files-linux-freedos
[11]: https://opensource.com/article/21/6/archive-files-freedos
[12]: https://opensource.com/article/21/6/edlin-freedos
[13]: https://opensource.com/article/21/6/freedos-text-editor
[14]: https://opensource.com/article/21/6/listen-music-freedos
[15]: https://opensource.com/article/21/6/freedos-package-manager
[16]: https://opensource.com/article/21/6/freedos-gw-basic
[17]: https://opensource.com/article/21/6/freedos-bywater-basic
[18]: https://opensource.com/article/21/6/history-freedos
[19]: https://opensource.com/article/21/6/freedos-founder