mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
commit
4ddc5e1f94
183
published/20190131 OOP Before OOP with Simula.md
Normal file
183
published/20190131 OOP Before OOP with Simula.md
Normal file
@ -0,0 +1,183 @@
|
||||
[#]: subject: "OOP Before OOP with Simula"
|
||||
[#]: via: "https://twobithistory.org/2019/01/31/simula.html"
|
||||
[#]: author: "Two-Bit History https://twobithistory.org"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "aREversez"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14682-1.html"
|
||||
|
||||
Simula 诞生之前的面向对象程序设计
|
||||
======
|
||||
|
||||
想象一下,你坐在河边,河岸上如茵绿草,不远处湍急河流;午后的阳光慵懒惬意,使人陷入冥想哲思,不觉开始思考眼前的河流是否真实存在。诚然,几米外确实有河水奔流而下。不过,我们所称为“河流”的存在究竟是什么呢?毕竟,河水奔流不息,一直处于变化之中。似乎,“河流”这个词无法指代任何固定不变的事物。
|
||||
|
||||
2009 年,Clojure 的创始人 <ruby>里奇·希基<rt>Rich Hickey</rt></ruby> 发表了 [一场精彩的演讲][1],探讨了为什么上文那样的哲学窘境会给面向对象程序的编程范式带来难题。他认为,人们看待计算机程序中的对象与看待河流的逻辑是一样的:我们想象对象是固定不变的,即使对象的许多或者说全部的属性都无时无刻不处于变化之中。所以,这种逻辑并不正确,我们无法区分在不同状态下同一对象实例的不同之处。程序中没有明确的时间的概念。人们只是单纯地用着同一个名字,以期在引用对象时,对象能够处于预期的状态中。这样,我们也就难免会遇到 <ruby>故障<rt>bug</rt></ruby>。
|
||||
|
||||
希基总结道,这一难题的应对办法就是人们应该将世界建模成作用于不可变数据的 <ruby>进程<rt>process</rt></ruby> 的集合,而不是可变的对象的集合。换句话说,我们应把每个对象看作一条“河流”,因果相连。总结说来,你应该使用 Clojure 等函数式语言。
|
||||
|
||||
![][2]
|
||||
|
||||
_作者在远足途中思考面向对象程序设计的本体论问题。_
|
||||
|
||||
自从希基发表演讲之后,人们对函数式编程语言的兴趣不断提升,主流的面向对象编程语言也大多都采用了函数式编程语言。尽管如此,大多数程序员依旧沿用自己的老一套,继续将对象实例化,不断改变其状态。这些人长此以往,很难做到用不同的视角看待编程。
|
||||
|
||||
我曾经想写一篇关于 Simula 的文章,大概会写到我们今天所熟知的面向对象的理念是何时又是如何应用到程序语言之中的。但是,我觉得写当初的 Simula 与如今的面向对象程序设计的 _迥然不同之处_,会更有趣一些,这我敢打包票。毕竟,我们现在熟知的面向对象程序设计还未完全成型。Simula 有两个主要版本:Simula I 和 Simula 67。Simula 67 为世界带来了 <ruby>类<rt>class</rt></ruby>、 <ruby>类的继承<rt>class hierarchy</rt></ruby> 以及 <ruby>虚拟方法<rt>virtual method</rt></ruby>;但 Simula I 是一个初稿,它实验了如何能够将数据和进程捆绑起来的其他设想。Simula I 的模型不是希基提出的函数式模型,不过这一模型关注的是随时间展开的 _进程_,而非有着隐藏状态的对象之间的相互作用。如果 Simula 67 采用了 Simula I 的理念,那么我们如今所知的面向对象程序设计可能会大有不同——这类偶然性启示我们,不要想着现在的程序设计范式会一直占据主导地位。
|
||||
|
||||
### 从 Simula 0 到 Simula 67
|
||||
|
||||
Simula 是由两位挪威人 <ruby>克里斯汀·尼加德<rt>Kristen Nygaard</rt></ruby> 和 <ruby>奥利-约翰·达尔<rt>Ole-Johan Dahl</rt></ruby> 创建的。
|
||||
|
||||
20 世纪 50 年代末,尼加德受雇于 <ruby>挪威防务科学研究中心<rt>Norwegian Defense Research Establishment</rt></ruby>(NDRE),该研究中心隶属于挪威军方。在那里,他负责设计 <ruby>蒙特卡洛模拟方法<rt>Monte Carlo simulations</rt></ruby>,用于核反应堆设计与操作研究。最初,那些模拟实验是由人工完成的;后来,实验在 Ferranti Mercury 电脑 [^1] 上编入程序运行。尼加德随后发现,将这些模拟实验输入电脑需要一种更有效的方式。
|
||||
|
||||
尼加德设计的这种模拟实验就是人们所知的“<ruby>离散事件模型<rt>discrete event model</rt></ruby>”,这种模拟记录了一系列事件随着时间改变系统状态的进程。但是问题的关键在于模拟可以从一个事件跳跃到另一个事件中,因为事件是离散的,事件之间的系统不存在任何变化。根据尼加德和达尔在 1966 年发表的一篇关于 Simula 的论文,这种模型被迅速应用于“神经网络、通信系统、交通流量、生产系统、管理系统、社会系统等” [^2] 领域的分析。因此,尼加德认为,其他人描述模拟实验时,可能也需要更高层级的模型。于是他开始物色人才,帮助他完成他称之为“<ruby>模拟语言<rt>Simulation Language</rt></ruby>”或者“<ruby>蒙特卡洛编译器<rt>Monte Carlo Compiler</rt></ruby>”的项目 [^3]。
|
||||
|
||||
达尔当时也受雇于挪威防务科学研究中心,专攻语言设计,此时也加入了尼加德的项目,扮演“沃兹尼亚克”的角色(LCTT 译注:指苹果公司联合创始人斯蒂夫·盖瑞·沃兹尼亚克)。在接下来一年左右的时间,尼加德和达尔携手开发了 Simula 0 语言。[^4] 这一语言的早期版本仅仅是在 ALGOL 60 基础上进行的较小拓展,当时也只是打算将其用作预处理程序而已。当时的语言要比后来的编程语言抽象得多,其基本语言结构是“<ruby>车站<rt>stations</rt></ruby>”与“<ruby>乘客<rt>customers</rt></ruby>”,这些结构可以用于针对具体某些离散事件网络建立模型。尼加德和达尔给出了一个模拟飞机离港的例子。[^5] 但是尼加德和达尔最后想出了一个更加通用的语言结构,可以同时表示“车站”和“乘客”,也可以为更广泛的模拟建立模型。这是两个主要的概括,它改变了 Simula 作为 ALGOL 专属包的定位,使其转变为通用编程语言。
|
||||
|
||||
Simula I 没有“<ruby>车站<rt>stations</rt></ruby>”和“<ruby>乘客<rt>customers</rt></ruby>”的语言结构,但它可以通过使用“<ruby>进程<rt>process</rt></ruby>”再现这些结构。(LCTT 译注:此处使用的“进程”,与当前计算机中用来指代一个已执行程序的实体的概念不同,大致上,你可以将本文中所说的“进程”理解为一种“对象”。)一个进程包含大量数据属性,这些属性与作为进程的 _操作规程_ 的单个行为相联系。你可能会把进程当作是只有单个方法的对象,比如 `run()` 之类的。不过,这种类比并不全面,因为每个进程的操作规程都可以随时暂停、随时恢复,因为这种操作规程属于 <ruby>协程<rt>coroutine</rt></ruby> 的一种。Simula I 程序会将系统建立为一套进程的模型,在概念上这些进程并行运行。实际上,一个时间点上能称为“当前进程”的只有一个进程。但是,一旦某个进程暂停运行,那么下一个进程就会自动接替它的位置。随着模拟的运行,Simula 会保持一个 “<ruby>事件通知<rt>event notices</rt></ruby>” 的时间线,跟踪记录每个进程恢复的时间。为了恢复暂停运行的进程,Simula 需要记录多个 <ruby>调用栈<rt>call stacks</rt></ruby> 的情况。这就意味着 Simula 无法再作为 ALGOL 的预处理程序了,因为 ALGOL 只有一个 <ruby>调用栈<rt>call stacks</rt></ruby>。于是,尼加德和达尔下定决心,开始编写自己的编译器。
|
||||
|
||||
尼加德和达尔在介绍该系统的论文中,借助图示,通过模拟一个可用机器数量有限的工厂,阐明了其用法。[^6] 在该案例中,进程就好比订单:通过寻找可用的机器,订单得以发出;如果没有可用的机器,订单就会搁置;而一旦有机器空出来,订单就会执行下去。有一个订单进程的定义,用来实例化若干种不同的订单实例,不过这些实例并未调用任何方法。该程序的主体仅仅是创建进程,并使其运行。
|
||||
|
||||
历史上第一个 Simula I 编译器发布于 1965 年。尼加德和达尔在离开挪威防务科学研究中心之后,就进入了 <ruby>挪威计算机中心<rt>Norwegian Computer Center</rt></ruby> 工作,Simula I 也是在这里日渐流行起来的。当时,Simula I 在 UNIVAC 公司的计算机和 Burroughs 公司的 B5500 计算机上均可执行。[^7] 尼加德和达尔两人与一家名为 ASEA 的瑞典公司达成了咨询协议,运用 Simula 模拟加工车间。但是,尼加德和达尔随后就意识到 Simula 也可以写一些和模拟完全不搭边的程序。
|
||||
|
||||
<ruby>奥斯陆大学<rt>University of Oslo</rt></ruby>教授 <ruby>斯坦因·克罗达尔<rt>Stein Krogdahl</rt></ruby> 曾写过关于 Simula 的发展史,称“真正能够促使新开发的通用语言快速发展的催化剂”就是 [一篇题为<ruby>《记录处理》<rt>Record Handling</rt></ruby>的论文][10],作者是英国计算机科学家 <ruby>查尔斯·安东尼·理查德·霍尔<rt>C.A.R. Hoare</rt></ruby>。[^8] 假如你现在读霍尔的这篇论文,你就不会怀疑这句话。当人们谈及面向对象语言的发展史时,一定会经常提起霍尔的大名。以下内容摘自霍尔的《记录处理》一文:
|
||||
|
||||
> 该方案设想,在程序执行期间,计算机内部存在任意数量的记录,每条记录都代表着程序员在过去、现在或未来所需的某个对象。程序对现有记录的数量保持动态控制,并可以根据当前任务的要求创建新的记录或删除现有记录。
|
||||
>
|
||||
> 计算机中的每条记录都必须属于数量有限但互不重合的记录类型中的一类;程序员可以根据需要声明尽可能多的记录类型,并借助标识符为各个类型命名。记录类型的命名可能是普通词汇,比如“牛”、“桌子”以及“房子”,同时,归属于这些类型的记录分别代表一头“牛”、一张“桌子”以及一座“房子”。
|
||||
|
||||
霍尔在这片论文中并未提到子类的概念,但是达尔由衷地感谢霍尔,是他引导了两人发现了这一概念。[^9] 尼加德和达尔注意到 Simula I 的进程通常具有相同的元素,所以引入父类来执行共同元素就会非常方便。这也强化了“进程”这一概念本身可以用作父类的可能性,也就是说,并非每种类型都必须用作只有单个操作规程的进程。这就是 Simula 语言迈向通用化的第二次飞跃,此时,Simula 67 真正成为了通用编程语言。正是如此变化让尼加德和达尔短暂地萌生了给 Simula 改名的想法,想让人们意识到 Simula 不仅仅可以用作模拟。[^10] 不过,考虑到 “Simula”这个名字的知名度已经很高了,另取名字恐怕会带来不小的麻烦。
|
||||
|
||||
1967 年,尼加德和达尔与 <ruby>控制数据公司<rt>Control Data</rt></ruby> 签署协议,着手开发Simula 的新版本:Simula 67。同年六月份的一场会议中,来自控制数据公司、奥斯陆大学以及挪威计算机中心的代表与尼加德和达尔两人会面,意在为这门新语言制定标准与规范。最终,会议发布了 [《Simula 67 通用基础语言》][14],确定了该语言的发展方向。
|
||||
|
||||
Simula 67 编译器的开发由若干家供应商负责。<ruby>Simula 用户协会<rt>The Association of Simula Users</rt></ruby>(ASU)也随后成立,并于每年举办年会。不久,Simula 67 的用户就遍及了 23 个国家。[^11]
|
||||
|
||||
### 21 世纪的 Simula 语言
|
||||
|
||||
人们至今还记得 Simula,是因为后来那些取代它的编程语言都受到了它的巨大影响。到了今天,你很难找到还在使用 Simula 写程序的人,但是这并不意味着 Simula 已经从这个世界上消失了。得益于 [GNU cim][16],人们在今天依然能够编写和运行 Simula 程序。
|
||||
|
||||
cim 编译器遵循 1986 年修订后的 Simula 标准,基本上也就是 Simula 67 版本。你可以用它编写类、子类以及虚拟方法,就像是在使用 Simula 67 一样。所以,用 Python 或 Ruby 轻松写出短短几行面向对象的程序,你照样也可以用 cim 写出来:
|
||||
|
||||
```
|
||||
! dogs.sim ;
|
||||
Begin
|
||||
Class Dog;
|
||||
! The cim compiler requires virtual procedures to be fully specified ;
|
||||
Virtual: Procedure bark Is Procedure bark;;
|
||||
Begin
|
||||
Procedure bark;
|
||||
Begin
|
||||
OutText("Woof!");
|
||||
OutImage; ! Outputs a newline ;
|
||||
End;
|
||||
End;
|
||||
|
||||
Dog Class Chihuahua; ! Chihuahua is "prefixed" by Dog ;
|
||||
Begin
|
||||
Procedure bark;
|
||||
Begin
|
||||
OutText("Yap yap yap yap yap yap");
|
||||
OutImage;
|
||||
End;
|
||||
End;
|
||||
|
||||
Ref (Dog) d;
|
||||
d :- new Chihuahua; ! :- is the reference assignment operator ;
|
||||
d.bark;
|
||||
End;
|
||||
```
|
||||
|
||||
你可以按照下面代码执行程序的编译与运行:
|
||||
|
||||
```
|
||||
$ cim dogs.sim
|
||||
Compiling dogs.sim:
|
||||
gcc -g -O2 -c dogs.c
|
||||
gcc -g -O2 -o dogs dogs.o -L/usr/local/lib -lcim
|
||||
$ ./dogs
|
||||
Yap yap yap yap yap yap
|
||||
```
|
||||
|
||||
(你可能会注意到,cim 先将 Simula 语言编译为 C 语言,然后传递给 C 语言编译器。)
|
||||
|
||||
这就是 1967 年的面向对象程序设计,除了语法方面的不同,和 2019 年的面向对象程序设计并无本质区别。如果你同意我的这一观点,你也就懂得了为什么人们会认为 Simula 在历史上是那么的重要。
|
||||
|
||||
不过,我更想介绍一下 Simula I 的核心概念——进程模型。Simula 67 保留了进程模型,不过只有在使用 `Process` 类 和 `Simulation` 块的时候才能调用。
|
||||
|
||||
为了表现出进程是如何运行的,我决定模拟下述场景。想象一下,有这么一座住满了村民的村庄,村庄的旁边有条小河边,小河里有很多的鱼。但是,村里的村民却只有一条鱼竿。村民们胃口很大,每隔一个小时就饿了。他们一饿,就会拿着鱼竿去钓鱼。如果一位村民正在等鱼竿,另一位村民自然也用不了。这样一来,村民们就会为了钓鱼排起长长的队伍。假如村民要等五、六分钟才能钓到一条鱼,那么这样等下去,村民们的身体状况就会变得越来越差。再假如,一位村民已经到了骨瘦如柴的地步,最后他可能就会饿死。
|
||||
|
||||
这个例子多少有些奇怪,虽然我也不说不出来为什么我脑袋里最先想到的是这样的故事,但是就这样吧。我们把村民们当作 Simula 的各个进程,观察在有着四个村民的村庄里,一天的模拟时间内会发生什么。
|
||||
|
||||
完整程序可以通过此处 [GitHub Gist][17] 的链接获取。
|
||||
|
||||
我把输出结果的最后几行放在了下面。我们来看看一天里最后几个小时发生了什么:
|
||||
|
||||
```
|
||||
1299.45: 王五饿了,要了鱼竿。
|
||||
1299.45: 王五正在钓鱼。
|
||||
1311.39: 王五钓到了一条鱼。
|
||||
1328.96: 赵六饿了,要了鱼竿。
|
||||
1328.96: 赵六正在钓鱼。
|
||||
1331.25: 李四饿了,要了鱼竿。
|
||||
1340.44: 赵六钓到了一条鱼。
|
||||
1340.44: 李四饿着肚子等着鱼竿。
|
||||
1340.44: 李四在等鱼竿的时候饿死了。
|
||||
1369.21: 王五饿了,要了鱼竿。
|
||||
1369.21: 王五正在钓鱼。
|
||||
1379.33: 王五钓到了一条鱼。
|
||||
1409.59: 赵六饿了,要了鱼竿。
|
||||
1409.59: 赵六正在钓鱼。
|
||||
1419.98: 赵六钓到了一条鱼。
|
||||
1427.53: 王五饿了,要了鱼竿。
|
||||
1427.53: 王五正在钓鱼。
|
||||
1437.52: 王五钓到了一条鱼。
|
||||
```
|
||||
|
||||
可怜的李四最后饿死了,但是他比张三要长寿,因为张三还没到上午 7 点就饿死了。赵六和王五现在一定过得很好,因为需要鱼竿的就只剩下他们两个了。
|
||||
|
||||
这里,我要说明,这个程序最重要的部分只是创建了进程(四个村民),并让它们运行下去。各个进程操作对象(鱼竿)的方式与我们今天对对象的操作方式相同。但是程序的主体部分并没有调用任何方法,也没有修改进程的任何属性。进程本身具有内部状态,但是这种内部状态的改变只有进程自身才能做到。
|
||||
|
||||
在这个程序中,仍然有一些字段发生了变化,这类程序设计无法直接解决纯函数式编程所能解决的问题。但是正如克罗达尔所注意到的那样,“这一机制引导进行模拟的程序员为底层系统建立模型,生成一系列进程,每个进程表示了系统内的自然事件顺序。”[^12] 我们不是主要从名词或行动者(对其他对象做事的对象)的角度来思考正在进行的进程。我们可以将程序的总控制权交予 Simula 的事件通知系统,克罗达尔称其为 “<ruby>时间管理器<rt>time manager</rt></ruby>”。因此,尽管我们仍然在适当地改变进程,但是没有任何进程可以假设其他进程的状态。每个进程只能间接地与其他进程进行交互。
|
||||
|
||||
这种模式如何用以编写编译器、HTTP 服务器以及其他内容,尚且无法确定。(另外,如果你在 Unity 游戏引擎上编写过游戏,就会发现两者十分相似。)我也承认,尽管我们有了“时间管理器”,但这可能并不完全是希基的意思,他说我们在程序中需要一个明确的时间概念。(我认为,希基想要的类似于 [<ruby>阿达·洛芙莱斯<rt>Ada Lovelace</rt></ruby> 用于区分一个变量随时间变化产生的不同数值的上标符号][19]。)尽管如此,我们可以发现,面向对象程序设计前期的设计方式与我们今天所习惯的面向对象程序设计并非完全一致,我觉得这一点很有意思。我们可能会理所当然地认为,面向对象程序设计的方式千篇一律,即程序就是对事件的一长串记录:某个对象以特定顺序对其他对象产生作用。Simula I 的进程系统表明,面向对象程序设计的方式不止一种。仔细想一下,函数式语言或许是更好的设计方式,但是 Simula I 的发展告诉我们,现代面向对象程序设计被取代也很正常。
|
||||
|
||||
_如果你喜欢这篇文章,欢迎关注推特 [@TwoBitHistory][20],也可通过 [RSS feed][21] 订阅,获取最新文章(每四周更新一篇)。_
|
||||
|
||||
|
||||
[^1]: Jan Rune Holmevik, “The History of Simula,” accessed January 31, 2019, <http://campus.hesge.ch/daehne/2004-2005/langages/simula.htm>.
|
||||
[^2]: Ole-Johan Dahl and Kristen Nygaard, “SIMULA—An ALGOL-Based Simulation Langauge,” Communications of the ACM 9, no. 9 (September 1966): 671, accessed January 31, 2019, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&rep=rep1&type=pdf][24].
|
||||
[^3]: Stein Krogdahl, “The Birth of Simula,” 2, accessed January 31, 2019, <http://heim.ifi.uio.no/~steinkr/papers/HiNC1-webversion-simula.pdf>.
|
||||
[^4]: 出处同上。
|
||||
[^5]: Ole-Johan Dahl and Kristen Nygaard, “The Development of the Simula Languages,” ACM SIGPLAN Notices 13, no. 8 (August 1978): 248, accessed January 31, 2019, <https://hannemyr.com/cache/knojd_acm78.pdf>.
|
||||
[^6]: Dahl and Nygaard (1966), 676.
|
||||
[^7]: Dahl and Nygaard (1978), 257.
|
||||
[^8]: Krogdahl, 3.
|
||||
[^9]: Ole-Johan Dahl, “The Birth of Object-Orientation: The Simula Languages,” 3, accessed January 31, 2019, <http://www.olejohandahl.info/old/birth-of-oo.pdf>.
|
||||
[^10]: Dahl and Nygaard (1978), 265.
|
||||
[^11]: Holmevik.
|
||||
[^12]: Krogdahl, 4.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://twobithistory.org/2019/01/31/simula.html
|
||||
|
||||
作者:[Two-Bit History][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[aREversez](https://github.com/aREversez)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://twobithistory.org
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey
|
||||
[2]: https://twobithistory.org/images/river.jpg
|
||||
[10]: https://archive.computerhistory.org/resources/text/algol/ACM_Algol_bulletin/1061032/p39-hoare.pdf
|
||||
[14]: http://web.eah-jena.de/~kleine/history/languages/Simula-CommonBaseLanguage.pdf
|
||||
[16]: https://www.gnu.org/software/cim/
|
||||
[17]: https://gist.github.com/sinclairtarget/6364cd521010d28ee24dd41ab3d61a96
|
||||
[19]: https://twobithistory.org/2018/08/18/ada-lovelace-note-g.html
|
||||
[20]: https://twitter.com/TwoBitHistory
|
||||
[21]: https://twobithistory.org/feed.xml
|
||||
[22]: https://twitter.com/TwoBitHistory/status/1075075139543449600?ref_src=twsrc%5Etfw
|
||||
[24]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&rep=rep1&type=pdf
|
75
published/20210104 10 ways Ansible is for everyone.md
Normal file
75
published/20210104 10 ways Ansible is for everyone.md
Normal file
@ -0,0 +1,75 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (Donkey-Hao)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-14739-1.html)
|
||||
[#]: subject: (10 ways Ansible is for everyone)
|
||||
[#]: via: (https://opensource.com/article/21/1/ansible)
|
||||
[#]: author: (James Farrell https://opensource.com/users/jamesf)
|
||||
|
||||
分享 10 篇 Ansible 文章
|
||||
======
|
||||
|
||||
> 通过这些 Ansible 文章扩展你的知识和技能。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/21/111840akw4bjd13dh8ayky.jpg)
|
||||
|
||||
我希望能够激发刚刚接触 Ansible 的初学者的兴趣。这里有一系列总结文章,我已将其包括在内,以供你随意后续查阅。
|
||||
|
||||
### 适合初学者的 Ansible
|
||||
|
||||
这五篇文章对于 Ansible 新手来说是一个非常好的起点。前三篇文章由 Seth Kenlon 撰写。
|
||||
|
||||
* 如果你不了解 Ansible ,[现在可以做这 7 件事][2] 来入手。这是很好的入门指导,它收集了用于管理硬件、云、容器等的链接。
|
||||
* 在 《[编排与自动化有何区别?][3]》 这篇文章中,你会学到一些术语和技术路线,将会激发你对 Ansible 感兴趣。
|
||||
* 文章 《[如何用 Ansible 安装软件][4]》 覆盖了一些脚本概念和一些 Ansible 的好惯例,给出了一些本地或远程管理软件包的案例。
|
||||
* 在 [我编写 Ansible 剧本时学到的 3 个教训][5] 中,使自己养成 Jeff Geerling 所传授的好习惯,他是一位真正的 Ansible 资深人士。源代码控制、文档、测试、简化和优化是自动化成功的关键。
|
||||
* 《[我使用 Ansible 的第一天][6]》 介绍了记者 David Both 在解决重复性开发任务时的思考过程。这篇文章从 Ansible 的基础开始,并说明了一些简单的操作和任务。
|
||||
|
||||
### 尝试 Ansible 项目
|
||||
|
||||
一旦你掌握了基础和并拥有良好习惯,就可以开始一些具体主题和实例了。
|
||||
|
||||
* Ken Fallon 在 《[使用 Ansible 管理你的树莓派机群][7]》 一文中介绍了一个部署和管理树莓派设备机群的示例。它介绍了受限环境中的安全和维护概念。
|
||||
* 在 《[将你的日历与 Ansible 融合以避免日程冲突][8]》一文中,Nicolas Leiva 快速介绍了如何使用前置任务和条件在自动日程安排中中强制执行隔离窗口
|
||||
* Nicolas 在 《[创建一个整合你的谷歌日历的 Ansible 模块][9]》中完成了他的日历隔离的理念。他的文章深入探讨了在 Go 中编写自定义 Ansible 模块以实现所需的日历连接。 Nicolas 介绍了构建和调用 Go 程序并将所需数据传递给 Ansible 并接收所需输出的不同方法。
|
||||
|
||||
### 提升你的 Ansible 技巧
|
||||
|
||||
Kubernetes 是近来的热门话题,以下文章提供了一些很好的示例来学习新技能。
|
||||
|
||||
* 在 《[适用于 Kubernets 自动编排你的 Ansible 模块][10]》 文章中,Seth Kenlon 介绍了 Ansible Kubernetes 模块, 介绍了用于测试的基本 Minikube 环境,并提供了一些用于<ruby>荚<rt>Pod</rt></ruby> 控制的 `k8s` 模块的基本示例。
|
||||
* Jeff Geerling 在 《[使用 Ansible 的 Helm 模块构建 Kubernetes Minecraft 服务器][11]》 中解释了 Helm Chart 应用程序、Ansible 集合以及执行一个有趣的项目以在 k8s 集群中设置你自己的 Minecraft 服务器的概念。
|
||||
|
||||
我希望你的 Ansible 旅程已经开始,并能常从这些文章中充实自己。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/1/ansible
|
||||
|
||||
作者:[James Farrell][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[Donkey](https://github.com/Donkey-Hao)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/jamesf
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/innovation_lightbulb_gears_devops_ansible.png?itok=TSbmp3_M (gears and lightbulb to represent innovation)
|
||||
[2]: https://opensource.com/article/20/9/ansible
|
||||
[3]: https://opensource.com/article/20/11/orchestration-vs-automation
|
||||
[4]: https://opensource.com/article/20/9/install-packages-ansible
|
||||
[5]: https://opensource.com/article/20/1/ansible-playbooks-lessons
|
||||
[6]: https://opensource.com/article/20/10/first-day-ansible
|
||||
[7]: https://opensource.com/article/20/9/raspberry-pi-ansible
|
||||
[8]: https://opensource.com/article/20/10/calendar-ansible
|
||||
[9]: https://opensource.com/article/20/10/ansible-module-go
|
||||
[10]: https://opensource.com/article/20/9/ansible-modules-kubernetes
|
||||
[11]: https://opensource.com/article/20/10/kubernetes-minecraft-ansible
|
||||
[12]: https://opensource.com/article/20/1/ansible-news-edition-six
|
||||
[13]: https://opensource.com/article/20/2/ansible-news-edition-seven
|
||||
[14]: https://opensource.com/article/20/3/ansible-news-edition-eight
|
||||
[15]: https://opensource.com/article/20/4/ansible-news-edition-nine
|
||||
[16]: https://opensource.com/article/20/5/ansible-news-edition-ten
|
||||
[17]: https://opensource.com/how-submit-article
|
@ -0,0 +1,73 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (duoluoxiaosheng)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-14686-1.html)
|
||||
[#]: subject: (How to teach open source beyond business)
|
||||
[#]: via: (https://opensource.com/article/21/1/open-source-beyond-business)
|
||||
[#]: author: (Irit Goihman https://opensource.com/users/iritgoihman)
|
||||
|
||||
在商业之外,为学生们教授开源知识
|
||||
======
|
||||
|
||||
> Beyond 计划连接起未来科技行业的人才和开源文化。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/08/095200eezhuq7ssd4x4d66.jpg)
|
||||
|
||||
那时,我还是一个大学生,我不明白人们为什么那么吹捧开源软件。我也使用 Linux 和开源软件,但是我不明白开源的运作模式,不知道如何参加一个开源项目,也不知道这对我未来的职业有什么好处。我的开发经验主要是家庭作业和学位需要的一个大型期末项目。
|
||||
|
||||
所以,当我开始踏足科技行业时,我发现我还有很多知识需要学习。我需要了解如何加入一个既定的、可能很大并且分散在不同地方的团队,为一个正在进行中的项目工作。我还要学会正确的沟通以保证我付出的努力不白费。
|
||||
|
||||
在这方面,我并不特别。我只是众多毕业生中的一员。
|
||||
|
||||
### 开源让毕业生的起点更高
|
||||
|
||||
作为一个工程师,一个管理者,从那时起我开始帮助刚入行的工程师。我发现,有开源经验的毕业生比没有开源经验的毕业生能更快的入门。
|
||||
|
||||
通过将开源方法纳入学术研究,学生们可以获得相关的行业经验,学会利用他们自己的知识,并建立一个陈述观点和分享知识的平台。参与开源项目可以对学生的技术知识和经验产生积极影响。这可以帮助他们更好的规划自己的职业生涯。
|
||||
|
||||
开源在科技行业的价值是公认的,它塑造了全球软件公司的文化。参与开源项目并采用 [开放组织文化][2] 正在成为行业普遍现象。公司寻求知道如何在开源领域工作并培养其文化的思想新颖、才华横溢的员工。因此,科技行业必须推动学术界将开源文化作为学习科技研究的基本方法之一。
|
||||
|
||||
### 商业之上是开源文化
|
||||
|
||||
当我遇到红帽的高级软件工程师 [Liora Milbaum][3] 时,我发现,我们对将开源文化和规则引入学术界有着共同的兴趣。Liora 之前创立了 [DevOps Loft][4], 在其中,她与有兴趣进入这个行业的人们分享了 DevOps 实践,并希望发起一个类似的项目,教授大学生开源。我们决定启动 [Beyond][5] 计划,将科技行业拥抱开源精神的人才与红帽的实践联系起来。
|
||||
|
||||
我们在 [Tel Aviv-Yafo 技术学院][6] 开始了 Beyond 计划,在那里,我们受到了信息系统学院的热烈欢迎。我们从介绍 DevOps 技术栈的 “DevOps 入门” 开始。我们开始时最大的挑战是怎么讲明白开源是什么。答案似乎很简单:实践出真理。我们不想给学生们讲授什么老套的学院课程,相反,我们想让学生接触到行业标准。
|
||||
|
||||
我们创建了一个包含常见的开源项目和工具的教学大纲来教授 DevOps 技术栈。该课程由工程师教授的讲座和实践组成。学生们被分成小组,每组都由一名工程师指导和支持。他们练习团队合作,分享知识(在团队内外),并有效的协作。
|
||||
|
||||
在我们为计算机科学学院的通讯准备的高级课程 “开源开发的基础” 中,我们遇到了另外的困难。当我们的课程开始两周以后,随着新冠疫情在全球的流行,我们完全靠远程沟通。我们通过与学生一起使用我们在红帽日常工作中使用的相同远程协作工具解决了这个问题。我们惊讶于过渡的是如此简单和顺利。
|
||||
|
||||
![Beyond teaching online][7]
|
||||
|
||||
(Irit Goihman, [CC BY-SA 4.0][8])
|
||||
|
||||
### 成果展示
|
||||
|
||||
这两个课程取得了巨大的成功,我们甚至雇佣了我们最优秀的学生之一。我们收到了非常棒的反馈,同学们表示,我们对他们的知识、思维和软技能产生了积极影响。一些学生因为在课程期间的开源贡献而得到了他们第一份技术工作。
|
||||
|
||||
其他学术机构对这些课程表达出了极大的兴趣,因此我们将这个项目扩展到了另外一所大学。
|
||||
|
||||
很荣幸,在一群优秀工程师的参与下,与 Liora 一起领导这个成功的项目。我们一起助力开源社区的成长。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/1/open-source-beyond-business
|
||||
|
||||
作者:[Irit Goihman][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[duoluoxiaosheng](https://github.com/duoluoxiaosheng)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/iritgoihman
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-lead-teacher-learner.png?itok=rMJqBN5G (Teacher or learner?)
|
||||
[2]: https://opensource.com/open-organization/resources/open-org-definition
|
||||
[3]: https://www.linkedin.com/in/lioramilbaum
|
||||
[4]: https://www.devopsloft.io/
|
||||
[5]: https://research.redhat.com/blog/2020/05/24/open-source-development-course-and-devops-methodology/
|
||||
[6]: https://www.int.mta.ac.il/
|
||||
[7]: https://opensource.com/sites/default/files/pictures/beyond_mta.png (Beyond teaching online)
|
||||
[8]: https://creativecommons.org/licenses/by-sa/4.0/
|
@ -0,0 +1,369 @@
|
||||
[#]: subject: (Create a countdown clock with a Raspberry Pi)
|
||||
[#]: via: (https://opensource.com/article/21/3/raspberry-pi-countdown-clock)
|
||||
[#]: author: (Chris Collins https://opensource.com/users/clcollins)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (Donkey-Hao)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-14731-1.html)
|
||||
|
||||
使用树莓派做一个倒计时器
|
||||
======
|
||||
|
||||
> 使用树莓派和电子纸显示屏开始倒计时你的下一个假期。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/19/145133beh3yp1s3ky6bi5b.jpg)
|
||||
|
||||
<ruby>[圆周率日][2]<rt>Pi Day</rt></ruby>(3 月 14 日) 来了又走,留下美好的回忆以及 [许多树莓派项目][3] 等待我们去尝试。在任何令人精神振奋、充满欢乐的假期后回到工作中都很难,圆周率日也不例外。当我们回望三月的时候,渴望那些天的快乐。但是不用害怕,亲爱的圆周率日庆祝者们,我们开始下一个节日的漫长倒计时!
|
||||
|
||||
好了,严肃点。我做了一个圆周率日倒计时器,你也可以!
|
||||
|
||||
不久前,我购买了一个 [树莓派 Zero W][4],并且用它来 [解决 WiFi 信号较差的原因][5] 。我也对使用<ruby>电子纸<rt>ePaper</rt></ruby>来作为它的显示屏十分感兴趣。虽然我不知道该用它来干什么,但是!它看起来真的很有趣!我买了一个十分适合放在树莓派的顶部的 2.13 英寸的 [WaveShare 显示器][6] 。安装很简单:只需要将显示器接到树莓派的 GPIO 上即可。
|
||||
|
||||
我使用 [树莓派操作系统][7] 来实现该项目,虽然其他的操作系统肯定也能完成。但是下面的 `raspi-config` 命令在树莓派系统上很容易使用。
|
||||
|
||||
### 设置树莓派和电子纸显示屏
|
||||
|
||||
设置树莓派和电子纸显示屏一起工作,需要你在树莓派软件中启用串行外设接口(SPI),安装 BCM2835 C 库(来访问树莓派上的博通 BCM 2835 芯片的 GPIO 功能),安装 Python GPIO 库来控制电子纸显示屏。最后,你需要安装 WaveShare 的库来使用 Python 控制这个 2.13 英寸的显示屏。
|
||||
|
||||
下面是完成这些的步骤。
|
||||
|
||||
#### 启用 SPI
|
||||
|
||||
树莓派上启用 SPI 最简单的方式是使用 `raspi-config` 命令。SPI 总线允许与设备进行串行数据通信——在本例中,电子纸显示:
|
||||
|
||||
```
|
||||
$ sudo raspi-config
|
||||
```
|
||||
|
||||
从弹出的菜单中, 选择 “<ruby>接口选项<rt>Interfacing Options</rt> -> SPI -> <ruby>是<rt>Yes</rt></ruby>” 来启用 SPI 接口,然后启动。
|
||||
|
||||
#### 安装 BCM2835 库
|
||||
|
||||
如上所述,BCM2835 库是用于树莓派博通 BCM2385 芯片的软件,它允许访问 GPIO 引脚来控制设备。
|
||||
|
||||
在我写这篇文章之时,用于树莓派的最新博通 BCM2385 库版本是 v1.68 。安装此库需要下载软件压缩包然后使用 `make` 来安装:
|
||||
|
||||
```
|
||||
# 下载 BCM2853 库并解压
|
||||
$ curl -sSL http://www.airspayce.com/mikem/bcm2835/bcm2835-1.68.tar.g> -o - | tar -xzf -
|
||||
|
||||
# 进入解压后的文件夹
|
||||
$ pushd bcm2835-1.68/
|
||||
|
||||
# 配置、检查并安装 BCM2853 库
|
||||
$ sudo ./configure
|
||||
$ sudo make check
|
||||
$ sudo make install
|
||||
|
||||
# 返回上级目录
|
||||
$ popd
|
||||
```
|
||||
|
||||
#### 安装需要的 Python 库
|
||||
|
||||
你用 Python 控制电子纸显示屏需要安装 Python 库 `RPi.GPIO`,还需要使用 `python3-pil` 包来画图。显然,PIL 包已经不行了,但 Pillow 可以作为代替方案。我还没有为该项目测试过 Pillow ,但它可行:
|
||||
|
||||
```
|
||||
# 安装需要的 Python 库
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install python3-pip python3-pil
|
||||
$ sudo pip3 install RPi.GPIO
|
||||
```
|
||||
|
||||
_注意:这些是 Python3 的指令。你可以在 WaveShare 网站查到 Python2 的指令。_
|
||||
|
||||
#### 下载 WaveShare 示例和 Python 库
|
||||
|
||||
Waveshare 维护了一个 Python 和 C 的 Git 库,用于使用其电子纸显示屏和一些展示如何使用它们的示例。对这个倒计时时钟而言,你需要克隆这个库并使用用于 2.13 英寸显示屏的库:
|
||||
|
||||
```
|
||||
# 克隆这个 WaveShare e-Paper git 库
|
||||
$ git clone https://github.com/waveshare/e-Paper.gi>
|
||||
```
|
||||
|
||||
如果你用不同的显示器或者其他公司产品,需要使用适配软件。
|
||||
|
||||
Waveshare 提供了很多指导:
|
||||
|
||||
* [WaveShare 电子纸设置指导][9]
|
||||
* [WaveShare 电子纸库安装指导][10]
|
||||
|
||||
#### 获得有趣的字体(选做)
|
||||
|
||||
你可以随心所欲的使用显示器,为什么不搞点花样?找一个炫酷的字体!
|
||||
|
||||
这有大量 [开放字体许可][11] 的字体可供选择。我十分喜爱 Bangers 字体。如果你看过 YouTube 那你见过这种字体了,它十分流行。你可以下载到本地的共享字体目录文件中,并且所有的应用都可以使用,包括这个项目:
|
||||
|
||||
```
|
||||
# “Bangers” 字体是 Vernon Adams 使用 Google 字体开放许可授权的字体
|
||||
$ mkdir -p ~/.local/share/fonts
|
||||
$ curl -sSL https://github.com/google/fonts/raw/master/ofl/bangers/Bangers-Regular.ttf -o fonts/Bangers-Regular.ttf
|
||||
```
|
||||
|
||||
### 创建一个圆周率日倒计时器
|
||||
|
||||
现在你已经安装好了软件,可以使用带有炫酷字体的电子纸显示屏了。你可以创建一个有趣的项目:倒计时到下一个圆周率日!
|
||||
|
||||
如果你想,你可以从该项目的 [GitHub 仓库][13] 直接下载 [countdown.py][12] 这个 Python 文件并跳到文章结尾。
|
||||
|
||||
为了满足大家的好奇心,我将逐步讲解。
|
||||
|
||||
#### 导入一些库
|
||||
|
||||
```
|
||||
#!/usr/bin/python3
|
||||
# -*- coding:utf-8 -*-
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from PIL import Image,ImageDraw,ImageFont
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
basedir = Path(__file__).parent
|
||||
waveshare_base = basedir.joinpath('e-Paper', 'RaspberryPi_JetsonNano', 'python')
|
||||
libdir = waveshare_base.joinpath('lib')
|
||||
```
|
||||
|
||||
开始先导入一些标准库之后脚本中用。也需要你从 PIL 添加 `Image`、`ImageDraw` 和 `ImageFont`,你会用到这些来画一些简单的图形。最后,为本地 `lib` 目录设置一些变量,该目录包含了用于 2.13 英寸显示屏的 Waveshare Python 库,稍后你可以使用这些变量从本地目录加载库。
|
||||
|
||||
#### 字体大小辅助函数
|
||||
|
||||
下一部分是为你选择的 Bangers-Regular.ttf 字体建立一个修改大小的辅助函数。该函数将整型变量作为大小参数,并返回一个图形字体对象来用于显示:
|
||||
|
||||
```
|
||||
def set_font_size(font_size):
|
||||
logging.info("Loading font...")
|
||||
return ImageFont.truetype(f"{basedir.joinpath('Bangers-Regular.ttf').resolve()}", font_size)
|
||||
```
|
||||
|
||||
#### 倒计时逻辑
|
||||
|
||||
接下来是计算这个项目的一个函数:距下次圆周率日还有多久。如果是在一月,那么计算剩余天数将很简单。但是你需要考虑是否今年的圆周率日是否已经过去了(允悲)。如果是的话,那么计算在你可以再次庆祝之前还有多少天:
|
||||
|
||||
```
|
||||
def countdown(now):
|
||||
piday = datetime(now.year, 3, 14)
|
||||
|
||||
# 如果错过了就增加一年
|
||||
if piday < now:
|
||||
piday = datetime((now.year + 1), 3, 14)
|
||||
|
||||
days = (piday - now).days
|
||||
|
||||
logging.info(f"Days till piday: {days}")
|
||||
return day
|
||||
```
|
||||
|
||||
#### 主函数
|
||||
|
||||
最后,到了主函数,需要初始化显示屏并向它写数据。这时,你应该写一个欢迎语然后再开始倒计时。但是首先,你需要加载 Waveshare 库:
|
||||
|
||||
```
|
||||
def main():
|
||||
|
||||
if os.path.exists(libdir):
|
||||
sys.path.append(f"{libdir}")
|
||||
from waveshare_epd import epd2in13_V2
|
||||
else:
|
||||
logging.fatal(f"not found: {libdir}")
|
||||
sys.exit(1)
|
||||
```
|
||||
|
||||
上面的代码片段检查以确保该库已下载到倒计时脚本旁边的目录中,然后加载`epd2in13_V2` 库。如果你使用不同的显示屏,则需要使用不同的库。如果你愿意,也可以自己编写。我发现阅读 Waveshare 随显示屏提供的 Python 代码很有趣,它比我想象的要简单得多。
|
||||
|
||||
下一段代码创建一个 EPD(电子纸显示屏)对象以与显示器交互并初始化硬件:
|
||||
|
||||
```
|
||||
logging.info("Starting...")
|
||||
try:
|
||||
# 创建一个显示对象
|
||||
epd = epd2in13_V2.EPD()
|
||||
|
||||
# 初始化并清空显示
|
||||
# ePaper 保持它的状态处分更新
|
||||
logging.info("Initialize and clear...")
|
||||
epd.init(epd.FULL_UPDATE)
|
||||
epd.Clear(0xFF)
|
||||
```
|
||||
|
||||
关于电子纸的一个有趣之处:它仅在将像素从白色变为黑色或从黑色变为白色时才耗电。这意味着当设备断电或应用程序因任何原因停止时,屏幕上的任何内容都会保留下来。从功耗的角度来看,这很好,但这也意味着你需要在启动时清除显示,否则你的脚本只会覆盖屏幕上已有的内容。 因此,`epd.Clear(0xFF)` 用于在脚本启动时清除显示。
|
||||
|
||||
接下来,创建一个“画布”来绘制剩余的显示输出:
|
||||
|
||||
```
|
||||
# 创建一个图形对象
|
||||
# 注意:"epd.heigh" 是屏幕的长边
|
||||
# 注意:"epd.width" 是屏幕的短边
|
||||
# 真是反直觉…
|
||||
logging.info(f"Creating canvas - height: {epd.height}, width: {epd.width}")
|
||||
image = Image.new('1', (epd.height, epd.width), 255) # 255: clear the frame
|
||||
draw = ImageDraw.Draw(image)
|
||||
```
|
||||
|
||||
这与显示器的宽度和高度相匹配——但它有点反直觉,因为显示器的短边是宽度。我认为长边是宽度,所以这只是需要注意的一点。 请注意,`epd.height` 和 `epd.width` 由 Waveshare 库设置以对应于你使用的设备。
|
||||
|
||||
#### 欢迎语
|
||||
|
||||
接下来,你将开始画一些画。这涉及在你之前创建的“画布”对象上设置数据。这还没有将它绘制到电子纸显示屏上——你现在只是在构建你想要的图像。由你为这个项目绘制带有一块馅饼的图像,来创建一个庆祝圆周率日的欢迎信息:
|
||||
|
||||
![画一块馅饼][14]
|
||||
|
||||
很可爱,不是吗?
|
||||
|
||||
```
|
||||
logging.info("Set text text...")
|
||||
bangers64 = set_font_size(64)
|
||||
draw.text((0, 30), 'PI DAY!', font = bangers64, fill = 0)
|
||||
|
||||
logging.info("Set BMP...")
|
||||
bmp = Image.open(basedir.joinpath("img", "pie.bmp"))
|
||||
image.paste(bmp, (150,2))
|
||||
```
|
||||
最后,_真是是最后了_,你可以展示你画的图画:
|
||||
|
||||
```
|
||||
logging.info("Display text and BMP")
|
||||
epd.display(epd.getbuffer(image))
|
||||
```
|
||||
|
||||
上面那段话更新了显示屏,以显示你所画的图像。
|
||||
|
||||
接下来,准备另一幅图像展示你的倒计时:
|
||||
|
||||
#### 圆周率日倒计时
|
||||
|
||||
首先,创建一个用来展示倒计时的图像对象。也需要设置数字的字体大小:
|
||||
|
||||
```
|
||||
logging.info("Pi Date countdown; press CTRL-C to exit")
|
||||
piday_image = Image.new('1', (epd.height, epd.width), 255)
|
||||
piday_draw = ImageDraw.Draw(piday_image)
|
||||
|
||||
# 设置字体大小
|
||||
bangers36 = set_font_size(36)
|
||||
bangers64 = set_font_size(64)
|
||||
```
|
||||
|
||||
为了使它显示的时候更像一个倒计时,更新图像的一部分是更加有效的手段,仅更改已经改变的显示数据部分。下面的代码准备以这样方式运行:
|
||||
|
||||
```
|
||||
# 准备更新显示
|
||||
epd.displayPartBaseImage(epd.getbuffer(piday_image))
|
||||
epd.init(epd.PART_UPDATE)
|
||||
```
|
||||
|
||||
最后,需要计时,开始一个无限循环来检查据下次圆周率日还有多久,并显示在电子纸上。如果到了圆周率日,你可以输出一些庆祝短语:
|
||||
|
||||
```
|
||||
while (True):
|
||||
days = countdown(datetime.now())
|
||||
unit = get_days_unit(days)
|
||||
|
||||
# 通过绘制一个填充有白色的矩形来清除屏幕的下半部分
|
||||
piday_draw.rectangle((0, 50, 250, 122), fill = 255)
|
||||
|
||||
# 绘制页眉
|
||||
piday_draw.text((10,10), "Days till Pi-day:", font = bangers36, fill = 0)
|
||||
|
||||
if days == 0:
|
||||
# 绘制庆祝语
|
||||
piday_draw.text((0, 50), f"It's Pi Day!", font = bangers64, fill = 0)
|
||||
else:
|
||||
# 绘制距下一次 Pi Day 的时间
|
||||
piday_draw.text((70, 50), f"{str(days)} {unit}", font = bangers64, fill = 0)
|
||||
|
||||
# 渲染屏幕
|
||||
epd.displayPartial(epd.getbuffer(piday_image))
|
||||
time.sleep(5)
|
||||
```
|
||||
|
||||
脚本最后做了一些错误处理,包括捕获键盘中断,这样你可以使用 `Ctrl + C` 来结束无限循环,以及一个根据计数来打印 `day` 或 `days` 的函数:
|
||||
|
||||
```
|
||||
except IOError as e:
|
||||
logging.info(e)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
logging.info("Exiting...")
|
||||
epd.init(epd.FULL_UPDATE)
|
||||
epd.Clear(0xFF)
|
||||
time.sleep(1)
|
||||
epd2in13_V2.epdconfig.module_exit()
|
||||
exit()
|
||||
|
||||
def get_days_unit(count):
|
||||
if count == 1:
|
||||
return "day"
|
||||
|
||||
return "days"
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
```
|
||||
|
||||
现在你已经拥有一个倒计时并显示剩余天数的脚本!这是在我的树莓派上的显示(视频经过加速,我没有足够的磁盘空间来保存一整天的视频):
|
||||
|
||||
![Pi Day Countdown Timer In Action][16]
|
||||
|
||||
#### 安装 systemd 服务(选做)
|
||||
|
||||
如果你希望在系统打开时运行倒计时显示,并且无需登录并运行脚本,你可以将可选的 systemd 单元安装为 [systemd 用户服务][17]。
|
||||
|
||||
将 GitHub 上的 [piday.service][18] 文件复制到 `${HOME}/.config/systemd/user`,如果该目录不存在,请先创建该目录。然后你可以启用该服务并启动它:
|
||||
|
||||
```
|
||||
$ mkdir -p ~/.config/systemd/user
|
||||
$ cp piday.service ~/.config/systemd/user
|
||||
$ systemctl --user enable piday.service
|
||||
$ systemctl --user start piday.service
|
||||
|
||||
# Enable lingering, to create a user session at boot
|
||||
# and allow services to run after logout
|
||||
$ loginctl enable-linger $USER
|
||||
```
|
||||
|
||||
该脚本将输出到 systemd 日志,可以使用 `journalctl` 命令查看输出。
|
||||
|
||||
### 它开始看起来像是圆周率日了!
|
||||
|
||||
这就是你的作品!一个显示在电子纸显示屏上的树莓派 Zero W 圆周率日倒计时器!并在系统启动时使用 systemd 单元文件启动!现在距离我们可以再次相聚庆祝圆周率日还有好多天的奇妙设备———树莓派。通过我们的小项目,我们可以一目了然地看到确切的天数。
|
||||
|
||||
但实际上,每个人都可以在每一天在心中庆祝圆周率日,因此请使用自己的树莓派创建一些有趣且具有教育意义的项目吧!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/3/raspberry-pi-countdown-clock
|
||||
|
||||
作者:[Chris Collins][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[Donkey](https://github.com/Donkey-Hao)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/clcollins
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/clocks_time.png?itok=_ID09GDk (Alarm clocks with different time)
|
||||
[2]: https://en.wikipedia.org/wiki/Pi_Day
|
||||
[3]: https://opensource.com/tags/raspberry-pi
|
||||
[4]: https://www.raspberrypi.org/products/raspberry-pi-zero-w/
|
||||
[5]: https://opensource.com/article/21/3/troubleshoot-wifi-go-raspberry-pi
|
||||
[6]: https://www.waveshare.com/product/displays/e-paper.htm
|
||||
[7]: https://www.raspberrypi.org/software/operating-systems/
|
||||
[8]: https://pypi.org/project/Pillow/
|
||||
[9]: https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT
|
||||
[10]: https://www.waveshare.com/wiki/Libraries_Installation_for_RPi
|
||||
[11]: https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL
|
||||
[12]: https://github.com/clcollins/epaper-pi-ex/blob/main/countdown.py
|
||||
[13]: https://github.com/clcollins/epaper-pi-ex/
|
||||
[14]: https://opensource.com/sites/default/files/uploads/pie.png (drawing of a piece of pie)
|
||||
[15]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[16]: https://opensource.com/sites/default/files/uploads/piday_countdown.gif (Pi Day Countdown Timer In Action)
|
||||
[17]: https://wiki.archlinux.org/index.php/systemd/User
|
||||
[18]: https://github.com/clcollins/epaper-pi-ex/blob/main/piday.service
|
@ -3,37 +3,39 @@
|
||||
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "VeryZZJ"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14687-1.html"
|
||||
|
||||
不同编程语言是如何完成同一件事
|
||||
======
|
||||
|
||||
通过一个简单的小游戏比较13种编程语言
|
||||
![Developing code.][1]
|
||||
> 通过一个简单的小游戏比较 13 种编程语言。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/08/113845fs81srd5s8rjryt5.jpg)
|
||||
|
||||
当我开始学习一种新的编程语言时,会把重点放在定义变量、书写声明以及计算表达式,一旦对这些概念有一个大致的了解,通常就能够自己弄清剩下的部分。大多数编程语言都具有相似性,所以如果你掌握了一种编程语言,学习下一种语言的重点就是弄清楚独有的概念以及区分不同。
|
||||
|
||||
我喜欢写一些测试程序来帮助练习新的编程语言。其中我经常写的是一个叫做“猜数字”的小游戏,计算机选出1到100里的任一数字,然后我来猜。程序循环进行,直到猜出正确数字。通过伪代码可以看出,这是个非常简单的程序:
|
||||
我喜欢写一些测试程序来帮助练习新的编程语言。其中我经常写的是一个叫做“猜数字”的小游戏,计算机选出 1 到 100 里的任一数字,然后我来猜。程序循环进行,直到猜出正确数字。通过伪代码可以看出,这是个非常简单的程序:
|
||||
|
||||
* 计算机在1到100之间选出一个随机数字
|
||||
* 计算机在 1 到 100 之间选出一个随机数字
|
||||
* 循环进行直到猜出该随机数字
|
||||
+ 计算机读取我的猜测
|
||||
+ 告诉我我的猜测过高还是过低
|
||||
|
||||
Opensource.com 最近发表了一篇文章,用不同的语言写这个程序。这是一个比较不同语言做同样事情的有趣机会。大多数编程语言具有相似性,所以当你在学习下一种新的编程语言时,主要是学习它的独特之处。
|
||||
我们发表了一些文章,用不同的语言写这个程序。这是一个比较不同语言做同样事情的有趣机会。大多数编程语言具有相似性,所以当你在学习下一种新的编程语言时,主要是学习它的独特之处。
|
||||
|
||||
C 语言由 Dennis Ritchie 于1972年在贝尔实验室创建,是一种早期的通用编程语言。C 语言非常受欢迎,并迅速成为 Unix 系统上的标准编程语言。正是因为它的流行,许多其他编程语言也采用了类似的编程语法。这就是为什么如果你已经知道如何使用 C 语言编程,学习 C++、Rust、Java、Groovy、JavaScript、awk 或 Lua 会更容易。
|
||||
C 语言由 Dennis Ritchie 于 1972 年在贝尔实验室创建,是一种早期的通用编程语言。C 语言非常受欢迎,并迅速成为 Unix 系统上的标准编程语言。正是因为它的流行,许多其他编程语言也采用了类似的编程语法。这就是为什么如果你已经知道如何使用 C 语言编程,学习 C++、Rust、Java、Groovy、JavaScript、awk 或 Lua 会更容易。
|
||||
|
||||
接下来我们看看这些不同的编程语言是如何实现 "猜数字 "游戏的主要步骤。我将把重点放在基本元素的相似或不同,跳过一些外围代码,如分配临时变量。
|
||||
接下来我们看看这些不同的编程语言是如何实现 “猜数字” 游戏的主要步骤。我将把重点放在基本元素的相似或不同,跳过一些外围代码,如分配临时变量。
|
||||
|
||||
### 计算机在1到100之间选出一个随机数字
|
||||
### 计算机在 1 到 100 之间选出一个随机数字
|
||||
|
||||
你可以看到这里有许多相似之处。大多数编程语言使用类似`rand()` 的函数,你可以设定一个范围来生成随机数。而其他一些语言使用一个特殊的函数来设定范围生成随机数。
|
||||
你可以看到这里有许多相似之处。大多数编程语言使用类似 `rand()` 的函数,你可以设定一个范围来生成随机数。而其他一些语言使用一个特殊的函数来设定范围生成随机数。
|
||||
|
||||
C
|
||||
C:
|
||||
|
||||
```c
|
||||
```
|
||||
// Using the Linux `getrandom` system call
|
||||
getrandom(&randval, sizeof(int), GRND_NONBLOCK);
|
||||
number = randval % maxval + 1;
|
||||
@ -42,97 +44,97 @@ number = randval % maxval + 1;
|
||||
number = rand() % 100 + 1;
|
||||
```
|
||||
|
||||
C++
|
||||
C++:
|
||||
|
||||
```cpp
|
||||
```
|
||||
int number = rand() % 100+1;
|
||||
```
|
||||
|
||||
Rust
|
||||
Rust:
|
||||
|
||||
```rust
|
||||
```
|
||||
let random = rng.gen_range(1..101);
|
||||
```
|
||||
|
||||
Java
|
||||
Java:
|
||||
|
||||
```java
|
||||
```
|
||||
private static final int NUMBER = r.nextInt(100) + 1;
|
||||
```
|
||||
|
||||
Groovy
|
||||
Groovy:
|
||||
|
||||
```groovy
|
||||
```
|
||||
int randomNumber = (new Random()).nextInt(100) + 1
|
||||
```
|
||||
|
||||
JavaScript
|
||||
JavaScript:
|
||||
|
||||
```javascript
|
||||
```
|
||||
const randomNumber = Math.floor(Math.random() * 100) + 1
|
||||
```
|
||||
|
||||
awk
|
||||
awk:
|
||||
|
||||
```awk
|
||||
```
|
||||
randomNumber = int(rand() * 100) + 1
|
||||
```
|
||||
|
||||
Lua
|
||||
Lua:
|
||||
|
||||
```lua
|
||||
```
|
||||
number = math.random(1,100)
|
||||
```
|
||||
|
||||
### 循环进行直到我猜出该随机数字
|
||||
|
||||
循环通常是用控制流程来实现的,如`while` 或`do-while`。JavaScript 中的实现没有使用循环,而是 "实时 "更新 HTML 页面,直到用户猜出正确的数字。Awk 虽然支持循环,但是通过循环读取输入信息是没有意义的,因为 awk 是基于数据管道的,所以它从文件而不是直接从用户读取输入信息。
|
||||
循环通常是用控制流程来实现的,如 `while` 或 `do-while`。JavaScript 中的实现没有使用循环,而是 “实时 ”更新 HTML 页面,直到用户猜出正确的数字。Awk 虽然支持循环,但是通过循环读取输入信息是没有意义的,因为 Awk 是基于数据管道的,所以它从文件而不是直接从用户读取输入信息。
|
||||
|
||||
C
|
||||
C:
|
||||
|
||||
```c
|
||||
```
|
||||
do {
|
||||
…
|
||||
} while (guess != number);
|
||||
```
|
||||
|
||||
C++
|
||||
C++:
|
||||
|
||||
```cpp
|
||||
```
|
||||
do {
|
||||
…
|
||||
} while ( number != guess );
|
||||
```
|
||||
|
||||
Rust
|
||||
Rust:
|
||||
|
||||
```rust
|
||||
```
|
||||
for line in std::io::stdin().lock().lines() {
|
||||
…
|
||||
break;
|
||||
}
|
||||
```
|
||||
|
||||
Java
|
||||
Java:
|
||||
|
||||
```java
|
||||
```
|
||||
while ( guess != NUMBER ) {
|
||||
…
|
||||
}
|
||||
```
|
||||
|
||||
Groovy
|
||||
Groovy:
|
||||
|
||||
```groovy
|
||||
```
|
||||
while ( … ) {
|
||||
…
|
||||
break;
|
||||
}
|
||||
```
|
||||
|
||||
Lua
|
||||
Lua:
|
||||
|
||||
```lua
|
||||
```
|
||||
while ( player.guess ~= number ) do
|
||||
…
|
||||
end
|
||||
@ -140,66 +142,68 @@ end
|
||||
|
||||
### 计算机读取我的猜测
|
||||
|
||||
不同编程语言对输入的处理方式不同。例如,JavaScript 直接从 HTML 表单中读取数值,而 awk 则从数据管道中读取数据。
|
||||
不同编程语言对输入的处理方式不同。例如,JavaScript 直接从 HTML 表单中读取数值,而 Awk 则从数据管道中读取数据。
|
||||
|
||||
```c
|
||||
C:
|
||||
|
||||
```
|
||||
scanf("%d", &guess);
|
||||
```
|
||||
|
||||
C++
|
||||
C++:
|
||||
|
||||
```cpp
|
||||
```
|
||||
cin >> guess;
|
||||
```
|
||||
|
||||
Rust
|
||||
Rust:
|
||||
|
||||
```rust
|
||||
```
|
||||
let parsed = line.ok().as_deref().map(str::parse::<i64>);
|
||||
if let Some(Ok(guess)) = parsed {
|
||||
…
|
||||
}
|
||||
```
|
||||
|
||||
Java
|
||||
Java:
|
||||
|
||||
```java
|
||||
```
|
||||
guess = player.nextInt();
|
||||
```
|
||||
|
||||
Groovy
|
||||
Groovy:
|
||||
|
||||
```groovy
|
||||
```
|
||||
response = reader.readLine()
|
||||
int guess = response as Integer
|
||||
```
|
||||
|
||||
JavaScript
|
||||
JavaScript:
|
||||
|
||||
```javascript
|
||||
```
|
||||
let myGuess = guess.value
|
||||
```
|
||||
|
||||
awk
|
||||
Awk:
|
||||
|
||||
```awk
|
||||
```
|
||||
guess = int($0)
|
||||
```
|
||||
|
||||
Lua
|
||||
Lua:
|
||||
|
||||
```lua
|
||||
```
|
||||
player.answer = io.read()
|
||||
player.guess = tonumber(player.answer)
|
||||
```
|
||||
|
||||
### 告诉我我的猜测过高还是过低
|
||||
### 告诉我猜测过高还是过低
|
||||
|
||||
在这些类 C 语言中,通常是通过`if`语句进行比较的。每种编程语言打印输出的方式有一些变化,但打印语句在每个样本中都是可识别的。
|
||||
在这些类 C 语言中,通常是通过 `if` 语句进行比较的。每种编程语言打印输出的方式有一些变化,但打印语句在每个样本中都是可识别的。
|
||||
|
||||
C
|
||||
C:
|
||||
|
||||
```c
|
||||
```
|
||||
if (guess < number) {
|
||||
puts("Too low");
|
||||
}
|
||||
@ -210,9 +214,9 @@ else if (guess > number) {
|
||||
puts("That's right!");
|
||||
```
|
||||
|
||||
C++
|
||||
C++:
|
||||
|
||||
```cpp
|
||||
```
|
||||
if ( guess > number) { cout << "Too high.\n" << endl; }
|
||||
else if ( guess < number ) { cout << "Too low.\n" << endl; }
|
||||
else {
|
||||
@ -221,9 +225,9 @@ else {
|
||||
}
|
||||
```
|
||||
|
||||
Rust
|
||||
Rust:
|
||||
|
||||
```rust
|
||||
```
|
||||
_ if guess < random => println!("Too low"),
|
||||
_ if guess > random => println!("Too high"),
|
||||
_ => {
|
||||
@ -232,9 +236,9 @@ _ => {
|
||||
}
|
||||
```
|
||||
|
||||
Java
|
||||
Java:
|
||||
|
||||
```java
|
||||
```
|
||||
if ( guess > NUMBER ) {
|
||||
System.out.println("Too high");
|
||||
} else if ( guess < NUMBER ) {
|
||||
@ -245,9 +249,9 @@ if ( guess > NUMBER ) {
|
||||
}
|
||||
```
|
||||
|
||||
Groovy
|
||||
Groovy:
|
||||
|
||||
```groovy
|
||||
```
|
||||
if (guess < randomNumber)
|
||||
print 'too low, try again: '
|
||||
else if (guess > randomNumber)
|
||||
@ -258,9 +262,9 @@ else {
|
||||
}
|
||||
```
|
||||
|
||||
JavaScript
|
||||
JavaScript:
|
||||
|
||||
```javascript
|
||||
```
|
||||
if (myGuess === randomNumber) {
|
||||
feedback.textContent = "You got it right!"
|
||||
} else if (myGuess > randomNumber) {
|
||||
@ -270,9 +274,9 @@ if (myGuess === randomNumber) {
|
||||
}
|
||||
```
|
||||
|
||||
awk
|
||||
Awk:
|
||||
|
||||
```awk
|
||||
```
|
||||
if (guess < randomNumber) {
|
||||
printf "too low, try again:"
|
||||
} else if (guess > randomNumber) {
|
||||
@ -283,9 +287,9 @@ if (guess < randomNumber) {
|
||||
}
|
||||
```
|
||||
|
||||
Lua
|
||||
Lua:
|
||||
|
||||
```lua
|
||||
```
|
||||
if ( player.guess > number ) then
|
||||
print("Too high")
|
||||
elseif ( player.guess < number) then
|
||||
@ -298,21 +302,21 @@ end
|
||||
|
||||
### 非类 C 编程语言会怎么样呢?
|
||||
|
||||
非类 C 编程语言会有很大的不同,需要学习特定的语法来完成每一步。Racket 源于 Lisp 和 Scheme,所以它使用 Lisp 的前缀符和大量括号。Python 使用空格而不是括号来表示循环之类的块。Elixir 是一种函数式编程语言,有自己的语法。Bash 是基于 Unix 系统中的 Bourne shell,它本身借鉴了 Algol68,并支持额外的速记符,如`&&`作为 "and " 的变体。Fortran 是在使用打孔卡片输入代码的时期创建的,所以它依赖于一些重要列的80-列布局。
|
||||
非类 C 编程语言会有很大的不同,需要学习特定的语法来完成每一步。Racket 源于 Lisp 和 Scheme,所以它使用 Lisp 的前缀符和大量括号。Python 使用空格而不是括号来表示循环之类的块。Elixir 是一种函数式编程语言,有自己的语法。Bash 是基于 Unix 系统中的 Bourne shell,它本身借鉴了 Algol68,并支持额外的速记符,如 `&&` 作为 `and` 的变体。Fortran 是在使用打孔卡片输入代码的时期创建的,所以它依赖于一些重要列的 80 列布局。
|
||||
|
||||
我将通过比较 "if "语句,举例表现这些编程语言的不同。if 判断一个值是否小于或大于另一个值,并向用户打印适当信息。
|
||||
我将通过比较 `if` 语句,举例表现这些编程语言的不同。`if` 判断一个值是否小于或大于另一个值,并向用户打印适当信息。
|
||||
|
||||
Racket
|
||||
Racket:
|
||||
|
||||
```racket
|
||||
```
|
||||
(cond [(> number guess) (displayln "Too low") (inquire-user number)]
|
||||
[(< number guess) (displayln "Too high") (inquire-user number)]
|
||||
[else (displayln "Correct!")]))
|
||||
```
|
||||
|
||||
Python
|
||||
Python:
|
||||
|
||||
```python
|
||||
```
|
||||
if guess < random:
|
||||
print("Too low")
|
||||
elif guess > random:
|
||||
@ -321,9 +325,9 @@ else:
|
||||
print("That's right!")
|
||||
```
|
||||
|
||||
Elixir
|
||||
Elixir:
|
||||
|
||||
```elixir
|
||||
```
|
||||
cond do
|
||||
guess < num ->
|
||||
IO.puts "Too low!"
|
||||
@ -336,16 +340,16 @@ cond do
|
||||
end
|
||||
```
|
||||
|
||||
Bash
|
||||
Bash:
|
||||
|
||||
```bash
|
||||
```
|
||||
[ "0$guess" -lt $number ] && echo "Too low"
|
||||
[ "0$guess" -gt $number ] && echo "Too high"
|
||||
```
|
||||
|
||||
Fortran
|
||||
Fortran:
|
||||
|
||||
```fortran
|
||||
```
|
||||
IF (GUESS.LT.NUMBER) THEN
|
||||
PRINT *, 'TOO LOW'
|
||||
ELSE IF (GUESS.GT.NUMBER) THEN
|
||||
@ -353,28 +357,28 @@ ELSE IF (GUESS.GT.NUMBER) THEN
|
||||
ENDIF
|
||||
```
|
||||
|
||||
### Read more 更多
|
||||
### 更多
|
||||
|
||||
当你在学习一种新的编程语言时"猜数字 "游戏是一个很友好的入门程序,通过一种简单的方式练习了几个常见的编程概念。通过不同编程语言实现这个简单游戏,你可以理解一些核心概念和每种语言的细节。
|
||||
当你在学习一种新的编程语言时 “猜数字” 游戏是一个很友好的入门程序,通过一种简单的方式练习了几个常见的编程概念。通过不同编程语言实现这个简单游戏,你可以理解一些核心概念和每种语言的细节。
|
||||
|
||||
学习如何用 C 和类 C 语言编写 "猜数字 "游戏:
|
||||
学习如何用 C 和类 C 语言编写 “猜数字” 游戏:
|
||||
|
||||
* [C][2], by Jim Hall
|
||||
* [C++][3], by Seth Kenlon
|
||||
* [Rust][4], by Moshe Zadka
|
||||
* [Java][5], by Seth Kenlon
|
||||
* [Groovy][6], by Chris Hermansen
|
||||
* [JavaScript][7], by Mandy Kendall
|
||||
* [awk][8], by Chris Hermansen
|
||||
* [Lua][9], by Seth Kenlon
|
||||
* [C][2], Jim Hall
|
||||
* [C++][3], Seth Kenlon
|
||||
* [Rust][4], Moshe Zadka
|
||||
* [Java][5], Seth Kenlon
|
||||
* [Groovy][6], Chris Hermansen
|
||||
* [JavaScript][7], Mandy Kendall
|
||||
* [awk][8], Chris Hermansen
|
||||
* [Lua][9], Seth Kenlon
|
||||
|
||||
其他语言:
|
||||
|
||||
* [Racket][10], by Cristiano L. Fontana
|
||||
* [Python][11], by Moshe Zadka
|
||||
* [Elixir][12], by Moshe Zadka
|
||||
* [Bash][13], by Jim Hall
|
||||
* [Fortran][14], by Jim Hall
|
||||
* [Racket][10], Cristiano L. Fontana
|
||||
* [Python][11], Moshe Zadka
|
||||
* [Elixir][12], Moshe Zadka
|
||||
* [Bash][13], Jim Hall
|
||||
* [Fortran][14], Jim Hall
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -383,7 +387,7 @@ via: https://opensource.com/article/21/4/compare-programming-languages
|
||||
作者:[Jim Hall][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[VeryZZJ](https://github.com/VeryZZJ)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,72 @@
|
||||
[#]: subject: (Get started with Kubernetes using chaos engineering)
|
||||
[#]: via: (https://opensource.com/article/21/5/kubernetes-chaos)
|
||||
[#]: author: (Jessica Cherry https://opensource.com/users/cherrybomb)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (Donkey-Hao)
|
||||
[#]: reviewer: (turbokernel, wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-14743-1.html)
|
||||
|
||||
在 Kubernetes 中使用混沌工程
|
||||
======
|
||||
|
||||
> 在这篇文章中学习混沌工程的基础知识。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/22/110901xbb88ccb8lfcgcrl.jpg)
|
||||
|
||||
混沌工程是由科学、规划以及实验组成的。它是一门在系统上进行实验的学科,用来建立系统在生产中承受混乱条件能力的信心。
|
||||
|
||||
首先,我会在文章导论部分解释混沌系统如何工作。
|
||||
|
||||
### 如何开始学习混沌系统呢?
|
||||
|
||||
以我的经验,开始学习混沌系统的最好方式是触发一个此前生产中出现的事故来进行实验。使用过去的数据,制定一个计划,以相同的方式破坏你的系统,然后建立修复策略,并确认结果满足你预期。如果计划失败,你就有了一种新的实验方式,并朝着快速处理问题的新方式前进。
|
||||
|
||||
最重要的是,你可以随时记录所有内容,这意味着,随着时间的推移,整个系统将被完整记录下来,任何人都可以值守而无需太多加码,每个人都可以在周末好好休息。
|
||||
|
||||
### 你要在混沌工程中做什么?
|
||||
|
||||
混沌系统实验运行背后有一些科学依据。我记录了其中一些步骤:
|
||||
|
||||
1. **定义一个稳定状态:** 使用监控工具来搜集当系统没有问题或事故时,看起来功能正常的数据。
|
||||
2. **提出假设或使用先前的事故:** 现在你已经定义了一个稳定状态,请提出一个关于在事故或中断期间会发生(或发生过)的情况的假设。用这个假设来得出一系列将会发生的事故,以及如何解决问题的理论。然后你可以制定一个故意引发该问题的计划。
|
||||
3. **引发问题:** 用这个计划来破坏系统,并开始在真实环境中测试。收集破坏时的指标状态,按计划修复,并追踪提出解决方案所需时长。确保你把所有的东西都记录下来,以备将来发生故障时使用。
|
||||
4. **试图推翻你的假设:** 实验中最精彩的部分是尝试推翻你的思考或计划。你要创建一个不同的状态,看看你能走多远,并在系统中生成一个不同的稳定状态。
|
||||
|
||||
确保在你在另一个系统中生成的破坏因素前,建立一个处于稳定状态的控制系统。这将使你更容易在实验前、期间和之后发现各种稳定状态的差异。
|
||||
|
||||
### 混沌工程需要什么?
|
||||
|
||||
这有一些初学混沌工程很好的工具:
|
||||
|
||||
* 良好的文档编制方法
|
||||
* 一个捕捉你系统是否处于稳定状态的监控系统
|
||||
* Grafana
|
||||
* Prometheus
|
||||
* 混沌工程工具:
|
||||
* Chaos mesh
|
||||
* Litmus
|
||||
* 之后的文章我会介绍更多
|
||||
* 一个假设
|
||||
* 一个计划
|
||||
|
||||
### 去搞破坏吧
|
||||
|
||||
现在你已经掌握了基础,是时候去安全的摧毁你的系统了。我计划每年制造四次混乱,然后努力实现每月一次的破坏。
|
||||
|
||||
混沌工程是一种很好的实践,也是推进你的内部文档保持最新的好方法。此外,随着时间的推移,新升级或应用程序部署将更加顺畅,你的日常生活管理将通过 Kubernetes 变得更加轻松。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/5/kubernetes-chaos
|
||||
|
||||
作者:[Jessica Cherry][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[Donkey](https://github.com/Donkey-Hao)
|
||||
校对:[turbokernel](https://github.com/turbokernel), [wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/cherrybomb
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/brett-jordan-chaos-unsplash.jpg?itok=sApp5dVd (Scrabble letters spell out chaos for chaos engineering)
|
186
published/20210722 Write your first JavaScript code.md
Normal file
186
published/20210722 Write your first JavaScript code.md
Normal file
@ -0,0 +1,186 @@
|
||||
[#]: subject: "Write your first JavaScript code"
|
||||
[#]: via: "https://opensource.com/article/21/7/javascript-cheat-sheet"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14740-1.html"
|
||||
|
||||
编写你的第一段 JavaScript 代码
|
||||
======
|
||||
|
||||
> JavaScript 是为 Web 而生的,但它可以做的事远不止于此。本文将带领你了解它的基础知识,然后你可以下载我们的备忘清单,以便随时掌握详细信息。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/21/114718zzb8f6na6lgb28cn.jpg)
|
||||
|
||||
JavaScript 是一种充满惊喜的编程语言。许多人第一次遇到 JavaScript 时,它通常是作为一种 Web 语言出现的。所有主流浏览器都有一个 JavaScript 引擎;并且,还有一些流行的框架,如 JQuery、Cash 和 Bootstrap 等,它们可以帮助简化网页设计;甚至还有用 JavaScript 编写的编程环境。它似乎在互联网上无处不在,但事实证明,它对于 [Electron][2] 等项目来说也是一种有用的语言。Electron 是一个构建跨平台桌面应用程序的开源工具包,它使用的语言就是 JavaScript。
|
||||
|
||||
JavaScript 语言的用途多到令人惊讶,它拥有各种各样的库,而不仅仅是用于制作网站。它的基础知识十分容易掌握,因此,它可以作为一个起点,助你跨出构建你想象中的东西的第一步。
|
||||
|
||||
### 安装 JavaScript
|
||||
|
||||
随着你的 JavaScript 水平不断提高,你可能会发现自己需要高级的 JavaScript 库和运行时环境。不过,刚开始学习的时候,你是根本不需要安装 JavaScript 环境的。因为所有主流的 Web 浏览器都包含一个 JavaScript 引擎来运行代码。你可以使用自己喜欢的文本编辑器编写 JavaScript,将其加载到 Web 浏览器中,接着你就能看到代码的作用。
|
||||
|
||||
### 上手 JavaScript
|
||||
|
||||
要编写你的第一个 JavaScript 代码,请打开你喜欢的文本编辑器,例如 [Atom][4] 或 [VSCode][5] 等。因为它是为 Web 开发的,所以 JavaScript 可以很好地与 HTML 配合使用。因此,我们先来尝试一些基本的 HTML:
|
||||
|
||||
```
|
||||
<html>
|
||||
<head>
|
||||
<title>JS</title>
|
||||
</head>
|
||||
<body>
|
||||
<p id="example">Nothing here.</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
保存这个文件,然后在 Web 浏览器中打开它。
|
||||
|
||||
![浏览器中显示的 HTML][6]
|
||||
|
||||
要将 JavaScript 添加到这个简单的 HTML 页面,你可以创建一个 JavaScript 文件并在页面的 `<head>` 中引用它,或者只需使用 `<script>` 标记将 JavaScript 代码嵌入 HTML 中。在这个例子中,我嵌入了下面的代码:
|
||||
|
||||
```
|
||||
<html>
|
||||
<head>
|
||||
<title>JS</title>
|
||||
</head>
|
||||
<body>
|
||||
<p id="example">Nothing here.</p>
|
||||
|
||||
<script>
|
||||
let myvariable = "Hello world!";
|
||||
|
||||
document.getElementById("example").innerHTML = myvariable;
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
在浏览器中重新加载页面。
|
||||
|
||||
![在浏览器中显示带有 JavaScript 的 HTML][7]
|
||||
|
||||
如你所见,`<p>` 标签仍然包含字符串 `"Nothing here"`,但是当它被渲染时,JavaScript 会改变它,使其包含 `"Hello world"`。是的,JavaScript 具有重建(或只是帮助构建)网页的能力。
|
||||
|
||||
这个简单脚本中的 JavaScript 做了两件事。首先,它创建一个名为 `myvariable` 的变量,并将字符串 `"Hello world!"` 放置其中。然后,它会在当前文档(浏览器呈现的网页)中搜索 ID 为 `example` 的所有 HTML 元素。当它找到 `example` 时,它使用了 `innerHTML` 函数将 HTML 元素的内容替换为 `myvariable` 的内容。(LCTT 译注:这里作者笔误了,`innerHTML` 是“属性”而非“函数”。)
|
||||
|
||||
当然,我们也可以不用自定义变量。因为,使用动态创建的内容来填充 HTML 元素也是容易的。例如,你可以使用当前时间戳来填充它:
|
||||
|
||||
```
|
||||
<html>
|
||||
<head>
|
||||
<title>JS</title>
|
||||
</head>
|
||||
<body>
|
||||
<p id="example">Date and time appears here.</p>
|
||||
|
||||
<script>
|
||||
document.getElementById("example").innerHTML = Date();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
重新加载页面,你就可以看到在呈现页面时生成的时间戳。再重新加载几次,你可以观察到秒数会不断增加。
|
||||
|
||||
### JavaScript 语法
|
||||
|
||||
在编程中,<ruby>语法<rt>syntax</rt></ruby> 指的是如何编写句子(或“行”)的规则。在 JavaScript 中,每行代码必须以分号(`;`)结尾,以便运行代码的 JavaScript 引擎知道何时停止阅读。(LCTT 译注:从实用角度看,此处的“必须”其实是不正确的,大多数 JS 引擎都支持不加分号。Vue.js 的作者尤雨溪认为“没有应该不应该,只有你自己喜欢不喜欢”,他同时表示,“Vue.js 的代码全部不带分号”。详情可以查看他在知乎上对于此问题的 [回答][10]。)
|
||||
|
||||
单词(或 <ruby>字符串<rt>strings</rt></ruby>)必须用引号(`"`)括起来,而数字(或 <ruby>整数<rt>integers</rt></ruby>)则不用。
|
||||
|
||||
几乎所有其他东西都是 JavaScript 语言的约定,例如变量、数组、条件语句、对象、函数等等。
|
||||
|
||||
### 在 JavaScript 中创建变量
|
||||
|
||||
变量是数据的容器。你可以将变量视为一个盒子,你在其中放置数据,以便与程序的其他部分共享它。要在 JavaScript 中创建变量,你可以选用关键字 `let` 和 `var` 中的一个,请根据你打算如何使用变量来选择:`var` 关键字用于创建一个供整个程序使用的变量,而 `let` 只为特定目的创建变量,通常在函数或循环的内部使用。(LCTT 译注:还有 `const` 关键字,它用于创建一个常量。)
|
||||
|
||||
JavaScript 内置的 `typeof` 函数可以帮助你识别变量包含的数据的类型。使用第一个示例,你可以修改显示文本,来显示 `myvariable` 包含的数据的类型:
|
||||
|
||||
```
|
||||
<string>
|
||||
let myvariable = "Hello world!";
|
||||
document.getElementById("example").innerHTML = typeof(myvariable);
|
||||
</string>
|
||||
```
|
||||
|
||||
接着,你就会发现 Web 浏览器中显示出 “string” 字样,因为该变量包含的数据是 `"Hello world!"`。在 `myvariable` 中存储不同类型的数据(例如整数),浏览器就会把不同的数据类型打印到示例网页上。尝试将 `myvariable` 的内容更改为你喜欢的数字,然后重新加载页面。
|
||||
|
||||
### 在 JavaScript 中创建函数
|
||||
|
||||
编程中的函数是独立的数据处理器。正是它们使编程得以 *模块化*。因为函数的存在,程序员可以编写通用库,例如,调整图像大小或统计时间花费的库,以供其他和你一样的程序员在他们的代码中使用。
|
||||
|
||||
要创建一个函数,你可以为函数提供一个自定义名称,后面跟着用大括号括起来的、任意数量的代码。
|
||||
|
||||
下面是一个简单的网页,其中包含了一个剪裁过的图像,还有一个分析图像并返回真实图像尺寸的按钮。在这个示例代码中,`<button>` 这个 HTML 元素使用了 JavaScript 的内置函数 `onclick` 来检测用户交互,它会触发一个名为 `get_size` 的自定义函数。具体代码如下:
|
||||
|
||||
```
|
||||
<html>
|
||||
<head>
|
||||
<title>Imager</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div>
|
||||
<button onclick="get_size(document.getElementById('myimg'))">
|
||||
Get image size
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<img style="width: 15%" id="myimg" src="penguin.png" />
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function get_size(i) {
|
||||
let w = i.naturalWidth;
|
||||
let h = i.naturalHeight;
|
||||
alert(w + " by " + h);
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
保存这个文件,并将其加载到 Web 浏览器中以尝试这段代码。
|
||||
|
||||
![自定义的 get_size 函数返回了图像尺寸][8]
|
||||
|
||||
### 使用 JavaScript 的跨平台应用程序
|
||||
|
||||
你可以从代码示例中看到,JavaScript 和 HTML 紧密协作,从而创建了有凝聚力的用户体验。这是 JavaScript 的一大优势。当你使用 JavaScript 编写代码时,你继承了现代计算中最常见的用户界面之一,而它与平台无关,那就是 Web 浏览器。你的代码本质上是跨平台的,因此你的应用程序,无论是简单的图像大小分析器还是复杂的图像编辑器、视频游戏,或者你梦想的任何其他东西,都可以被所有人使用,无论是通过 Web 浏览器,还是桌面(如果你同时提供了一个 Electron 应用)。
|
||||
|
||||
学习 JavaScript 既简单又有趣。网络上有很多网站提供了相关教程,还有超过一百万个 JavaScript 库可帮助你与设备、外围设备、物联网、服务器、文件系统等进行交互。在你学习的过程中,请将我们的 [JavaScript 备忘单][9] 放在身边,以便记住语法和结构的细节。
|
||||
|
||||
> **[JavaScript 备忘单][9]**
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/7/javascript-cheat-sheet
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[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/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/code2.png
|
||||
[2]: https://www.electronjs.org/
|
||||
[3]: https://opensource.com/article/16/12/notepad-text-editor
|
||||
[4]: https://opensource.com/article/20/12/atom
|
||||
[5]: https://opensource.com/article/20/6/open-source-alternatives-vs-code
|
||||
[6]: https://opensource.com/sites/default/files/pictures/plain-html.jpg
|
||||
[7]: https://opensource.com/sites/default/files/uploads/html-javascript.jpg
|
||||
[8]: https://opensource.com/sites/default/files/uploads/get-size.jpg
|
||||
[9]: https://opensource.com/downloads/javascript-cheat-sheet
|
||||
[10]: https://www.zhihu.com/question/20298345/answer/49551142
|
@ -0,0 +1,68 @@
|
||||
[#]: subject: "How to Fix yay: error while loading shared libraries: libalpm.so.12"
|
||||
[#]: via: "https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14683-1.html"
|
||||
|
||||
如何修复 “yay: error while loading shared libraries: libalpm.so.12”
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/07/144052x9tpvo93zhthdh6x.jpg)
|
||||
|
||||
> 这篇快速指南是为了帮助你修复 “yay error: while loading shared libraries: libalpm.so.12” 错误。
|
||||
|
||||
如果你在系统中运行 [Arch Linux][1] 的时间比较长,那么由于其滚动发布性质以及你的硬件支持,程序可能会损坏。 如果你使用 AUR 助手 Yay,那么有时,由于其他软件包的多次安装升级,Yay 可能会损坏。
|
||||
|
||||
Yay 助手一般是非常稳定的,但有时它会被搞乱,在修复好之前,你不能使用它安装任何程序。而其中一个令人头疼的错误是这样的:
|
||||
|
||||
```
|
||||
yay: error while loading shared libraries: libalpm.so.12: cannot open shared object file: No such file or directory
|
||||
```
|
||||
|
||||
这个错误特别是在升级到 pacman 6.0 后出现的,因为共享库不兼容。
|
||||
|
||||
![error while loading shared libraries - yay][2]
|
||||
|
||||
### 如何解决 “yay: error while loading shared libraries: libalpm.so.12”
|
||||
|
||||
这个错误只能通过完全卸载 `yay` 来解决,包括它的依赖。然后重新安装 `yay`。
|
||||
|
||||
没有其他方法来解决这个错误。
|
||||
|
||||
我们已经有一个 [如何安装 Yay][3] 的指南,然而,以下是修复的步骤。
|
||||
|
||||
从 AUR 克隆 yay 仓库并构建。在终端窗口中依次运行以下命令。
|
||||
|
||||
```
|
||||
cd /tmp
|
||||
git clone 'https://aur.archlinux.org/yay.git'
|
||||
cd /tmp/yay
|
||||
makepkg -si
|
||||
cd ~
|
||||
rm -rf /tmp/yay/
|
||||
```
|
||||
|
||||
安装完成后,你可以尝试运行给你带来这个错误的命令。然后就好了。如果你仍然有这个错误,请在下面的评论区告诉我。
|
||||
|
||||
很多人都遇到了这个问题,网络上有 [几个讨论][4]。以上是解决这个错误的唯一办法。而且我在任何地方都找不到这个问题的确切根源,除了它是在 pacman 6.0 更新后开始的。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://archlinux.org/
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2021/07/error-while-loading-shared-libraries-yay.jpg
|
||||
[3]: https://www.debugpoint.com/2021/01/install-yay-arch/
|
||||
[4]: https://github.com/Jguer/yay/issues/1519
|
@ -0,0 +1,117 @@
|
||||
[#]: subject: "How to Recover Arch Linux Install via chroot"
|
||||
[#]: via: "https://www.debugpoint.com/2021/07/recover-arch-linux/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14708-1.html"
|
||||
|
||||
如何通过 chroot 恢复 Arch Linux 系统
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/14/111204hm20rzjmmf5ib9nr.jpg)
|
||||
|
||||
> 这个快速指南解释了恢复 Arch Linux 安装的一些方便步骤。
|
||||
|
||||
作为一个滚动发布的版本,[Arch Linux][1] 中有时会出现一些问题。不是因为你自己的行为,而是数以百计的其他原因,如新内核与你的硬件或软件的兼容性。但是,Arch Linux 仍然很棒,它提供了最新的软件包和应用。
|
||||
|
||||
但有时,它也会给你带来麻烦,你最终只能看到一个闪烁的光标,其他什么都没有。
|
||||
|
||||
所以,在这种情况下,与其重新格式化或重新安装,不如在放弃希望之前尝试恢复安装和数据。本指南概述了这个方向的一些步骤。
|
||||
|
||||
### 恢复 Arch Linux 安装
|
||||
|
||||
第一步是用 Arch Linux 创建一个可启动的<ruby>现场<rt>Live</rt></ruby> USB。从 [这个链接][3] 下载 .ISO 并创建一个可启动的 USB。你可以查看这个 [如何使用 Etcher 创建可启动的 USB][2] 的指南。记住这一步需要另一个稳定的工作系统,因为你目前的系统不能使用。
|
||||
|
||||
你需要知道你的 Arch Linux 安装在哪个分区上。这是一个非常重要的步骤。如果你不知道,你可以用 GParted 来查找。或者在你的 GRUB 菜单中查看,或者你可以运行下面的命令来了解。这将列出你所有的磁盘分区及其大小、标签:
|
||||
|
||||
```
|
||||
sudo lsblk -o name,mountpoint,label,size,uuid
|
||||
```
|
||||
|
||||
完成后,插入 USB 盘并从它启动。你应该在现场介质中看到 Arch Linux 的提示符。
|
||||
|
||||
现在,用下面的方法挂载 Arch Linux 分区。记得把 `/dev/sda3` 改成你对应的分区。
|
||||
|
||||
```
|
||||
mount /dev/sda3 /mnt
|
||||
arch-chroot /mnt
|
||||
```
|
||||
|
||||
`arch-chroot` 命令将在终端挂载你的 Arch Linux 分区,所以用你的 Arch 凭证登录。现在,在这个阶段,根据你的需要,你有以下选择。
|
||||
|
||||
* 你可以通过 `/home` 文件夹来备份你的数据。如果,故障排除方式无效的话。你可以把文件复制到外部 USB 或其他分区。
|
||||
* 核查日志文件,特别是 pacman 日志。因为,不稳定的系统可能是由升级某些软件包引起的,如图形驱动或任何其他驱动。根据日志,如果你需要的话,可以降级任何特定的软件包。
|
||||
|
||||
你可以使用下面的命令来查看 pacman 日志文件的最后 200 行,以找出任何失败的项目或依赖性删除。
|
||||
|
||||
```
|
||||
tail -n 200 /var/log/pacman.log | less
|
||||
```
|
||||
|
||||
上面的命令给出了你的 `pacman.log` 文件末尾的 200 行来验证。现在,仔细检查哪些软件包在你成功启动后被更新了。
|
||||
|
||||
并记下软件包的名称和版本。你可以尝试逐一降级软件包,或者如果你认为某个特定的软件包产生了问题。使用 `pacman -U` 开关来降级。
|
||||
|
||||
```
|
||||
pacman -U <package name>
|
||||
```
|
||||
|
||||
如果有的话,你可以在降级后运行以下命令来启动你的 Arch 系统。
|
||||
|
||||
```
|
||||
exec /sbin/init
|
||||
```
|
||||
|
||||
检查你的显示管理器的状态,是否有任何错误。有时,显示管理器会产生一个问题,无法与 X 服务器通信。例如,如果你正在使用 Lightdm,那么你可以通过以下方式检查它的状态。
|
||||
|
||||
```
|
||||
systemctl status lightdm
|
||||
```
|
||||
|
||||
或者,可以通过下面的命令启动它,并检查出现了错误。
|
||||
|
||||
```
|
||||
lightdm --test-mode --debug
|
||||
```
|
||||
|
||||
下面是一个 Lightdm 失败的例子,它导致了一个不稳定的 Arch 系统。
|
||||
|
||||
![lightdm - test mode][4]
|
||||
|
||||
或者通过使用 `startx` 启动 X 服务器来检查。
|
||||
|
||||
```
|
||||
startx
|
||||
```
|
||||
|
||||
根据我的经验,如果你在上述命令中看到错误,尝试安装另一个显示管理器并启用它,如 sddm。它可能会消除这个错误。
|
||||
|
||||
根据你的系统状态,尝试上述步骤,并进行故障排除。对于特定于显示管理器 lightdm 的错误,我们有一个 [指南][5],你可以看看。
|
||||
|
||||
如果你使用的是 sddm,那么请查看 [这些故障排除步骤][6]。
|
||||
|
||||
### 总结
|
||||
|
||||
每个安装环境都是不同的。上述步骤可能对你不起作用。但它值得一试,根据经验,它是有效的。如果它起作用,那么,对你来说是好事。无论哪种方式,请在下面的评论区中告诉我结果如何。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2021/07/recover-arch-linux/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://www.debugpoint.com/tag/arch-linux
|
||||
[2]: https://www.debugpoint.com/2021/01/etcher-bootable-usb-linux/
|
||||
[3]: https://archlinux.org/download/
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2021/03/lightdm-test-mode.jpg
|
||||
[5]: https://www.debugpoint.com/2021/03/failed-to-start-lightdm/
|
||||
[6]: https://wiki.archlinux.org/title/SDDM#Troubleshooting
|
@ -0,0 +1,58 @@
|
||||
[#]: subject: "6 easy ways to make your first open source contribution with LibreOffice"
|
||||
[#]: via: "https://opensource.com/article/22/5/first-open-source-contribution-libreoffice"
|
||||
[#]: author: "Klaatu https://opensource.com/users/klaatu"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkskjjk"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14719-1.html"
|
||||
|
||||
使用 LibreOffice 进行首次开源贡献的 6 种简单方法
|
||||
======
|
||||
|
||||
> 2022 年 5 月是 LibreOffice 月。这里有一些简单的方法来完成你的第一个开源贡献。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/16/230450d6u6u9hb1q9wx69c.jpg)
|
||||
|
||||
“参与”开源似乎有点令人困惑。你从哪里开始?如果你不会编程怎么办?你取得谁的同意?别人怎么知道你做出了贡献,会有人关心吗?
|
||||
|
||||
这类问题实际上有答案(你自己选择就行;没关系;不用谁的同意;你告诉他们;是的),但在 2022 年 5 月,有一个简单的答案:LibreOffice。5 月是参与 LibreOffice 及其管理机构 <ruby>文档基金会<rt>The Document Foundation</rt></ruby> 的月份。他们正在邀请各种各样的贡献者以六种不同的方式提供帮助,其中只有一种与代码有任何关系。无论你的技能如何,你都可以找到一种方法来帮助这个世界上最好的办公套件。
|
||||
|
||||
### 为 LibreOffice 做出贡献的 6 种方式
|
||||
|
||||
以下是你可以做的:
|
||||
|
||||
* Handy Helper:在 [Ask LibreOffice][3] 上回答其他 LibreOffice 用户的问题。如果你是 LibreOffice 的狂热用户,并且认为你有可以帮助他人的有用提示和技巧,那么这就是你一直在等待的角色。
|
||||
* First Responder:当错误报告得到不止一个用户确认时会更好。如果你擅长安装软件(有时错误报告是针对比你通常使用的版本更旧的版本),那么请访问 [LibreOffice Bugzilla][4] 并查找尚未确认的新错误。当你找到时,试着复制所报告的内容。假设你可以做到这一点,请添加一条评论,例如 “CONFIRMED on Linux (Fedora 35) and LibreOffice 7.3.2”。
|
||||
* Drum Beater:开源项目很少有大公司投入营销资金来推广它们。如果所有声称喜欢开源的公司都能提供帮助,那就太好了,但不是所有的公司都这样做,那么为什么不发出你的声音呢?在社交媒体上告诉你的朋友你为什么喜欢 LibreOffice,或者你用它做什么(当然还要加上#libreoffice 标签。)
|
||||
* Globetrotter:LibreOffice 已经支持多种不同的语言,但并不是所有语言。 LibreOffice 正在积极开发中,因此它的界面翻译需要保持最新。[在这里参与][5]。
|
||||
* Docs Doctor:LibreOffice 有在线帮助和用户手册。如果你擅长向其他人解释事情,或者如果你擅长校对其他人的文档,那么你应该联系 [文档团队][6]。
|
||||
* Code Cruncher:你可能不会立即深入了解 LibreOffice 的代码库并进行重大更改,但这通常不是项目所需要的。如果你知道如何编码,那么你可以[按照此 wiki 页面上的说明][8]加入[开发人员社区][7]。
|
||||
|
||||
### 免费贴纸
|
||||
|
||||
我不想提前提到这一点,因为很明显你参与 LibreOffice 只是因为你喜欢参与一个优秀的开源项目。但是,你最终会发现,所以我不妨告诉你:通过为 LibreOffice 做出贡献,你可以注册然后从文档基金会获得免费贴纸。你肯定一直想 [装饰你的笔记本电脑吧][2]?
|
||||
|
||||
不过,不要被战利品的承诺分心。如果你对参与开源感到困惑但很兴奋,那么这是一个很好的机会。它代表了你参与开源的一般方式:寻找需要做的事情,去做它,然后你和其他人讨论它,这样你就可以获得下一步可以做什么的想法。经常这样做,你就会找到进入社区的方式。最终,你不会再纠结于如何参与开源,因为你已经忙于贡献!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/5/first-open-source-contribution-libreoffice
|
||||
|
||||
作者:[Klaatu][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkskjjk](https://github.com/lkskjjk)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/klaatu
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/dandelion_zoom.jpg
|
||||
[2]: https://opensource.com/business/15/11/open-source-stickers
|
||||
[3]: http://ask.libreoffice.org/
|
||||
[4]: https://bugs.documentfoundation.org/buglist.cgi?bug_status=__open__&content=&no_redirect=1&order=changeddate%20DESC%2Cpriority%2Cbug_severity&product=&query_based_on=&query_format=specific
|
||||
[5]: https://www.libreoffice.org/community/localization/
|
||||
[6]: https://www.libreoffice.org/community/docs-team
|
||||
[7]: https://www.libreoffice.org/community/developers/
|
||||
[8]: https://wiki.documentfoundation.org/Development/GetInvolved
|
@ -2,70 +2,73 @@
|
||||
[#]: via: "https://itsfoss.com/duckduckgo-easter-eggs/"
|
||||
[#]: author: "sreenath https://itsfoss.com/author/sreenath/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: translator: "TravinDreek"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14696-1.html"
|
||||
|
||||
隐藏功能!在 DuckDuckGo 搜索引擎中,你可以做这 25 件有趣的事情
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/11/142806ebr5xtzgcwcr5955.jpg)
|
||||
|
||||
比起无处不在的 Google,[有些搜索引擎替代品更加尊重隐私][1],而 DuckDuckGo 就是其中之一。
|
||||
|
||||
最近,这个搜索引擎有了很大的改进,搜索一般网页十分顺畅。在搜索本地地点方面,则还远不及 Google。
|
||||
|
||||
不过,DuckDuckGo(其爱称为 DDG)有一些很酷的功能,大部分用户还没注意到。如果你是一位 DDG 狂热粉,你可能会喜欢用这些小技巧来提升你的搜索体验。
|
||||
不过,DuckDuckGo(简称为 DDG)有一些很酷的功能,大部分用户还没注意到。如果你是一位 DDG 狂热粉,你可能会喜欢用这些小技巧来提升你的搜索体验。
|
||||
|
||||
### 1. 跳转特定网页
|
||||
### 1、跳转到特定网页
|
||||
|
||||
在你最喜欢的网站名称前输入 ! 即可直接进入这个网站。则类似于 Google 的 “运气不错” 功能,但用 DDG 的话来说,这就叫 “叹号搜索”。
|
||||
在你最喜欢的网站名称前输入 `!` 即可直接进入这个网站。则类似于 Google 的 “运气不错” 功能,但用 DDG 的话来说,这就叫 “叹号搜索”。
|
||||
|
||||
网站有缩写,开始输入时便会提示。
|
||||
有一些网站有缩写形式,开始输入时便会提示。
|
||||
|
||||
![duckduckgo bang feature][2]
|
||||
|
||||
在网站名后面输入搜索词,就可以直接抵达那个网站的搜索结果处。
|
||||
|
||||
### 2. 文本转 ASCII
|
||||
### 2、文本转 ASCII
|
||||
|
||||
Figlet 是一个[有趣的 Linux 命令][3],可以将任意文本转换为漂亮的 ASCII 画格式。
|
||||
Figlet 是一个 [有趣的 Linux 命令][3],可以将任意文本转换为漂亮的 ASCII 画格式。
|
||||
|
||||
在任意搜索词前输入 **figlet**,就会显示 ASCII 输出。无需打开终端。
|
||||
在任意搜索词前输入 `figlet`,就会显示 ASCII 输出。无需打开终端。
|
||||
|
||||
![Figlet in DDG][4]
|
||||
|
||||
### 3. 检查社交媒体的状态
|
||||
### 3、检查社交媒体的状态
|
||||
|
||||
在某个人的 Twitter 名前加上 ‘@’,就会显示 TA 的状态(关注者等)。
|
||||
在某个人的 Twitter 名前加上 `@`,就会显示 TA 的状态(关注者等)。
|
||||
|
||||
![Itsfoss Twitter][5]
|
||||
|
||||
### 4. 生成强密码
|
||||
### 4、生成强密码
|
||||
|
||||
输入 ‘password’ 并加上需要的字符数,就可以生成一个独特的强密码。
|
||||
输入 `password` 并加上需要的字符数,就可以生成一个独特的强密码。
|
||||
|
||||
![Generating password in DuckDuckGo][6]
|
||||
|
||||
### 5. 生成随机密码短语
|
||||
### 5、生成随机密码短语
|
||||
|
||||
输入 ‘random passphrase’ 可生成一段密码短语,通常长度为 4 个词。
|
||||
输入 `random passphrase` 可生成一段密码短语,通常长度为 4 个词。
|
||||
|
||||
![Random Passphrase][7]
|
||||
|
||||
### 6. 获取一份速查表
|
||||
### 6、获取一份速查表
|
||||
|
||||
在需要看速查表的搜索词后面,可输入 cheatsheet。如果要搜索的东西有速查表,就会立即显示在搜索页面。
|
||||
在需要看速查表的搜索词后面,可输入 `cheatsheet`。如果要搜索的东西有速查表,就会立即显示在搜索页面。
|
||||
|
||||
![Vim Cheatsheet][8]
|
||||
|
||||
### 7. 通过色码获取颜色
|
||||
### 7、通过色码获取颜色
|
||||
|
||||
输入 ‘color’ 并加上你想查的颜色的十六进制码,便可显示这个颜色。
|
||||
输入 `color` 并加上你想查的颜色的十六进制码,便可显示这个颜色。
|
||||
|
||||
![Color][9]
|
||||
|
||||
### 8. 生成随机数
|
||||
### 8、生成随机数
|
||||
|
||||
搜索 ‘random number’ 会输出一个 0 到 1 之间的随机数。
|
||||
搜索 `random number` 会输出一个 0 到 1 之间的随机数。
|
||||
|
||||
![Random Number][10]
|
||||
|
||||
@ -73,113 +76,113 @@ Figlet 是一个[有趣的 Linux 命令][3],可以将任意文本转换为漂
|
||||
|
||||
![Random Number between 1 and 1000][11]
|
||||
|
||||
### 9. 转换为二进制等形式
|
||||
### 9、转换为二进制等形式
|
||||
|
||||
输入一个二进制数并加上 ‘binary’,可将其从二进制转换为十进制。
|
||||
输入一个二进制数并加上 `binary`,可将其从二进制转换为十进制。
|
||||
|
||||
![Binary to Decimal][12]
|
||||
|
||||
类似地,它也能用于十六禁止和八进制,但我不清楚它们的处理逻辑。
|
||||
类似地,它也能用于十六进制和八进制,但我不清楚它们的处理逻辑。
|
||||
|
||||
### 10. 寻找韵词
|
||||
### 10、寻找韵词
|
||||
|
||||
输入 ‘what rhymes with ’ 并带上要找同韵词的词语。作诗能力变强了,对吧?
|
||||
输入 `what rhymes with` 并带上要找同韵词的词语。作诗能力变强了,对吧?
|
||||
|
||||
![What rhymes with rain][13]
|
||||
|
||||
### 11. 获取拉马努金数、圆周率等常数
|
||||
### 11、获取拉马努金数、圆周率等常数
|
||||
|
||||
输入想获取数值的常数名,便可在搜索结果中看到它。
|
||||
|
||||
![Ramanujan Number][14]
|
||||
|
||||
### 12. 查询现在谁在太空中
|
||||
### 12、查询现在谁在太空中
|
||||
|
||||
输入 ‘people in space’ 获取当前在太空中的人员名单。同时还会显示他们在太空中居住的时间。
|
||||
输入 `people in space` 获取当前在太空中的人员名单。同时还会显示他们在太空中居住的时间。
|
||||
|
||||
![People in Space][15]
|
||||
|
||||
### 13. 查询网页是否无法访问
|
||||
### 13、查询网页是否无法访问
|
||||
|
||||
如果你想知道某个网站是你无法访问了,还是大家都无法访问了,只需在搜索词中输入 “is xyz.com down”。
|
||||
如果你想知道某个网站是你无法访问了,还是大家都无法访问了,只需在搜索词中输入 `is xyz.com down`。
|
||||
|
||||
![Is down?][16]
|
||||
|
||||
### 14. 获取特定话题的名言
|
||||
### 14、获取特定话题的名言
|
||||
|
||||
输入一个词并带上 quotes,就会显示与这个词相关的名言。
|
||||
输入一个词并带上 `quotes`,就会显示与这个词相关的名言。
|
||||
|
||||
![Get quotes in DDG][17]
|
||||
|
||||
### 15. 获取占位文本
|
||||
### 15、获取占位文本
|
||||
|
||||
搜索 ‘lorem ipsum’ 就可以获取 5 段占位文本。对 Web 开发者应该会有用。
|
||||
搜索 `lorem ipsum` 就可以获取 5 段占位文本。对 Web 开发者应该会有用。
|
||||
|
||||
![Lorem ipsum][18]
|
||||
|
||||
### 16. 获取任意月份的日历
|
||||
### 16、获取任意月份的日历
|
||||
|
||||
在年、月、日后面输入 calendar,就会为你显示该月份的交互式日历。
|
||||
在年、月、日后面输入 `calendar`,就会为你显示该月份的交互式日历。
|
||||
|
||||
![Calendar][19]
|
||||
|
||||
### 17. 生成二维码
|
||||
### 17、生成二维码
|
||||
|
||||
在文字、链接等后面输入 ‘qr’,就会生成对应的二维码。
|
||||
在文字、链接等后面输入 `qr`,就会生成对应的二维码。
|
||||
|
||||
![QRCode][20]
|
||||
|
||||
### 18. 获取一些 CSS 动画
|
||||
### 18、获取一些 CSS 动画
|
||||
|
||||
搜索 ‘css animations’ 以获取一些 CSS 动画例子。
|
||||
搜索 `css animations` 以获取一些 CSS 动画例子。
|
||||
|
||||
![CSS Animations][21]
|
||||
|
||||
### 19. 展开短链接
|
||||
### 19、展开短链接
|
||||
|
||||
如果有一个 Bitly 链接或其他短链接,但不确定它指向哪里,不必再跳转到充满垃圾信息的网页了,只需展开短链接,看看真正的网址。
|
||||
|
||||
在短链接后面输入关键词 expand,就会显示真正的目标 URL。
|
||||
在短链接后面输入关键词 `expand`,就会显示真正的目标 URL。
|
||||
|
||||
![Expand Link][22]
|
||||
|
||||
### 20. 获取特殊字符的 HTML 代码
|
||||
### 20、获取特殊字符的 HTML 代码
|
||||
|
||||
搜索 ‘html chars’,可以获取一份很长的列表,上面有 HTML 实体及其描述,按下后会在结果中显示更多信息。
|
||||
搜索 `html chars`,可以获取一份很长的列表,上面有 HTML 实体及其描述,按下后会在结果中显示更多信息。
|
||||
|
||||
![HTML Chars][23]
|
||||
|
||||
### 21. 我用这东西干啥?
|
||||
### 21、我用这东西干啥?
|
||||
|
||||
这功能没什么用。如果你输入 “why should I use this?” ,它就会在搜索结果顶部显示 “cause it's awesome”。显然,DuckDuckGo 在说他自己。
|
||||
这功能没什么用。如果你输入 `why should I use this?` ,它就会在搜索结果顶部显示 `cause it's awesome`。显然,DuckDuckGo 在说他自己。
|
||||
|
||||
![Why should I use this?][24]
|
||||
|
||||
### 22. 转换大小写
|
||||
### 22、转换大小写
|
||||
|
||||
大小写都可转换。lowercase <大写搜索词> 就会显示小写的结果
|
||||
大小写都可转换。`lowercase <大写搜索词>` 就会显示小写的结果
|
||||
|
||||
![Lowercase][25]
|
||||
|
||||
uppercase <小写搜索词> 就会显示大写的结果。
|
||||
`uppercase <小写搜索词>` 就会显示大写的结果。
|
||||
|
||||
![Uppercase][26]
|
||||
|
||||
### 23. 编码 URL
|
||||
### 23、编码 URL
|
||||
|
||||
搜索 ‘encode’ 并加上 URL,就会给出编码后的结果
|
||||
搜索 `encode` 并加上 URL,就会给出编码后的结果
|
||||
|
||||
![URL Encode][27]
|
||||
|
||||
### 24. Motherboard
|
||||
### 24、Motherboard
|
||||
|
||||
搜索 ‘Motherboard’就会看见左侧的 DuckDuckGo 的 logo 变了。它会显示选好的几个随机 logo。
|
||||
搜索 `Motherboard` 就会看见左侧的 DuckDuckGo 的 logo 变了。它会显示选好的几个随机 logo。
|
||||
|
||||
![Motherboard][28]
|
||||
|
||||
### 25. 获取 HTML 色码
|
||||
### 25、获取 HTML 色码
|
||||
|
||||
搜索 ‘color codes’ 便可获得一份颜色表。一样,这个功能多为 Web 开发者和设计师所用。
|
||||
搜索 `color codes` 便可获得一份颜色表。一样,这个功能多为 Web 开发者和设计师所用。
|
||||
|
||||
![Color Codes][29]
|
||||
|
||||
@ -196,7 +199,7 @@ via: https://itsfoss.com/duckduckgo-easter-eggs/
|
||||
作者:[sreenath][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[Peaksol](https://github.com/TravinDreek)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,196 @@
|
||||
[#]: subject: "How to Dual Boot Ubuntu 22.04 LTS and Windows 11"
|
||||
[#]: via: "https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/"
|
||||
[#]: author: "James Kiarie https://www.linuxtechi.com/author/james/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "robsean"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14699-1.html"
|
||||
|
||||
如何双启动 Ubuntu 22.04 LTS 和 Windows 11
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/12/110546fff10ck07e2p0z2f.jpg)
|
||||
|
||||
嗨,伙计们,在这篇指南中,我们将演示如何在 Windows 11 的之外配置 Ubuntu 22.04 LTS(Jammy Jellyfish)的双启动设置。
|
||||
|
||||
为使其能工作,你需要在你的计算机上已经安装好了 Windows 11 。接下来,你将需要在你的硬盘驱动器上创建一个单独的分区,你将在此分区上安装 Ubuntu 22.04 。我们将包含这点知识,因此不要担心。
|
||||
|
||||
**前置条件:**
|
||||
|
||||
在设置双启动前,这些是你所需要的:
|
||||
|
||||
* 一个 Ubuntu 22.04 的可启动 USB 驱动器,你可以转到 [Ubuntu 22.04 下载页面][1] 来下载 Ubuntu 22.04 的 ISO 镜像文件。在 ISO 镜像文件到位后,拿一个 16GB USB 驱动器,并使用 Rufus 应用程序来使其可启动。
|
||||
* 快速稳定的互联网连接
|
||||
|
||||
### 步骤 1、在你的硬盘驱动器上创建一个可用的分区
|
||||
|
||||
正如介绍中所提到的,我们首先需要在硬盘驱动器上创建一个单独的分区,我们将在其中安装 Ubuntu 22.04 。
|
||||
|
||||
因此,通过按下 `Windows + R` 组合键来打开磁盘管理器实用程序。
|
||||
|
||||
在对话框中,输入 `diskmgmt.msc` ,并按下回车键。
|
||||
|
||||
![][2]
|
||||
|
||||
<ruby>磁盘管理<rt>disk management</rt></ruby>控制台将显示当前磁盘分区,如你将在下面所看到的一样。我们将通过压缩 “卷 E” 来创建一个用于安装 Ubuntu 的分区。这在你的安装过程中可能有所不同,但是只需要跟着做,你就会理解其中的大体意思。
|
||||
|
||||
![][3]
|
||||
|
||||
因此,在你想要压缩的磁盘驱动器卷上点击鼠标右键,并在弹出的菜单中选择 <ruby>压缩卷<rt>Shrink</rt></ruby> 选项。
|
||||
|
||||
![][4]
|
||||
|
||||
将会出现一个弹出对话框,如下所示。具体指定压缩的控件大小(以 MB 为单位),并单击 <ruby>压缩卷<rt>Shrink</rt></ruby> 。
|
||||
|
||||
这是指定给 Ubuntu 22.04 安装所用的空间。
|
||||
|
||||
![][5]
|
||||
|
||||
在缩小磁盘空间后,它将显示为 <ruby>未分配<rt>Unallocated</rt></ruby> 或 <ruby>可用空间<rt>Free Space</rt></ruby>,如图所示。
|
||||
|
||||
![][6]
|
||||
|
||||
随着有了可用空间,现在将可启动 USB 驱动器插入到你的 PC ,并重新启动你的系统。此外,要确保访问 BIOS 设置,并修改启动优先级,来使 USB 驱动器成为第一优先级。保存 BIOS 更改并继续启动。
|
||||
|
||||
### 步骤 2、开始安装
|
||||
|
||||
在第一个屏幕中,你将得到如图所示的 GRUB 菜单。选择第一个选项 <ruby>尝试或安装 Ubuntu<rt>Try or Install Ubuntu</rt></ruby> ,并按下 <ruby>回车键<rt>ENTER</rt></ruby> 按键。
|
||||
|
||||
![][7]
|
||||
|
||||
Ubuntu 22.04 将开始加载,如下所示。这最多需要一分钟。
|
||||
|
||||
![][8]
|
||||
|
||||
此后,安装程序向导将弹出,向你提供两个选项: <ruby>尝试 Ubuntu<rt>Try Ubuntu</rt></ruby> 和 <ruby>安装 Ubuntu<rt>Install Ubuntu</rt></ruby>。因为我们的使命是安装 Ubuntu ,所以选择后者。
|
||||
|
||||
![][9]
|
||||
|
||||
接下来,选择你的首选键盘布局,并单击 <ruby>继续<rt>Continue</rt></ruby> 按钮。
|
||||
|
||||
![][10]
|
||||
|
||||
在 <ruby>更新和其它软件<rt>Updates and Other Software</rt></ruby> 步骤中,选择 <ruby>正常安装<rt>Normal Installation</rt></ruby> 以便安装 Ubuntu的 GUI 版本,通过勾选其它剩余选项来允许下载更新和安装第三方的针对于图像、WIFI 硬件和其它实用程序的软件包。
|
||||
|
||||
接下来,单击 <ruby>继续<rt>Continue</rt></ruby> 按钮。
|
||||
|
||||
![][11]
|
||||
|
||||
下一步提供两个安装选项。第一个选项 - <ruby>清除整个磁盘并安装 Ubuntu<rt>Erase disk and install Ubuntu</rt></ruby> – 完全地擦除你的驱动器并安装。但是由于这是一个双启动设置,这个选项对于你现有安装的 Windows 系统来说会是灾难性的。
|
||||
|
||||
因此,选择 <ruby>其它选项<rt>Something else</rt></ruby>,单击 <ruby>继续<rt>Continue</rt></ruby> 按钮。
|
||||
|
||||
![][12]
|
||||
|
||||
分区表将显示所有现有的磁盘分区。到目前为止,我们仅有 NTFS 分区和我们之前压缩出来的可用分区。
|
||||
|
||||
针对 Ubuntu 22.04 ,我们将创建下面的分区:
|
||||
|
||||
* `/boot` – 1 GB
|
||||
* `/home` – 10 GB
|
||||
* `/` – 12 GB
|
||||
* 交换分区 – 2 GB
|
||||
* EFI – 300 MB
|
||||
|
||||
为开始使用这些分区,单击 <ruby>可用空间<rt>Free Space</rt></ruby>分区下面的 “+” 符号。
|
||||
|
||||
![][13]
|
||||
|
||||
如图显示填写 `/boot` 分区的详细信息,然后单击 <ruby>确定<rt>OK</rt></ruby> 按钮。
|
||||
|
||||
![][14]
|
||||
|
||||
接下来,具体指定 `/home` 分区,并单击 <ruby>确定<rt>OK</rt></ruby> 按钮。
|
||||
|
||||
![][15]
|
||||
|
||||
接下来,定义 `/`(根)分区,并单击 <ruby>确定<rt>OK</rt></ruby> 按钮。
|
||||
|
||||
![][16]
|
||||
|
||||
为定义交换空间,设置大小,并在 <ruby>使用为<rt>Use as</rt></ruby>:选项中选择 <ruby>交换区域<rt>Swap area</rt></ruby>。
|
||||
|
||||
![][17]
|
||||
|
||||
最后,如果你正在使用 UEFI 启动模式,那么创建一个 EFI 系统分区。我们将分配 300MB 到 EFI 分区。
|
||||
|
||||
![][18]
|
||||
|
||||
下图是一份我们的分区表的分区摘要:
|
||||
|
||||
![][19]
|
||||
|
||||
为继续安装,单击 <ruby>现在安装<rt>Install Now</rt></ruby>。在下图显示的弹出窗口中,单击 <ruby>继续<rt>Continue</rt></ruby>来保存更改到磁盘。
|
||||
|
||||
![][20]
|
||||
|
||||
接下来,安装程序向导将自动侦测出你的位置,只需要单击 <ruby>继续<rt>Continue</rt></ruby> 按钮。
|
||||
|
||||
![][21]
|
||||
|
||||
接下来,通过具体指定姓名、计算机的名称和密码来创建一个登录用户。接下来单击 <ruby>继续<rt>Continue</rt></ruby> 按钮。
|
||||
|
||||
![][22]
|
||||
|
||||
此时,安装程序向导将复制所有的 Ubuntu 文件和软件包到手动创建的硬盘驱动器分区,并安装必要的软件包。
|
||||
|
||||
这个过程将需要很长一段时间,因此,要有耐心。在我们的实例中,它需要大约 30 分钟。
|
||||
|
||||
![][23]
|
||||
|
||||
在安装过程完成后,单击 <ruby>立刻重新启动<rt>Restart Now</rt></ruby> 按钮来重新启动系统。
|
||||
|
||||
![][24]
|
||||
|
||||
在这时,移除你的可启动 USB 驱动器,并按下回车键。
|
||||
|
||||
![][25]
|
||||
|
||||
在系统重新启动时,你将找到包括 Ubuntu 和 Windows 11 在内的各种选项。
|
||||
|
||||
选择 “Ubuntu” 来启动到你的新 Ubuntu 22.04 安装。要启动到 Windows 11,请选择标有 <ruby>Windows 恢复环境<rt>Windows Recovery Environment</rt></ruby> 的条目。
|
||||
|
||||
![][26]
|
||||
|
||||
就这样。我们演示了如何双启动 Windows 11 和 Ubuntu 22.04。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/
|
||||
|
||||
作者:[James Kiarie][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.linuxtechi.com/author/james/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://releases.ubuntu.com/22.04/
|
||||
[2]: https://www.linuxtechi.com/wp-content/uploads/2022/05/diskmgmt-msc-command-windows11.png
|
||||
[3]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Disk-Management-Console-Windows11.png
|
||||
[4]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Shrink-Volume-Windows11.png
|
||||
[5]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Shrink-Volume-Size-Windows11.png
|
||||
[6]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Free-Space-Disk-Management-Console-Windows11.png
|
||||
[7]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Install-Ubuntu-Linux.png
|
||||
[8]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Ubuntu-22-04-Loading-Screen.png
|
||||
[9]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-Install-Ubuntu-Linux.png
|
||||
[10]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Keyboard-Layout-Ubuntu-22-04.png
|
||||
[11]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Normal-Installation-Option-During-Ubuntu-22-04-Installation.png
|
||||
[12]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Something-else-ubuntu-installation.png
|
||||
[13]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Free-Space-for-Ubuntu-22-04-Installation.png
|
||||
[14]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Boot-Partition-Ubuntu-22-04-LTS.png
|
||||
[15]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Home-Partition-For-Ubuntu-22-04.png
|
||||
[16]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Root-Partition-For-Ubuntu-22-04.png
|
||||
[17]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Swap-Area-Ubuntu-22-04.png
|
||||
[18]: https://www.linuxtechi.com/wp-content/uploads/2022/05/EFI-System-Partition-Ubuntu-22-04.png
|
||||
[19]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Install-Now-Ubuntu-22-04.png
|
||||
[20]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Write-Changes-Disk-Ubuntu-22-04.png
|
||||
[21]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Location-for-Ubuntu-22-04-Installation.png
|
||||
[22]: https://www.linuxtechi.com/wp-content/uploads/2022/05/UserName-Hostname-Ubuntu-22-04-lts-Installation.png
|
||||
[23]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Installation-Progress-Ubuntu-22-04.png
|
||||
[24]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Restart-After-Ubuntu-22-04-LTS-Installation.png
|
||||
[25]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Remove-Installation-Media-after-Ubuntu-22-04-Installation.png
|
||||
[26]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Dual-Boot-Grub-Bootloader-Screen-Ubuntu-22-04.png
|
@ -0,0 +1,276 @@
|
||||
[#]: subject: "How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 / 20.04 / 18.04"
|
||||
[#]: via: "https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/"
|
||||
[#]: author: "sk https://ostechnix.com/author/sk/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "robsean"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14709-1.html"
|
||||
|
||||
详解在 Ubuntu 中引导到救援模式或紧急模式
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/14/153639n33fg3e2gc7xnvv3.jpg)
|
||||
|
||||
这篇教程将介绍如何在 Ubuntu 22.04、20.04 和 18.04 LTS 版本中引导到 <ruby>救援<rt>Rescue</rt></ruby> 模式或 <ruby>紧急<rt>Emergency</rt></ruby> 模式。
|
||||
|
||||
> 你可能已经知道,在 RHEL 7 、RHEL 8 、Ubuntu 16.04 LTS 及其更新的版本的 Linux 发行版中 <ruby>运行等级<rt>Runlevels</rt></ruby> 已经被 <ruby>系统目标<rt>Systemd target</rt></ruby> 所替代。更多关于 <ruby>运行等级<rt>Runlevel</rt></ruby> 和 <ruby>系统目标<rt>Systemd targets</rt></ruby> 的信息,参考 [这篇指南][1] 。
|
||||
|
||||
这篇指南是针对 Ubuntu 编写的,但是,下面所给的步骤应该也适用于大多数使用 systemd 作为默认服务管理器的 Linux 发行版。
|
||||
|
||||
在进入主题前,让我们简单的理解:什么是 <ruby>救援<rt>rescue</rt></ruby> 模式 和 <ruby>紧急<rt>Emergency</rt></ruby> 模式,以及这两种模式的目的是什么。
|
||||
|
||||
### 什么是救援模式?
|
||||
|
||||
在 Linux 发行版中,救援模式等效于使用 SysV 作为默认的服务器管理器的 <ruby>单用户<rt>single user</rt></ruby> 模式。在救援模式中,将挂载所有的本地文件系统,将仅启动一些重要的服务。但是,不会启动一般的服务(例如,网络服务)。
|
||||
|
||||
救援模式在不能正常引导系统的情况下是很有用的。此外,我们可以在救援模式下执行一些重要的救援操作,例如,[重新设置 root 密码][2] 。
|
||||
|
||||
### 什么是紧急模式?
|
||||
|
||||
与救援模式相比,在紧急模式中,不会启动任何的东西。不会启动服务、不会挂载挂载点、不会建立套接字、什么都不会启动。你将所拥有的只是一个 **原始的 shell** 。紧急模式适用于调试目的。
|
||||
|
||||
首先,我们将看到如何在 Ubuntu 22.04 和 20.04 LTS 发行版中引导到救援模式或紧急模式。在 Ubuntu 22.04 和 20.04 LTS 中的过程是完全相同的!
|
||||
|
||||
### 在 Ubuntu 22.04 / 20.04 LTS 中引导到救援模式
|
||||
|
||||
我们可以使用两种方法来引导到救援模式。
|
||||
|
||||
#### 方法 1
|
||||
|
||||
打开你的 Ubuntu 系统。在 BIOS 徽标出现后,按下 `ESC` 按键来显示 GRUB 菜单。
|
||||
|
||||
在 GRUB 菜单中,选择第一项,并按下 `e` 按键来编辑它。
|
||||
|
||||
![GRUB Menu In Ubuntu 22.04 / 20.04 LTS][3]
|
||||
|
||||
按下 `↓` 按键,并找到以单词 `linux` 开头的一行代码,并在其结尾处添加下面的一行代码。为到达其结尾处,只需要按下 `Ctrl + e` 组合键,或使用你键盘上的 `END` 按键或 `←`/`→` 按键。
|
||||
|
||||
```
|
||||
systemd.unit=rescue.target
|
||||
```
|
||||
|
||||
![Edit Grub Boot Menu Entries To Enter Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS][4]
|
||||
|
||||
在添加上面的代码行后,按下 `Ctrl + x` 组合键或按下 `F10` 按键来引导到救援模式。
|
||||
|
||||
数秒后,你将作为 root 用户来登录到救援模式(即单用户模式)。将会提示你按下回车键来进入维护。
|
||||
|
||||
下图是 Ubuntu 22.04 / 20.04 LTS 系统的救援模式的样子:
|
||||
|
||||
![Boot Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS][5]
|
||||
|
||||
现在,在救援模式中做你想做的任何事。在救援模式中,在你执行任何操作前,你可能需要以 读/写模式来挂载根(`/`)文件系统。
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
![Mount Root File System In Read Write Mode In Ubuntu 22.04 / 20.04 LTS][6]
|
||||
|
||||
在完成后,按下 `Ctrl + d` 组合键来引导到正常模式。或者,你可以输入下面的任意一个命令来引导到正常模式。
|
||||
|
||||
```
|
||||
systemctl default
|
||||
```
|
||||
|
||||
或者,
|
||||
|
||||
```
|
||||
exit
|
||||
```
|
||||
|
||||
如果你想重新启动系统,而不是引导到正常的模式,输入:
|
||||
|
||||
```
|
||||
systemctl reboot
|
||||
```
|
||||
|
||||
#### 方法 2
|
||||
|
||||
在这种方法中,你不需要编辑 GRUB 启动菜单项目。
|
||||
|
||||
打开系统电源,并从 GRUB 启动菜单中选择 <ruby>Ubuntu 高级选项<rt>Advanced options for Ubuntu</rt></ruby>。
|
||||
|
||||
![Choose Advanced Options For Ubuntu From Grub Boot Menu][7]
|
||||
|
||||
接下来,你将看到一个带有内核版本的可用的 Ubuntu 版本的列表。在 Ubuntu 中的 GRUB 启动菜单中选择 <ruby>恢复模式<rt>Recovery mode</rt></ruby> 。
|
||||
|
||||
![Choose Recovery Mode In Grub Boot Menu In Ubuntu 22.04 / 20.04 LTS][8]
|
||||
|
||||
数秒后,你将看到 Ubuntu 的 <ruby>恢复<rt>Recovery</rt></ruby> 菜单。从恢复菜单中,选择 <ruby>进入 root 的 shell 提示符<rt>Drop to root shell prompt</rt></ruby> 选项 ,并按下回车键。
|
||||
|
||||
![Enter Into Root Shell Prompt In Ubuntu 22.04 / 20.04 LTS][9]
|
||||
|
||||
现在,你将进入维护。
|
||||
|
||||
![Ubuntu Maintenance Mode][10]
|
||||
|
||||
通过输入下面的命令来 以读/写模式的方式 来挂载根(`/`)文件系统:
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
![Mount Root File System In Read Write Mode In Ubuntu][11]
|
||||
|
||||
在救援模式中做你想做的任何事。
|
||||
|
||||
在完成后,输入 `exit` 来返回到恢复菜单。
|
||||
|
||||
```
|
||||
exit
|
||||
```
|
||||
|
||||
最后,选择 <ruby>救援正常启动<rt>Resume normal boot</rt></ruby> 选项,并按下回车键。
|
||||
|
||||
![Boot Into Normal Mode In Ubuntu][12]
|
||||
|
||||
再次按下回车键来退出恢复模式,并继续引导到正常模式。
|
||||
|
||||
![Exit The Recovery Mode In Ubuntu][13]
|
||||
|
||||
如果你不想引导到正常模式,从救援模式中输入 `reboot` 并按下回车键来重新启动你的系统。
|
||||
|
||||
### 在 Ubuntu 22.04 / 20.04 LTS 中引导到紧急模式
|
||||
|
||||
当 GRUB 菜单出现时,按下 `e` 按键来编辑它。
|
||||
|
||||
![GRUB Menu In Ubuntu 22.04 / 20.04 LTS][14]
|
||||
|
||||
找到以单词 `linux` 开头的一行代码,并在其结尾处添加下面的一行代码:
|
||||
|
||||
```
|
||||
systemd.unit=emergency.target
|
||||
```
|
||||
|
||||
![Edit Grub Boot Menu Entries To Enter Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS][15]
|
||||
|
||||
在添加上面的代码行后,按下 `Ctrl + x` 组合键,或按下 `F10` 按键来引导到紧急模式。
|
||||
|
||||
数秒后,你将作为 `root` 用户来进入维护。将会提示你按下回车键来进入紧急模式。
|
||||
|
||||
下图是 Ubuntu 22.04 / 20.04 LTS 系统的紧急模式的样子:
|
||||
|
||||
![Boot Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS][16]
|
||||
|
||||
现在,在紧急模式中做你想做的任何事。在紧急模式中,在你执行任何操作前,你可能需要以读/写模式来挂载根(`/`)文件系统。
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
在完成后,按下 `Ctrl + d` 组合键来引导到正常模式。或者,你可以输入下面的任意一个命令来引导到正常模式。
|
||||
|
||||
```
|
||||
systemctl default
|
||||
```
|
||||
|
||||
或者,
|
||||
|
||||
```
|
||||
exit
|
||||
```
|
||||
|
||||
如果你想重新启动系统,而不是引导到正常模式,输入:
|
||||
|
||||
```
|
||||
systemctl reboot
|
||||
```
|
||||
|
||||
### 在 Ubuntu 18.04 LTS 中引导到救援模式
|
||||
|
||||
启动你的 Ubuntu 系统。当 GRUB 菜单出现时,选择第一项并按下按键 `e` 来编辑。(为到达其行尾处,只需要按下 `Ctrl + e` 组合键,或使用你键盘上的 `END` 按键或 `←`/`→` 按键):
|
||||
|
||||
![Grub Menu][17]
|
||||
|
||||
如果你没有看到 GRUB 菜单,只需要在 BIOS 徽标出现后,按下 `ESC` 按键来显示 GRUB 菜单。
|
||||
|
||||
找到以单词 `linux` 开头的一行代码,并在其结尾处添加下面的一行代码(为到达其行尾处,只需要按下 `Ctrl + e` 组合键,或使用你键盘上的 END` 按键或 `←`/`→` 按键):
|
||||
|
||||
```
|
||||
systemd.unit=rescue.target
|
||||
```
|
||||
|
||||
![Edit Grub Menu][18]
|
||||
|
||||
在添加上面的代码行后,只需要按下 `Ctrl + x` 组合键,或按下 `F10` 按键来引导到救援模式。数秒后,你将作为 `root` 用户进入维护(即单用户模式)。
|
||||
|
||||
下图是 Ubuntu 18.04 LTS 服务器系统的救援模式的样子:
|
||||
|
||||
![Ubuntu Rescue Mode][19]
|
||||
|
||||
接下来,输入下面的命令来挂载根(`/`)文件系统为读/写模式。
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
### 在 Ubuntu 18.04 LTS 中引导到紧急模式
|
||||
|
||||
引导你的 Ubuntu 到紧急模式基本与上述方法相同。你所需要做的全部工作是,在编辑 GRUB 菜单时,将 `systemd.unit=rescue.target` 替换为 `systemd.unit=emergency.target` 。
|
||||
|
||||
![Edit Grub Menu][20]
|
||||
|
||||
在你添加 `systemd.unit=emergency.target` 后,按下 `Ctrl + x` 组合键,或按下 `F10` 按键来引导到紧急模式。
|
||||
|
||||
![Ubuntu Emergency Mode][21]
|
||||
|
||||
最后,你可以使用下面的命令来以读/写模式的方式来挂载根(`/`)文件系统:
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
### 在救援模式和紧急模式之间切换
|
||||
|
||||
如果你正在救援模式中,你不必像我上述提到的那样来编辑 GRUB 的菜单启动项。相反,你只想要输入下面的命令来立刻切换到紧急模式:
|
||||
|
||||
```
|
||||
systemctl emergency
|
||||
```
|
||||
|
||||
同样,为从紧急模式切换到救援模式,输入:
|
||||
|
||||
```
|
||||
systemctl rescue
|
||||
```
|
||||
|
||||
### 总结
|
||||
|
||||
现在,你知道了什么是救援模式和紧急模式,以及如何在 Ubuntu 22.04 、20.04 和 18.04 LTS 系统中启动到这些模式。正如我已经提到的,在这里提供的这些步骤应该也适用于大多数当前使用 systemd 作为默认服务管理器的 Linux 发行版。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/
|
||||
|
||||
作者:[sk][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://ostechnix.com/check-runlevel-linux/
|
||||
[2]: https://ostechnix.com/how-to-reset-or-recover-root-user-password-in-linux/
|
||||
[3]: https://ostechnix.com/wp-content/uploads/2022/05/GRUB-Menu-In-Ubuntu-22.04-LTS.png
|
||||
[4]: https://ostechnix.com/wp-content/uploads/2022/05/Edit-Grub-Boot-Menu-Entries-To-Enter-Into-Rescue-Mode-In-Ubuntu-22.04-LTS.png
|
||||
[5]: https://ostechnix.com/wp-content/uploads/2022/05/Boot-Into-Rescue-Mode-In-Ubuntu-22.04.png
|
||||
[6]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-File-System-In-Read-Write-Mode-In-Ubuntu.png
|
||||
[7]: https://ostechnix.com/wp-content/uploads/2022/05/Choose-Advanced-Options-For-Ubuntu-From-Grub-Boot-Menu.png
|
||||
[8]: https://ostechnix.com/wp-content/uploads/2022/05/Choose-Recovery-Mode-In-Grub-Boot-Menu-In-Ubuntu.png
|
||||
[9]: https://ostechnix.com/wp-content/uploads/2022/05/Enter-Into-Root-Shell-Prompt-In-Ubuntu.png
|
||||
[10]: https://ostechnix.com/wp-content/uploads/2022/05/Ubuntu-Maintenance-Mode.png
|
||||
[11]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-File-System-In-Read-Write-Mode-In-Ubuntu-1.png
|
||||
[12]: https://ostechnix.com/wp-content/uploads/2022/05/Boot-Into-Normal-Mode-In-Ubuntu.png
|
||||
[13]: https://ostechnix.com/wp-content/uploads/2022/05/Exit-The-Recovery-Mode-In-Ubuntu.png
|
||||
[14]: https://ostechnix.com/wp-content/uploads/2022/05/GRUB-Menu-In-Ubuntu-22.04-LTS.png
|
||||
[15]: https://ostechnix.com/wp-content/uploads/2022/05/Edit-Grub-Boot-Menu-Entries-To-Enter-Into-Emergency-Mode-In-Ubuntu.png
|
||||
[16]: https://ostechnix.com/wp-content/uploads/2018/12/Boot-Into-Emergency-Mode-In-Ubuntu-20.04-LTS.png
|
||||
[17]: https://ostechnix.com/wp-content/uploads/2018/12/Grub-menu.png
|
||||
[18]: https://ostechnix.com/wp-content/uploads/2018/12/Edit-grub-menu.png
|
||||
[19]: https://ostechnix.com/wp-content/uploads/2018/12/Ubuntu-rescue-mode.png
|
||||
[20]: https://ostechnix.com/wp-content/uploads/2018/12/emergency-mode.png
|
||||
[21]: https://ostechnix.com/wp-content/uploads/2018/12/emergency-mode-1.png
|
141
published/20220523 7 pieces of Linux advice for beginners.md
Normal file
141
published/20220523 7 pieces of Linux advice for beginners.md
Normal file
@ -0,0 +1,141 @@
|
||||
[#]: subject: "7 pieces of Linux advice for beginners"
|
||||
[#]: via: "https://opensource.com/article/22/5/linux-advice-beginners"
|
||||
[#]: author: "Opensource.com https://opensource.com/users/admin"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lightchaserhy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14712-1.html"
|
||||
|
||||
给 Linux 初学者的 7 条建议
|
||||
======
|
||||
|
||||
> 我们咨询了我们社区作者们,分享了他们的初学经验。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/15/143733yhdrxhbnhojbxn2a.jpg)
|
||||
|
||||
对 Linux 的新用户有什么建议?我们请社区的作者们分享了他们初学时的最佳经验。
|
||||
|
||||
### 1、用好 Linux 资源
|
||||
|
||||
我哥们儿告诉我,Linux 就像一个“软件积木搭建套装”(这是一个过时的词汇,指的是上世纪五六十年代流行的建筑积木玩具),这个比喻比较恰当。在 2001、2002 年那时,我曾经利用 Windows 3.1 和 Windows NT,尝试搭建一个安全、有用的 K12 学区网站,当时网上可用的资料不多。其中被推荐的《ROOT 用户指南》是一本“大部头”专业教程,信息丰富,但是有一定上手难度。
|
||||
|
||||
于我而言,Mandrake Linux 的线上课程是最有用的资源。该课程对使用和管理 Linux 桌面或服务器进行了详细的解读。我学习了该课程,并同时利用红帽公司维护的一个邮件列表服务,有问题时就在社区提问寻求帮助。
|
||||
|
||||
—— [Don Watkins][2]
|
||||
|
||||
### 2、在 Linux 社区寻求帮助
|
||||
|
||||
我的建议是要多问,你可以从网上搜索信息开始,看看其他人类似的问题(甚至是更好的提问)。问什么和如何问,需要花一定时间熟悉。
|
||||
|
||||
一旦你对 Linux 更加熟悉了,查看你感兴趣的各种相关论坛,在提问前,先看看是否有人已经提过相同问题,并获得了答案。
|
||||
|
||||
加入邮件列表也很有用,最后你会发现自己也能专业地答复提问。正如他们说的,通过回答他人的问题也会学到更多知识。
|
||||
|
||||
同时,你会越来越熟悉这个操作系统内部运行机制,再也不是初学时的一无所知。
|
||||
|
||||
—— [Greg Pittman][3]
|
||||
|
||||
我的建议是利用 `man`、`info` 等帮助命令获取信息。另外,尽可能花时间熟悉命令行界面,且真正理解 UNIX 的设计理念。事实上,我最喜欢的书之一就是一本 80 年代的 UNIX 书籍,对理解文件、目录、设备、基础命令等非常有帮助。
|
||||
|
||||
—— [Alan Formy-Duval][4]
|
||||
|
||||
我最好的建议是充分相信社区的答复、手册页的详细信息、介绍不同选项的 HOW-TO 文档。不管怎么说,我是在 2009 年左右开始学习的,当时有很多可用的工具和资源。有一个叫 “Linux from Scratch(LFS)”的项目 —— 从源码开始创建 Linux 系统,在这个项目我学会了很多内部原理知识,以及如何创建一个 LFS 镜像。
|
||||
|
||||
—— [Sumantro Mukherjee][6]
|
||||
|
||||
我的建议是泛读。利用像 “Ask Fedora”、“Fedora Matrix chat” 等论坛,阅读他人的经验观点,并且尝试实践。我通过阅读他人的网上争论学习到很多东西,然后我会尝试找出问题的原因。
|
||||
|
||||
—— [Steve Morris][8]
|
||||
|
||||
### 3、安装双操作系统
|
||||
|
||||
我在 90 年代末就开始安装双操作系统(Windows 和 Linux),虽然我真正想使用的是 Linux 操作系统,但我最终还是启动了 Windows 系统,以便在熟悉的桌面环境中工作。最好的建议之一是改变计算机系统启动顺序,所以每次我都反应不够快,自动进入了 Linux 系统。: )
|
||||
|
||||
—— [Heike Jurzik][9]
|
||||
|
||||
我的团队里的一个人挑战我,要做一个知识交换。
|
||||
|
||||
他是我们的 Linux 系统管理员,利用 Joomla 搭建了一个网站(我们的 Web 团队擅长这个,他想学习更多知识),而我则安装了 Linux(以前一直是用 Windows)。我们一开始就用了双启动,因为我还有一堆依赖于操作系统的软件需要用于业务,但这让我对 Linux 的使用有了一个飞跃。
|
||||
|
||||
在我们各自学习新系统时,对方作为专家来互相帮助有助于共同成长,“一个都不能少!”,坚持不懈是一个很大的挑战。
|
||||
|
||||
我经历一个相当尴尬的低级错误后,在显示器上贴了一个大便签,上面写着“在使用任何 `rm` 操作前,首先要思考一下”。管理员给我写了一个命令行大全(网上有很多类似的),对于熟悉基础操作非常有用。我开始使用 Ubuntu 的 KDE 桌面环境时,发现对习惯于使用图形界面的初学者很有帮助。
|
||||
|
||||
从那以后我就开始长期使用 Linux(除了我的工作计算机),而那位管理员仍然在用 Joomla,看起来我俩都得到了成长。
|
||||
|
||||
—— [Ruth Cheesley][12]
|
||||
|
||||
### 4、为了安全请先备份
|
||||
|
||||
我的建议是使用一个带有简单且强大的备份软件的发行版。Linux 新用户会创建、编辑、破坏和恢复系统配置。当操作系统无法启动、丢失数据时,会让他们非常沮丧。
|
||||
|
||||
有了备份软件,他们的数据就有了保障。
|
||||
|
||||
我们都喜爱 Linux,因为它能让我们自由飞翔,但这是“双刃剑”,使用不当也有可能发生非常严重的错误。
|
||||
|
||||
—— [Giuseppe Cassibba][13]
|
||||
|
||||
### 5、分享你的 Linux 经验
|
||||
|
||||
我的建议是分享你的 Linux 使用经验。我曾经认为有一些发行版更适合新用户,所以当他们咨询使用 Linux 时,我总是推荐这些为“新用户准备的”发行版。但是当我坐在他们的计算机前,看起来却像是我从未用过 Linux 一样,因为一些新功能我也不熟悉。现在当有人咨询时,我会推荐自己使用的发行版,虽说这不一定是初学者的“最佳”版本,但毕竟我熟悉,他们遇到的问题我能够快速解决(当然我自己也会在分享中学到新东西)。
|
||||
|
||||
—— [Seth Kenlon][14]
|
||||
|
||||
以前有句俗话叫“不要随便使用杂志封面上宣传的发行版,使用你朋友都在用的,当你遇到问题时才能更好地需求帮助”。将关键词“杂志封面”替换为“互联网”,这句话依然有效 : -) 。我从未听从过这个建议,因为我是方圆五十公里内唯一使用 Linux 的人,周围的人都在用 FreeBSD、IRIX、Solaris 和 Windows 3.11 等操作系统,最后,我就是那个被人们寻求 Linux 帮助的人。
|
||||
|
||||
—— [Peter Czanik][15]
|
||||
|
||||
### 6、坚持学习 Linux
|
||||
|
||||
在到 Red Hat 工作前,我是一名分销商合作伙伴,我有几个提供旅行护士的家庭健康代理机构客户,他们使用了一个叫“Carefacts”的软件包,最初用于 DOS,在旅行笔记本电脑和中心数据库同步中总是出错。
|
||||
|
||||
早期我听到的最好建议是认真研究一下开源运动。开源在 2022 年是主流思想,但在一代人以前,从 Red Hat 的零售商购买 Linux 安装光盘是带有革命性的创新行为。开源打破了常规,我认为要客观看待开源,但确实惊叹到了相当一部分人。
|
||||
|
||||
我的公司在 20 世纪 90 年代中期搭建了第一个客户防火墙,那是基于 Windows NT 和 Altavista 的一个产品,但是经常发生错误崩溃。我们自己又搭建了一个基于 Linux 的防火墙,再也没有出问题了。因此,我们用 Linux 替换了客户的那套 Altavista 系统,稳定地运行了多年。我们在 1999 年底搭建了另一个客户防火墙,当时我花三周读完了一本关书,介绍了数据包过滤和 ipchains 的正确使用,当我完成时感觉超赞,它解决了所有问题。在接下来的 15 年,我搭建安装了数百个防火墙系统,主要采用 iptables 技术,有些利用桥接或 ARP 代理以及 QOS 保障视频会议传输,有些利用 IPSEC 和 OpenVPN 隧道。我靠管理个人防火墙和一些双机热备系统赚取生活费,非常不错,而以前都是用的 Windows 系统。我甚至还建了一些虚拟防火墙。
|
||||
|
||||
但是技术在高速发展,2022 年,iptables 已过时,我以前的防火墙技术也成了美好的回忆。
|
||||
|
||||
目前的经验之谈?永远不要停止探索。
|
||||
|
||||
—— [Greg Scott][19]
|
||||
|
||||
### 7、享受过程
|
||||
|
||||
耐心点,Linux 和之前你熟悉的操作系统不太相同,准备拥抱一个充满无限可能的新世界,尽情享受吧。
|
||||
|
||||
—— [Alex Callejas][20]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/5/linux-advice-beginners
|
||||
|
||||
作者:[Opensource.com][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lightchaserhy](https://github.com/lightchaserhy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/admin
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/yearbook-haff-rx-linux-file-lead_0.png
|
||||
[2]: https://opensource.com/users/don-watkins
|
||||
[3]: https://opensource.com/users/greg-p
|
||||
[4]: https://opensource.com/users/alanfdoss
|
||||
[5]: https://linuxfromscratch.org/
|
||||
[6]: https://opensource.com/users/sumantro
|
||||
[7]: https://ask.fedoraproject.org
|
||||
[8]: https://opensource.com/users/smorris12
|
||||
[9]: https://opensource.com/users/hej
|
||||
[10]: https://opensource.com/downloads/linux-common-commands-cheat-sheet
|
||||
[11]: https://opensource.com/article/22/2/why-i-love-linux-kde
|
||||
[12]: https://opensource.com/users/rcheesley
|
||||
[13]: https://opensource.com/users/peppe8o
|
||||
[14]: https://opensource.com/users/seth
|
||||
[15]: https://opensource.com/users/czanik
|
||||
[16]: https://www.redhat.com/sysadmin/run-your-own-vpn-libreswan
|
||||
[17]: https://opensource.com/article/21/8/openvpn-server-linux
|
||||
[18]: https://opensource.com/article/19/7/make-linux-stronger-firewalls
|
||||
[19]: https://opensource.com/users/greg-scott
|
||||
[20]: https://opensource.com/users/darkaxl
|
@ -3,19 +3,18 @@
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14690-1.html"
|
||||
|
||||
编译代码时动态链接库
|
||||
编译代码时动态地链接库
|
||||
======
|
||||
编译软件在你如何运行你的系统方面给你很大的灵活性。LD_LIBRARY_PATH 变量,以及 GCC 的 -L 和 -l 选项,是这种灵活性的组成部分。
|
||||
|
||||
![women programming][1]
|
||||
![](https://linux.cn/article-14690-1.html)
|
||||
|
||||
图片提供:WOCinTech Chat。由 Opensource.com 修改。CC BY-SA 4.0
|
||||
> 编译软件在你如何运行你的系统方面给你很大的灵活性。`LD_LIBRARY_PATH` 变量,以及 GCC 的 `-L` 和 `-l` 选项,是这种灵活性的组成部分。
|
||||
|
||||
编译软件是开发者经常做的事情,在开源中,一些用户甚至选择自己动手。Linux 播客 Dann Washko 称源码为“通用包格式”,因为它包含了使一个应用在任何平台上运行所需的所有组件。当然,并不是所有的源码都是为所有的系统编写的,所以它只是在目标系统的子集内是“通用”的,但问题是,源码是非常灵活的。有了开源,你可以决定代码的编译和运行方式。
|
||||
编译软件是开发者经常做的事情,在开源世界中,一些用户甚至选择自己动手。Linux 播客 Dann Washko 称源码为“通用包格式”,因为它包含了使一个应用在任何平台上运行所需的所有组件。当然,并不是所有的源码都是为所有的系统编写的,所以它只是在目标系统的子集内是“通用”的,但问题是,源码是非常灵活的。有了开源,你可以决定代码的编译和运行方式。
|
||||
|
||||
当你在编译代码时,你通常要处理多个源文件。开发人员倾向于将不同的类或模块放在不同的文件中,这样它们可以被单独维护,甚至可能被不同的项目使用。但当你编译这些文件时,许多文件会被编译成一个可执行文件。
|
||||
|
||||
@ -23,12 +22,12 @@
|
||||
|
||||
### 在编译过程中定位一个共享对象
|
||||
|
||||
当你[用 GCC 编译][2]时,你通常需要在你的工作站上安装一个库,以便 GCC 能够定位到它。默认情况下,GCC 假定库在系统库路径中,例如 `/lib64` 和 `/usr/lib64`。然而,如果你要链接到一个你自己的尚未安装的库,或者你需要链接到一个没有安装在标准位置的库,那么你必须帮助 GCC 找到这些文件。
|
||||
当你 [用 GCC 编译][2] 时,你通常需要在你的工作站上安装一个库,以便 GCC 能够定位到它。默认情况下,GCC 假定库在系统库路径中,例如 `/lib64` 和 `/usr/lib64`。然而,如果你要链接到一个你自己的尚未安装的库,或者你需要链接到一个没有安装在标准位置的库,那么你必须帮助 GCC 找到这些文件。
|
||||
|
||||
有两个选项对于在 GCC 中寻找库很重要:
|
||||
|
||||
* -L(大写字母 L)在 GCC 的搜索位置上增加一个额外的库路径。
|
||||
* -l(小写字母 L)设置你要链接的库的名字。
|
||||
* `-L`(大写字母 L)在 GCC 的搜索位置上增加一个额外的库路径。
|
||||
* `-l`(小写字母 L)设置你要链接的库的名字。
|
||||
|
||||
例如,假设你写了一个叫做 `libexample.so` 的库,并且你想在编译你的应用 `demo.c` 时使用它。首先,从 `demo.c` 创建一个对象文件:
|
||||
|
||||
@ -36,7 +35,7 @@
|
||||
$ gcc -I ./include -c src/demo.c
|
||||
```
|
||||
|
||||
`-I` 选项在 GCC 搜索头文件的路径中增加了一个目录。在这个例子中,我假设自定义头文件在一个名为 `include` 的本地目录中。`-c` 选项防止 GCC 运行链接器,因为这个任务只是为了创建一个对象文件。而这正是所发生的:
|
||||
`-I` 选项在 GCC 搜索头文件的路径中增加了一个目录。在这个例子中,我假设自定义头文件在一个名为 `include` 的本地目录中。`-c` 选项防止 GCC 运行链接器,因为这个任务只是为了创建一个对象文件。结果如下:
|
||||
|
||||
```
|
||||
$ ls
|
||||
@ -70,11 +69,11 @@ $ ldd ./myDemo
|
||||
/lib64/ld-linux-x86-64.so.2 (0x00007f514b839000)
|
||||
```
|
||||
|
||||
你已经知道`libexample` 不能被定位,但 `ldd` 输出至少确认了对*工作*库的期望。例如,`libc.so.6 `已经被定位,`ldd` 显示其完整路径。
|
||||
你已经知道定位不到 `libexample`,但 `ldd` 输出至少确认了它对*工作*库的期望位置。例如,`libc.so.6 `已经被定位,`ldd` 显示其完整路径。
|
||||
|
||||
### LD_LIBRARY_PATH
|
||||
|
||||
`LD_LIBRARY_PATH` [环境变量][3]定义了库的路径。如果你正在运行一个依赖于没有安装到标准目录的库的应用程,你可以使用 `LD_LIBRARY_PATH` 添加到系统的库搜索路径。
|
||||
`LD_LIBRARY_PATH` [环境变量][3] 定义了库的路径。如果你正在运行一个依赖于没有安装到标准目录的库的应用程,你可以使用 `LD_LIBRARY_PATH` 添加到系统的库搜索路径。
|
||||
|
||||
有几种设置环境变量的方法,但最灵活的是在运行命令前放置环境变量。看看设置 `LD_LIBRARY_PATH` 对 `ldd` 命令在分析一个“损坏”的可执行文件时的作用:
|
||||
|
||||
@ -112,9 +111,8 @@ hello world!
|
||||
|
||||
在大多数情况下,`LD_LIBRARY_PATH` 不是你需要设置的变量。按照设计,库安装到 `/usr/lib64` 中,因此应用自然会在其中搜索所需的库。在两种情况下,你可能需要使用 `LD_LIBRARY_PATH`:
|
||||
|
||||
* 你正在编译的软件需要链接到本身刚刚编译但尚未安装的库。好的构建系统,例如 [Autotools][4] 和 [CMake][5],可以帮助处理这个问题。
|
||||
|
||||
* 你正在使用设计为在单个目录之外运行的软件,没有安装脚本或将库放置在非标准目录中的安装脚本。一些应用具有 Linux 用户可以下载、复制到 `/opt` 并在“不安装”的情况下运行的版本。`LD_PATH_LIBRARY` 变量是通过封装脚本设置的,因此用户通常甚至不知道它已被设置。
|
||||
* 你正在编译的软件需要链接到本身刚刚编译但尚未安装的库。良好设计的构建系统,例如 [Autotools][4] 和 [CMake][5],可以帮助处理这个问题。
|
||||
* 你正在使用设计为在单个目录之外运行的软件,它没有安装脚本,或安装脚本将库放置在非标准目录中。一些应用具有 Linux 用户可以下载、复制到 `/opt` 并在“不安装”的情况下运行的版本。`LD_PATH_LIBRARY` 变量是通过封装脚本设置的,因此用户通常甚至不知道它已被设置。
|
||||
|
||||
编译软件为你在运行系统方面提供了很大的灵活性。`LD_LIBRARY_PATH` 变量以及 `-L` 和 `-l` GCC 选项是这种灵活性的组成部分。
|
||||
|
||||
@ -125,7 +123,7 @@ via: https://opensource.com/article/22/5/compile-code-ldlibrarypath
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lkxed][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,13 +3,16 @@
|
||||
[#]: author: "Jishnu Saurav Mittapalli https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14689-1.html"
|
||||
|
||||
使用机器学习模型进行预测
|
||||
机器学习:使用 Python 进行预测
|
||||
======
|
||||
机器学习基本上是人工智能的一个子集,它使用以前存在的数据对新数据进行预测。当然,现在我们所有人都知道这个道理了!这篇文章展示了如何将 Python 中开发的机器学习模型作为 Java 代码的一部分来进行预测。
|
||||
|
||||
> 机器学习基本上是人工智能的一个子集,它使用以前存在的数据对新数据进行预测。
|
||||
|
||||
当然,现在我们所有人都知道这个道理了!这篇文章展示了如何将 Python 中开发的机器学习模型作为 Java 代码的一部分来进行预测。
|
||||
|
||||
![Machine-learning][1]
|
||||
|
||||
@ -28,14 +31,15 @@ import matplotlib.pyplot as plt
|
||||
```
|
||||
from google.colab import files
|
||||
uploaded = files.upload()
|
||||
for fn in uploaded.keys(): print(‘User uploaded file “{name}” with length {length} bytes’.format(
|
||||
name=fn, length=len(uploaded[fn])))
|
||||
Choose files No file chosen
|
||||
for fn in uploaded.keys():
|
||||
print('User uploaded file "{name}" with length {length} bytes'.format(name=fn, length=len(uploaded[fn])))
|
||||
```
|
||||
|
||||
只有在当前浏览器会话中执行了该单元格时,上传部件才可用。请重新运行此单元,上传文件 *“Hoppers Crossing-Hourly-River-Level.csv”*,大小 2207036 字节。
|
||||
如果没有选择文件的话,选择上传的文件。
|
||||
|
||||
完成后,我们就可以使用 *sklearn 库*来训练我们的模型。为此,我们首先需要导入该库和算法模型,如图 1 所示。
|
||||
只有在当前浏览器会话中执行了该单元格时,上传部件才可用。请重新运行此单元,上传文件 `Hoppers Crossing-Hourly-River-Level.csv`,大小 2207036 字节。
|
||||
|
||||
完成后,我们就可以使用 `sklearn` 库来训练我们的模型。为此,我们首先需要导入该库和算法模型,如图 1 所示。
|
||||
|
||||
![Figure 1: Training the model][2]
|
||||
|
||||
@ -51,7 +55,7 @@ regressor.fit(X_train, y_train)
|
||||
|
||||
### 在 Java 中使用 ML 模型
|
||||
|
||||
我们现在需要做的是把 ML 模型转换成一个可以被 Java 程序使用的模型。有一个叫做 sklearn2pmml 的库可以帮助我们做到这一点:
|
||||
我们现在需要做的是把 ML 模型转换成一个可以被 Java 程序使用的模型。有一个叫做 `sklearn2pmml` 的库可以帮助我们做到这一点:
|
||||
|
||||
```
|
||||
# Install the library
|
||||
@ -75,7 +79,7 @@ via: https://www.opensourceforu.com/2022/05/using-a-machine-learning-model-to-ma
|
||||
作者:[Jishnu Saurav Mittapalli][a]
|
||||
选题:[lkxed][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,27 +3,30 @@
|
||||
[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14697-1.html"
|
||||
|
||||
How to Create Local Yum/DNF Repository on RHEL 9
|
||||
如何在 RHEL 9 上创建本地 Yum/DNF 仓库
|
||||
======
|
||||
Hello techies, recently Red Hat has released its latest operating system RHEL 9. RHEL 9 fulfill all the requirements of hybrid cloud. It can be installed on physical server, virtual machine and inside the container image.
|
||||
|
||||
When we don’t have subscription and want to install packages for doing the POCs then setting up local yum or dnf repository will be handy.
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/11/164149y9zzm7kkxwsxgszw.jpg)
|
||||
|
||||
In this guide, we will cover how to create local yum/dnf repository on RHEL 9 using DVD or ISO file step by step.
|
||||
你好,技术兄弟,最近红帽发布了最新的操作系统 RHEL 9,RHEL 9 满足了混合云的所有要求。它可以安装在物理服务器、虚拟机和容器镜像中。
|
||||
|
||||
Prerequisites for creating local Yum/DNF repository
|
||||
当我们没有订阅的时候,想安装软件包来做实验,那么设置本地的 Yum 或 DNF 仓库将是很方便的。
|
||||
|
||||
* Minimal Install RHEL 9 system
|
||||
* Sudo User with admin privileges
|
||||
* RHEL 9 DVD or ISO file
|
||||
在本指南中,我们将介绍如何在 RHEL 9 上使用 DVD 或 ISO 文件一步一步地创建本地 Yum/DNF 资源库。
|
||||
|
||||
### 1 ) Mount RHEL 9 ISO File or DVD
|
||||
创建本地 Yum/DNF 资源库的先决条件:
|
||||
|
||||
We are assuming RHEL 9 iso file is already copied into the system. Run following mount command to mount ISO file on /opt/repo folder.
|
||||
* 最小化安装 RHEL 9 系统
|
||||
* 具有管理权限的 sudo 用户
|
||||
* RHEL 9 DVD 或 ISO 文件
|
||||
|
||||
### 1)挂载 RHEL 9 ISO 文件或 DVD
|
||||
|
||||
我们假设 RHEL 9 iso 文件已经被复制到系统中。运行下面的挂载命令,将 ISO 文件挂载到 `/opt/repo` 文件夹。
|
||||
|
||||
```
|
||||
$ sudo mkdir /var/repo
|
||||
@ -32,15 +35,15 @@ $ sudo mount -o loop rhel-baseos-9.0-x86_64-dvd.iso /var/repo/
|
||||
|
||||
![Mount-RHEL9-ISO-File-Command][1]
|
||||
|
||||
In case of dvd, run
|
||||
如果是 DVD 光盘,运行:
|
||||
|
||||
```
|
||||
$ sudo mount /dev/sr0 /var/repo/
|
||||
```
|
||||
|
||||
### 2) Create Repo File in ‘/etc/yum.repos.d/’ Directory
|
||||
### 2)在 /etc/yum.repos.d/ 目录中创建仓库文件
|
||||
|
||||
Create a repo file with name ‘rhel9-local.repo’ under the folder /etc/yum.repos.d/ with following content
|
||||
在 `/etc/yum.repos.d/` 目录下创建一个名为 “rhel9-local.repo` 的仓库文件,内容如下:
|
||||
|
||||
```
|
||||
$ sudo vi /etc/yum.repos.d/rhel9-local.repo
|
||||
@ -61,13 +64,13 @@ baseurl=file:///var/repo//AppStream/
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
|
||||
```
|
||||
|
||||
Save and close the file.
|
||||
保存并关闭该文件。
|
||||
|
||||
![RHEL8-Local-Repo-File][2]
|
||||
|
||||
### 3) Flush Yum/DNF & Subscription Manager Cache
|
||||
### 3)刷新 Yum/DNF 和订阅管理器的缓存
|
||||
|
||||
Execute following commands to clean yum or dnf and subscription manager cache.
|
||||
执行以下命令来清理 Yum 或 DNF 和订阅管理器的缓存。
|
||||
|
||||
```
|
||||
$ sudo dnf clean all
|
||||
@ -76,7 +79,7 @@ $ sudo subscription-manager clean
|
||||
|
||||
![DNF-Subscription-Manager-Clean][3]
|
||||
|
||||
In the above output, we are getting a warning message ‘This system is not registered with an entitlement’. So, to suppress this warning message, edit the file ‘/etc/yum/pluginconf.d/subscription-manager.conf’ , change the parameter ‘enabled=1’ to ‘enabled=0’.
|
||||
在上面的输出中,我们得到一个警告信息 `This system is not registered with an entitlement`(系统没有注册权限)。所以,为了抑制这个警告信息,编辑文件 `/etc/yum/pluginconf.d/subscription-manager.conf`,将参数 `enabled=1` 改为 `enabled=0`。
|
||||
|
||||
```
|
||||
$ sudo vi /etc/yum/pluginconf.d/subscription-manager.conf
|
||||
@ -84,35 +87,35 @@ $ sudo vi /etc/yum/pluginconf.d/subscription-manager.conf
|
||||
|
||||
![Disable-Subscription-Parameter-RHEL-9][4]
|
||||
|
||||
Save and exit the file.
|
||||
保存并退出该文件。
|
||||
|
||||
### 4) Install Packages using Local Repository
|
||||
### 4)使用本地仓库安装软件包
|
||||
|
||||
Now we are all set to test our local repository. Run beneath command to view configure repository.
|
||||
现在我们都准备好测试我们的本地仓库了。运行下面的命令来查看配置仓库。
|
||||
|
||||
```
|
||||
$ sudo dnf repolist
|
||||
```
|
||||
|
||||
Output,
|
||||
输出:
|
||||
|
||||
![DNF-Repolist-RHEL-9][5]
|
||||
|
||||
Now, try Install packages using dnf command via above configure local repository.
|
||||
现在,试试用 `dnf` 命令通过上面配置的本地仓库安装软件包。
|
||||
|
||||
```
|
||||
$ sudo dnf install nfs-utils
|
||||
```
|
||||
|
||||
Output,
|
||||
输出:
|
||||
|
||||
![Install-RPM-Package-via-local-repo-rhel9][6]
|
||||
|
||||
![Package-Installation-Completion-RHEL9-DNF-Command][7]
|
||||
|
||||
Perfect, above output confirms that nfs-utils package along with its dependencies are installed successfully via locally configured yum or dnf repository.
|
||||
完美,上述输出证实了 `nfs-utils` 包及其依赖项已经通过本地配置的 Yum 或 DNF 仓库成功安装。
|
||||
|
||||
That’s all from this guide. I hope you have found it informative. Kindly do post your queries and feedback in below comments section.
|
||||
这就是本指南的全部内容。我希望你觉得它有参考价值。请在下面的评论区发表你的疑问和反馈。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -120,8 +123,8 @@ via: https://www.linuxtechi.com/create-local-yum-dnf-repository-rhel/
|
||||
|
||||
作者:[Pradeep Kumar][a]
|
||||
选题:[lkxed][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,121 @@
|
||||
[#]: subject: "Why Do Enterprises Use and Contribute to Open Source Software"
|
||||
[#]: via: "https://www.linux.com/news/why-do-enterprises-use-and-contribute-to-open-source-software/"
|
||||
[#]: author: "Dan Whiting https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "aREversez"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14725-1.html"
|
||||
|
||||
企业为何使用开源软件,又为何推动开源软件的发展
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/18/160635ejcmee273zmmxh72.jpg)
|
||||
|
||||
每当人们知道我在 <ruby>Linux 基金会<rt>Linux Foundation</rt></ruby> 工作,他们总是会问我们的工作具体是做什么的。有时候,他们会一直问我是不是开发 Linux 操作系统的。我只能回答说,我们做的是开源软件,并试图在他们失去兴趣之前,在短短的 20 秒钟内介绍它对世界的影响力。如果他们的兴趣还在,想要进一步了解,我就会给他们深入分析一番:企业为何想参与到开源软件项目之中?它们为何会使用开源软件?没错,企业确实会这样做,无论它们有没有意识到这一点。此外,成千上万的企业会将企业内部代码捐给开源项目,为推动开源软件的进一步开发和优化投入大量的时间和资源。
|
||||
|
||||
### 开源软件的使用范围有多广
|
||||
|
||||
引用我们最近发表的一项报告《<ruby>企业开源指南<rt>A Guide to Enterprise Open Source</rt></ruby>》:“<ruby>开源软件<rt>open source software</rt></ruby>(OSS)改变了世界,是数字经济的支柱,数字世界的基石。从我们日常使用的互联网和移动应用到开拓未来的操作系统和编程语言,开源软件无不发挥着重要的作用,可谓是科技行业的命脉。在今天,开源软件驱动数字经济发展,推进科学技术取得突破,不断改善人们的生活水平。手机、汽车和飞机等设备,家庭、企业和政府等群体都在使用着开源软件。但就在 20 年前,开源软件还仅仅为少数人所知,它的使用也仅限于一小部分专门的爱好者。”
|
||||
|
||||
开源软件(OSS)已经改变了我们的世界,成为我们数字经济的支柱和数字世界的基础。
|
||||
|
||||
而它实际上:
|
||||
|
||||
* 在各行业的 <ruby>垂类软件栈<rt>vertical software stacks</rt></ruby> 中,开源软件的占比达到了 20% - 85%。
|
||||
* 超过 90% 的网站服务器和联网设备都依靠 Linux 来运行。
|
||||
* 安卓手机系统也是基于 Linux 内核。
|
||||
* 用于应用程序开发的 AMP、Appium、Dojo、jQuery、Marko、Node.js 等 [主流的库和工具][1] 均属于开源项目。
|
||||
* 世界上排名位列前 100 名的超级计算机都在使用 Linux。
|
||||
* 大型机客户均在使用 Linux。
|
||||
* 亚马逊、谷歌以及微软三大云服务供应商都在使用开源软件运行服务,并在云端托管开源解决方案。
|
||||
|
||||
### 企业为何想参与到开源软件项目之中
|
||||
|
||||
企业参与开源软件项目主要通过三种方式:
|
||||
|
||||
* 企业向开源社区捐赠自家开发的软件。
|
||||
* 企业向开源软件项目提供直接的资金援助。
|
||||
* 企业向开源项目分派软件开发人员以及其他员工。
|
||||
|
||||
人们经常会问,为什么这些企业愿意放弃自家软件的所有权?为什么它们不让员工专攻自家软件的开发呢?
|
||||
|
||||
从整体上来看,这一问题的答案就是,企业和组织聚集起来,合力解决共同的难题,如此一来,他们就可以各自专注于在这基础上的各类难题。这些企业明白,将资源聚集在一起,能够更好地解决基础问题。有时,这种现象被叫做“<ruby>竞合<rt>coopetition</rt></ruby>”,大概的意思是企业在一些领域可能互为竞争对手,但是它们在另一些领域则会互相合作。
|
||||
|
||||
“竞合”现象的一些典型例子:
|
||||
|
||||
* 铁路公司采用统一的铁轨尺寸,统一规划建设。得益于此,火车就可以在同样铁轨上运行,铁路公司之间也可以互相交换设备。
|
||||
* 在数码相机诞生之前,不同的公司在电影和摄像机行业各行创新之路,形成了各自的优势,但为了推进电影行业的发展,它们在相机链轮间距这一问题上达成了统一。
|
||||
* 娱乐产业在开展竞争的同时,也一致坚持采用家用录像系统和蓝光格式。
|
||||
|
||||
如今,企业、组织以及个体在合力解决难题的同时,也在不断地改进自身的产品与业务。
|
||||
|
||||
* <ruby>[来此加密][2]<rt>Let’s Encrypt</rt></ruby>(LCTT译注:Let’s Encrypt 官网并没有用“来此加密”这样的称呼,但是在一些场合有这样的译名。我们认为此翻译很贴切。) 是一个免费的、开放的自动化证书颁发机构,旨在通过简化安装程序,减低安装费用,快速扩大安全网络协议的应用范围。该机构为超过 2.25 亿个网站提供服务,每天平均发放证书约 150 万张。
|
||||
* 好莱坞成立的 <ruby>[学院软件基金会][3]<rt>Academy Software Foundation</rt></ruby> 通过共同开发软件,推动娱乐、游戏和媒体等产业的增长,为产业发展提供开放标准,在电影行业内 [创造了巨大的价值][4]。
|
||||
* <ruby>超级账本<rt>Hyperledger</rt></ruby> 基金会管理多个企业级区块链软件项目。众所周知,这些项目 [消耗的能源远比其他解决方案要少][5]。
|
||||
* <ruby>[LF 能源基金会][6]<rt>LF Energy</rt></ruby> 推动 [电网朝着更加模块化、互操作和可拓展的方向发展][7],助力提升可再生能源的利用率。
|
||||
* <ruby>[无人机代码基金会][8]<rt>Dronecode</rt></ruby> 致力于无人机软件的开发,促进企业在无人机领域进一步开拓创新。
|
||||
* <ruby>[开源软件软件安全基金会][9]<rt>OpenSSF</rt></ruby> 聚集了顶尖的科技企业,共同强化开源软件的安全与韧性。
|
||||
* [Kubernetes][10] 是 Google 捐赠给 Linux 基金会下属的云原生计算基金会(CNCF)的一个项目,是管理基于云计算软件的首选方案。
|
||||
|
||||
上述只是企业参与的一小部分开源软件项目,点击 [此处][11],可以在 Linux 基金会官网浏览全部项目列表。
|
||||
|
||||
### 企业如何有效利用和参与开源软件项目?
|
||||
|
||||
若想要更好地利用开源项目,更有效地参与开源项目,企业可以向 Linux 基金会寻求帮助。我们最新发布的报告 《[企业开源指南][12]》 提供了企业与组织需要了解的大部分信息。这份报告凝聚了来自多家顶级企业、具有几十年丰富经验的开源领袖的知识与智慧,报告主要分为以下六个章节:
|
||||
|
||||
* 使用开源软件
|
||||
* 准备参与开源
|
||||
* 制定开源策略
|
||||
* 部署基础设施
|
||||
* 建立人才团队
|
||||
* 应对多方挑战
|
||||
|
||||
此外,Linux 基金会还提供了许多开源 [培训课程][13]、全年 [活动][14]、[LFX 平台][15],发起开源项目,协助企业与组织利用和参与开源项目,比如:
|
||||
|
||||
* [TODO 工作组][16] 为开源项目办公室的建立和运作提供资源,包括其自身 [丰富的指导意见][17]。
|
||||
* [Openchain 项目][18] 旨在提供和维护国际开源许可标准,包括各种许可规定的相关信息。依赖于此,企业可以确保自身行为符合法律规定。
|
||||
* [FinOps 基金会][19] 目前正在将自身打造为“不断发展的云财务管理和文化实践平台,通过促进工程、财务、技术以及商业团队之间在数据驱动支出决策方面的合作,确保企业能够最大化实现商业价值”。
|
||||
* <ruby>[软件数据包交换标准][20]<rt>Software Data Package Exchange</rt></ruby>(SPDX)是一个用于交流 <ruby>软件物料清单<rt>software bill of materials</rt></ruby>(SBOM)的开放标准。在该标准下,每个用户都能清楚了解整个软件包中包括哪些软件。
|
||||
|
||||
同样,上述这些只是 Linux 基金会所有项目中的一小部分。所有这些项目都致力于帮助企业接受和使用开源项目,引导企业为开源项目做出贡献、提供捐赠。
|
||||
|
||||
总而言之,目前,企业正在迅速投向开源软件项目,借此解决共同的难题,并探索进一步的创新发展,而 Linux 基金会将为它们提供帮助。
|
||||
|
||||
*该文 [《企业为何使用开源软件,又为何推动开源软件的发展》][21] 首发于 [Linux 基金会][22] 官网。*
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linux.com/news/why-do-enterprises-use-and-contribute-to-open-source-software/
|
||||
|
||||
作者:[Dan Whiting][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[aREversez](https://github.com/aREversez)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://openjsf.org/projects/
|
||||
[2]: https://letsencrypt.org/
|
||||
[3]: https://www.aswf.io/
|
||||
[4]: https://linuxfoundation.org/tools/open-source-in-entertainment/
|
||||
[5]: https://linuxfoundation.org/tools/carbon-footprint-of-nfts/
|
||||
[6]: https://www.lfenergy.org/
|
||||
[7]: https://linuxfoundation.org/tools/paving-the-way-to-battle-climate-change-how-two-utilities-embraced-open-source-to-speed-modernization-of-the-electric-grid/
|
||||
[8]: https://www.dronecode.org/projects/
|
||||
[9]: https://openssf.org/
|
||||
[10]: https://kubernetes.io/
|
||||
[11]: https://linuxfoundation.org/projects/
|
||||
[12]: https://linuxfoundation.org/tools/guide-to-enterprise-open-source/
|
||||
[13]: https://training.linuxfoundation.org/
|
||||
[14]: https://events.linuxfoundation.org/
|
||||
[15]: https://lfx.linuxfoundation.org/
|
||||
[16]: https://todogroup.org/
|
||||
[17]: https://linuxfoundation.org/resources/open-source-guides/
|
||||
[18]: https://www.openchainproject.org/resources
|
||||
[19]: https://www.finops.org/introduction/what-is-finops/
|
||||
[20]: https://spdx.dev/
|
||||
[21]: https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/
|
||||
[22]: https://www.linuxfoundation.org/
|
@ -0,0 +1,173 @@
|
||||
[#]: subject: "How to Install FFmpeg in Ubuntu and Other Linux"
|
||||
[#]: via: "https://www.debugpoint.com/2022/06/install-ffmpeg-ubuntu/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "aREversez"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14716-1.html"
|
||||
|
||||
在 Linux 上安装 FFmpeg
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/16/103329av0zoz5m5o9ootz5.jpg)
|
||||
|
||||
> 本教程介绍了在 Ubuntu 及其他 Linux 发行版上安装 FFmpeg 的步骤。
|
||||
|
||||
FFmpeg 是一套处理多媒体文件的软件库。凭借这些强大的库,FFmpeg 能够转换格式、推流以及处理音频和视频文件。许多 Linux 的前端应用都使用 FFmpeg 作为后端支持,所以这些应用对 FFmpeg 的依赖度非常高。举个例子,录屏软件可能会用到 FFmpeg 将录屏转换为 gif 动图。
|
||||
|
||||
VLC 多媒体播放器、YouTube、Blender、Kodi、Shotcut 和 Handbrake 等流行的应用与服务都在使用 FFmpeg,这仅仅一小部分。
|
||||
|
||||
趣事:NASA 火星 2020 计划的探测器“毅力”号在将图像和视频发送到地球之前,会先使用 FFmpeg 对其进行处理。
|
||||
|
||||
### 关于 FFmpeg
|
||||
|
||||
[FFmpeg][1] 本身是一款非常强大的命令行实用程序,在 Linux 发行版、Windows 以及 macOS 等系统上均可运行,支持多种架构。FFmpeg 是用 C 语言和汇编语言编写的,性能强大,提供跨平台支持。
|
||||
|
||||
#### 核心
|
||||
|
||||
FFmpeg 的核心是命令行实用程序,既可在命令行上使用,也可以经由任何程序语言调用。比如,你可以在 Shell 程序或 python 脚本中使用 FFmpeg。
|
||||
|
||||
* `ffmpeg`:用于转换音视频格式,包括来自视频直播的信号源。
|
||||
* `ffplay`:FFmpeg 配套使用的媒体播放器
|
||||
* `ffprobe`:显示媒体文件信息的命令行工具,可将信息输出为 csv、xml、json 等格式。
|
||||
|
||||
### FFmpeg 安装
|
||||
|
||||
在 Ubuntu 等 Linux 发行版上, FFmpeg 的安装比较简单。打开终端,运行以下命令安装即可。
|
||||
|
||||
#### Ubuntu 及与其相似的发行版
|
||||
|
||||
```
|
||||
sudo apt install FFmpeg
|
||||
```
|
||||
|
||||
#### Fedora
|
||||
|
||||
在 Fedora Linux 上安装 FFmpeg,你需要添加 [RPM Fusion 仓库][2],因为 Fedora 官方仓库没有 FFmpeg 软件包。
|
||||
|
||||
```
|
||||
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
|
||||
```
|
||||
|
||||
```
|
||||
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-
|
||||
```
|
||||
|
||||
```
|
||||
sudo dnf install ffmpeg
|
||||
```
|
||||
|
||||
#### Arch Linux
|
||||
|
||||
```
|
||||
pacman -S ffmpeg
|
||||
```
|
||||
|
||||
安装完成后,可输入以下命令查看安装是否成功。
|
||||
|
||||
```
|
||||
ffmpeg --version
|
||||
```
|
||||
|
||||
![FFmpeg installed in Ubuntu Linux][3]
|
||||
|
||||
### 示例:FFmpeg 的基本操作
|
||||
|
||||
首先,我们先来看看 FFmpeg 语法的一个简单例子。如下,该语法可以将 mp4 文件转换为 mkv 文件。
|
||||
|
||||
1、视频文件格式转换
|
||||
|
||||
```
|
||||
ffmpeg -i big_buck_bunny.mp4 big_buck_bunny.mkv
|
||||
```
|
||||
|
||||
当然,这种写法最为简单易懂,但它并不完整,因为没有输入 <ruby>比特率<rt>bit rate</rt></ruby>、<ruby>分辨率<rt>resolution</rt></ruby> 以及其他的视频文件属性。
|
||||
|
||||
2、音频文件格式转换
|
||||
|
||||
其次,输入与上面相似的命令可以转换音频文件的格式。
|
||||
|
||||
```
|
||||
ffmpeg -i sunny_day.ogg sunny_day.mp3
|
||||
```
|
||||
|
||||
3、使用音视频编解码器执行格式转换
|
||||
|
||||
最后,在下面的例子中,我们可以使用特定的 <ruby>编解码器<rt>codec</rt></ruby> 来转换视频格式。参数 `-c` 搭配 `a` 或者 `v`,可以分别定义音频和视频文件。以下转换命令使用 `libvpx` 视频编解码器和 `libvorbis` 音频编解码器。
|
||||
|
||||
```
|
||||
ffmpeg -i big_buck_bunny.mp4 -c:v libvpx -c:a libvorbis big_buck_bunny.webm
|
||||
```
|
||||
|
||||
### 如何确定自己系统中有哪些编码器和解码器?
|
||||
|
||||
#### 显示所有编解码器
|
||||
|
||||
输入以下命令,打印所有编解码器。
|
||||
|
||||
```
|
||||
ffmpeg -codecs
|
||||
```
|
||||
|
||||
该命令可以打印出所有可用的编解码器,并显示每个编解码器对应的功能信息,比如是否支持解码或编码。此外,如以下输出结果所示,打印出来的信息还会按照首字母顺序标注出每个编码器和解码器的位置。
|
||||
|
||||
```
|
||||
D..... = 支持解码
|
||||
.E.... = 支持编码
|
||||
..V... = 视频编解码器
|
||||
..A... = 音频编解码器
|
||||
..S... = 字幕编解码器
|
||||
...I.. = 仅限帧内编解码器
|
||||
....L. = 有损压缩
|
||||
.....S = 无损压缩
|
||||
```
|
||||
|
||||
![FFmpeg Codec list][4]
|
||||
|
||||
#### 显示所有编码器
|
||||
|
||||
输入下列命令,打印出所有编码器
|
||||
|
||||
```
|
||||
ffmpeg -encoders
|
||||
```
|
||||
|
||||
#### 显示所有解码器
|
||||
|
||||
同样,输入下列命令,打印出所有解码器。
|
||||
|
||||
```
|
||||
ffmpeg -decoders
|
||||
```
|
||||
|
||||
#### 更多信息
|
||||
|
||||
输入参数 `-h`,获取更多关于编码器或解码器的信息。
|
||||
|
||||
```
|
||||
ffmpeg -h decoder=mp3
|
||||
```
|
||||
|
||||
### 总结
|
||||
|
||||
我希望这篇文章可以帮助你了解 FFmpeg 的基本知识及基本命令。若要了解更多信息,可前往 FFmpeg 官方网站浏览 [帮助文档][5]。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/06/install-ffmpeg-ubuntu/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[aREversez](https://github.com/aREversez)
|
||||
校对:[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/lkxed
|
||||
[1]: https://ffmpeg.org/
|
||||
[2]: https://www.debugpoint.com/2020/07/enable-rpm-fusion-fedora-rhel-centos/
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-installed-in-Ubuntu-Linux.jpg
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-Codec-list.jpg
|
||||
[5]: https://ffmpeg.org/documentation.html
|
@ -0,0 +1,45 @@
|
||||
[#]: subject: "Contribute at the Fedora Linux 37 Test Week for Kernel 5.18"
|
||||
[#]: via: "https://fedoramagazine.org/contribute-at-the-fedora-linux-37-test-week-for-kernel-5-18/"
|
||||
[#]: author: "Sumantro Mukherjee https://fedoramagazine.org/author/sumantrom/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14685-1.html"
|
||||
|
||||
Fedora Linux 37 的内核 5.18 测试周到了,一起来做贡献吧!
|
||||
======
|
||||
![][1]
|
||||
|
||||
Fedora 内核团队正在为 Linux 内核 5.18 进行最终集成。这个版本刚刚发布,很快就会出现在 Fedora 中。因此,Fedora 内核和 QA 团队组织了一个测试周,截止日期为 **2022 年 6 月 12 日,星期日。** 请参阅 [维基页面][2] 来获取你将要参与的测试镜像链接。继续阅读下文,可了解更多细节~
|
||||
|
||||
### 测试周是如何运作的?
|
||||
|
||||
测试周是一个人人都可以参与的活动。在测试周,任何人都可以为 Fedora 即将发布的版本查漏补缺,确保它最终能够运行良好。Fedora 社区成员会经常参与这个活动,我们同时也欢迎公众参加这些活动。如果你以前从未做过贡献,那么这是一个绝佳的上手机会。
|
||||
|
||||
要想做出贡献,你只需要能够执行以下操作即可:
|
||||
|
||||
* 下载测试资料,包括一些大文件
|
||||
* 阅读并按照说明一步一步地进行操作
|
||||
|
||||
内核测试日的 [维基页面][2] 提供了很多关于测试内容和测试方法的有用信息。完成一些测试后,你可以在测试日的 [Web 应用][3] 上记录下你的测试结果。如果你在活动的当天或前后有空,请进行一些测试并报告你的结果。不知道该怎么做?没关系,我们有一份文件,其中提供了 [所有步骤][4]。
|
||||
|
||||
希望能在测试日见到你,预祝测试愉快~
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/contribute-at-the-fedora-linux-37-test-week-for-kernel-5-18/
|
||||
|
||||
作者:[Sumantro Mukherjee][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://fedoramagazine.org/author/sumantrom/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2022/06/test-days-816x345.jpg
|
||||
[2]: http://fedoraproject.org/wiki/Test_Day:2022-06-05_Kernel_5.18_Test_Week
|
||||
[3]: https://testdays.fedoraproject.org/events/136
|
||||
[4]: https://docs.fedoraproject.org/en-US/quick-docs/kernel/howto-kernel-testday/
|
@ -0,0 +1,82 @@
|
||||
[#]: subject: "6 Linux word processors you need to try"
|
||||
[#]: via: "https://opensource.com/article/22/6/word-processors-linux"
|
||||
[#]: author: "Don Watkins https://opensource.com/users/don-watkins"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "duoluoxiaosheng"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14693-1.html"
|
||||
|
||||
值得尝试的六款 Linux 文字处理程序
|
||||
======
|
||||
|
||||
> 选择一款最中意的文字处理程序把你的想法打印到纸上。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/10/120032h7jlo1ozm37fdyfv.jpg)
|
||||
|
||||
作家们总是在寻找更好的方法将他们的文字和想法以更好的方式呈现给他们的读者。我对文字处理程序最早的印象是在 Apple II 上使用 AppleWorks 和后来的 FrEDWriter,后者是一个创建于 1985 年的免费文字处理程序。这是我的学生们的标配,他们许多人来自没有钱购买专有软件的家庭。
|
||||
|
||||
### Abiword
|
||||
|
||||
在 20 世纪 90 年代时,我开始使用 Linux,寻找我可以使用的高质量的写作程序,并推荐给跟随我进入开源软件世界的学生们。我首先接触的文字处理程序是 [AbiWord][2]。AbiWord 来自西班牙语 Abierto,意思是“开放”。它最早发布于 1998 年,并且之后一直在升级。它使用 GPLv2 开源协议。它支持列表、缩进,字符格式等基本功能,支持 .doc、.html、.docx、.odt 等多种格式文件的导入和导出。
|
||||
|
||||
![Image of Abiword][3]
|
||||
|
||||
### Etherpad
|
||||
|
||||
[Etherpad][4] 是一个开源协作编辑项目。它可以让你像 Google Drive 那样实时编辑文档,主要的区别是它是完全开源的。据它的网站上介绍,你可以“与你的朋友、同学或同事一起写文章、新闻稿、待办事项,同时在同一个文件上工作”。其源代码可随时查看。Etherpad 采用 Apache 2.0 开源协议。你可以直接在线使用它,或者把它下载并 [安装][5] 到你的 Linux 电脑上。
|
||||
|
||||
### Cryptpad
|
||||
|
||||
[CryptPad][6] 是一个端到端加密的写作套件。使用 GPLv3 开源协议,并且源代码公开在 [GitHub][7] 上。它由 [Xwiki][8] 实验室开发。可替代 Google Drive,并且是自主托管的。根据其网站描述,“CryptPad 旨在实现协作办公。实时同步文档的更改。由于所有数据都已加密,因此该服务及其管理员无法查看正在编辑和存储的内容。” Cryptpad 为用户提供了 [丰富的文档][9]。
|
||||
|
||||
### Focuswriter
|
||||
|
||||
[FocusWriter][10] 是一个简单的免干扰的编辑器。它使用隐藏式界面,鼠标移动到屏幕边界时才显示界面。它使用 GPLv3 开源协议,并为 Linux 提供了 Flatpak 软件包,也为 [Ubuntu][11] 和 [Fedora][12] 提供了 DEB 和 RPM。下图是一个 FocusWriter 桌面的例子。这是一个非常简单直观的界面,菜单自动隐藏,当鼠标指向屏幕顶部或边缘时才会显示。文件默认保存为 .odt 格式,也支持纯文本、.docx 和富文本。
|
||||
|
||||
![Image of FocusWriter][13]
|
||||
|
||||
### LibreOffice Writer
|
||||
|
||||
[LibreOffice Writer][14] 是我最喜欢的,我已经使用了十多年了。它拥有我需要的所有特性,包括富文本格式化。它还拥有我见过的最多的导入、导出方式。类似于 [APA][15] 这样的问卷和出版模板它拥有十多种。我最喜欢的是它可以将文件导出为 PDF 和 epub。 LibreOffice Writer 是一个自由软件,使用 Mozilla 公开许可证(MPL)2.0 开源协议。其 [源代码][16] 由文档基金会提供。LibreOffice 支持大多数 Linux 发行版。同时它也提供 Flatpak、Snap 和 AppImage 软件包。另外,你也可以把它下载并安装到 MacOS 和 Windows 上。
|
||||
|
||||
![Image of LibreOffice work space][17]
|
||||
|
||||
### OpenOffice Writer
|
||||
|
||||
Apache [OpenOffice Writer][18] 是一个全功能的文字处理程序。它可以简单地用于备忘录,也可以复杂到足以编写你的第一本书。依据官网的描述,OpenOffice Writer 将文档自动保存为 .odt。它还支持将文档保存为 .doc、.docx、富文本和其他格式。OpenOffice Writer 使用 Apache 许可证 2.0 开源协议。源代码在 [GitHub][19] 上公开。
|
||||
|
||||
还有许多自由开源软件等着大家去发现。它们非常适合完成你的日常任务,你也可以为它们的发展做出贡献。你最喜欢的 Linux 文字处理器程序是什么呢?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/word-processors-linux
|
||||
|
||||
作者:[Don Watkins][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[duoluoxiaosheng](https://github.com/duoluoxiaosheng)
|
||||
校对:[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/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/typewriter-hands.jpg
|
||||
[2]: https://www.abisource.com/
|
||||
[3]: https://opensource.com/sites/default/files/2022-05/abiword.png
|
||||
[4]: https://etherpad.org/#
|
||||
[5]: https://github.com/ether/etherpad-lite#installation
|
||||
[6]: https://cryptpad.fr/what-is-cryptpad.html
|
||||
[7]: https://github.com/xwiki-labs/cryptpad
|
||||
[8]: https://github.com/xwiki-labs
|
||||
[9]: https://docs.cryptpad.fr/en/user_guide/index.html
|
||||
[10]: https://gottcode.org/focuswriter/
|
||||
[11]: https://packages.ubuntu.com/jammy/focuswriter
|
||||
[12]: https://src.fedoraproject.org/rpms/focuswriter
|
||||
[13]: https://opensource.com/sites/default/files/2022-05/focuswriter.png
|
||||
[14]: https://www.libreoffice.org/discover/writer/
|
||||
[15]: https://extensions.libreoffice.org/en/extensions/show/apa-style-paper-template
|
||||
[16]: https://www.libreoffice.org/about-us/source-code/
|
||||
[17]: https://opensource.com/sites/default/files/2022-05/Libreofficewriter.png
|
||||
[18]: https://www.openoffice.org/product/writer.html
|
||||
[19]: https://github.com/apache/openoffice
|
@ -0,0 +1,113 @@
|
||||
[#]: subject: "Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else"
|
||||
[#]: via: "https://itsfoss.com/amberol-music-player/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14700-1.html"
|
||||
|
||||
Amberol 是一款外观漂亮的 Linux 音乐播放器,只播放音乐,不做其他事情
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/12/155846b0sbsvtt1et70ttf.jpg)
|
||||
|
||||
虽然音乐世界被流媒体服务所主导,但这并没有阻止开发者为桌面电脑创建音乐播放器。
|
||||
|
||||
最近,我发现了一个外观漂亮的新的 Linux 桌面音乐播放器。它名为 Amberol,我被它的美丽所震撼。
|
||||
|
||||
![amberol music player interface][1]
|
||||
|
||||
看起来不错,不是吗?让我们仔细看看它。
|
||||
|
||||
### Amberol,Linux 上的可爱的音乐播放器
|
||||
|
||||
看起来不错是它所做的两件(或几件)事情中的一件。另一件事是播放音乐。
|
||||
|
||||
这就是它,[Amberol][2] 没有额外的花哨(和有用)的功能,如生成专辑封面、元数据编辑、歌词显示或播放列表和库管理。
|
||||
|
||||
这些功能也不像是会在未来的版本中加入。Amberol 只想播放音乐。就是这样。
|
||||
|
||||
#### 令人惊叹的用户界面
|
||||
|
||||
Amberol 和大多数新的 GNOME 应用一样,是用 Rust 和 GTK 编写的。
|
||||
|
||||
它有一个自适应的用户界面,可以根据你正在播放的专辑颜色来改变颜色。渐变效果给了它一个现代、时尚的外观,肯定会成为你的 Linux <ruby>美化<rt>Ricing</rt></ruby>截图的一部分。
|
||||
|
||||
![amberol music player][3]
|
||||
|
||||
由于其 UI 没有传统的手柄和菜单,它给应用一个统一的外观。
|
||||
|
||||
#### 播放列表
|
||||
|
||||
它会从你添加的文件夹中的文件自动生成一个播放列表,显示在左手边的侧边栏。
|
||||
|
||||
![amberol playlist][4]
|
||||
|
||||
你可以在左上角看到整个播放列表将播放多长时间的音乐。点击“勾选”符号,你可以选择歌曲,并从播放列表中删除它们。
|
||||
|
||||
如果你愿意,可以隐藏播放列表的侧边栏。
|
||||
|
||||
![amberol without playlist][5]
|
||||
|
||||
#### 音乐播放选项
|
||||
|
||||
你可以在界面上看到歌曲的进度。该播放器与键盘上的媒体控制按钮整合得很好。你可以用专用的媒体键来播放、暂停和改变曲目(如果你的系统上有)。
|
||||
|
||||
Amberol 为你提供了一些播放音乐的选项。你可以打开随机播放功能,按随机顺序播放音乐。你也可以单曲循环,直到你厌倦它。
|
||||
|
||||
![amberol music playing options][6]
|
||||
|
||||
底部的汉堡菜单让你可以选择添加文件或文件夹,并显示可用的键盘快捷方式。
|
||||
|
||||
![amberol keyboard shortcuts][7]
|
||||
|
||||
你也可以从这里禁用 UI 颜色变化以配合专辑封面。
|
||||
|
||||
### 在 Linux 上安装 Amberol
|
||||
|
||||
Amberol 是 [以 Flatpak 形式提供的][8]。请确保 [你的系统已启用 Flatpak 支持][9]。
|
||||
|
||||
要安装 Amberol,请打开终端并使用以下命令:
|
||||
|
||||
```
|
||||
flatpak install flathub io.bassi.Amberol
|
||||
```
|
||||
|
||||
安装完毕后,在菜单中搜索该应用,并点击启动。
|
||||
|
||||
第一次运行时,它会要求你添加音乐文件或文件夹。你也可以拖放文件播放。
|
||||
|
||||
![amberol first run][10]
|
||||
|
||||
### 总结
|
||||
|
||||
就个人而言,我更喜欢流媒体服务,因为我没有本机音乐珍藏。但我知道有的人有大量的 CD 收藏,现在都保存在硬盘上。
|
||||
|
||||
Amberol 是一个外观漂亮的应用,对于播放本机音乐来说,它足够好。最吸引人的是它基于专辑封面的自适应用户界面。
|
||||
|
||||
请你试试它,并在评论区分享你的经验。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/amberol-music-player/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lkxed][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/abhishek/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-music-player-interface-800x693.png
|
||||
[2]: https://apps.gnome.org/app/io.bassi.Amberol/
|
||||
[3]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-music-player-800x580.png
|
||||
[4]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-playlist-800x548.png
|
||||
[5]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-without-playlist-800x693.png
|
||||
[6]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-music-playing-options-800x548.png
|
||||
[7]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-keyboard-shortcuts-800x528.png
|
||||
[8]: https://flathub.org/apps/details/io.bassi.Amberol
|
||||
[9]: https://itsfoss.com/flatpak-guide/
|
||||
[10]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-first-run-800x693.png
|
@ -0,0 +1,156 @@
|
||||
[#]: subject: "How Garbage Collection works inside a Java Virtual Machine"
|
||||
[#]: via: "https://opensource.com/article/22/6/garbage-collection-java-virtual-machine"
|
||||
[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14742-1.html"
|
||||
|
||||
JVM 垃圾回收的工作原理
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/22/094238qvh45pv2jtpde9td.jpg)
|
||||
|
||||
> 对于程序员来说,掌握 Java 的内存管理机制并不是必须的,但它能够帮助你更好地理解 JVM 是如何处理程序中的变量和类实例的。
|
||||
|
||||
Java 之所以能够如此流行,自动 <ruby>垃圾回收<rt>Garbage Collection</rt></ruby>(GC)功不可没,它也是 Java 最重要的几个特性之一。在这篇文章中,我将说明为什么垃圾回收如此重要。本文的主要内容为:自动的分代垃圾回收、JVM 划分内存的依据,以及 JVM 垃圾回收的工作原理。
|
||||
|
||||
### Java 内存分配
|
||||
|
||||
Java 程序的内存空间被划分为以下四个区域:
|
||||
|
||||
1. <ruby>堆区<rt>Heap</rt></ruby>:对象实例就是在这个区域分配的。不过,当我们声明一个对象时,堆中不会发生任何内存分配,只是在栈中创建了一个对象的引用而已。
|
||||
2. <ruby>栈区<rt>Stack</rt></ruby>:方法、局部变量和类的实例变量就是在这个区域分配的。
|
||||
3. <ruby>代码区<rt>Code</rt></ruby>:这个区域存放了程序的字节码。
|
||||
4. <ruby>静态区<rt>Static</rt></ruby>:这个区域存放了程序的静态数据和静态方法。
|
||||
|
||||
### 什么是自动垃圾回收?
|
||||
|
||||
自动垃圾回收是这样一个过程:首先,堆中的所有对象会被分类为“被引用的”和“未被引用的”;接着,“未被引用的对象”就会被做上标记,以待之后删除。其中,“被引用的对象”是指程序中的某一部分仍在使用的对象,“未被引用的对象”是指目前没有正在被使用的对象。
|
||||
|
||||
许多编程语言,例如 C 和 C++,都需要程序员手动管理内存的分配和释放。在 Java 中,这一过程是通过垃圾回收机制来自动完成的(尽管你也可以在代码中调用 `system.gc();` 来手动触发垃圾回收)。
|
||||
|
||||
垃圾回收的基本步骤如下:
|
||||
|
||||
#### 1、标记已使用和未使用的对象
|
||||
|
||||
在这一步骤中,已使用和未使用的对象会被分别做上标记。这是一个及其耗时的过程,因为需要扫描内存中的所有对象,才能够确定它们是否正在被使用。
|
||||
|
||||
![标记已使用和未使用的对象][2]
|
||||
|
||||
#### 2、扫描/删除对象
|
||||
|
||||
有两种不同的扫描和删除算法:
|
||||
|
||||
**简单删除(标记清除)**:它的过程很简单,我们只需要删除未被引用的对象即可。但是,后续给新对象分配内存就会变得很困难了,因为可用空间被分割成了一块块碎片。
|
||||
|
||||
![标记清除的过程][3]
|
||||
|
||||
**删除压缩(标记整理)**:除了会删除未被引用的对象,我们还会压缩被引用的对象(未被删除的对象)。这样以来,新对象的内存分配就相对容易了,并且内存分配的效率也有了提升。
|
||||
|
||||
![标记整理的过程][4]
|
||||
|
||||
### 什么是分代垃圾回收,为什么需要它?
|
||||
|
||||
正如我们在“扫描删除”模型中所看到的,一旦对象不断增长,我们就很难扫描所有未使用的对象以回收内存。不过,有一项实验性研究指出,在程序执行期间创建的大多数对象,它们的存活时间都很短。
|
||||
|
||||
既然大多数对象的存活时间都很短,那么我们就可以利用这个事实,从而提升垃圾回收的效率。该怎么做呢?首先,JVM 将内存划分为不同的“代”。接着,它将所有的对象都分类到这些内存“代”中,然后对这些“代”分别执行垃圾回收。这就是“分代垃圾回收”。
|
||||
|
||||
### 堆内存的“代”和分代垃圾回收过程
|
||||
|
||||
为了提升垃圾回收中的“标记清除”的效率,JVM 将对内存划分成以下三个“代”:
|
||||
|
||||
* <ruby>新生代<rt>Young Generation</rt></ruby>
|
||||
* <ruby>老年代<rt>Old Generation</rt></ruby>
|
||||
* <ruby>永久代<rt>Permanent Generation</rt></ruby>
|
||||
|
||||
![Hotspot 堆内存结构][5]
|
||||
|
||||
下面我将介绍每个“代”及其主要特征。
|
||||
|
||||
#### 新生代
|
||||
|
||||
所有创建不久的对象都存放在这里。新生代被进一步分为以下两个区域:
|
||||
|
||||
1. <ruby>伊甸区<rt>Eden</rt></ruby>:所有新创建的对象都在此处分配内存。
|
||||
2. <ruby>幸存者区<rt>Survivor</rt></ruby>,分为 S0 和 S1:经历过一次垃圾回收后,仍然存活的对象会被移动到两个幸存者区中的一个。
|
||||
|
||||
![对象分配][6]
|
||||
|
||||
在新生代发生的分代垃圾回收被称为 “<ruby>次要回收<rt>Minor GC</rt></ruby>”(LCTT 译注:也称为“<ruby>新生代回收<rt>Young GC</rt></ruby>”)。Minor GC 过程中的每个阶段都是“<ruby>停止世界<rt>Stop The World</rt></ruby>”(STW)的,这会导致其他应用程序暂停运行,直到垃圾回收结束。这也是次要回收更快的原因。
|
||||
|
||||
一句话总结:伊甸区存放了所有新创建的对象,当它的可用空间被耗尽,第一次垃圾回收就会被触发。
|
||||
|
||||
![填充伊甸区][7]
|
||||
|
||||
次要回收:在该垃圾回收过程中,所有存活和死亡的对象都会被做上标记。其中,存活对象会被移动到 S0 幸存者区。当所有存活对象都被移动到了 S0,未被引用的对象就会被删除。
|
||||
|
||||
![拷贝被引用的对象][8]
|
||||
|
||||
S0 中的对象年龄为 1,因为它们挺过了一次次要回收。此时,伊甸区和 S1 都是空的。
|
||||
|
||||
每当完成清理后,伊甸区就会再次接受新的存活对象。随着时间的推移,伊甸区和 S0 中的某些对象被宣判死亡(不再被引用),并且伊甸区的可用空间也再次耗尽(填满了),那么次要回收 又将再次被触发。
|
||||
|
||||
![对象年龄增长][9]
|
||||
|
||||
这一次,伊甸区和 S0 中的死亡和存活的对象会被做上标记。其中,伊甸区的存活对象会被移动到 S1,并且年龄增加至 1。S0 中的存活对象也会被移动到 S1,并且年龄增加至 2(因为它们挺过了两次次要回收)。此时,伊甸区和 S0 又是空的了。每次次要回收之后,伊甸区和两个幸存者区中的一个都会是空的。
|
||||
|
||||
新对象总是在伊甸区被创建,周而复始。当下一次垃圾回收发生时,伊甸区和 S1 都会被清理,它们中的存活对象会被移动到 S0 区。每次次要回收之后,这两个幸存者区(S0 和 S1)就会交换一次。
|
||||
|
||||
![额外年龄增长][10]
|
||||
|
||||
这个过程会一直进行下去,直到某个存活对象的年龄达到了某个阈值,然后它就会被移动到一个叫做“老年代”的地方,这是通过一个叫做“晋升”的过程来完成的。
|
||||
|
||||
使用 `-Xmn` 选项可以设置新生代的大小。
|
||||
|
||||
### 老年代
|
||||
|
||||
这个区域存放着那些挺过了许多次次要回收,并且达到了某个年龄阈值的对象。
|
||||
|
||||
![晋升][11]
|
||||
|
||||
在上面这个示例图表中,晋升的年龄阈值为 8。在老年代发生的垃圾回收被称为 “<ruby>主要回收<rt>Major GC</rt></ruby>”。(LCTT 译注:也被称为“<ruby>全回收<rt>Full GC</rt></ruby>”)
|
||||
|
||||
使用 `-Xms` 和 `-Xmx` 选项可以分别设置堆内存大小的初始值和最大值。(LCTT 译注:结合上面的 `-Xmn` 选项,就可以间接设置老年代的大小了。)
|
||||
|
||||
### 永久代
|
||||
|
||||
永久代存放着一些元数据,它们与应用程序、Java 标准环境以及 JVM 自用的库类及其方法相关。JVM 会在运行时,用到了什么类和方法,就会填充相应的数据。当 JVM 发现有未使用的类,就会卸载或是回收它们,从而为正在使用的类腾出空间。
|
||||
|
||||
使用 `-XX:PermGen` 和 `-XX:MaxPerGen` 选项可以分别设置永久代大小的初始值和最大值。
|
||||
|
||||
#### 元空间
|
||||
|
||||
Java 8 引入了<ruby>元空间<rt>Metaspace</rt></ruby>,并用它替换了永久代。这么做的好处是自动调整大小,避免了 <ruby>内存不足<rt>OutOfMemory</rt></ruby>(OOM)错误。
|
||||
|
||||
### 总结
|
||||
|
||||
本文讨论了各种不同的 JVM 内存“代”,以及它们是如何在分代垃圾回收算法中起作用的。对于程序员来说,掌握 Java 的内存管理机制并不是必须的,但它能够帮助你更好地理解 JVM 处理程序中的变量和类实例的方式。这种理解使你能够规划和排除代码故障,并理解特定平台固有的潜在限制。
|
||||
|
||||
*正文配图来自:Jayashree Huttanagoudar,CC BY-SA 4.0*
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/garbage-collection-java-virtual-machine
|
||||
|
||||
作者:[Jayashree Huttanagoudar][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/jayashree-huttanagoudar
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/java-coffee-beans.jpg
|
||||
[2]: https://opensource.com/sites/default/files/2022-06/1Marking.png
|
||||
[3]: https://opensource.com/sites/default/files/2022-06/2NormalDeletion.png
|
||||
[4]: https://opensource.com/sites/default/files/2022-06/3DeletionwithCompacting.png
|
||||
[5]: https://opensource.com/sites/default/files/2022-06/4Hotspot.png
|
||||
[6]: https://opensource.com/sites/default/files/2022-06/5ObjAllocation.png
|
||||
[7]: https://opensource.com/sites/default/files/2022-06/6FillingEden.png
|
||||
[8]: https://opensource.com/sites/default/files/2022-06/7CopyingRefdObjs.png
|
||||
[9]: https://opensource.com/sites/default/files/2022-06/8ObjAging.png
|
||||
[10]: https://opensource.com/sites/default/files/2022-06/9AddlAging.png
|
||||
[11]: https://opensource.com/sites/default/files/2022-06/10Promotion.png
|
@ -0,0 +1,100 @@
|
||||
[#]: subject: "Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work"
|
||||
[#]: via: "https://www.debugpoint.com/2022/06/linux-kernel-5-19-rc1/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "Donkey-Hao"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14692-1.html"
|
||||
|
||||
Linux 内核 5.19 RC1 发布,完成了 ARM 通用内核的工作
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/10/100401b0t82bd0ww0o2tgn.jpg)
|
||||
|
||||
> Linus Torvalds 发布了用来测试的 Linux 内核 5.19 RC1,带来了一些重大变化。
|
||||
|
||||
继上个月 [Linux 内核 5.18][1] 发布之后,Linus Torvalds 宣布了 Linux 内核 5.19 系列第一个候选版本。与此同时,Linux 内核 5.19 官方合并窗口关闭,这意味着除非是关键性的,否则不会再接受任何新功能。
|
||||
|
||||
简单看一下 Linux 内核 5.19 的新内容,会发现 CPU、GPU、网络、存储和核心模块都有常规的更新。此外,代码清理、淘汰过时硬件和对以后芯片组的持续支持是此版本的亮点。
|
||||
|
||||
在进一步介绍之前,让我们简单来看一下这些新特性。
|
||||
|
||||
### Linux 内核 5.19(RC1)的新特性
|
||||
|
||||
#### CPU
|
||||
|
||||
首先需要提及的是,Linux 内核 5.19 开始 [初步支持][2] 龙芯架构的 CPU 系列。龙芯由中国龙芯中科公司设计开发。龙芯架构的 CPU 是兼容 MIPS 架构的通用微处理器。不过虽然现在提供了支持,但是你仍不能在龙芯 CPU 上启动 Linux,因为一些代码还在审核中。希望在 5.20 版本中能够使用。
|
||||
|
||||
新的 [英特尔 IFS 驱动][4] 在该版本中落地,这有助于在部署前后发现硬件问题。它能够在早期阶段检测电路层面的 CPU 错误。
|
||||
|
||||
在前几个针对英特尔 CPU 的内核版本中一直在对电源管理和散热方面进行开发,[这个版本][5] 也不例外。首先,为 Raptor 和 Alder Lake 家族添加了英特尔 <ruby>运行时平均功率限制<rt>Run-Time Average Power Limiting</rt></ruby>(RAPL)的支持。其次,改进了 P-state 驱动以处理频率变化,并且基于 CPU 的缩放支持被添加到被动 devfreq 中。
|
||||
|
||||
虽然英特尔 CPU 主要是散热和电源管理方面的工作,但对 AMD CPU 系列来说有更多的性能更新。首先,计划在今年年底完成 ZMD Zen 4 CPU 的 <ruby>基于指令的采样<rt>Instruction-Based Sampling</rt></ruby>(IBS)模块引入了更多更新。此外,此版本引入了 PerfMonV2,提供了更多性能监视能力。
|
||||
|
||||
此外,该版本中移除了 a.out 支持。同样,过时的 Renesas H8/300 CPU 也被移除了。
|
||||
|
||||
#### 主要 ARM 更新
|
||||
|
||||
终于,主线 Linux 内核能够 [支持 ARM 多平台][7] 了。在 Linus 的 RC1 开场白中可以看到,这是该版本中的巨大改变!从 Linux 3.7 开始,跨越了十多年的工作,这是多么漫长的过程。
|
||||
|
||||
![Linux 内核 5.19 Rc1 发布公告提到了 ARM 变化][8]
|
||||
|
||||
#### 图形和存储升级
|
||||
|
||||
存储子系统在各种流行的文件系统中都有性能提升。最主要的变化包括苹果 M1 NVMe 控制器支持和对 XFS 文件系统的更好支持。此外,Btrfs、F2FS 以及 exFAT 文件系统也有增强。
|
||||
|
||||
在代码行数方面,有一个令人兴奋的指标是仅是图形驱动程序 Linux 内核 5.19 就增加了大约[50 万行代码][9]。它包括 AMD 的 RDNA、CDNA,英特尔的 Raptor Lake、DG2/Alchemist 等图形驱动更新。
|
||||
|
||||
#### 重要的网络变化
|
||||
|
||||
鉴于数据传输大幅增长,对 Big TCP 的支持有助于支持数据中心 400 GBit 级别的流量。它还可以在高性能网络环境中降低延迟。
|
||||
|
||||
继续改进了 <ruby>多路径 TCP<rt>Multi-Path TCP</rt></ruby>(MPTCP)。此外,高通 ath11k WiFi 驱动程序在此版本中添加了网络唤醒功能。同样增加了对瑞昱的 8852ce 芯片、联发科的 T700 调制解调器以及瑞萨科技的 RZ/V2M 的支持。
|
||||
|
||||
#### 其他值得注意的功能
|
||||
|
||||
首先,内核中著名的随机函数生成器(RNG)在此版本中 [继续][10] 改进。
|
||||
|
||||
其次,著名的新兴的 Framework 模块化笔记本电脑获得了此版本 Chrome OS EC 驱动支持。Framework 笔记本现在可以作为一个非 Chromebook 设备利用 ChromeOS 的嵌入式控制器。
|
||||
|
||||
此外,Wacom 绘画板以及其他相关设备也有众多更新。[包括][11] 对联想 Thinkpad TrackPoint II、谷歌 Whiskers Touchpad、联想 X12 TrackPoint 等设备支持的提升。
|
||||
|
||||
### Linux 内核 5.19 下载
|
||||
|
||||
如果你想要测试并尝试该候选版本,可以在 [这里][12] 下载。
|
||||
|
||||
预计在 2022 年 7 月左右最终版本发布前,将会有多个版本更迭。
|
||||
|
||||
参考自:[内核邮件列表][17]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/06/linux-kernel-5-19-rc1/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[Donkey-Hao](https://github.com/Donkey-Hao)
|
||||
校对:[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/lkxed
|
||||
[1]: https://www.debugpoint.com/2022/05/linux-kernel-5-18/
|
||||
[2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c6f2f3e2c80e975804360665d973211e4d9390cb
|
||||
[3]: http://www.loongson.cn/
|
||||
[4]: https://lore.kernel.org/lkml/13e61c61-0d4b-5f48-6373-f056bf8b603f@redhat.com/
|
||||
[5]: https://lore.kernel.org/linux-acpi/CAJZ5v0hKBt3js65w18iKxzWoN5QuEc84_2xcM6paSv-ZHwe3Rw@mail.gmail.com/
|
||||
[6]: https://lore.kernel.org/lkml/You6yGPUttvBcg8s@gmail.com/
|
||||
[7]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ecf0aa5317b0ad6bb015128a5b763c954fd58708
|
||||
[8]: https://www.debugpoint.com/wp-content/uploads/2022/06/Linux-Kernel-5.19-Rc1-release-announcement-mentions-ARM-changes.jpg
|
||||
[9]: https://lore.kernel.org/lkml/CAPM=9tw62EZfAm0PbiOPmMrpfR98QMFTWGEQcA34G4ap4xxNkA@mail.gmail.com/
|
||||
[10]: https://lore.kernel.org/lkml/20220522214457.37108-1-Jason@zx2c4.com/T/#u
|
||||
[11]: https://lore.kernel.org/lkml/nycvar.YFH.7.76.2205241107530.28985@cbobk.fhfr.pm/
|
||||
[12]: https://www.kernel.org/
|
||||
[13]: https://git.kernel.org/torvalds/t/linux-5.19-rc1.tar.gz
|
||||
[14]: https://git.kernel.org/torvalds/p/v5.19-rc1/v5.18
|
||||
[15]: https://git.kernel.org/torvalds/ds/v5.19-rc1/v5.18
|
||||
[16]: https://git.kernel.org/torvalds/h/v5.19-rc1
|
||||
[17]: https://lore.kernel.org/lkml/CAHk-=wgZt-YDSKfdyES2p6A_KJoG8DwQ0mb9CeS8jZYp+0Y2Rw@mail.gmail.com/T/#u
|
@ -0,0 +1,47 @@
|
||||
[#]: subject: "OpenInfra Foundation Launches ‘directed funding’ To Support Open Source Projects"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/openinfra-foundation-launches-directed-funding-to-support-open-source-projects/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14707-1.html"
|
||||
|
||||
OpenInfra 基金会启动“定向资助”以支持开源项目
|
||||
======
|
||||
![OpenInfra][1]
|
||||
|
||||
OpenInfra 基金会的前身为 OpenStack 基金会,几年前它将范围扩展到其旗舰项目之外,于是改了名字。2022 年 6 月 7 日,它宣布了一种有趣的新方式,让企业资助基金会内的开源项目。一般来说,开源基金会的企业成员通过支付会员费来支持该组织,然后基金会按照他们认为合适的方式分发这些费用。OpenInfra 基金会现在推出了一种新的“定向资助”模式,允许成员将他们的资金直接用于项目。
|
||||
|
||||
此前,基金会并不允许这样做,因为正如 Bryce 指出的那样,它可能会产生混合激励和付费游戏动态,而该组织一直试图避免这种情况。然而,社区对支持特定项目有很大的兴趣,这是有道理的,因为该基金会现在拥有更多种类的项目,但并不是每个成员都对每个项目进行了大量投入。
|
||||
|
||||
Bryce 表示,基金会的领导层和董事会,花费了大量时间来考虑,如何使基金会的核心原则与这种新模式相协调。因此,该模型试图将过去十年运行良好的 OpenStack/OpenInfra 技术治理模型的优点,与这些新的财务考虑相结合。
|
||||
|
||||
在这种“定向资助”模式下,每个新项目都将拥有自己的法人实体来持有项目资金。为确保新项目的合法性,OpenInfra 白金会员(目前为 9 家,包括蚂蚁集团、华为、Meta、微软和红帽)必须担任项目的发起人,之后其他组织才能加入项目基金。如果赞助公司还不是 OpenInfra 成员,则必须成为成员。然后,所有这些资助成员组成一个项目基金管理委员会,决定创建预算的费用。与此同时,OpenInfra 基金会将为这些项目提供社区建设服务。
|
||||
|
||||
这种新模式暂时只适用于加入基金会的新项目。Bryce 和 Collier 指出,组织可能会在一些现有项目中追溯应用这种新模式,但这个考虑目前不在路线图上。
|
||||
|
||||
自从将范围扩展到 OpenStack 之外后,OpenInfra 基金会增加了一些新项目,例如用于提高容器安全性的 Kata Containers、用于基础设施生命周期管理的 Airship、Startling X 边缘计算堆栈以及 Zuul CI/CD 平台。
|
||||
|
||||
“我们从每个成功的项目中学到的最重要的一点是,协作是关键,支持生态系统的范围越广越好,” OpenInfra 基金会总经理 Thierry Carrez 说,“事实上,我们发现最成功的开源项目是由多家公司资助的,因为他们能够整合资源以实现更高的回报率。”
|
||||
|
||||
这种新模式显然是 OpenInfra 基金会引入新项目和新成员的一种方式。正如领导团队欣然承认的那样,其在多方生态系统中管理开源项目的模型 —— 无论是通过新的定向资金还是更传统的方法 —— 可能并不适合每个项目。即使 OpenInfra 基金会只收到一小部分项目,随着对这些复杂云基础设施项目需求的增长,开源项目的数量也在增加,同时它们也变得更加复杂。
|
||||
|
||||
基金会还宣布了其各个项目的几个里程碑版本的发布,包括 Kata Containers 2.0 版、Zuul 5.0 版和 StarlingX 6.0 。
|
||||
|
||||
Collier 说:“基金会今年庆祝成立 10 周年,在展望下一个十年的开放基础设施之际,我们正在推动我们的模型如此成功的关键,那就是:将希望合作的公司和个人联合起来,为他们提供一个框架和有效协作的工具,并帮助他们投资资金以最好地帮助他们关心的项目。”
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/openinfra-foundation-launches-directed-funding-to-support-open-source-projects/
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/open-infra-berlin-event.png
|
@ -0,0 +1,93 @@
|
||||
[#]: subject: "How I gave my old laptop new life with the Linux Xfce desktop"
|
||||
[#]: via: "https://opensource.com/article/22/6/linux-xfce-old-laptop"
|
||||
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lightchaserhy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14735-1.html"
|
||||
|
||||
我如何利用 Xfce 桌面为旧电脑赋予新生
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/20/143325vfdibhvv22qvddiv.jpg)
|
||||
|
||||
> 当我为了在一场会议上做演示,用笔记本电脑安装 Linux 系统后,发现 Linux 和 Xfce 桌面让我的这台旧电脑健步如飞。
|
||||
|
||||
几周前,我要在一个会议上简要演示自己在 Linux 下编写的一款小软件。我需要带一台 Linux 笔记本电脑参会,因此我翻出一台旧笔记本电脑,并且安装上 Linux 系统。我使用的是 Fedora 36 Xfce 版,使用还不错。
|
||||
|
||||
这台我用的笔记本是在 2012 年购买的。1.70 GHZ 的 CPU、4 GB 的 内存、128 GB 的硬盘,也许和我现在的桌面电脑比性能很弱,但是 Linux 和 Xfce 桌面赋予了这台旧电脑新的生命。
|
||||
|
||||
### Linux 的 Xfce 桌面
|
||||
|
||||
Xfce 桌面是一个轻量级桌面,它提供一个精美、现代的外观。熟悉的界面,有任务栏或者顶部“面板”可以启动应用程序,在系统托盘可以改变虚拟桌面,或者查看通知信息。屏幕底部的快速访问停靠区让你可以启动经常使用的应用程序,如终端、文件管理器和网络浏览器。
|
||||
|
||||
![Image of Xfce desktop][6]
|
||||
|
||||
要开始一个新应用程序,点击左上角的应用程序按钮。这将打开一个应用程序启动菜单,顶部有常用的应用程序,比如终端和文件管理。其它的应用程序会分组排列,这样你可以找到所需要的应用。
|
||||
|
||||
![Image of desktop applications][7]
|
||||
|
||||
### 管理文件
|
||||
|
||||
Xfce 的文件管理器时叫 Thunar,它能很好地管理我的文件。我喜欢 Thunar 可以连接远程系统,在家里,我用一个开启 SSH 的树莓派作为个人文件服务器。Thunar 可以打开一个 SSH 文件传输窗口,这样我可以在笔记本电脑和树莓派之间拷贝文件。
|
||||
|
||||
![Image of Thunar remote][9]
|
||||
|
||||
另一个访问文件和文件夹的方式是通过屏幕底部的快速访问停靠区。点击文件夹图标可以打开一个常用操作的菜单,如在终端窗口打开一个文件夹、新建一个文件夹或进入指定文件夹等。
|
||||
|
||||
![Image of desktop with open folders][10]
|
||||
|
||||
### 其它应用程序
|
||||
|
||||
我喜欢探索 Xfce 提供的其他应用程序。Mousepad 看起来像一个简单的文本编辑器,但是比起纯文本编辑,它包含更多有用的功能。Mousepad 支持许多文件类型,程序员和其他高级用户也许会非常喜欢。可以在文档菜单中查看一下部分编程语言的列表。
|
||||
|
||||
![Image of Mousepad file types][11]
|
||||
|
||||
如果你更喜欢一个不同的外观和感觉,可以用视图菜单调整界面选项,如字体、配色方案以及行号。
|
||||
|
||||
![Image of Mousepad in color scheme solarized][12]
|
||||
|
||||
磁盘工具可以让你管理储存设备。虽然我不需要修改我的系统磁盘,磁盘工具是一个初始化或重新格式化 USB 闪存设备的好方式。我认为这个界面非常简单好用。
|
||||
|
||||
![Image of disk utility][13]
|
||||
|
||||
Geany 集成开发环境也给我留下了深刻印象,我有点惊讶于一个完整的集成开发软件(IDE)可以在一个旧系统可以如此流畅地运行。Geany 宣称自己是一个“强大、稳定和轻量级的程序员文本编辑器,提供大量有用的功能,而不会拖累你的工作流程”。而这正是 Geany 所提供的。
|
||||
|
||||
我用一个简单的 “hello world” 程序测试 Geany,当我输入每一个函数名称时,很高兴地看到 IDE 弹出语法帮助,弹出的信息并不特别显眼,且刚好提供了我需要的信息。虽然我能很容易记住 `printf` 函数,但总是忘记诸如 `fputs` 和 `realloc` 之类的函数的选项顺序,这就是我需要弹出语法帮助的地方。
|
||||
|
||||
![Image of Geany workspace][14]
|
||||
|
||||
深入了解 Xfce 的菜单,寻找其它应用程序,让你的工作更简单,你将找到可以播放音乐、访问终端或浏览网页的应用程序。
|
||||
|
||||
当我在笔记本电脑上安装了 Linux,在会议上做了一些演示后,我发现 Linux 和 Xfce 桌面让这台旧电脑变得相当敏捷。这个系统运行得如此流畅,以至于当会议结束后,我决定把这台笔记本电脑作为备用机。
|
||||
|
||||
我确实喜欢在 Xfce 中工作和使用这些应用程序,尽管系统开销不大,使用也很简单,但我并没有感觉到不够用,我可以用 Xfce 和上面的应用程序做任何事情。如果你有一台需要翻新的旧电脑,试试安装 Linux,给旧硬件带来新的生命。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/linux-xfce-old-laptop
|
||||
|
||||
作者:[Jim Hall][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lightchaserhy](https://github.com/lightchaserhy)
|
||||
校对:[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/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/coffee_tea_laptop_computer_work_desk.png
|
||||
[2]: https://unsplash.com/@jonasleupe?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
||||
[3]: https://unsplash.com/s/photos/tea-cup-computer?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
||||
[4]: https://spins.fedoraproject.org/xfce/download/index.html
|
||||
[5]: https://opensource.com/article/19/12/xfce-linux-desktop
|
||||
[6]: https://opensource.com/sites/default/files/2022-06/Linuxlaptop1.png
|
||||
[7]: https://opensource.com/sites/default/files/2022-06/linuxlaptopDesktopApps.png
|
||||
[8]: https://opensource.com/article/20/3/personal-file-server-ssh
|
||||
[9]: https://opensource.com/sites/default/files/2022-06/LinuxlaptopThunarremote.png
|
||||
[10]: https://opensource.com/sites/default/files/2022-06/LinuxlaptopDesk.png
|
||||
[11]: https://opensource.com/sites/default/files/2022-06/LinuxlaptopMousepadfiletype.png
|
||||
[12]: https://opensource.com/sites/default/files/2022-06/Linuxlaptopmousepadsolarized.png
|
||||
[13]: https://opensource.com/sites/default/files/2022-06/linuxlaptopdisks.png
|
||||
[14]: https://opensource.com/sites/default/files/2022-06/Linuxlaptopgeany.png
|
@ -0,0 +1,87 @@
|
||||
[#]: subject: "Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet"
|
||||
[#]: via: "https://news.itsfoss.com/cloudflare-pat/"
|
||||
[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14711-1.html"
|
||||
|
||||
Cloudflare 有了一个新东西,它可以替代互联网上烦人的验证码
|
||||
======
|
||||
|
||||
不想通过正确输入 <ruby>验证码<rt>CAPTCHA</rt></ruby> 来证明自己是个人类吗?Cloudflare 可能有了一个解决方案。
|
||||
|
||||
![Cloudflare][1]
|
||||
|
||||
互联网服务巨头 Cloudflare 前两天 [宣布了][2] <ruby>私有访问令牌<rt>Private Access Tokens</rt></ruby> 功能。这项功能旨在减少你在网络上看到的验证码数量,同时改善你的隐私。
|
||||
|
||||
你可能已经发现,验证码在移动设备上是一种可怕的体验。通常,它们会最终会占据整个屏幕,有时甚至无法完成。
|
||||
|
||||
作为替代方案,网站可以选择收集唯一识别数据,以证明你是人类。当然,从隐私的角度来看,这种做法是很糟糕的。如果这么做,许多重视隐私的公司都几乎无法避免他们受到 <ruby>僵尸攻击<rt>bot attacks</rt></ruby>。
|
||||
|
||||
幸运的是,私有访问令牌(PAT)的发布将改变这一点。
|
||||
|
||||
### 私有访问令牌会产生什么影响?
|
||||
|
||||
简而言之,私有访问令牌能够做到下面这些事:
|
||||
|
||||
* 在支持的设备上减少验证码数量
|
||||
* 增强用户隐私
|
||||
* 允许网站所有者确保访问者来自真实设备
|
||||
|
||||
然而,深入观察,我们可以看到私有访问令牌的影响力远不止于此。若使用传统的验证码,就有多个实体可以访问你的数据。
|
||||
|
||||
首先,你正在访问的网站知道你的 IP 地址和你正在访问的 URL。当然,这些数据是建立连接所需的最低要求。此外,对于更高级的功能,网站还会发送一些用户代理(UA)数据,还好这些数据并不是唯一可识别的。
|
||||
|
||||
然而,另一方,也就是验证码提供者,却可以收集更多的数据。与你要访问的网站一样,它也知道你的 IP 地址、用户代理数据和你访问的 URL。不幸的是,除此之外,他们还会收集其他数据,例如你的设备信息和交互数据。如果把这些信息,与你之前完成验证码的时间联系起来,你就会惊讶的发现,他们可以建立一个非常详细的属于你的个人资料。
|
||||
|
||||
幸运的是,有了 Cloudflare 的私有访问令牌,你就可以完全绕过验证码,从而阻止验证码提供者收集此类数据。
|
||||
|
||||
### 私有访问令牌是如何工作的?
|
||||
|
||||
![][3]
|
||||
|
||||
验证码的理念是集中尽可能多的数据,私人访问令牌则恰恰相反,它将数据去中心化,因此任何一方都无法唯一识别你。在你提到数据共享之前,Cloudflare 就已经特别指出了,数据不会在各方之间共享。
|
||||
|
||||
当你访问使用 Cloudflare 和私人访问令牌的网站的时候,共有三方将处理你的数据的不同部分。
|
||||
|
||||
1. 网站。它只会知道你的 IP、URL 和用户代理,这也是建立连接所必需的。
|
||||
2. 你的设备制造商。他们只会知道那些用于验证设备是否真实所需的设备数据,而不会知道你正在访问哪个网站,或你的 IP 地址是什么。验证了你的设备后,他们将生成一个令牌,该令牌将发送到 Cloudflare。
|
||||
3. Cloudflare。他们将收到这个令牌,令牌中不包含你的任何设备数据,只有制造商对它是正品的“保证”。他们知道的唯一其他数据,就是你正在访问的网站,同样,这是为你提供内容所必需的。
|
||||
|
||||
通过这种方式,Cloudflare 无需接触你的数据,就可以对“你是一个人”充满信心。
|
||||
|
||||
### 支持的操作系统:没有 Linux?
|
||||
|
||||
你可能已经意识到,私人访问令牌需要特定的操作系统功能才能工作。目前,它们仅存在于苹果最新的操作系统上,即 iOS 和 iPadOS 16,以及 macOS Ventura。这是因为苹果的操作系统只在有限的硬件上运行,设备验证会更加容易。
|
||||
|
||||
另一方面,Linux 是一种通用操作系统,旨在在各种硬件上运行。因此,我认为,在可预见的未来,它都不会支持私人访问令牌。
|
||||
|
||||
回到苹果,我想到私人访问令牌也可能导致消费者维修设备的权利出现一些问题。例如,如果我用第三方的非正品电池更换了老旧的 iPhone 原装电池,私人访问令牌系统会特殊对待这种情况吗?
|
||||
|
||||
如果是 Linux 手机呢?这些制造商,如 Pine64 和 Purism,可能没有支持这样一个系统的基础设施。是否可以在这些上使用私人访问令牌呢?
|
||||
|
||||
Cloudflare 在 [公告][4] 中提到:
|
||||
|
||||
> 我们正在积极努力让其他客户和设备制造商也使用私人访问令牌框架。每当新客户开始使用它时,从该客户进入你网站的流量将自动开始要求令牌,你的访问者将自动看到更少的验证码。
|
||||
|
||||
因此,我们希望看到它被更多的设备和操作系统采用。你如何看待 Cloudflare 的私人访问令牌呢?在下面的评论中发表你的看法吧!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/cloudflare-pat/
|
||||
|
||||
作者:[Jacob Crume][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/jacob/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/cloudflare-private-access-tokens.jpg
|
||||
[2]: https://blog.cloudflare.com/eliminating-captchas-on-iphones-and-macs-using-new-standard/
|
||||
[3]: https://news.itsfoss.com/wp-content/uploads/2022/06/PAT-Data-transfer-chart-1024x650.png
|
||||
[4]: https://blog.cloudflare.com/eliminating-captchas-on-iphones-and-macs-using-new-standard/
|
@ -0,0 +1,100 @@
|
||||
[#]: subject: "openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More"
|
||||
[#]: via: "https://news.itsfoss.com/opensuse-leap-15-4-release/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "robsean"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14695-1.html"
|
||||
|
||||
openSUSE Leap 15.4 发布版本添加了 Leap Micro 5.2、更新桌面环境等等
|
||||
======
|
||||
|
||||
> 为奋起直追 SUSE Linux Enterprise 的 SP 4 ,openSUSE Leap 15.4 到来了,带来了新的升级和极其重要的改善。
|
||||
|
||||
![opensuse 15.4][1]
|
||||
|
||||
即将到来的 openSUSE 小发布版本终于来了。如果你使用 openSUSE 作为你日常使用的桌面或服务器版本,你现在可能已经测试候选版本好几周了。
|
||||
|
||||
openSUSE Leap 15.4 的重点是软件包的更新,用以奋起直追 SUSE Linux Enterprise 的 SP 4 。因此,你将注意到一些弃用的软件包,以及可用于替换它们的新的升级。
|
||||
|
||||
当然,你应该有一些可用的软件包来确保兼容性。但是,大多数较旧的版本已经被移除。
|
||||
|
||||
### openSUSE Leap 15.4: 有什么新的变化?
|
||||
|
||||
为与最新的 SUSE Linux Enterprise(SLE)相适应,像 Python 2 和 KDE 4 一样的软件包已经被移除。你可以在这次的发布版本中找到较新的桌面环境。
|
||||
|
||||
此外,在容器和 AI/ML 用例方面,更新了 Podman、Containerd、Tensorflow 和 Grafana。
|
||||
|
||||
#### Leap Micro 5.2
|
||||
|
||||
Leap Micro 是针对容器和虚拟化工作负载定制的轻量级操作系统的最新版本。它也是 Leap 版的 [MicroOS][2],是 Tumbleweed 的一种变体,提供了自动管理和修补。
|
||||
|
||||
#### 桌面环境
|
||||
|
||||
Xfce 4.16 继续保留,但你可以找到主要功能的一些新补充,包括新图标和调色板。
|
||||
|
||||
Xfce 4.16 中的设置管理器也获得了视觉上的刷新。类似地,文件管理器(Thunar)也有一些改善,新的状态托盘插件的深色模式支持等等。
|
||||
|
||||
KDE 4 软件包已经被弃用,Plasma 5.24 LTS 已经作为长期支持版本中包含于其中。
|
||||
|
||||
要深入了解这些变化,你可以查看我们之前针对 [KDE Plasma 5.24 LTS][3] 的报道。总体来说,新的 KDE Plasma 体验应该会令桌面用户赞叹。
|
||||
|
||||
说到 GNOME,你可以发现包含在 openSUSE Leap 15.4 中的 GNOME 41 带来了一系列的改善和新的特色功能。了解更多关于 [GNOME 41][4] 的信息,你可以期待它的一些新的特色功能。
|
||||
|
||||
对于其它的可用的桌面环境来说,Leap 15.4 包括:
|
||||
|
||||
* MATE 桌面环境 1.26
|
||||
* Enlightenment 桌面环境0.25.3
|
||||
* 深度桌面环境 20.3
|
||||
|
||||
#### 弃用的软件包
|
||||
|
||||
移除了一些基础的软件包,包括 Python 2(生命终结)、Digikam、TensorFlow 1.x 和 Qt 4 等软件包。
|
||||
|
||||
在更新系统后,你可以使用 Qt 5 和 Plasma 5 。
|
||||
|
||||
#### 更新的软件包
|
||||
|
||||
很多重要的软件包在 Leap 15.4 中得到了更新,包含一些流行的软件包:
|
||||
|
||||
* TensorFlow 2.6.2
|
||||
* Podman 3.4.4
|
||||
* GNU Health 4.0
|
||||
* sudo 1.9.9
|
||||
* systemd 249.10
|
||||
* AppArmor 3.04
|
||||
* DNF 4.10.0
|
||||
* LibreOffice 7.2.5
|
||||
|
||||
因此,你应该会注意到一些针对服务器用户和桌面用户的各种应用程序的有用更新。很多多媒体应用程序,像 VLC、GNOME MPV 等,都得到了升级。
|
||||
|
||||
#### 其它改善
|
||||
|
||||
随着基本软件的更新和清理,你也可以找到一个由 SUSE 维护的较新的 Linux 内核 5.14.21。
|
||||
|
||||
更新后的内核对硬件的支持应该会有改善。
|
||||
|
||||
更多信息,你可以参考针对 [openSUSE Leap 15.4][5] 的发布版本说明。
|
||||
|
||||
> **[下载 openSUSE Leap 15.4][6]**
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/opensuse-leap-15-4-release/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[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/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/opensuse-leap-15-4.jpg
|
||||
[2]: https://microos.opensuse.org/
|
||||
[3]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/
|
||||
[4]: https://news.itsfoss.com/gnome-41-release/
|
||||
[5]: https://doc.opensuse.org/release-notes/x86_64/openSUSE/Leap/15.4/#rnotes
|
||||
[6]: https://get.opensuse.org/leap/15.4/
|
116
published/20220610 Manage Flatpak Permission Using Flatseal.md
Normal file
116
published/20220610 Manage Flatpak Permission Using Flatseal.md
Normal file
@ -0,0 +1,116 @@
|
||||
[#]: subject: "Manage Flatpak Permission Using Flatseal"
|
||||
[#]: via: "https://www.debugpoint.com/2022/06/manage-flatpak-permission-flatseal/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14736-1.html"
|
||||
|
||||
使用 Flatseal 管理 Flatpak 的权限
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/20/151550qkrkpjw4f9dpjo50.jpg)
|
||||
|
||||
> 了解如何使用 Flatseal 应用管理 Flatpak 权限,它为你提供了一个友好的 GUI 和额外的功能。
|
||||
|
||||
从新用户的角度来看,在 Linux 中安装应用可能是一个挑战。主要原因是有这么多的 [Linux 发行版][1]。而你需要为各种 Linux 发行版提供不同的安装方法或说明。对于一些用户来说,这可能会让他们不知所措。此外,对于开发者来说,为不同的发行版创建独立的软件包和构建也很困难。
|
||||
|
||||
### Flatpak 解决了这个问题。如何解决?
|
||||
|
||||
它使用了容器技术,使同一个应用的可执行文件在所有的 Linux 平台上都能类似地运行。例如,一个单一的可执行文件可以在 Ubuntu、Fedora、OpenSUSE、Arch Linux 和许多其他平台上运行。
|
||||
|
||||
此外,开发人员还可以减少为不同平台打包同一应用的努力。他们可以专注于应用的功能,而不是发行或部署。
|
||||
|
||||
此外,Flatpak 应用还能即时更新,当有了最新版本,你就能得到它。
|
||||
|
||||
所有这些好处也开启了一个重要的问题。Flatpak 应用需要的权限是什么?你如何轻松地管理它们?例如,一个应用可能只需要网络访问,而不需要磁盘空间。或者另一个可能有截图的权限,但可能根本就不需要。
|
||||
|
||||
所以,审查一个 Flatpak 应用的权限是非常必要的。这与你的安卓或 iOS 应用的权限类似。
|
||||
|
||||
最后,即使你是一个新用户,管理和审查权限也不是那么困难,这要感谢图形化的应用 - Flatseal。
|
||||
|
||||
### 什么是 Flatseal?
|
||||
|
||||
Flatseal 是一个 Flatpak 应用,它为你提供了一个友好的用户界面来查看和改变你系统中所有 Flatpak 应用的权限。
|
||||
|
||||
它是一个优秀的小程序,每个应用的每个权限部分都有一个易于使用的切换按钮。下面是它的外观(图 1)。
|
||||
|
||||
![Figure 1 – Flatseal App][2]
|
||||
|
||||
### 你如何使用 Flatseal 来管理 Flatpak 的权限?
|
||||
|
||||
当打开 Flatseal 应用时,它应该在左边的导航栏列出所有的 Flatpak 应用。而当你选择了一个应用,它就会在右边的主窗口中显示可用的权限设置。
|
||||
|
||||
现在,对于每个 Flatpak 权限控制,当前值显示在切换开关中。如果该权限正在使用中,它应该被启用。否则,它应该是灰色的。
|
||||
|
||||
首先,要设置权限,你必须进入你的系统的应用。然后,你可以从权限列表中启用或禁用任何各自的控制。
|
||||
|
||||
其次,如果你想设置一个适用于你系统中所有 Flatpak 的全局控制,你可以在左上方选择“所有应用”并应用全局设置(图 2)。
|
||||
|
||||
![Figure 2: Manage Flatpak Permission using Flatseal][3]
|
||||
|
||||
这真是超级简单。不是吗?
|
||||
|
||||
### 使用 Flatseal 管理 Flatpak 权限的例子
|
||||
|
||||
让我们举个例子。
|
||||
|
||||
在我的系统中,我安装了上述 Flatpak(图 2)。让我们挑选 Telegram 桌面应用。目前,Telegram 桌面没有访问任何主目录或用户文件的权限(图 3)。
|
||||
|
||||
![Figure 3: Telegram Desktop Flatpak App does not have permission to the home folders][4]
|
||||
|
||||
现在,如果我想允许所有的用户文件和某个特定的文件夹(例如:`/home/Downloads`),你可以通过打开启用开关来给予它。请看下面的图 4。
|
||||
|
||||
![Figure 4: Permission changed of Telegram Desktop to give access to folders][5]
|
||||
|
||||
同样地,你可以启用或禁用你想要的权限。在内部,Flatseal 执行内部的 Flatpak 命令来实现这一点。
|
||||
|
||||
例如,上述情况可能转化为以下命令。
|
||||
|
||||
```
|
||||
flatpak override org.telegram.desktop --filesystem=/home/Downloads
|
||||
```
|
||||
|
||||
而要删除权限:
|
||||
|
||||
```
|
||||
flatpak override org.telegram.desktop --nofilesystem=/home/Downloads
|
||||
```
|
||||
|
||||
Flatseal 还有一个很酷的功能,它在用户特定的权限变化旁边显示一个小的警报图标(见图 4)。
|
||||
|
||||
### 我可以在所有的 Linux 发行版中安装 Flatseal 吗?
|
||||
|
||||
是的,你可以把 [Flatseal][6] 作为 Flatpak 安装在所有 Linux 发行版中。你可以使用 [本指南][7] 设置你的系统,并运行以下命令进行安装。或者,[点击这里][8] 直接启动特定系统的安装程序。
|
||||
|
||||
```
|
||||
flatpak install flathub com.github.tchx84.Flatseal
|
||||
```
|
||||
|
||||
### 结束语
|
||||
|
||||
我希望上面的 Flatpak 权限管理指南足够简单,让你了解并开始使用 Flatpak。它超级容易控制,使用起来也容易得多。另外,你可能想访问我们更多的 [Flatpak 指南][9]。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/06/manage-flatpak-permission-flatseal/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://www.debugpoint.com/category/distributions
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2022/06/Flatseal-App.jpg
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/Manage-Flatpak-Permission-using-Flatseal.jpg
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/Telegram-Desktop-Flatpak-App-does-not-have-permission-to-the-home-folders.jpg
|
||||
[5]: https://www.debugpoint.com/wp-content/uploads/2022/06/Permission-changed-of-Telegram-Desktop-to-give-access-to-folders.jpg
|
||||
[6]: https://flathub.org/apps/details/com.github.tchx84.Flatseal
|
||||
[7]: https://flatpak.org/setup/
|
||||
[8]: https://dl.flathub.org/repo/appstream/com.github.tchx84.Flatseal.flatpakref
|
||||
[9]: https://www.debugpoint.com/tag/flatpak/
|
@ -0,0 +1,178 @@
|
||||
[#]: subject: "Run Windows Apps And Games Using WineZGUI On Linux"
|
||||
[#]: via: "https://ostechnix.com/winezgui-run-windows-apps-and-games-on-linux/"
|
||||
[#]: author: "sk https://ostechnix.com/author/sk/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14744-1.html"
|
||||
|
||||
在 Linux 上使用 WineZGUI 运行 Windows 应用和游戏
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/22/160322tds2ut05d8jqdlzz.jpg)
|
||||
|
||||
> WineZGUI - 一个使用 Zenity 的 Wine GUI 前台
|
||||
|
||||
不久前,我们写了关于 [Bottles][1] 的文章,这是一个开源的图形应用,可以在 Linux 操作系统上轻松运行 Windows 软件和游戏。今天,我们将讨论一个类似的有趣项目。向 **WineZGUI** 打个招呼,它是一个 Wine GUI 前台,可以 [在 Linux 上用 Wine 运行 Windows 应用和游戏][2]。
|
||||
|
||||
### 什么是 WineZGUI?
|
||||
|
||||
WineZGUI 是一个 Bash 脚本的集合,它允许你轻松地管理 Wine 前缀,并在 Linux 上使用 **Zenity** 提供更轻松的 Wine 游戏体验。
|
||||
|
||||
(LCTT 译注:Wine 前缀是一个特殊文件夹,Wine 在其中放置所有 Wine 特定的文件,安装 Windows 程序、库和注册表代码,以及用户首选项。)
|
||||
|
||||
使用 WineZGUI,我们可以直接从文件管理器中启动 Windows EXE 文件或游戏,而无需安装它们。
|
||||
|
||||
WineZGUI 为每个应用或游戏创建快捷方式,以便于访问,同时也为每个 EXE 二进制文件创建单独的前缀。
|
||||
|
||||
当你用 WineZGUI 启动一个 Windows EXE 文件时,它会提示你是否使用默认的 Wine 前缀或创建一个新的前缀。默认的前缀是 `~/.local/share/winezgui/default`。
|
||||
|
||||
如果你选择为 Windows 二进制文件(EXE)创建一个新的前缀,WineZGUI 将尝试从 EXE 文件中提取产品名称和图标,并创建一个桌面快捷方式。
|
||||
|
||||
当你以后启动相同的二进制文件(EXE)时,它将建议你用先前的相关前缀来运行它。
|
||||
|
||||
说得通俗一点,WineZGUI 只是一个用于官方原始 Wine 的简单 GUI。当我们启动一个 EXE 来玩游戏时,Wine 前缀的设置是自动的。
|
||||
|
||||
你只需打开一个 EXE,它就会创建一个前缀和一个桌面快捷方式,并从该 EXE 中提取名称和图标。
|
||||
|
||||
它使用 `exiftool` 和 `icotool` 工具来分别提取名称和图标。你可以通过现有的前缀打开一个 EXE 来启动该游戏,或者使用桌面快捷方式。
|
||||
|
||||
WineZGUI 是一个在 GitHub 上免费托管的 shell 脚本。你可以抓取源代码,改进它,修复错误和增加功能。
|
||||
|
||||
### Bottles Vs WineZGUI
|
||||
|
||||
你可能想知道 WineZGUI 与 Bottles 相比如何。但这些应用之间有一个微妙的区别。
|
||||
|
||||
**Bottles 是面向前缀的**和**面向运行器的**。意思是:Bottles 首先创建一个前缀,然后使用不同的 EXE 文件。Bottles 不会记住 EXE 的前缀。Bottles 使用不同的运行器。
|
||||
|
||||
**WineZGUI 是面向 EXE 的**。它使用 EXE 并只为该 EXE 创建一个前缀。下次我们打开一个 EXE 时,它将询问是否用现有的 EXE 前缀启动。
|
||||
|
||||
WineZGUI 不提供像 Bottles 或 [lutris][3] 那样的高级功能,如运行程序、在线安装程序等。
|
||||
|
||||
### 如何在 Linux 中安装 WineZGUI
|
||||
|
||||
确保你已经安装了 WineZGUI 的必要先决条件。
|
||||
|
||||
Debian/Ubuntu:
|
||||
|
||||
```
|
||||
$ sudo dpkg --add-architecture i386
|
||||
$ sudo apt install zenity wine winetricks libimage-exiftool-perl icoutils gnome-terminal
|
||||
```
|
||||
|
||||
Fedora:
|
||||
|
||||
```
|
||||
$ sudo dnf install zenity wine winetricks perl-Image-ExifTool icoutils gnome-terminal
|
||||
```
|
||||
|
||||
官方推荐的安装 WineZGUI 的方法是使用 [Flatpak][4]。
|
||||
|
||||
安装完 Flatpak 后,逐一运行以下命令,在 Linux 中安装 WineZGUI。
|
||||
|
||||
```
|
||||
$ flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
```
|
||||
|
||||
```
|
||||
$ flatpak --user -y install flathub org.winehq.Wine/x86_64/stable-21.08
|
||||
```
|
||||
|
||||
```
|
||||
$ wget https://github.com/fastrizwaan/WineZGUI-Releases/releases/download/WineZGUI-0.4_20220608/io.github.WineZGUI_0_4_20220608.flatpak
|
||||
```
|
||||
|
||||
```
|
||||
$ flatpak --user -y install io.github.WineZGUI_0_4_20220608.flatpak
|
||||
```
|
||||
|
||||
### 在 Linux 中用 WineZGUI 运行 Windows 应用和游戏
|
||||
|
||||
从 Dash 或菜单中启动 WineZGUI。
|
||||
|
||||
![Launch WineZGUI][5]
|
||||
|
||||
这就是 WineZGUI 的默认界面的样子。
|
||||
|
||||
![WineZGUI Interface][6]
|
||||
|
||||
正如你在上面的截图中看到的,WineZGUI 的界面非常简单易懂。从主窗口中,你可以:
|
||||
|
||||
* 打开一个 EXE 文件。
|
||||
* 打开 Winetricks GUI 和 CLI。
|
||||
* 启动 Wine 配置。
|
||||
* 启动资源管理器。
|
||||
* 打开 BASH Shell。
|
||||
* 关闭所有的应用/游戏,包括 WineZGUI 界面。
|
||||
* 删除 Wine 前缀。
|
||||
* 查看已安装的 WineZGUI 版本。
|
||||
|
||||
为了演示,我将打开一个 EXE 文件。
|
||||
|
||||
在下一个窗口中,选择要运行的 EXE 文件。在我的例子中,它是 WinRAR。
|
||||
|
||||
![Choose The EXE File To Run][7]
|
||||
|
||||
接下来,你是想用默认的前缀运行 EXE 文件,还是创建一个新的前缀。我选择默认的前缀。
|
||||
|
||||
![Run WinRAR With Default Prefix][8]
|
||||
|
||||
几秒钟后,会出现 WinRAR 安装向导。点击安装,继续。
|
||||
|
||||
![Install WinRAR In Linux][9]
|
||||
|
||||
点击 “OK” 来完成 WinRAR 的安装。
|
||||
|
||||
![Complete WinRAR Installation][10]
|
||||
|
||||
点击 “<ruby>运行 WinRAR<rt>Run WinRAR</rt></ruby>” 来启动它。
|
||||
|
||||
![Run WinRAR][11]
|
||||
|
||||
下面是 WinRAR 在我的 Fedora 36 桌面上的运行情况!
|
||||
|
||||
![WinRAR Is Running In Fedora Using Wine][12]
|
||||
|
||||
### 总结
|
||||
|
||||
WineZGUI 是俱乐部的新人。如果你正在寻找一种在 Linux 桌面上使用 Wine 运行 Windows 应用和游戏的更简单方法,WineZGUI 可能是一个不错的选择。
|
||||
|
||||
在 WineZGUI 的帮助下,用户可以选择在与 EXE 相同的文件夹中创建一个 Wine 前缀,并创建一个相对链接的 `.desktop` 条目来自动执行此操作。
|
||||
|
||||
原因是使用 Wine 前缀备份和删除游戏更容易,并且让它生成一个 `.desktop` 将使其能够适应移动和转移。
|
||||
|
||||
一个很酷的场景是使用该应用进行设置,然后将 Wine 前缀分享给你的朋友和其他人,他们只需要一个具有所有依赖性和保存的工作 Wine 前缀。
|
||||
|
||||
请试一试它,在下面的评论区告诉我们你对这个项目的看法。
|
||||
|
||||
**资源:**
|
||||
|
||||
* [WineZGUI GitHub 仓库][13]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://ostechnix.com/winezgui-run-windows-apps-and-games-on-linux/
|
||||
|
||||
作者:[sk][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://ostechnix.com/run-windows-software-on-linux-with-bottles/
|
||||
[2]: https://ostechnix.com/run-windows-games-softwares-ubuntu-16-04/
|
||||
[3]: https://ostechnix.com/manage-games-using-lutris-linux/
|
||||
[4]: https://ostechnix.com/how-to-install-and-use-flatpak-in-linux/
|
||||
[5]: https://ostechnix.com/wp-content/uploads/2022/06/Launch-WineZGUI.png
|
||||
[6]: https://ostechnix.com/wp-content/uploads/2022/06/WineZGUI-Interface.png
|
||||
[7]: https://ostechnix.com/wp-content/uploads/2022/06/Choose-The-EXE-File-To-Run.png
|
||||
[8]: https://ostechnix.com/wp-content/uploads/2022/06/Run-WinRAR-With-Default-Prefix.png
|
||||
[9]: https://ostechnix.com/wp-content/uploads/2022/06/Install-WinRAR-In-Linux.png
|
||||
[10]: https://ostechnix.com/wp-content/uploads/2022/06/Complete-WinRAR-Installation.png
|
||||
[11]: https://ostechnix.com/wp-content/uploads/2022/06/Run-WinRAR.png
|
||||
[12]: https://ostechnix.com/wp-content/uploads/2022/06/WinRAR-Is-Running-In-Fedora-Using-Wine.png
|
||||
[13]: https://github.com/fastrizwaan/WineZGUI
|
@ -0,0 +1,147 @@
|
||||
[#]: subject: "Don’t Be Afraid of Linux Terminal. Embrace it."
|
||||
[#]: via: "https://itsfoss.com/love-thy-terminal/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "duoluoxiaosheng"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14721-1.html"
|
||||
|
||||
Linux 终端,它不可怕,拥抱它
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/17/144213pjobjojcnwbnd4rn.jpg)
|
||||
|
||||
至少,对于熟悉图形界面的新用户来说,我们大多时候都在避免使用 Linux 终端。
|
||||
|
||||
尽管让事情变得简单和方便是好事,但还是有许多理由说明我们不应该害怕尝试 Linux 终端。
|
||||
|
||||
在这里,我将重点介绍其中的几个,以鼓励你在终端中尝试一些最终会对你有所帮助的东西。
|
||||
|
||||
### 1、快速熟悉命令
|
||||
|
||||
![quick info terminal][1]
|
||||
|
||||
有时,你需要使用某个命令在终端中执行一些操作。当然,你可以在不知道它到底有什么用情况下复制粘贴。
|
||||
|
||||
但是,如果你想知道这条命令更多的信息,该怎么办呢?
|
||||
|
||||
你只需要输入下面的命令就可以了,
|
||||
|
||||
```
|
||||
man <command you intend to learn>
|
||||
```
|
||||
|
||||
例如:`man apt`。
|
||||
|
||||
它会直接在屏幕上给出所有重要的细节,不需要网络连接,不需要在网上搜索它是如何工作的。你节约了时间,增长了知识。
|
||||
|
||||
而且,这使事情变得简单,使你在使用终端的时候更有信心。
|
||||
|
||||
这通常被称为 “<ruby>手册页<rt>man page</rt></ruby>”。 你可以阅读我们的课程《[了解 Linux 上的手册页][2]》。
|
||||
|
||||
Linux 终端万岁。
|
||||
|
||||
### 2、解决问题
|
||||
|
||||
![troubleshoting illustration][3]
|
||||
|
||||
当你在互联网上搜索一个问题的解决方法时,通常,解决方案中会包含几个命令。
|
||||
|
||||
因此,终端的最佳用例之一,是可以毫不费力地解决几个系统问题。同时,你需要小心,因为如果你不知道你在做什么,你可能最终会破坏你的系统。
|
||||
|
||||
虽然图形界面可以调整一些东西,但是大部分简单的修复方法都是通过终端完成的。
|
||||
|
||||
我们在网站上提供了几个 [故障诊断指南][4],例如:
|
||||
|
||||
* [检查网卡制造商][5]
|
||||
* [修复关机时间过长][6]
|
||||
* [修复博通网卡没有 WiFi 信号的问题][7]
|
||||
|
||||
### 3、使用远程服务器愉快工作
|
||||
|
||||
![remote server illustration][8]
|
||||
|
||||
最终,你会通过命令行(或终端)访问一个远程服务器并执行各种操作,包括文件传输。
|
||||
|
||||
与使用图形界面访问远程服务器相比,使用 Linux 终端可以让你用最小的带宽,快速的执行任何你想要的操作。
|
||||
|
||||
当然,你也可以通过终端在远程服务器上开启图形界面程序。尽管速度十分缓慢,终端还是可以让你轻松的与远程服务器进行交互。
|
||||
|
||||
### 4、高效利用资源
|
||||
|
||||
不管你使用哪一款 [Linux 发行版][9],Linux 终端永远是高效且消耗内存最小的。
|
||||
|
||||
如果你资源不足或硬件驱动和图形界面程序有冲突,那么 Linux 终端永远值得你的信赖。
|
||||
|
||||
这将帮你在不占用太多系统资源的情况下完成关键任务。
|
||||
|
||||
### 5、快速
|
||||
|
||||
![fast illustration][10]
|
||||
|
||||
你知道吗?不仅局限于内存使用,使用终端你可以比使用图形界面更快的完成任务。
|
||||
|
||||
你可以尝试安装应用、运行程序、执行复杂的文件操作等等。
|
||||
|
||||
### 6、稳定可靠的命令行程序
|
||||
|
||||
相比于图形界面程序,命令行程序更加稳定和可靠,为什么呢?
|
||||
|
||||
在终端中,使程序崩溃的因素很少。
|
||||
|
||||
由于终端工具大部分是为服务器构建的,很多时候不够直观。也正是由于这个原因,命令行工具通常不会得到不必要的频繁更新,使它们成为比图形界面程序更可靠的选择。
|
||||
|
||||
### 7、更多的命令行工具
|
||||
|
||||
没有一个图形界面程序能解决所有问题。但是,对执行各种操作,然而,有几个 [命令行工具][11] 可以执行各种操作,一些有趣和关键的任务也是如此。
|
||||
|
||||
你需要完成一些工作,来吧,总有一款命令行工具适合你。
|
||||
|
||||
### 8、尝试各种终端模拟器
|
||||
|
||||
![variety illustration][12]
|
||||
|
||||
尽管使用 Linux 发行版默认安装的终端模拟器对你来说没有任何困难,你仍然有更多的选择。
|
||||
|
||||
如果你有特殊的外观和性能需求,或者为某些用途特殊定制,你可以看看这些 [最佳的终端模拟器][13]。
|
||||
|
||||
如果你觉得使用终端是一件枯燥的事情,你一定要试试这些终端模拟器。
|
||||
|
||||
### 结束语
|
||||
|
||||
就我个人来说,当我刚开始接触 Linux 时,我也对终端心存畏惧。但是当我可以熟练的使用它处理一些简单任务的时候,我才开始意识到上面所说的终端的优点。
|
||||
|
||||
你没必要放弃图形界面而使用终端处理所有的事情。尽管如此,最好还是使用终端处理一些事情,这可以节省你的时间,让你更快的完成工作,并心情愉悦。
|
||||
|
||||
Abhishek 曾经写过一篇很棒的涉及各种小事的 [指南][14],可以让你熟悉 Linux 终端。
|
||||
|
||||
*你觉得,相比于图形界面,终端有哪些优点呢?是什么原因让你选择终端呢?快来告诉我们吧。*
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/love-thy-terminal/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[duoluoxiaosheng](https://github.com/duoluoxiaosheng)
|
||||
校对:[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/lkxed
|
||||
[1]: https://itsfoss.com/wp-content/uploads/2022/06/quick-info-terminal.png
|
||||
[2]: https://itsfoss.com/linux-man-page-guide/
|
||||
[3]: https://itsfoss.com/wp-content/uploads/2022/06/troubleshoting-illustration.jpg
|
||||
[4]: https://itsfoss.com/tag/troubleshoot/
|
||||
[5]: https://itsfoss.com/find-network-adapter-ubuntu-linux/
|
||||
[6]: https://itsfoss.com/long-shutdown-linux/
|
||||
[7]: https://itsfoss.com/fix-no-wireless-network-ubuntu/
|
||||
[8]: https://itsfoss.com/wp-content/uploads/2022/06/remote-server-illustration.jpg
|
||||
[9]: https://itsfoss.com/best-linux-distributions/
|
||||
[10]: https://itsfoss.com/wp-content/uploads/2022/06/fast-illustration.jpg
|
||||
[11]: https://itsfoss.com/tag/cli-tools/
|
||||
[12]: https://itsfoss.com/wp-content/uploads/2022/06/variety-illustration.jpg
|
||||
[13]: https://itsfoss.com/linux-terminal-emulators/
|
||||
[14]: https://itsfoss.com/basic-terminal-tips-ubuntu/
|
@ -0,0 +1,128 @@
|
||||
[#]: subject: "Thonny is an Ideal IDE for Teaching Python Programming in Schools"
|
||||
[#]: via: "https://itsfoss.com/thonny-python-ide/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14717-1.html"
|
||||
|
||||
Thonny:在学校教授 Python 编程的理想 IDE
|
||||
======
|
||||
|
||||
在 Linux 中运行一个 Python 程序只需要简单地在终端中执行 Python 文件就行。
|
||||
|
||||
但这对人们来说不是很方便,也不能帮助你调试你的程序。太原始了。
|
||||
|
||||
有几个 IDE 和文本编辑器可以用于 Python 开发。Linux 用户可以使用 [PyCharm 社区版][1]。
|
||||
|
||||
我最近发现了另一个专门为 Python 初学者制作的 IDE。我喜欢这个应用的想法,因此我在这里与你分享。
|
||||
|
||||
### Thonny 是一个跨平台、开源的 Python IDE,适合初学者使用
|
||||
|
||||
[Thonny][2] 在用户界面和用户体验方面,感觉就像 Python 版本的 Eclipse。考虑到大多数 C++ 和 Java 的初学者都是从 Eclipse 开始的,而且许多人后来一直使用它,这也不完全是一件坏事。
|
||||
|
||||
它不是一个新的工具。它已经出现好几年了。我没有用 Python 进行编码,所以直到最近才发现它。
|
||||
|
||||
Thonny 专注于 Python,提供了帮助 Python 初学者了解其程序行为的功能。让我们来看看这些功能。
|
||||
|
||||
#### 即装即用
|
||||
|
||||
Thonny 自带 Python,所以你不需要为安装 Python 做额外的努力。这对 Linux 用户来说不是什么大事,因为大多数发行版都默认安装了 Python。
|
||||
|
||||
界面很简单。它给你一个编辑器,你可以写你的 Python 程序,然后点击运行按钮或使用 `F5` 键来运行程序。输出显示在底部。
|
||||
|
||||
![thonny hello world][3]
|
||||
|
||||
#### 查看变量
|
||||
|
||||
在 “<ruby>查看<rt>View</rt></ruby>-><ruby>变量<rt>Variables</rt></ruby>”,你可以看到所有变量的值。不需要将它们全部打印出来。
|
||||
|
||||
![thonny variable pane][4]
|
||||
|
||||
#### 内置调试器
|
||||
|
||||
通过使用调试器一步步运行你的程序。你可以从顶部的菜单或使用 `Ctrl + F5` 键访问它。在这里你甚至不需要设置断点。你可以用 `F6` 进入大步骤,或用 `F7` 进入小步骤。
|
||||
|
||||
![thonny step by step f6][5]
|
||||
|
||||
在小步骤中,你可以看到 Python 是如何看待你的表达式的。这对新的程序员理解他们的程序为什么以某种方式表现非常有帮助。
|
||||
|
||||
![thonny step by step f7][6]
|
||||
|
||||
不止这样。对于函数调用,它会打开一个新的窗口,里面有独立的局部变量表和代码指针。超级酷!
|
||||
|
||||
#### 语法错误高亮
|
||||
|
||||
初学者经常会犯一些简单的语法错误,如缺少小括号、引号等。Thonny 会在编辑器中立即指出来。
|
||||
|
||||
本地变量也可以从视觉上与全局变量区分开来。
|
||||
|
||||
#### 自动补全
|
||||
|
||||
你不需要输入所有的东西。Thonny 支持自动补全代码,这有助于加快编码。
|
||||
|
||||
![thonny auto complete][7]
|
||||
|
||||
#### 访问系统 shell
|
||||
|
||||
在工具中,你可以访问系统 shell。在这里你可以安装新的 Python 包或学习从命令行处理 Python。
|
||||
|
||||
![thonny shell terminal][8]
|
||||
|
||||
请注意,如果你使用 Flatpak 或 Snap,Thonny 可能无法访问系统 shell。
|
||||
|
||||
#### 从 GUI 管理 Pip
|
||||
|
||||
进入工具和管理包。它会打开一个窗口,你可以从这个 GUI 中安装 Pip 软件包。
|
||||
|
||||
![thonny manage packages][9]
|
||||
|
||||
对于学习 Python 来说,功能足够好,对吗?让我们看看如何安装它。
|
||||
|
||||
### 在 Linux 上安装 Thonny
|
||||
|
||||
Thonny 是一个跨平台的应用。它可用于 Windows、macOS 和 Linux。
|
||||
|
||||
它是一个流行的应用,你可以在大多数 Linux 发行版的仓库中找到它。只要在你的系统的软件中心寻找它。
|
||||
|
||||
另外,你也可以随时使用你的 Linux 发行版的包管理器。
|
||||
|
||||
在 Debian 和基于 Ubuntu 的发行版上,你可以使用 `apt` 命令来安装它。
|
||||
|
||||
```
|
||||
sudo apt install thonny
|
||||
```
|
||||
|
||||
它会下载一堆依赖关系和大约 300MB 的软件包。
|
||||
|
||||
安装后,你可以在菜单中搜索它,并从那里安装它。
|
||||
|
||||
### 总结
|
||||
|
||||
Thonny 对于初级 Python 程序员来说是个不错的工具。不是说专家不能使用它,但它更适合在学校和学院使用。学生们会发现它有助于学习 Python 和理解他们的代码是如何以某种方式表现出来的。事实上,它最初是在爱沙尼亚的塔尔图大学开发的。
|
||||
|
||||
总的来说,对于 Python 学习者来说是一个很好的软件。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/thonny-python-ide/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lkxed][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/abhishek/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://itsfoss.com/install-pycharm-ubuntu/
|
||||
[2]: https://thonny.org/
|
||||
[3]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-hello-world.png
|
||||
[4]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-variable-pane.png
|
||||
[5]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-step-by-step-f6.png
|
||||
[6]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-step-by-step-f7.png
|
||||
[7]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-auto-complete.png
|
||||
[8]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-shell-terminal.png
|
||||
[9]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-manage-packages.png
|
@ -0,0 +1,44 @@
|
||||
[#]: subject: "Adobe Launches Open Source Toolkit To Contain Visual Misinformation"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/adobe-launches-open-source-toolkit-to-contain-visual-misinformation/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14729-1.html"
|
||||
|
||||
为减少视觉错误信息,Adobe 推出了开源工具包
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/19/105844yauuhdz1u1189ffr.jpg)
|
||||
|
||||
Adobe 设想的是为网络上充斥的照片和视频标注关于它们的来源。该公司的主要目标是减少视觉错误信息的传播,不过,该系统也可以使那些“希望将自己的名字与工作关联起来”的内容创作者受益。
|
||||
|
||||
Adobe 在 2019 年首次宣布了其 <ruby>内容真实性计划<rt>Content Authenticity Initiative</rt></ruby>(CAI)项目,此后,它发布了一份关于实现该目标的技术白皮书,将该系统集成了到自己的软件中,并与新闻编辑室和硬件制造商展开了合作,以帮助普及其愿景。
|
||||
|
||||
现在,该公司发布了一个由三部分组成的开源工具包,从而把该技术交到开发人员手中,并投入使用。Adobe 的新开源工具包括一个用于开发“在浏览器中显示内容凭据”的 JavaScript SDK、一个命令行实用程序,和一个用于开发桌面应用程序、移动应用程序和其他应用的 Rust SDK,以创建、查看和验证嵌入式内容凭据。
|
||||
|
||||
众所周知,照片的 EXIF 数据中记录了有关光圈和快门速度的信息,这个新标准也采用了这种方式,它还记录有关文件创建的信息,例如文件的创建和编辑方式。如果该公司的共同愿景成真,这些 Adobe 称之为“内容凭证”的元数据,将在社交媒体平台、图像搜索平台、图像编辑器、搜索引擎中广泛可见。
|
||||
|
||||
C2PA 是 Adobe 的 CAI 与 微软、索尼、英特尔、推特以及 BBC 等合作伙伴的合作成果。华尔街日报、尼康和美联社最近也加入了 Adobe 的这个计划,即将 <ruby>内容认证技术<rt>content authentication</rt></ruby> 更加广泛地应用。
|
||||
|
||||
有了这些新工具,社交媒体平台就可以使用 Adobe 的 JavaScript SDK,快速让平台上的所有图像和视频显示内容凭据,这些凭据将会在鼠标悬停时,显示为右上角的一个图标。因此,无需专门的团队和更大的软件构建,该实施可以由几个开发人员在几周内完成。
|
||||
|
||||
CAI 的主要目标是打击互联网上的视觉错误信息,比如那些扭曲乌克兰战争的旧图片的重新传播,或是臭名昭著的南希·佩洛西的“廉价假货”。不过,数字监管链也可能使“作品被盗或出售”的内容创作者受益,这个问题多年来一直困扰着视觉艺术家,现在也正在 NFT 市场引发问题。
|
||||
|
||||
根据 Parsons 的说法,CAI 还引起了那些“制作合成图像和视频”的公司的巨大兴趣。公司可以将原始元数据嵌入到我们从 DALL-E 等模型中看到的那种 AI 创作中,从而确保它提供的合成图像不会轻易被误认为是真实的东西。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/adobe-launches-open-source-toolkit-to-contain-visual-misinformation/
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/adobe.jpeg
|
@ -0,0 +1,143 @@
|
||||
[#]: subject: "KDE Plasma 5.25 Release is All About Color, Theme, and Other Improvements"
|
||||
[#]: via: "https://news.itsfoss.com/kde-plasma-5-25-release/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14720-1.html"
|
||||
|
||||
KDE Plasma 5.25 发布:颜色、主题和其他改进
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/17/120251jxjpjmmhzcmoq2mx.jpg)
|
||||
|
||||
> KDE Plasma 5.25 终于来了,它带来了许多视觉更新和有用的改进!
|
||||
|
||||
![Plasma 5.25][1]
|
||||
|
||||
KDE Plasma 5.25 一直是最受期待的版本之一,因为它最近的版本都专注于改进视觉效果和工作流程。
|
||||
|
||||
例如,[KDE Plasma 5.24][2] LTS 版本带来了升级的 Breeze 主题和全新的概览效果,改进了工作流程。
|
||||
|
||||
如今,KDE Plasma 5.25 带来了更多升级!
|
||||
|
||||
### KDE Plasma 5.25 更新内容
|
||||
|
||||
虽然,在 Plasma 5.25 的最终发布之前,我们已经知道了一些它的 [关键特性][3]。但是,既然它正式发布了,那就是时候和你简单介绍一下 KDE Plasma 5.25 的全部新功能啦!
|
||||
|
||||
**剧透一下**:大多数更新都涉及视觉改善和可用性改进。
|
||||
|
||||
#### 新壁纸
|
||||
|
||||
![][4]
|
||||
|
||||
如果你玩过 “<ruby>[无人深空][5]<rt>No Man's Sky</rt></ruby>” 或类似的电子游戏,你可能会有似曾相识的感觉。
|
||||
|
||||
撇开这一点不谈,默认壁纸对旧壁纸进行了更新,具有完全不同的主题颜色。
|
||||
|
||||
#### 触摸板和触摸屏手势
|
||||
|
||||
Plasma 5.25 包括了一系列手势,以充分利用新功能。例如:四指捏合、从屏幕边缘滑动以触发概览效果或 <ruby>桌面网格<rt>Desktop Grid</rt></ruby> 等。
|
||||
|
||||
你可以使用该版本支持的 1:1 手势,轻松管理虚拟桌面,并在工作区之间切换。
|
||||
|
||||
你可以前往 <ruby>工作区行为<rt>Workspace Behavior</rt></ruby> 设置来调整你需要的操作。
|
||||
|
||||
#### 支持选择性应用全局主题
|
||||
|
||||
![KDE Plasma 5.25][6]
|
||||
|
||||
当你在系统设置中应用 <ruby>全局主题<rt>Global Theme</rt></ruby> 时,系统将提示你,是否要应用主题的所有部分,或是只应用它的某些部分。
|
||||
|
||||
你可以应用它的特定外观选项,也可以用它来替换整个配置。
|
||||
|
||||
总的来说,当将全局主题应用于使用 KDE 的系统时,这个更新提供了细粒度的自定义控制。
|
||||
|
||||
#### 根据当前壁纸自动生成强调色
|
||||
|
||||
以前,我们总觉得能够选择自定义或预设强调色,就已经足够了。
|
||||
|
||||
现在,有了 KDE Plasma 5.25,你可以根据当前壁纸自动生成强调色。它应该也能够与墙纸幻灯片一起使用。
|
||||
|
||||
![][7]
|
||||
|
||||
所以,如果你既让桌面匹配你的背景,又不想要自己花力气定制,那么这个选项应该会对你有用。
|
||||
|
||||
![][7a]
|
||||
|
||||
这是新功能库的一个小而强大的补充。
|
||||
|
||||
#### 带有强调色的配色方案
|
||||
|
||||
为了更好地自定义外观/观感,KDE Plasma 5.25 可以让你在选择的强调色上定制配色方案。
|
||||
|
||||
![KDE Plasma 5.25][8]
|
||||
|
||||
如果你喜欢配色主题的用户体验,你可以启用/禁用它。
|
||||
|
||||
#### 触控模式改进
|
||||
|
||||
![][9]
|
||||
|
||||
当你在桌面环境中使用触控模式时(通过支持的设备或手动),KDE Plasma 5.25 将增大 KDE 应用程序的任务管理器、系统托盘和标题栏的大小,使它们更易于访问。
|
||||
|
||||
#### “发现” 软件中心的改进
|
||||
|
||||
“<ruby>发现<rt>Discover</rt></ruby>” 软件中心有一些细微的变化。以前,你需要单独浏览“应用程序”、“附加组件”和 “Plasma 附加组件”等类别;而现在,你在侧边栏中就可以找到所有应用程序类别。
|
||||
|
||||
![KDE Plasma 5.24][10]
|
||||
|
||||
![KDE Plasma 5.25][11]
|
||||
|
||||
此外,对于 Flatpak 应用程序,你可以看到它所需的权限。还有,应用程序页面也有了一些升级,以显示有关你查看的应用程序的更多信息。
|
||||
|
||||
#### 其他改进
|
||||
|
||||
其他重要的改进包括定制功能的升级和工作流程的修改。其中包括:
|
||||
|
||||
* 一个新的混合效果,用于使动画颜色之间的变化具有动画效果,每当你改变主题/颜色或自动改变时,可以平滑过渡。
|
||||
* 强大的容纳管理功能,它允许你在监视器之间移动桌面以及文件夹/小部件,即使你已断开它们的连接。
|
||||
* Kwin 脚本设置页面已被重写。
|
||||
* 键盘导航支持自定义快捷键和系统托盘图标。
|
||||
* 新增一个浮动面板,用于在面板周围添加边距。
|
||||
* 改进了 KRunner 的性能。
|
||||
* 网络小部件添加了 Wi-Fi 网络的频率和 BSSID 的详细信息。
|
||||
|
||||
如果你想了解更多,可以查看 [公告][12]。
|
||||
|
||||
### 尝试 KDE Plasma 5.25
|
||||
|
||||
你可以下载 KDE Neon,以便在最新的 KDE Plasma 5.25 有更新时马上就可以用上。如果你等不及了,测试版也是个不错的选择(如果你愿意实验的话)。
|
||||
|
||||
> **[KDE Neon][13]**
|
||||
|
||||
对于其他 Linux 发行版,你得等待开发人员推送更新(LTS 版除外)。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/kde-plasma-5-25-release/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[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/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/plasma-5-25-feat.jpg
|
||||
[2]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/
|
||||
[3]: https://news.itsfoss.com/plasma-5-25-features/
|
||||
[4]: https://news.itsfoss.com/wp-content/uploads/2022/06/plasma-5-25-wallpaper-1024x576.jpg
|
||||
[5]: https://www.nomanssky.com/
|
||||
[6]: https://news.itsfoss.com/wp-content/uploads/2022/06/apply_global_theme_advanced.png
|
||||
[7]: https://news.itsfoss.com/wp-content/uploads/2022/06/blue_accent.jpg
|
||||
[7a]: https://player.vimeo.com/video/720193948
|
||||
[8]: https://news.itsfoss.com/wp-content/uploads/2022/04/tint-color-scheme-1024x751.png
|
||||
[9]: https://news.itsfoss.com/wp-content/uploads/2022/06/tablet_context_menu.png
|
||||
[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/04/kde-discover-plasma-5-25.png?ssl=1
|
||||
[11]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/04/kde-plasma-5-25-discover.png?ssl=1
|
||||
[12]: https://kde.org/announcements/plasma/5/5.25.0/
|
||||
[13]: https://neon.kde.org/download
|
104
published/20220614 Share your Linux terminal with tmate.md
Normal file
104
published/20220614 Share your Linux terminal with tmate.md
Normal file
@ -0,0 +1,104 @@
|
||||
[#]: subject: "Share your Linux terminal with tmate"
|
||||
[#]: via: "https://opensource.com/article/22/6/share-linux-terminal-tmate"
|
||||
[#]: author: "Sumantro Mukherjee https://opensource.com/users/sumantro"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "turbokernel"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14726-1.html"
|
||||
|
||||
用 tmate 分享你的 Linux 终端
|
||||
======
|
||||
|
||||
> tmate 扩展了你分享 Linux 终端会话的方式。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/18/170815hfrcdfd4lltd737z.jpg)
|
||||
|
||||
作为 Fedora Linux QA 团队的一员,我有时想将自己执行的一堆命令广而告之给其他开发者。如果你曾经使用过像 [tmux][5] 或 [GNU Screen][6] 这样的 [终端复用器][4],你可能会认为这是一个挺轻松的任务。不是所有看我的示范的人都是从笔记本电脑或台式机连接到我的终端会话的,有些人可能是随手在他们的手机浏览器中打开的,因为我使用了 [tmate][7],所以他们可以很容易地做到这一点。
|
||||
|
||||
### 使用 tmate 分享 Linux 终端
|
||||
|
||||
观看别人在 Linux 终端的工作是非常有教育意义的。你可以学到新的命令、新的工作流程,或者新的调试和自动化的方法。但要抓住你所看到的东西,以便你以后可以自己尝试,这可能很困难。你可能会借助截图或一个共享终端会话的屏幕记录,这样你就可以在以后打出每个命令。剩下的唯一选择是由演示命令的人使用 [Asciinema][8] 或 [script 和 scriptreplay][9] 等工具来记录会话。
|
||||
|
||||
但是通过 `tmate`,用户可以在只读模式下或通过 SSH 分享终端。SSH 和只读会话都可以通过终端或以 HTML 网页的形式访问。
|
||||
|
||||
当我为 Fedora QA 团队培训人员时,我使用只读模式,因为我需要运行命令并显示输出,但有了 `tmate`,人们可以通过从他们的浏览器复制和粘贴到文本编辑器来记录笔记。
|
||||
|
||||
### Linux tmate 上手
|
||||
|
||||
在 Linux 上,你可以用你的包管理器安装 `tmate`。例如,在 Fedora 上:
|
||||
|
||||
```
|
||||
$ sudo dnf install tmate
|
||||
```
|
||||
|
||||
在 Debian 和类似的发行版上:
|
||||
|
||||
```
|
||||
$ sudo apt install tmate
|
||||
```
|
||||
|
||||
在 macOS 上,你可以用 [Homebrew][10] 或 [MacPorts][11] 安装它。如果你需要其他 Linux 发行版的说明,请参考 [安装][12] 指南。
|
||||
|
||||
![Screenshot of terminal showing the options for tmate sharing: web session (regular and read-only) and ssh session (regular and read-only)][13]
|
||||
|
||||
安装后,启动 `tmate`:
|
||||
|
||||
```
|
||||
$ tmate
|
||||
```
|
||||
|
||||
当 `tmate` 启动时,会生成链接,通过 HTTP 和 SSH 提供对终端会话的访问。每个协议都有一个只读方式,以及一个反向的 SSH 会话。
|
||||
|
||||
下面是一个网络会话的样子:
|
||||
|
||||
![Screenshot showing tmate terminal window and 2 versions of sharing sessions demonstrating the same code][14]
|
||||
|
||||
`tmate` 的网络控制台是 HTML5 的,因此,用户可以复制整个屏幕并粘贴到终端来运行相同的命令。
|
||||
|
||||
### 保持会话
|
||||
|
||||
你可能想知道如果你不小心关闭了你的终端会发生什么。你也可能想知道如何与不同的控制台应用共享你的终端。毕竟,`tmate` 是一个多路复用器,所以它应该能够保持会话,脱离并重新连接到一个会话,等等。
|
||||
|
||||
当然,这正是 `tmate` 所能做到的。如果你曾经使用过 `tmux`,这可能是相当熟悉的。
|
||||
|
||||
```
|
||||
$ tmate -F -n web new-session vi console
|
||||
```
|
||||
|
||||
这个命令在 `vi` 中打开了 `new-session`,`-F` 选项确保会话在关闭时也能重新产生。
|
||||
|
||||
![A screenshot of the terminal showing the output after using the new-session and -F options: connection information for either a web session (regular or read-only) or ssh session (regular or read-only)][15]
|
||||
|
||||
### 社交复用
|
||||
|
||||
`tmate` 给你带来了 `tmux` 或 GNU Screen 的自由度,以及与他人分享会话的能力。这是一个有价值的工具,可以教其他用户如何使用终端、演示一个新命令的功能,或调试意外的行为。它是开源的,所以请试一试!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/share-linux-terminal-tmate
|
||||
|
||||
作者:[Sumantro Mukherjee][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[turbokernel](https://github.com/turbokernel)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/sumantro
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/terminal_command_linux_desktop_code.jpg
|
||||
[2]: https://pixabay.com/en/users/iradaturrahmat-3964359/
|
||||
[3]: https://pixabay.com/en/ubuntu-computer-program-interface-3145957/
|
||||
[4]: https://opensource.com/article/21/5/linux-terminal-multiplexer
|
||||
[5]: https://opensource.com/downloads/tmux-cheat-sheet
|
||||
[6]: https://opensource.com/article/17/3/introduction-gnu-screen
|
||||
[7]: https://tmate.io/
|
||||
[8]: https://opensource.com/article/22/1/record-your-terminal-session-asciinema
|
||||
[9]: https://www.redhat.com/sysadmin/record-terminal-script-scriptreplay
|
||||
[10]: https://opensource.com/article/20/6/homebrew-mac
|
||||
[11]: https://opensource.com/article/20/11/macports
|
||||
[12]: https://tmate.io/
|
||||
[13]: https://opensource.com/sites/default/files/2022-06/install%20tmate_0.png
|
||||
[14]: https://opensource.com/sites/default/files/2022-06/tmate%20web%20session.png
|
||||
[15]: https://opensource.com/sites/default/files/2022-06/tmate%20keeping%20session%20alive.png
|
@ -0,0 +1,38 @@
|
||||
[#]: subject: "Thunderbird, The Open Source Email Client, Is Coming To Android"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/thunderbird-the-open-source-email-client-is-coming-to-android/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14715-1.html"
|
||||
|
||||
开源电子邮件客户端 Thunderbird 即将登陆 Android
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/16/084004gdzgp4bqgigi9tpe.jpg)
|
||||
|
||||
开源电子邮件客户端 Thunderbird 将通过 K-9 Mail Android 电子邮件应用项目登陆 Android,该项目与 Thunderbird 合并后的产品就是 Thunderbird Android 电子邮件应用。两年前,Thunderbird 被转移到了 Mozilla 基金会的子公司 MZLA Technologies Corporation 下,该公司的所有权结构与基金会子公司 Mozilla 公司旗下的 Firefox 类似。有了 OpenPGP 端到端加密和期待已久的移动应用等新功能,Thunderbird 项目能够开辟出一条自己的道路。
|
||||
|
||||
根据 Thunderbird 团队的说法,Thunderbird 产品经理 Ryan Lee Sipes 和 K-9 的主要维护者 Christian Ketterer,两人早在 2018 年就开始讨论可能的 Thunderbird 电子邮件应用合作了。到了 2022 年,两人决定不再让 Thunderbird 从头开始开发自己的应用程序,而是直接让 K-9 加入 Thunderbird。
|
||||
|
||||
Thunderbird 团队表示:“许多 Thunderbird 用户都要求在移动设备上获得 Thunderbird 体验,我们打算通过把 K-9 打造成令人惊叹的产品(并将其变成 Android 上的 Thunderbird)来提供这种体验。K-9 将补充提供 Thunderbird 体验,并增强它的使用场景和方式,让用户获得出色的电子邮件体验。我们对桌面 Thunderbird 的承诺没有改变,我们团队中的大多数人都致力于将其打造为一流的电子邮件客户端,并将保持这种状态。”
|
||||
|
||||
虽然 K-9 在 Google Play 上并不是特别受欢迎的电子邮件应用,但它已经获得了 500 万次下载。K-9 Mail 的路线图目前包括:使用 Thunderbird 帐户自动配置的帐户设置、改进的文件夹管理、消息过滤器支持,以及桌面和移动 Thunderbird 之间的同步。虽然 Thunderbird 知道人们对 iOS 版 Thunderbird 应用程序也很感兴趣,但在常见问题解答(FAQ)中,该项目仅声明它正在“评估”这种可能性。
|
||||
|
||||
Thunderbird 团队还打算将 Firefox Sync 作为一种在 Thunderbird 和 K-9 Mail 之间同步帐户的方法。它应该会在 2023 年夏天正式投入使用。该项目还在研究将哪些 Thunderbird 功能引入 Android 应用程序,例如日历、任务、提要和聊天支持等。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/thunderbird-the-open-source-email-client-is-coming-to-android/
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/android-developer.jpg
|
@ -0,0 +1,42 @@
|
||||
[#]: subject: "According to studies, Twitter Drives Open Source Projects Popularity"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/according-to-studies-twitter-drives-open-source-projects-popularity/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14734-1.html"
|
||||
|
||||
有研究表明,推特能够推动开源项目的普及
|
||||
======
|
||||
|
||||
![推特][1]
|
||||
|
||||
由 HongBo Fang 博士领导的研究团队发现,推特是一种吸引更多人关注和贡献 GitHub 开源项目的有效方式。Fang 博士在国际软件工程会议上发表了这项名为“‘这真是太棒了!’估计推文对开源项目受欢迎程度和新贡献者的影响”的研究,并获得了杰出论文奖。这项研究显示,发送和一个项目有关的推文,导致了该项目受欢迎程度增加了 7%(在 GitHub 上至少增加了一个星标),贡献者数量增加了 2%。一个项目收到的推文越多,它收到的星标和贡献者就越多。
|
||||
|
||||
Fang 说:“我们已经意识到社交媒体在开源社区中变得越来越重要,吸引关注和新的贡献者将带来更高质量和更好的软件。”
|
||||
|
||||
大多数开源软件都是由志愿者创建和维护的。参与项目的人越多,结果就越好。开发者和其他人使用该软件、报告问题并努力解决这些问题。然而,不受欢迎的项目有可能得不到应有的关注。这些劳动力(几乎都是志愿者),维护了数百万人每天依赖的软件。例如,几乎每个 HTTPS 网站都使用开源的 OpenSSL 保护其内容。Heartbleed 是 OpenSSL 中发现的一个安全漏洞,在 2014 年被发现后,企业花费了数百万美元来修复它。另一个开源软件 cURL 允许连接的设备相互发送数据,并安装在大约 10 亿台设备上。开源软件之多,不胜枚举。
|
||||
|
||||
此次“推特对提高开源项目的受欢迎程度和吸引新贡献者的影响”的研究,其实是 “Vasilescu 数据挖掘与社会技术研究实验室”(STRUDEL)的一个更大项目的其中一部分,该研究着眼于如何建立开源社区并且其工作更具可持续性。毕竟,支撑现代技术的数字基础设施、道路和桥梁都是开源软件。如果维护不当,这些基础设施可能会崩溃。
|
||||
|
||||
研究人员检查了 44544 条推文,其中包含指向 2370 个开源 GitHub 存储库的链接,以证明这些推文确实吸引了新的星标和项目贡献者。在这项研究中,研究人员使用了一种科学的方法:将推特上提及的 GitHub 项目的星标和贡献者的增加,与推特上未提及的一组项目进行了比较。该研究还描述了高影响力推文的特征、可能被帖子吸引到项目的人的类型,以及这些人与通过其他方式吸引的贡献者有何不同。来自项目支持者而不是开发者的推文最能吸引注意力。请求针对特定任务或项目提供帮助的帖子会收到更高的回复率。推文往往会吸引新的贡献者,**他们是 GitHub 的新手,但不是经验不足的程序员**。还有,**新的关注可能不会带来新的帮助**。
|
||||
|
||||
提高项目受欢迎程度也存在其缺点,研究人员讨论后认为,它的潜在缺点之一,就是注意力和行动之间的差距。**更多的关注通常会导致更多的功能请求或问题报告,但不一定有更多的开发者来解决它们**。社交媒体受欢迎程度的提高,可能会导致有更多的“巨魔”或“有毒行为”出现在项目周围。
|
||||
|
||||
(LCTT 译注:我觉得文章中有三句话写得很好,于是把它们加粗了,和大家分享。 —— 六开箱)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/according-to-studies-twitter-drives-open-source-projects-popularity/
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/twiiter.jpg
|
@ -0,0 +1,77 @@
|
||||
[#]: subject: "Mozilla Just Made Firefox the Most Secure Web Browser for All Users"
|
||||
[#]: via: "https://news.itsfoss.com/mozilla-firefox-secure/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14723-1.html"
|
||||
|
||||
Mozilla 刚刚使 Firefox 成为所有人的最安全的网页浏览器
|
||||
======
|
||||
|
||||
> Mozilla 终于启用了一项隐私保护功能,这可能使其成为当下最安全的网页浏览器。你怎么看?
|
||||
|
||||
![Mozilla Firefox][1]
|
||||
|
||||
Mozilla Firefox 是市面上最安全的开源网页浏览器之一。
|
||||
|
||||
毫无疑问,你可以自由定制它来进一步增强安全性,这就是 Tor 浏览器使用 Firefox 作为其核心的原因。
|
||||
|
||||
并且,这也是 [我继续使用 Firefox 的原因][2] 之一。
|
||||
|
||||
现在,Mozilla 终于为**所有桌面用户**启用了一项新功能,这使其成为最安全的浏览器(或是他们声称的“最安全”)。
|
||||
|
||||
本文中,我讨论的不是任何新功能,而是 Firefox 中的现有功能,即 <ruby>Cookie 全面保护<rt>Total Cookie Protection</rt></ruby>。它是在去年与 [Firefox 86][3] 一起引入的,但默认情况下并未对所有用户启用。
|
||||
|
||||
### 为所有用户提供的全面的 Cookie 保护
|
||||
|
||||
“Cookie 全面保护”正在向所有人推出,无论你使用的是 Windows、Mac 还是 Linux,它将成为默认启用的核心功能之一。
|
||||
|
||||
最初,要使用该功能,你必须启用严格模式(<ruby>增强跟踪保护<rt>Enhanced Tracking Protection</rt></ruby>)。但现在,你不再需要这样做了。
|
||||
|
||||
#### 它是什么?
|
||||
|
||||
如果你好奇的话,“Cookie 全面保护”会隔离每个网站和它们的 Cookie。Cookie 是网站向你的浏览器发送的少量数据。
|
||||
|
||||
因此,Cookie 不会在网站之间共享,从而防止了<ruby>跨站跟踪<rt>cross-site tracking</rt></ruby>。
|
||||
|
||||
浏览器将为你访问的每个网站都创建单独的“<ruby>饼干罐<rt>Cookie Jar</rt></ruby>”。(LCTT 译注:Cookie 原意是小饼干。)
|
||||
|
||||
![][4]
|
||||
|
||||
Mozilla 的博文对此进行了更多解释:
|
||||
|
||||
> 在任何时候,网站或嵌入网站的 [第三方内容][5] 在浏览器中存储的 Cookie,都将仅限于分配给该网站的 “饼干罐”。其他网站无法进入不属于它们的“饼干罐”,以得到你存储在那些 Cookie 中的信息。这可以让你免受侵入性广告的影响,并减少公司收集的关于你的信息量。
|
||||
|
||||
### 那么,这有什么大不了的吗?
|
||||
|
||||
即使你配备了所有的隐私跟踪保护和内容拦截器,你也不一定知道,其实还有个问题叫做“跨站跟踪”。
|
||||
|
||||
因此,通过跨站点的 Cookie 交互,你的许多个人活动和习惯,都可以帮助数字跟踪公司建立你的在线个人资料。
|
||||
|
||||
但是,对于 Mozilla Firefox 来说,它在所有其他隐私措施之上,默认额外启用了该功能,这可确保你获得最私密的体验。
|
||||
|
||||
并且,所有这些都不需要你调整任何东西,这应该为那些“重视隐私”的用户提供方便。
|
||||
|
||||
想了解进一步信息,你可以查看 Mozilla 的 [官方公告][6]。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/mozilla-firefox-secure/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[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/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/mozilla-made-firefox-most-secure-web-browser.jpg
|
||||
[2]: https://news.itsfoss.com/why-mozilla-firefox/
|
||||
[3]: https://news.itsfoss.com/firefox-86-release/
|
||||
[4]: https://news.itsfoss.com/wp-content/uploads/2021/02/tcp-firefox.png
|
||||
[5]: https://support.mozilla.org/en-US/kb/third-party-cookies-firefox-tracking-protection#:~:text=Third%2Dparty%20cookies%20are%20cookies,considered%20a%20third%2Dparty%20cookie.
|
||||
[6]: https://blog.mozilla.org/en/products/firefox/firefox-rolls-out-total-cookie-protection-by-default-to-all-users-worldwide/
|
@ -0,0 +1,40 @@
|
||||
[#]: subject: "Mattermost Extends workflow platform with 7.0 release"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/mattermost-extends-workflow-platform-with-7-0-release/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14738-1.html"
|
||||
|
||||
Mattermost 7.0 发布,扩展了工作流平台
|
||||
======
|
||||
|
||||
![Mattermost][1]
|
||||
|
||||
自 2016 年开源以来,Mattermost 一直在开发一个具有不断增加的用例的消息传递平台。6 月 16 日,Mattermost 7.0 平台发布,其中包括了新的语音呼叫、工作流模板和用于开源技术的应用框架。新版本扩展了 2021 年 10 月发布的 6.0 版本引入的功能。一直以来,Mattermost 都在与包括 Slack、Atlassian 和 Asana 在内的几家大公司,竞争不断增长的协作工具市场。另一方面,Mattermost 侧重于对开发者的支持,尽管该平台也可用于安全和 IT 运营。
|
||||
|
||||
Mattermost 的软件同时提供有商业版和开源版,目前它们都升级到了 7.0 版。Tien 解释说,Mattermost 的商业平台是建立在开源基础上的。在开放核心模型中,开源版作为软件的基础或核心,专有的企业功能则内置于商业版中。合规性、规模性和高级配置是 Mattermost 的关键企业功能。Tien 声称,开源版本对于中小型团队来说已经足够了。他认为,拥有 500 名或更多用户的团队才需要考虑使用商业版。
|
||||
|
||||
Tien 认为开源也关乎社区贡献。Mattermost 开源项目有超过 4000 名个人贡献者,他们贡献了超过 30000 行代码。
|
||||
|
||||
以前,Mattermost 依赖集成第三方呼叫服务(例如 Zoom)来启用语音呼叫功能。在 7.0 版本中,它通过开源 WebRTC 协议引入了呼叫功能的直接集成,所有现代 Web 浏览器都支持该协议。直接集成呼叫功能的目标是为协作提供单一平台,这符合 Tien 对该平台的总体愿景。现在,除了提供集成工具以实现协作之外,该平台还会增加“工作流模板”功能,以帮助(用户)组织构建可重复的流程。
|
||||
|
||||
工作流概念采用了 <ruby>剧本<rt>playbook</rt></ruby>,其中包含了为“特定类型的操作”所执行的动作和操作的清单。例如,在发生服务故障或网络安全事件时,公司可以为事件响应创建工作流模板。
|
||||
|
||||
这个清单可以链接到 Mattermost <ruby>操作<rt>operation</rt></ruby>,例如让特定用户发起呼叫,并协助生成报告。Tien 表示,Mattermost 还与常见的开发者工具集成,并且工作流模板的功能将随着时间的推移而扩展,以便使用第三方工具来实现更多自动化。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/mattermost-extends-workflow-platform-with-7-0-release/
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/marttermost-e1655377462300.jpeg
|
@ -0,0 +1,38 @@
|
||||
[#]: subject: "The Travis CI Vulnerability Exposes Sensitive Open Source Project Credentials"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/the-travis-ci-vulnerability-exposes-sensitive-open-source-project-credentials/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14724-1.html"
|
||||
|
||||
Travis CI 漏洞暴露了敏感的开源项目凭证
|
||||
======
|
||||
|
||||
![Travis CI](https://img.linux.net.cn/data/attachment/album/202206/18/095734heuo8nc7g7n0ibtd.jpg)
|
||||
|
||||
Travis CI 持续集成工具中的一个缺陷暴露了来自数千个在线开源项目的敏感数据。这并不是该软件第一次遇到此类安全问题。
|
||||
|
||||
Travis CI 是一个持续集成工具,它帮助软件开发者实现自动化地测试新代码,并将新代码集成到开源项目中。Aqua 研究人员发现,通过该软件的一个 API,可以访问来自 Travis CI 免费用户的多达 7.7 亿条“日志”(即使用户的账号已经删除)。
|
||||
|
||||
攻击者可以从这些明文存储的日志中,提取出用于登录 GitHub、Docker Hub 和 AWS 等云服务的用户身份验证令牌。研究人员在 800 万份日志样本中,发现了 70000 多个敏感令牌和其他机密凭证。Aqua 团队认为“所有 Travis CI 免费用户都有可能暴露”。根据 2019 年的数据,Travis CI 被超过 60 万名独立用户,用于超过 932977 个开源项目。
|
||||
|
||||
这种对高级用户凭证的访问,会给使用该产品的软件开发者及其客户带来风险。趋势科技英国和爱尔兰安全技术总监 Bharat Mistry 解释道:“如果攻击者获得了这些凭据,就没有什么能阻止他们将恶意代码引入库或构建过程。这个缺陷无疑会导致数字供应链攻击。”
|
||||
|
||||
供应链攻击可能极具破坏性。2020 年的 <ruby>太阳风<rt>Solar Winds</rt></ruby> 攻击,使国家资助的俄罗斯黑客能够访问数千家企业和政府组织的系统。2021 年的 Kaseya 供应链攻击,使犯罪分子可以同时加密 1500 多家公司的数据,将它们全部扣为人质。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/the-travis-ci-vulnerability-exposes-sensitive-open-source-project-credentials/
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/travis-c.png
|
@ -0,0 +1,77 @@
|
||||
[#]: subject: "Ubuntu Core 22 is Here for IoT and Edge Devices"
|
||||
[#]: via: "https://news.itsfoss.com/ubuntu-core-22-release/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14730-1.html"
|
||||
|
||||
Ubuntu Core 22 来了,适用于物联网和边缘设备
|
||||
======
|
||||
|
||||
> Ubuntu Core 22 基于 Ubuntu 22.04 LTS,为物联网和嵌入式设备带来了最佳的安全性和性能。
|
||||
|
||||
![Ubuntu][1]
|
||||
|
||||
Ubuntu Core 22 是一个容器化的 Ubuntu 22.04 LTS 变体,针对嵌入式和物联网设备进行了优化。
|
||||
|
||||
对于希望在边缘设备上运行 Canonical 的最新操作系统的开发者来说,这会是一个很棒的产品。
|
||||
|
||||
在发布 Ubuntu Core 22 时,Canonical 的 CEO **Mark Shuttleworth** 说:
|
||||
|
||||
> “Canonical 的目标是在从开发环境到云、再到边缘和设备的任何地方提供安全、可靠的开源技术。”
|
||||
|
||||
### Ubuntu Core 22 更新介绍
|
||||
|
||||
![什么是 Ubuntu Core 22?][2]
|
||||
|
||||
Ubuntu Core 22 版本带来了针对安全性和可靠性的改进。其中包括了以下几个改进。
|
||||
|
||||
#### 实时计算
|
||||
|
||||
正如公告中提到的,Ubuntu 22.04 LTS 提供了一个实时内核(测试版可用),它能为那些时间敏感的工业、汽车和机器人用例,提供高性能、超低延迟和工作负载可预测性。
|
||||
|
||||
此外,如果你有 Ubuntu 认证的硬件,你还能充分利用先进的实时功能。
|
||||
|
||||
#### Snapcraft 框架
|
||||
|
||||
整个 Ubuntu 镜像分解为许多个包(Snap),使得内核、操作系统和应用程序隔离在一个沙箱中。
|
||||
|
||||
这可以让你轻松地安装应用程序,而无需担心来自专用 <ruby>物联网应用商店<rt>IoT App Store</rt></ruby> 的依赖。对于企业而言,通过软件商店进行的软件管理解决方案,应该能够带来一系列内部部署的机会。
|
||||
|
||||
该框架还可帮助系统确保 OTA 更新按预期工作,即使由于某种原因失败,也不会破坏任何内容。
|
||||
|
||||
#### 安全
|
||||
|
||||
Ubuntu Core 提供了高级安全功能,包括安全启动、全盘加密以及一些更适合任务关键型环境的功能。
|
||||
|
||||
注意,此版本还提供了 10 年的安全更新承诺。
|
||||
|
||||
#### 其他关键改进
|
||||
|
||||
* 支持从 Ubuntu Core 20 轻松迁移并确保向后兼容性。
|
||||
* 性能改进。
|
||||
* 新的“恢复出厂设置”启动模式,以便在“运行/恢复模式”中恢复出厂设置。
|
||||
|
||||
如果你想了解更多信息,可以查看 [官方公告][3]。
|
||||
|
||||
如果你对 Ubuntu Core 感兴趣,可以访问它的 [主页][4] 以了解更多关于它的信息。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/ubuntu-core-22-release/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[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/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/ubuntu-22-core.jpg
|
||||
[2]: https://youtu.be/6NDWqH1SrGs
|
||||
[3]: https://ubuntu.com/blog/canonical-ubuntu-core-22-is-now-available-optimised-for-iot-and-embedded-devices
|
||||
[4]: https://ubuntu.com/core
|
@ -1,81 +0,0 @@
|
||||
[#]: subject: "Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging"
|
||||
[#]: via: "https://news.itsfoss.com/rocket-chat-matrix/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging
|
||||
======
|
||||
Rocket.Chat is embracing the Matrix protocol to enable decentralized communication for the platform. That’s a huge change, isn’t it?
|
||||
|
||||
![rocket chat matrix][1]
|
||||
|
||||
Rocket.Chat is an excellent open-source messaging (collaboration) platform.
|
||||
|
||||
In fact, it is one of the [best open-source Slack alternatives][2] available. We use it as well for internal communication.
|
||||
|
||||
Rocket.Chat is also making good progress compared to some of its open-source competitors. For instance, they [teamed up with Nextcloud to provide an alternative to Office 365][3].
|
||||
|
||||
And recently announced a switch to Matrix protocol to introduce federation capabilities that allow its users to communicate with users on other platforms. In other words, [Rocket.Chat][4] will be utilizing a decentralized network for communication with the Matrix integration.
|
||||
|
||||
As a Rocket.Chat user; you can talk to users on any other app using the Matrix protocol.
|
||||
|
||||
### Rocket.Chat is Switching to a Decentralized Protocol to Enhance Collaboration
|
||||
|
||||
![][5]
|
||||
|
||||
Matrix protocol is a fantastic choice to enable an interoperable federation. Now, with Rocket.Chat onboard; the decentralized network should be stronger than ever.
|
||||
|
||||
Not to forget, we already have [Element][6], and [Gitter][7], as some of the platforms that already utilize Matrix. So, Rocket.Chat joining the network sounds exciting!
|
||||
|
||||
The [official announcement][8] further explains the collaboration:
|
||||
|
||||
> The Rocket.Chat adoption of Matrix makes it simple for organizations to easily connect with external parties, whether they’re using Rocket.Chat or any other Matrix compatible platform. This initiative is another step forward on Rocket.Chat’s journey to let every conversation flow without compromise and enable full interoperability with its ecosystem.
|
||||
|
||||
The new change with the Matrix network is already available in the latest [alpha release for Rocket.Chat 4.7.0][9]. Unless you want to experiment with it, you should wait for the stable release to introduce the Matrix network support.
|
||||
|
||||
**Aron Ogle** (*Core Developer at Rocket.Chat*) has put together a [guide][10] and a video to help you out if you want to explore the technical details of Rocket.Chat integration with the Matrix. Here’s the video for it:
|
||||
|
||||
![Setting up Rocket Chat to talk with Matrix][11]
|
||||
|
||||
### Is This a Good Move?
|
||||
|
||||
While decentralized tech hasn’t taken the internet by storm, it is promising and makes more sense with its reliability and decentralized capabilities. Matrix protocol has been getting all the praise for a couple of years now, and it seems to be heading in the right direction.
|
||||
|
||||
As of now, most of the big platforms rely on centralized infrastructure to make things work.
|
||||
|
||||
And, with the current implementations, cross-communication is not possible with most of the chat applications.
|
||||
|
||||
So, Rocket.Chat will be making a difference by offering cross-app interactions, like the ability to chat with an Element user on **matrix.org,** as shown in the image above.
|
||||
|
||||
Rocket.Chat entering the scene with Matrix protocol could open up the potential for its competitors or other services to give a second thought to solutions like Matrix protocol.
|
||||
|
||||
*What do you think about Rocket.Chat adopting the Matrix protocol? Share your thoughts in the comments section below.*
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/rocket-chat-matrix/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/rocketchat-matrix-protocol.jpg
|
||||
[2]: https://itsfoss.com/open-source-slack-alternative/
|
||||
[3]: https://news.itsfoss.com/rocket-chat-nextcloud-collaboration/
|
||||
[4]: https://itsfoss.com/rocket-chat/
|
||||
[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/rocket-chat-matrix.jpg
|
||||
[6]: https://itsfoss.com/element/
|
||||
[7]: https://itsfoss.com/gitter/
|
||||
[8]: https://rocket.chat/press-releases/rocket-chat-leverages-matrix-protocol-for-decentralized-and-interoperable-communications
|
||||
[9]: https://github.com/RocketChat/Rocket.Chat/releases/tag/4.7.0
|
||||
[10]: https://geekgonecrazy.com/2022/05/30/rocketchat-and-the-matrix-protocol/
|
||||
[11]: https://youtu.be/oQhIH8kql9I
|
@ -1,37 +0,0 @@
|
||||
[#]: subject: "Google Makes Data Centre Scale Encryption Open Source"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/google-makes-data-centre-scale-encryption-open-source/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Google Makes Data Centre Scale Encryption Open Source
|
||||
======
|
||||
![google-ranking-factors][1]
|
||||
|
||||
Google has made open source an encryption scheme it developed to protect traffic between its data centres. PSP, which stands for PSP Security Protocol, was created to relieve Google’s processors of the growing burden of software-based encryption, according to the company. PSP has been hailed as a success in the company’s own environment, and the company has stated that it is “making PSP open source to encourage broader adoption by the community and hardware implementation by additional NIC [network interface card] vendors.” PSP offloads encryption to NICs, which was previously possible with existing encryption schemes, but not at the scale or with the traffic coverage required by Google.
|
||||
|
||||
“At Google’s scale,” the company wrote when announcing its decision, “the cryptographic offload must support millions of live transmission control protocol (TCP) connections and sustain 100,000 new connections per second at peak.”
|
||||
|
||||
Existing security protocols, according to Google Cloud’s Amin Vahdat and Soheil Hassas Yeganeh, had flaws. “While TLS meets our security requirements, it is not an offload-friendly solution because of the tight coupling between the connection state in the kernel and the offload state in hardware. TLS also does not support non-TCP transport protocols, such as UDP”, they stated.
|
||||
|
||||
However, the IPSec protocol cannot be offloaded to hardware at the required scale. “IPSec … cannot economically support our scale partly because they store the full encryption state in an associative hardware table with modest update rates,” the post explains.
|
||||
|
||||
Google added a custom header and trailer to standard User Datagram Protocol (UDP) encapsulation to create PSP. PSP is currently implemented in three ways: one for Google’s Andromeda Linux virtualisation kernel, one for its Snap networking system, and an application-layer version, SoftPSP, created so Google Cloud customers could use PSP on computers with traditional NICs.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/google-makes-data-centre-scale-encryption-open-source/
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/google-ranking-factors-e1654074528236.jpg
|
@ -1,85 +0,0 @@
|
||||
[#]: subject: "Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians"
|
||||
[#]: via: "https://news.itsfoss.com/spotify-basic-pitch/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians
|
||||
======
|
||||
Spotify’s new open-source tool helps you convert audio to MIDI version. Explore why it is a big deal for modern musicians.
|
||||
|
||||
![spotify][1]
|
||||
|
||||
Spotify is a leading music streaming platform with several open-source projects.
|
||||
|
||||
While most of the projects/tools are built for niche users, they have finally introduced something that seems enticing to all the modern musicians involved with digital music production.
|
||||
|
||||
‘Basic Pitch’ is a new free and open-source tool by Spotify that lets you convert any audio file to its MIDI (Musical Instrument Digital Interface) version.
|
||||
|
||||
In case you did not know, with MIDI notes, you can easily tweak what’s being played and analyze more to help you in digital music production.
|
||||
|
||||
### Basic Pitch: Making Things Easier
|
||||
|
||||
With Basic Pitch, one can easily have MIDI notes of an audio file they have always wanted, and with better accuracy.
|
||||
|
||||
![spotify basic pitch][2]
|
||||
|
||||
Spotify explains that it is better than existing note-detection systems by offering some advantages that include:
|
||||
|
||||
> **Polyphonic + instrument-agnostic:** Unlike most other note-detection algorithms, Basic Pitch can track multiple notes at a time and across various instruments, including piano, guitar, and ocarina. Many systems limit users to only monophonic output (one note at a time, like a single vocal melody), or are built for only one kind of instrument.
|
||||
|
||||
> **Pitch bend detection:** Instruments, like guitar or the human voice, allow for more expressiveness through pitch-bending: vibrato, glissando, bends, slides, etc. However, this valuable information is often lost when turning audio into MIDI. Basic Pitch supports this right out of the box.
|
||||
|
||||
> **Speed:** Basic Pitch is light on resources, and is able to run faster than real time on most modern computers ([Bittner et al. 2022][3]).
|
||||
|
||||
Basic Pitch uses a machine learning model that turns various instrumental performances into MIDI. The audio file may also contain your voice, but it should still be able to convert the instrument to its MIDI version.
|
||||
|
||||
![Basic Pitch demo: Convert audio into MIDI using ML][4]
|
||||
|
||||
I tried converting an MP3 karaoke file with a single instrument to get the MIDI notes, and it seemed to work pretty well.
|
||||
|
||||
The tool also lets you process more than one audio file at a time and offers a few parameter controls that include note segmentation, confidence threshold, minimum/maximum pitch, and note length.
|
||||
|
||||
### Made for Creators and Researchers
|
||||
|
||||
Spotify mentions that it targets the creators primarily, but they are also interested to learn how machine learning researchers build upon it and help develop better solutions using the [open-source project on GitHub][5].
|
||||
|
||||
As a creator/musician, you can access the open-source tool on its [official website][6] for a demo. The parameters can be adjusted using the website, and you can also download the MIDI file from there.
|
||||
|
||||
[Basic Pitch][7]
|
||||
|
||||
![spotify basic pitch][8]
|
||||
|
||||
It is also available via [PyPI][9] to install and use via the command-line interface on Linux, Windows, and macOS.
|
||||
|
||||
You can explore its [GitHub page][10] to know more about its usage/commands.
|
||||
|
||||
If you are curious, the [official announcement post][11] provides more technical comparisons and explanations regarding the development of the tool.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/spotify-basic-pitch/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/spotify-midi.jpg
|
||||
[2]: https://news.itsfoss.com/wp-content/uploads/2022/06/spotify-basic-pitch-1024x531.png
|
||||
[3]: https://ieeexplore.ieee.org/document/9746549
|
||||
[4]: https://youtu.be/DhlvfgS73ZQ?list=PLf1KFlSkDLIAYLdb-SD9s8TdGy0rWIwVr
|
||||
[5]: https://github.com/spotify/basic-pitch
|
||||
[6]: https://basicpitch.spotify.com/
|
||||
[7]: https://basicpitch.spotify.com/
|
||||
[8]: https://news.itsfoss.com/wp-content/uploads/2022/06/basic-pitch-parameters.jpg
|
||||
[9]: https://pypi.org/
|
||||
[10]: https://github.com/spotify/basic-pitch
|
||||
[11]: https://engineering.atspotify.com/2022/06/meet-basic-pitch/
|
@ -1,48 +0,0 @@
|
||||
[#]: subject: "Contribute at the Fedora Linux 37 Test Week for Kernel 5.18"
|
||||
[#]: via: "https://fedoramagazine.org/contribute-at-the-fedora-linux-37-test-week-for-kernel-5-18/"
|
||||
[#]: author: "Sumantro Mukherjee https://fedoramagazine.org/author/sumantrom/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Contribute at the Fedora Linux 37 Test Week for Kernel 5.18
|
||||
======
|
||||
![][1]
|
||||
|
||||
The kernel team is working on final integration for Linux kernel 5.18. This version was just recently released, and will arrive soon in Fedora. As a result, the Fedora kernel and QA teams have organized a test week now through **Sunday, June 12, 2022.** Refer to the [wiki][2][page][3] for links to the test images you’ll need to participate. Read below for details.
|
||||
|
||||
### How does a test week work?
|
||||
|
||||
A test week is an event where anyone can help make sure changes in Fedora work well in an upcoming release. Fedora community members often participate, and the public is welcome at these events. If you’ve never contributed before, this is a perfect way to get started.
|
||||
|
||||
To contribute, you only need to be able to do the following things:
|
||||
|
||||
* Download test materials, which include some large files
|
||||
* Read and follow directions step by step
|
||||
|
||||
The [wiki page][4] for the kernel test day has a lot of good information on what and how to test. After you’ve done some testing, you can log your results in the test day [web][5][application][6]. If you’re available on or around the day of the event, please do some testing and report your results. We have a document which provides [all the steps][7] written.
|
||||
|
||||
Happy testing, and we hope to see you on test day.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/contribute-at-the-fedora-linux-37-test-week-for-kernel-5-18/
|
||||
|
||||
作者:[Sumantro Mukherjee][a]
|
||||
选题:[lkxed][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/sumantrom/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2022/06/test-days-816x345.jpg
|
||||
[2]: http://fedoraproject.org/wiki/Test_Day:2022-06-05_Kernel_5.18_Test_Week
|
||||
[3]: http://fedoraproject.org/wiki/Test_Day:2022-06-05_Kernel_5.18_Test_Week
|
||||
[4]: http://fedoraproject.org/wiki/Test_Day:2022-06-05_Kernel_5.18_Test_Week
|
||||
[5]: https://testdays.fedoraproject.org/events/136
|
||||
[6]: https://testdays.fedoraproject.org/events/136
|
||||
[7]: https://docs.fedoraproject.org/en-US/quick-docs/kernel/howto-kernel-testday/
|
@ -1,69 +0,0 @@
|
||||
[#]: subject: "Cloud Storage Service Internxt Has a Photos Feature as a Google Photos Alternative"
|
||||
[#]: via: "https://news.itsfoss.com/internxt-photos/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Cloud Storage Service Internxt Has a Photos Feature as a Google Photos Alternative
|
||||
======
|
||||
Internxt is already an interesting cloud storage service. It also has a Photos feature that can be a replacement to Google Photos for some.
|
||||
|
||||
![internxt photos][1]
|
||||
|
||||
Internxt is an open-source encrypted cloud service with a native Linux client. Our [older article][2] explaining its cloud storage service can be an interesting read if you did not know about it.
|
||||
|
||||
Initially, we focused on their cloud storage offering. And, it seems like we missed out on another product “Photos” that was unveiled by them last month in a tweet.
|
||||
|
||||
[Internxt Photos][3] pitches itself as an open-source Google Photo alternative with privacy and security in mind.
|
||||
|
||||
*The post includes an affiliate link for Internxt. If you get a subscription through our link, we get a commission, and you get to support us at no extra cost to you.*
|
||||
|
||||
### Internxt Photos with Zero-Knowledge Encryption
|
||||
|
||||
![][4]
|
||||
|
||||
Internxt Photos claims that it puts privacy and security at its core compared to some competitors in the industry.
|
||||
|
||||
While respecting user privacy, they also try to offer the basic features that help you easily organize the photos you upload to the service.
|
||||
|
||||
Note that the Photos service is included with the cloud storage subscription. Unlike Google’s offering, there are no separate pricing plans for just storing the Photos.
|
||||
|
||||
Likewise, you need to rely on the same Internxt app to access your Photo gallery.
|
||||
|
||||
You should not have anything to worry about considering the Internxt app is available on the Google Play Store, and the App Store as well.
|
||||
|
||||
The photos you upload to the gallery get synced across multiple devices. So, even if you do not have access to one of your devices, it should not be a problem.
|
||||
|
||||
![][5]
|
||||
|
||||
The look of the photo gallery seems inspired by Apple’s Photos app, but that’s a good approach for simplicity and usability. The Photos also provide you the ability to share photos with your friends and family using a link. You can also customize the link to tweak the open limit to control access to your shared links.
|
||||
|
||||
Considering it as an open-source encrypted alternative with a primary cloud storage offering to mainstream Photo storage services, does this sound like something interesting to you?
|
||||
|
||||
You can get started using our link to the product page to explore more about it and get started. The [GitHub page][6] can also be useful if you’re curious.
|
||||
|
||||
[Internxt Photos][7]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/internxt-photos/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/internxt-photos.jpg
|
||||
[2]: https://itsfoss.com/internxt-cloud-service/
|
||||
[3]: https://itsfoss.com/go/internxt-photos/
|
||||
[4]: https://news.itsfoss.com/wp-content/uploads/2022/06/internxt-gallery.jpg
|
||||
[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/mobile-photos-share-mockup-506x1024.webp
|
||||
[6]: https://github.com/internxt
|
||||
[7]: https://itsfoss.com/go/internxt-photos/
|
@ -0,0 +1,91 @@
|
||||
[#]: subject: "Manjaro 21.3.0 ‘Ruah’ Release Adds Latest Calmares 3.2, GNOME 42, and More Upgrades"
|
||||
[#]: via: "https://news.itsfoss.com/manjaro-21-3-0-release/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Manjaro 21.3.0 ‘Ruah’ Release Adds Latest Calmares 3.2, GNOME 42, and More Upgrades
|
||||
======
|
||||
Manjaro Linux 21.3.0 release packs in some of the latest and greatest updates, including an improved installer.
|
||||
|
||||
![manjaro 21.3.0][1]
|
||||
|
||||
Manjaro Linux is a rolling-release distribution. So, technically, you will be on the latest version if you regularly update your system.
|
||||
|
||||
It should not be a big deal to upgrade to Manjaro 21.3.0, considering I am already running it without issues for a few days before the official announcement.
|
||||
|
||||
**Also,**you might want to read my initial experience [switching to Manjaro from Ubuntu][2] (if you’re still on the fence).
|
||||
|
||||
So, what does the Manjaro 21.3.0 upgrade introduce?
|
||||
|
||||
### Manjaro 21.3.0: What’s New?
|
||||
|
||||
![][3]
|
||||
|
||||
The desktop environments upgraded to their latest stable versions while the core [Linux Kernel 5.15 LTS][4] remains.
|
||||
|
||||
Also, this release includes the final Clamares v3.2 version. Let us take a look at the changes:
|
||||
|
||||
#### Calamares v3.2.59
|
||||
|
||||
Calamares v3.2.59 installer is the final release of the 3.2 series with meaningful improvements. This time the partition module includes support for LUKS partitions and more refinements to avoid settings that can mess up the Manjaro installation.
|
||||
|
||||
All the future releases for Calamares 3.2 will be bug fixes only.
|
||||
|
||||
#### GNOME 42 + Libadwaita
|
||||
|
||||
While the initial release included GNOME 42, now we have GNOME 42.2 available with the latest updates.
|
||||
|
||||
Overall, you get all the goodies introduced with [GNOME 42][5], including the system-wide dark mode, a modern user interface based on GTK 4 for GNOME apps, upgraded applications, and several other significant changes.
|
||||
|
||||
![][6]
|
||||
|
||||
#### KDE Plasma 5.24
|
||||
|
||||
Unfortunately, the release couldn’t feature [KDE Plasma 5.25][7], considering it was released around the same week.
|
||||
|
||||
[KDE Plasma 5.24][8] is a nice upgrade, with a refreshed theme and an overview effect.
|
||||
|
||||
#### XFCE 4.16
|
||||
|
||||
With Xfce 4.16, the window manager received numerous updates and refinements to support fractional scaling and more capabilities.
|
||||
|
||||
### Download Manjaro 21.3.0
|
||||
|
||||
As of now, I have no issues with Manjaro 21.3.0 GNOME edition. Everything looks good, and the upgrade went smoothly.
|
||||
|
||||
However, you should always take backups if you do not want to re-install or lose your important files.
|
||||
|
||||
You can download the latest version from [Manjaro’s download page][9]. The upgrade should be available through the pamac package manager.
|
||||
|
||||
In either case, you can enter the following command in the terminal to upgrade:
|
||||
|
||||
```
|
||||
sudo pacmane -Syu
|
||||
```
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/manjaro-21-3-0-release/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/manjaro-21-3-0-ruah-release.jpg
|
||||
[2]: https://news.itsfoss.com/manjaro-linux-experience/
|
||||
[3]: https://news.itsfoss.com/wp-content/uploads/2022/06/manjaro-gnome-42-2-1024x576.jpg
|
||||
[4]: https://news.itsfoss.com/linux-kernel-5-15-release/
|
||||
[5]: https://news.itsfoss.com/gnome-42-release/
|
||||
[6]: https://news.itsfoss.com/wp-content/uploads/2022/06/manjaro-21-3-neofetch.png
|
||||
[7]: https://news.itsfoss.com/kde-plasma-5-25-release/
|
||||
[8]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/
|
||||
[9]: https://manjaro.org/download/
|
@ -0,0 +1,39 @@
|
||||
[#]: subject: "Microsoft To Charge For Available Open Source Software In Microsoft Store"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/microsoft-to-charge-for-available-open-source-software-in-microsoft-store/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Microsoft To Charge For Available Open Source Software In Microsoft Store
|
||||
======
|
||||
![microsoft][1]
|
||||
|
||||
On June 16, 2022, Microsoft updated the Microsoft Store policies. One of the changes prohibits publishers from charging fees for open source or freely available software. Another example is the store’s use of irrationally high pricing. If you’ve been to the Microsoft Store in the last few years, you’ve probably noticed that it’s becoming more and more home to open source and free products. While this would be beneficial if the original developer had uploaded the apps and games to the store, it is not the case because the uploads were made by third parties.
|
||||
|
||||
Worse, many of these programs are only available as paid applications rather than free downloads. In other words, Microsoft customers must pay to purchase a Store version of an app that is free elsewhere. In the Store, free and paid versions coexist at times. Paying for a free app is bad enough, but this isn’t the only problem that users may encounter when they make the purchase. Updates may also be a concern, as copycat programs may not be updated as frequently or as quickly as the source applications.
|
||||
|
||||
In the updated Microsoft Store Policies, Microsoft notes under 10.8.7:
|
||||
|
||||
In cases where you determine the pricing for your product or in-app purchases, all pricing for your digital products or services, including sales or discounts, must:
|
||||
|
||||
Comply with all applicable laws, regulations, and regulatory guidelines, including the Federal Trade Commission’s Guides Against Deceptive Pricing. You must not attempt to profit from open-source or other software that is otherwise freely available, nor should your product be priced irrationally high in comparison to the features and functionality it provides.
|
||||
|
||||
The new policies are confirmed in the updated section. Open source and free products may no longer be sold on the Microsoft Store if they are generally available for free, and publishers may no longer charge irrationally high prices for their products. Developers of open source and free applications may charge for their products on the Microsoft Store; for example, the developer of Paint.net does so. Many applications will be removed from the Store if Microsoft enforces the policies. Developers could previously report applications to Microsoft, but the new policies give Microsoft direct control over application listings and submissions.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/microsoft-to-charge-for-available-open-source-software-in-microsoft-store/
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/microsoft-e1655714723942.jpg
|
@ -0,0 +1,75 @@
|
||||
[#]: subject: "Mysterious GeckoLinux Creator Reveals a New Debian Remix Distro"
|
||||
[#]: via: "https://news.itsfoss.com/debian-remix-spiral-linux/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Mysterious GeckoLinux Creator Reveals a New Debian Remix Distro
|
||||
======
|
||||
GeckoLinux creator unveils a new Linux distribution based on Debian, focusing on simplicity and usability.
|
||||
|
||||
![spiral linux][1]
|
||||
|
||||
The creator of GeckoLinux (providing an improved openSUSE experience) remains anonymous.
|
||||
|
||||
And, I won’t comment if it is a good or bad thing, but now the developer is back with another similar project based on Debian.
|
||||
|
||||
**SpiralLinux**, a Debian-based distribution that aims to make Debian usable for the end-users.
|
||||
|
||||
### SpiralLinux: A Distro Built from Debian
|
||||
|
||||
![spirallinux][2]
|
||||
|
||||
It is no surprise that most of the user-friendly Linux distributions have Debian as its original base. Ubuntu has managed to do a lot of improvements on top of it to make it a good desktop experience, even for users without prior Linux experience.
|
||||
|
||||
So, how is this different?
|
||||
|
||||
Well, the creator says that this project aims to help you use Debian with all its core strengths without customizing a lot of things.
|
||||
|
||||
SpiralLinux is a close-to-vanilla experience if you want to use Debian on your desktop. You can also upgrade to the latest stable Debian version (or unstable/testing) as you require without losing the user-friendly customizations.
|
||||
|
||||
In other words, SpiralLinux makes Debian fit for desktop usage with minimal efforts to the end-user.
|
||||
|
||||
And, to achieve this, SpiralLinux uses official Debian package repositories providing a live installation method to let you setup a customized Debian system.
|
||||
|
||||
Additionally, you have the following features in SpiralLinux:
|
||||
|
||||
* VirtualBox support out-of-the-box
|
||||
* Preinstalled proprietary media codecs and non-free package repositories
|
||||
* Preinstalled proprietary firmware
|
||||
* Printer support
|
||||
* Flatpak support through a GUI (software center)
|
||||
* zRAM swap enabled by default
|
||||
* Multiple desktop environments (Cinnamon, XFCE, Gnome, Plasma, MATE, Budgie, LXQt)
|
||||
|
||||
Considering Debian always sticks to the open-source and free packages, the end-user has to figure out the codecs, drivers, and other packages to make a lot of things work for a proper desktop experience.
|
||||
|
||||
And, it seems like SpiralLinux could live as a useful alternative to Debian just like GeckoLinux is to openSUSE.
|
||||
|
||||
### Download SpiralLinux
|
||||
|
||||
If you always wanted to try Debian, but did not want to fiddle around a lot for initial configuration, you can try SpiralLinux.
|
||||
|
||||
You can head to its official webpage hosted on GitHub to explore more about it.
|
||||
|
||||
[SpiralLinux][3]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/debian-remix-spiral-linux/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/spiral-linux-debian-remix-distro.jpg
|
||||
[2]: https://news.itsfoss.com/wp-content/uploads/2022/06/spirallinux.jpg
|
||||
[3]: https://spirallinux.github.io/
|
@ -0,0 +1,55 @@
|
||||
[#]: subject: "The Final Version Of 7-Zip 22.00 Is Now Available"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/the-final-version-of-7-zip-22-00-is-now-available/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
The Final Version Of 7-Zip 22.00 Is Now Available
|
||||
======
|
||||
![7-zip-2200-500x312][1]
|
||||
|
||||
7-Zip is a well-known open source file archiver for Windows, Mac, and Linux. 7-Zip 22.00 is now available; it is the first stable release of 2022. The most recent release was 7-Zip 21.07, which was released in December 2021. Users of 7-Zip can obtain the most recent version of the application from the official website. Downloads are available for Windows 64-bit, 32-bit, and ARM versions. The programme is still compatible with out-of-date versions of Windows, such as XP and Vista. All officially supported Windows versions, including server versions, are also supported. 7-Zip 22.00 for Linux is already available for download, but the Mac OS version is not.
|
||||
|
||||
7-Zip 22.00 includes several new features that enhance the application’s functionality. The archiver now supports the extraction of Apple File System APFS images. Several years ago, Apple introduced the Apple File System in Mac OS 10.13 and iOS. The file system has been designed with flash and solid state drive storage in mind.
|
||||
|
||||
7-Zip 22.00 includes several enhancements to its TAR archive support. Using the switches -ttar -mm=pax or -ttar -mm=posix, 7-Zip can now create TAR archives in POSIX tar format. Additionally, using the switches ttar -mm=pax -mtp=3 -mtc -mta, 7-Zip can store file timestamps with high precision in tar/pax archives.
|
||||
|
||||
* snoi: save owner/group ids in the archive or copy owner/group ids from the archive to the extracted files.
|
||||
* snon: keep owner/group names in the archive
|
||||
|
||||
7-Zip 22.00 for Windows adds support for the -snz switch, which propagates the Zone.
|
||||
|
||||
To extract files, use the identifier stream. Windows uses the stream for security purposes; it can be used to determine whether a file was created locally or downloaded from the Internet.
|
||||
|
||||
7-Zip 22.00 includes several new features that enhance the application’s functionality. The archiver now supports the extraction of Apple File System APFS images. Several years ago, Apple introduced the Apple File System in Mac OS 10.13 and iOS. The file system has been designed with flash and solid state drive storage in mind.
|
||||
|
||||
7-Zip 22.00 includes several enhancements to its TAR archive support. Using the switches -ttar -mm=pax or -ttar -mm=posix, 7-Zip can now create TAR archives in POSIX tar format. Additionally, using the switches ttar -mm=pax -mtp=3 -mtc -mta, 7-Zip can store file timestamps with high precision in tar/pax archives.
|
||||
|
||||
Finally, Linux users can use the following two new switches with TAR archives:
|
||||
|
||||
* snoi: save owner/group ids in the archive or copy owner/group ids from the archive to the extracted files.
|
||||
* snon: keep owner/group names in the archive
|
||||
|
||||
7-Zip 22.00 for Windows adds support for the -snz switch, which propagates the Zone.
|
||||
|
||||
To extract files, use the identifier stream. Windows uses the stream for security purposes; it can be used to determine whether a file was created locally or downloaded from the Internet.
|
||||
|
||||
In the “add to archive” configuration dialogue, 7-Zip 22.00 includes a new options window. It includes options for changing the timestamp precision, changing other time-related configuration options, and preventing the source files’ last access time from changing.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/the-final-version-of-7-zip-22-00-is-now-available/
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/7-zip-2200-500x312-1.jpg
|
@ -0,0 +1,69 @@
|
||||
[#]: subject: "This Open-Source Project Proves Chrome Extensions Can Track You"
|
||||
[#]: via: "https://news.itsfoss.com/chrome-extension-tracking/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
This Open-Source Project Proves Chrome Extensions Can Track You
|
||||
======
|
||||
Is this a reason to ditch Chromium-based browsers and start using Firefox? Maybe, you decide.
|
||||
|
||||
![chrome extension tracker][1]
|
||||
|
||||
Even with all the privacy extensions and fancy protection features, there are still ways to identify you or track you.
|
||||
|
||||
Note that it is not the case for all browsers, here, we focus on Chromium-based browsers and Google Chrome as the prime suspect.
|
||||
|
||||
While detecting installed extensions in a Chromium browser was already possible, numerous extensions implemented certain protections to prevent it.
|
||||
|
||||
However, a security researcher, also known as “**z0ccc**”, discovered a new method to detect installed Chrome browser extensions, which can be further used to track you through browser fingerprinting.
|
||||
|
||||
**In case you did not know**: Browser fingerprinting refers to the tracking method where various information about your device/browser gets collected to create a unique fingerprint ID (hash) to identify you across the internet. Information like browser name, version, operating system, extensions installed, screen resolution, and similar technical data.
|
||||
|
||||
It sounds like a harmless data collection technique, but you can be tracked online with this tracking method.
|
||||
|
||||
### Detecting Google Chrome Extensions
|
||||
|
||||
The researcher shared an open-source project “**Extension Fingerprints**” which you can use to test if Chrome extensions installed on your browser are being detected.
|
||||
|
||||
The new technique involves a time-difference method where the tool compares the time to fetch resources for the extensions. A protected extension takes more time to fetch compared to other extensions not installed on your browser. So, that helps identify some extensions from the list of over 1000 extensions.
|
||||
|
||||
The point is—even with all the advancements and techniques to prevent tracking, extensions from the Google Web Store can be detected.
|
||||
|
||||
![][2]
|
||||
|
||||
And, with the installed extensions detected, you can be tracked online using browser fingerprinting.
|
||||
|
||||
Surprisingly, even if you have extensions like **uBlocker, AdBlocker,**or**Privacy Badger** (some popular privacy-focused extensions), they all get detected using this method.
|
||||
|
||||
You can explore all the technical details on its [GitHub page][3]. And, if you want to test it yourself, head to its [Extension Fingerprints site][4] to check for yourself.
|
||||
|
||||
### Firefox To The Rescue?
|
||||
|
||||
It seems like it, considering [I keep coming back to Firefox][5] for various reasons.
|
||||
|
||||
The discovered method should work with all the Chromium-based browsers. I tested it with Brave and Google Chrome. The researcher also mentions that the tool does not work with Microsoft Edge using extensions from Microsoft’s store. But, it is possible with the same method of tracking.
|
||||
|
||||
Mozilla Firefox is safe from this because the extension IDs for every browser instance are unique, as the researcher suggested.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/chrome-extension-tracking/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/opensource-project-tracker-chrome-extensions.jpg
|
||||
[2]: https://news.itsfoss.com/wp-content/uploads/2022/06/extension-fingerprints.jpg
|
||||
[3]: https://github.com/z0ccc/extension-fingerprints
|
||||
[4]: https://z0ccc.github.io/extension-fingerprints/
|
||||
[5]: https://news.itsfoss.com/why-mozilla-firefox/
|
@ -0,0 +1,84 @@
|
||||
[#]: subject: "Rocket.Chat Aims to Replace Skype for Business by Collaborating with Pexip"
|
||||
[#]: via: "https://news.itsfoss.com/rocket-chat-pexip/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Rocket.Chat Aims to Replace Skype for Business by Collaborating with Pexip
|
||||
======
|
||||
Rocket.Chat is collaborating with a video communication platform, Pexip to offer an alternative to Skype for Business and Microsoft Teams.
|
||||
|
||||
![rocket chat pixep][1]
|
||||
|
||||
Rocket.Chat is making headlines this year, and for all the good reasons.
|
||||
|
||||
To start with, they collaborated with [Nextcloud to offer an open-source Microsoft 365 alternative][2], then [joined forces with Matrix][3], and now they have announced another partnership to tackle the likes of “Skype for Business” and Microsoft Teams.
|
||||
|
||||
So, what is it about? Let us get to know more here.
|
||||
|
||||
### Rocket.Chat + Pexip to Integrate Chat and Video Conferencing Platforms
|
||||
|
||||
Rocket.Chat is one of the [best open-source Slack alternatives][4] out there. It is probably going to be one of the [best Matrix clients][5] as well. It most likely does not need an introduction for users who prefer using open-source solutions.
|
||||
|
||||
[Pexip][6], on the other hand, is not an open-source platform that provides a video communication solution. You can self-host the service along with enterprise and cloud services.
|
||||
|
||||
Pexip is a good contender when it comes to video communication solutions for healthcare, government, or any security-conscious organizations. Companies like Accenture, and Intel, rely on some of their services.
|
||||
|
||||
Hence, Rocket.Chat and Pexip decided to integrate their strengths to offer a solid offering for organizations that require high-level security.
|
||||
|
||||
**Gabriel Engel**, CEO, and co-founder of Rocket.Chat, mentioned the following:
|
||||
|
||||
> “There’s an immediate need in the market for an on-premise digital collaboration solution thatenables fully compliant and secure chat and video communications. Rocket.Chat and Pexip havecome together with a complete solution and a strong commitment for the long-term success ofour customers,”
|
||||
|
||||
While they target every type of organizations with the partnership, but the public sector and government organizations are one of the top priorities.
|
||||
|
||||
**John Thorneycroft**, Senior VicePresident, Business Management at Pexip said:
|
||||
|
||||
> Our public sector and government customers are especially mindful of data privacy andsecurity when selecting a communications solution. The combination of Pexip’s on-premisevideo communication platform and Rocket.Chat’s secure chat functionality provides thesecustomers with the control and compliance they require.
|
||||
|
||||
### Replacing Skype for Business and Teams
|
||||
|
||||
Microsoft retired Skype for Business on July 31, 2021. And, its online infrastructure will be decommissioned after June 30, 2022.
|
||||
|
||||
And, Rocket.Chat’s partnership with Pexip focuses on being a replacement for those organizations that are looking to switch to a better solution considering privacy and security.
|
||||
|
||||
Not just Skype for Business, but it can also be a potential substitute for organizations using Microsoft Teams. Mostly because of the security features of Rocket.Chat and Pexip including:
|
||||
|
||||
* End-to-End encryption chat.
|
||||
* Secure file sharing.
|
||||
* Transcoding, secure/flexible access on any device.
|
||||
* Role-based permissions.
|
||||
* Data loss prevention.
|
||||
* Audit trails.
|
||||
* Active Directory/single sing-on.
|
||||
* On-premise deployment.
|
||||
* Compliance with privacy regulations.
|
||||
|
||||
Not to forget, Rocket.Chat also enables cross-platform communication using its bridges and helps you interact with users from Microsoft Teams, Slack, and Matrix clients.
|
||||
|
||||
Are you an organization that is looking to use a secure collaboration platform? I think Rocket.Chat and Pexip’s integration solution should be a great alternative, considering the competition does not offer the same features.
|
||||
|
||||
Share your thoughts in the comments down below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/rocket-chat-pexip/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/rocketchat-pixep-collabortation.jpg
|
||||
[2]: https://news.itsfoss.com/rocket-chat-nextcloud-collaboration/
|
||||
[3]: https://news.itsfoss.com/rocket-chat-matrix/
|
||||
[4]: https://itsfoss.com/open-source-slack-alternative/
|
||||
[5]: https://itsfoss.com/best-matrix-clients/
|
||||
[6]: https://www.pexip.com/
|
@ -1,56 +0,0 @@
|
||||
[#]: subject: "6 easy ways to make your first open source contribution with LibreOffice"
|
||||
[#]: via: "https://opensource.com/article/22/5/first-open-source-contribution-libreoffice"
|
||||
[#]: author: "Klaatu https://opensource.com/users/klaatu"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
6 easy ways to make your first open source contribution with LibreOffice
|
||||
======
|
||||
May 2022 is LibreOffice month. Here are some easy ways to make your first open source contribution.
|
||||
|
||||
![Dandelion zoomed in][1]
|
||||
(Photo by Rob Tiller, CC BY-SA 4.0)
|
||||
|
||||
"Getting involved" with open source can seem a little confusing. Where do you go to get started? What if you don't know how to code? Who do you talk to? How does anybody know that you have contributed, and besides that does anybody care?
|
||||
|
||||
There are actually answers to questions like those (your choice, it's OK, nobody, you tell them, yes) but during the month of May 2022, there's one simple answer: LibreOffice. This month is a month of participation at LibreOffice and its governing body, The Document Foundation. They're inviting contributors of all sorts to help in any of six different ways, and only one of those has anything at all to do with code. No matter what your skill, you can probably find a way to help the world's greatest office suite.
|
||||
|
||||
### 6 ways to contribute to LibreOffice
|
||||
|
||||
Here's what you can do:
|
||||
|
||||
* Handy Helper: Go answer questions from other LibreOffice users on Ask LibreOffice. If you're an avid user of LibreOffice and think you have useful tips and tricks that will help others, this is the role you've been waiting for.
|
||||
* First Responder: Bug reports are better when they're confirmed by more than just one user. If you're good at installing software (sometimes bug reports are for older versions than what you might be using normally) then go to the LibreOffice Bugzilla and find new bugs that have yet to be confirmed. When you find one, try to replicate what's been reported. Assuming you can do that, add a comment like “CONFIRMED on Linux (Fedora 35) and LibreOffice 7.3.2”.
|
||||
* Drum Beater: Open source projects rarely have big companies funneling marketing money into promoting them. It would be nice if all the companies claiming to love open source would help out, but not all of them do, so why not lend your voice? Get on social media and tell your friends why you love LibreOffice, or what you’re using it for (and of course add the #libreoffice hashtag.)
|
||||
* Globetrotter: LibreOffice is already available in many different languages, but not literally all languages. And LibreOffice is actively being developed, so its interface translations need to be kept up-to-date. Get involved here.
|
||||
* Docs Doctor: LibreOffice has online help as well as user handbooks. If you're great at explaining things to other people, or if you're great at proof-reading other people's documentation, then you should contact the docs team.
|
||||
* Code Cruncher: You're probably not going to dive into LibreOffice's code base and make major changes right away, but that's not generally what projects need. If you know how to code, then you can join the developer community by following the instructions on this wiki page.
|
||||
|
||||
```
|
||||
#libreoffice
|
||||
```
|
||||
|
||||
### Free stickers
|
||||
|
||||
I didn't want to mention this up-front because obviously you should get involved with LibreOffice just because you're excited to get involved with a great open source project. However, you're going to find out eventually so I may as well tell you: By contributing to LibreOffice, you can sign up to get free stickers from The Document Foundation. Surely you've been meaning to [decorate your laptop][2]?
|
||||
|
||||
Don't get distracted by the promise of loot, though. If you're confused but excited to get involved with open source, this is a great opportunity to do so. And it is representative of how you get involved with open source in general: You look for something that needs to be done, you do it, and then you talk about it with others so you can get ideas for what you can do next. Do that often enough, and you find your way into a community. Eventually, you stop wondering how to get involved with open source, because you're too busy contributing!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/5/first-open-source-contribution-libreoffice
|
||||
|
||||
作者:[Klaatu][a]
|
||||
选题:[lkxed][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/klaatu
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/dandelion_zoom.jpg
|
||||
[2]: https://opensource.com/business/15/11/open-source-stickers
|
@ -1,142 +0,0 @@
|
||||
[#]: subject: "7 pieces of Linux advice for beginners"
|
||||
[#]: via: "https://opensource.com/article/22/5/linux-advice-beginners"
|
||||
[#]: author: "Opensource.com https://opensource.com/users/admin"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
7 pieces of Linux advice for beginners
|
||||
======
|
||||
We asked our community of writers for the best advice they got when they first started using Linux.
|
||||
|
||||
![Why the operating system matters even more in 2017][1]
|
||||
|
||||
Image by: Internet Archive Book Images. Modified by Opensource.com. CC BY-SA 4.0
|
||||
|
||||
What advice would you give a new Linux user? We asked our community of writers to share their favorite Linux advice.
|
||||
|
||||
### 1. Use Linux resources
|
||||
|
||||
My brother told me that Linux was like a "software erector set" (that's a dated reference to the old Erector sets that could be purchased in the 1950s and 1960s) which was a helpful metaphor. I was using Windows 3.1 and Windows NT at the time and was trying to build a useful and safe K-12 school district website. This was in 2001 and 2002 and there were very few texts or resources on the web that were helpful. One of the resources recommended was the "Root Users Guide," a very large book that had lots of printed information in it but was tough to decipher and know just how to proceed.
|
||||
|
||||
One of the most useful resources for me was an online course that Mandrake Linux maintained. It was a step-by-step explanation of the nuances of using and administering a Linux computer or server. I used that along with a listserv that Red Hat maintained in those days, where you could pose questions and get answers.
|
||||
|
||||
—— [Don Watkins][2]
|
||||
|
||||
### 2. Ask the Linux community for help
|
||||
|
||||
My advice is to ask questions, in all of their settings. You can start out with an Internet search, looking for others who have had the same or similar questions (maybe even better questions.) It takes a while to know what to ask and how to ask it.
|
||||
|
||||
Once you become more familiar with Linux, check through the various forums out there, to find one or more that you like, and again, before you ask something yourself, look to see if someone else has already had the question and had it answered.
|
||||
|
||||
Getting involved in a mail list is also helpful, and eventually, you may find yourself knowledgeable enough to answer some questions yourself. As they say, you learn the most about something by becoming able to answer someone else's questions about it.
|
||||
|
||||
Meanwhile, you also become more familiar with using a system that's not a black box that you never understand how something is done except by paying for it.
|
||||
|
||||
—— [Greg Pittman][3]
|
||||
|
||||
My advice is to get familiar with help utilities such as man and info. Also, spend as much time as possible at the command line interface and really get used to the fundamental UNIX design. As a matter of fact, one of my favorite books is a UNIX book from the 80s because it really helps in understanding files, directories, devices, basic commands, and more.
|
||||
|
||||
—— [Alan Formy-Duval][4]
|
||||
|
||||
The best advice I got was to trust the community with answers and manual pages for detailed information and "how-to" use different options. However, I started off around 2009-ish, there were a lot of tools and resources available, including a project called [Linux from Scratch (LFS)][5]. This project really taught me a lot about the internals and how to actually build an LFS image.
|
||||
|
||||
—— [Sumantro Mukherjee][6]
|
||||
|
||||
My advice is to read. Using places like [Ask Fedora][7] or the Fedora Matrix chat or other forum type areas. Just read what others are saying, and trying to fix. I learned a lot from just reading what others were struggling with, and then I would try to figure out how the issue was caused.
|
||||
|
||||
—— [Steve Morris][8]
|
||||
|
||||
### 3. Try dual booting
|
||||
|
||||
I started with a dual-boot system in the late 90s (Windows and Linux), and while I wanted to really use Linux, I ended up booting Windows to work in my familiar desktop environment. One of the best pieces of advice was to change the boot order, so every time I wasn't quick enough, I ended up using Linux. ;)
|
||||
|
||||
—— [Heike Jurzik][9]
|
||||
|
||||
I was challenged by one of my team to do a knowledge swap.
|
||||
|
||||
He (our Linux sysadmin) built his website in **Joomla!** (which our web team specialized in, and he wanted to know more about) and I adopted Linux (having been Windows only to that point.) We dual booted to start with, as I still had a bunch of OS-dependent software I needed to use for the business, but it jump-started my adoption of Linux.
|
||||
|
||||
It was really helpful to have each other as an expert to call on while we were each learning our way into the new systems, and quite a challenge to keep going and not give up because he hadn't!
|
||||
|
||||
I did have a big sticky note on my monitor saying "anything with `rm` in the command, ask first" after a rather embarrassing blunder early on. He wrote a command-line cheat sheet (there are dozens [online now][10]) for me, which really helped me get familiar with the basics. I also started with the [KDE version][11] of Ubuntu, which I found really helpful as a novice used to working with a GUI.
|
||||
|
||||
I've used Linux ever since (aside from my work computer) and he's still on Joomla, so it seemed to work for both of us!
|
||||
|
||||
—— [Ruth Cheesley][12]
|
||||
|
||||
### 4. Back it up for safety
|
||||
|
||||
My advice is to use a distro with an easy and powerful backup app. A new Linux user will touch, edit, destroy and restore configurations. They probably will reach a time when their OS will not boot and losing data is frustrating.
|
||||
|
||||
With a backup app, they're always sure that their data is safe.
|
||||
|
||||
We all love Linux because it allows us to edit everything, but the dark side of this is that making fatal errors is always an option.
|
||||
|
||||
—— [Giuseppe Cassibba][13]
|
||||
|
||||
### 5. Share the Linux you know and use
|
||||
|
||||
My advice is to share the Linux you use. I used to believe the hype that there were distributions that were "better" for new users, so when someone asked me to help them with Linux, I'd show them the distro "for new users." Invariably, this resulted in me sitting in front of their computer looking like I had never seen Linux before myself, because something would be just unfamiliar enough to confuse me. Now when someone asks about Linux, I show them how to use what I use. It may not be branded as the "best" Linux for beginners, but it's the distro I know best, so when their problems become mine, I'm able to help solve them (and sometimes I learn something new, myself.)
|
||||
|
||||
—— [Seth Kenlon][14]
|
||||
|
||||
There was a saying back in the old days, "Do not just use a random Linux distro from a magazine cover. Use the distro your friend is using, so you can ask for help when you need it." Just replace "from a magazine cover" with "off the Internet" and it's still valid :-) I never followed this advice, as I was the only Linux user in a 50km radius. Everyone else was using FreeBSD, IRIX, Solaris, and Windows 3.11 around me. Later I was the one people were asking for Linux help.
|
||||
|
||||
—— [Peter Czanik][15]
|
||||
|
||||
### 6. Keep learning Linux
|
||||
|
||||
I was a reseller partner prior to working at Red Hat, and I had a few home health agencies with traveling nurses. They used a quirky package named Carefacts, originally built for DOS, that always got itself out of sync between the traveling laptops and the central database.
|
||||
|
||||
The best early advice I heard was to take a hard look at the open source movement. Open source is mainstream in 2022, but it was revolutionary a generation ago when nonconformists bought Red Hat Linux CDs from retailers. Open source turned conventional wisdom on its ear. I learned it was not communism and not cancer, but it scared powerful people.
|
||||
|
||||
My company built its first customer firewall in the mid-1990s, based on Windows NT and a product from Altavista. That thing regularly crashed and often corrupted itself. We built a Linux-based firewall for ourselves and it never gave us a problem. And so, we replaced that customer Altavista system with a Linux-based system, and it ran trouble-free for years. I built another customer firewall in late 1999. It took me three weeks to go through a book on packet filtering and get the `ipchains` commands right. But it was beautiful when I finally finished, and it did everything it was supposed to do. Over the next 15+ years, I built and installed hundreds more, now with `iptables` ; some with bridges or proxy ARP and QOS to support video conferencing, some with [IPSEC][16] and [OpenVPN tunnels][17]. I got pretty good at it and earned a living managing individual firewalls and a few active/standby pairs, all with Windows systems behind them. I even built a few virtual firewalls.
|
||||
|
||||
But progress never stops. By 2022, [iptables is obsolete][18] and my firewall days are a fond memory.
|
||||
|
||||
The ongoing lesson? Never stop exploring.
|
||||
|
||||
—— [Greg Scott][19]
|
||||
|
||||
### 7. Enjoy the process
|
||||
|
||||
Be patient. Linux is a different system than what you are used to, be prepared for a new world of endless possibilities. Enjoy it.
|
||||
|
||||
—— [Alex Callejas][20]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/5/linux-advice-beginners
|
||||
|
||||
作者:[Opensource.com][a]
|
||||
选题:[lkxed][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/admin
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/yearbook-haff-rx-linux-file-lead_0.png
|
||||
[2]: https://opensource.com/users/don-watkins
|
||||
[3]: https://opensource.com/users/greg-p
|
||||
[4]: https://opensource.com/users/alanfdoss
|
||||
[5]: https://linuxfromscratch.org/
|
||||
[6]: https://opensource.com/users/sumantro
|
||||
[7]: https://ask.fedoraproject.org
|
||||
[8]: https://opensource.com/users/smorris12
|
||||
[9]: https://opensource.com/users/hej
|
||||
[10]: https://opensource.com/downloads/linux-common-commands-cheat-sheet
|
||||
[11]: https://opensource.com/article/22/2/why-i-love-linux-kde
|
||||
[12]: https://opensource.com/users/rcheesley
|
||||
[13]: https://opensource.com/users/peppe8o
|
||||
[14]: https://opensource.com/users/seth
|
||||
[15]: https://opensource.com/users/czanik
|
||||
[16]: https://www.redhat.com/sysadmin/run-your-own-vpn-libreswan
|
||||
[17]: https://opensource.com/article/21/8/openvpn-server-linux
|
||||
[18]: https://opensource.com/article/19/7/make-linux-stronger-firewalls
|
||||
[19]: https://opensource.com/users/greg-scott
|
||||
[20]: https://opensource.com/users/darkaxl
|
@ -1,128 +0,0 @@
|
||||
[#]: subject: "Why Do Enterprises Use and Contribute to Open Source Software"
|
||||
[#]: via: "https://www.linux.com/news/why-do-enterprises-use-and-contribute-to-open-source-software/"
|
||||
[#]: author: "Dan Whiting https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Why Do Enterprises Use and Contribute to Open Source Software
|
||||
======
|
||||
When people find out I work at the Linux Foundation they invariably ask what we do? Sometimes it is couched around the question, As in the Linux operating system? I explain open source software and try to capture the worldwide impact into 20 seconds before I lose their attention. If they happen to stick around for more, we often dig into the question, Why would enterprises want to participate in open source software projects or use open source software? The reality is – they do, whether they know it or not. And the reality is thousands of companies donate their code to open source projects and invest time and resources helping to further develop and improve open source software.
|
||||
|
||||
### How extensively used is open source software
|
||||
|
||||
To quote from our recently released report, A Guide to Enterprise Open Source, “Open source software (OSS) has transformed our world and become the backbone of our digital economy and the foundation of our digital world. From the Internet and the mobile apps we use daily to the operating systems and programming languages we use to build the future, OSS has played a vital role. It is the lifeblood of the technology industry. Today, OSS powers the digital economy and enables scientific and technological breakthroughs that improve our lives. It’s in our phones, our cars, our airplanes, our homes, our businesses, and our governments. But just over two decades ago, few people had ever heard of OSS, and its use was limited to a small group of dedicated enthusiasts.”
|
||||
|
||||
Open source software (OSS) has transformed our world and become the backbone of our digital economy and the foundation of our digital world.
|
||||
|
||||
But what does this look like practically:
|
||||
|
||||
* In vertical software stacks across industries, open source penetration ranges from 20 to 85 percent of the overall software used.
|
||||
* Linux fuels 90%+ of web servers and Internet-connected devices.
|
||||
* The Android mobile operating system is built on the Linux kernel.
|
||||
* Immensely [popular libraries and tools][1] to build web applications, such as: AMP, Appium, Dojo, jQuery, Marko, Node.js and so many more are open source.
|
||||
* The world’s top 100 supercomputers run Linux.
|
||||
* 100% of mainframe customers use Linux.
|
||||
* The major cloud-service providers – AWS, Google, and Microsoft – all utilize open-source software to run their services and host open-source solutions delivered through the cloud.
|
||||
|
||||
### Why do companies want to participate in open source software projects
|
||||
|
||||
Companies primarily participate in open source software projects in three ways:
|
||||
|
||||
* They donate software they created to the open source community.
|
||||
* They provide direct funding and/or allocate software developers and other staff to contribute to open source software projects
|
||||
|
||||
The question often asked is, why wouldn’t they want to keep all of their software proprietary or only task their employees to work on their proprietary software?
|
||||
|
||||
The 30,000-foot answer is that it is about organizations coming together to collectively solve common problems so they can separately innovate and differentiate on top of the common baseline. They see that they are better off pooling resources to make the baseline better. Sometimes it is called “coopetition.” It generally means that while companies may be in competition with each other in certain areas, they can still cooperate on others.
|
||||
|
||||
It is about organizations coming together to collectively solve common problems so they can separately innovate and differentiate
|
||||
|
||||
Some old-school examples of this principle:
|
||||
|
||||
* Railroads agreed on a common track size and build so they can all utilize the same lines and equipment was interchangeable.
|
||||
* Before digital cameras, companies innovated and differentiated on film and cameras, but they all agreed on the spacing for the sprockets to advance the film.
|
||||
* The entertainment industry united around the VHS and Blu-Ray formats over their rivals.
|
||||
|
||||
Now, we see companies, organizations, and individuals coming together to solve problems while simultaneously improving their businesses and products:
|
||||
|
||||
[Let’s Encrypt][2] is a free, automated, and open certificate authority with the goal of dramatically increasing the use of secure web protocols by making it much easier and less expensive to setup. They are serving 225+ million websites, issuing ~1.5 million certificates each day on average.
|
||||
|
||||
The [Academy Software Foundation][3] [creates value in the film industry][4] through collectively engineering software that powers much of the entertainment, gaming, and media industry productions and open standards needed for growth.
|
||||
|
||||
The Hyperledger Foundation hosts enterprise-grade blockchain software projects, notably [using significantly fewer energy resources][5] than other popular solutions.
|
||||
|
||||
[LF Energy][6] is [making the electric grid more modular, interoperable, and scalable][7] to help increase the use of renewable energy sources.
|
||||
|
||||
[Dronecode][8] is enabling the development of drone software so companies can use their resources to innovate further.
|
||||
|
||||
[OpenSSF][9] is the top technology companies coming together to strengthen the security and resiliency of open source software.
|
||||
|
||||
[Kubernetes][10] was donated by Google and is the go-to solution for managing cloud-based software.
|
||||
|
||||
These are just a small sampling of the open source software projects that enterprises are participating in. You can explore all of the ones hosted at the Linux Foundation [here][11].
|
||||
|
||||
### How can companies effectively use and participate in open source software projects?
|
||||
|
||||
Enterprises looking to better utilize and participate in open source projects can look to the Linux Foundation’s resources to help. Much of what organizations need to know is provided in the just-published report,[A Guide to Enterprise Open Source][12]. The report is packed with information and insights from open source leaders at top companies with decades of combined experience. It includes chapters on these topics:
|
||||
|
||||
* Leveraging Open Source Software
|
||||
* Preparing the Enterprise for Open Source
|
||||
* Developing an Open Source Strategy
|
||||
* Setting Up Your Infrastructure for Implementation
|
||||
* Setting Up Your Talent for Success
|
||||
* Challenges
|
||||
|
||||
Additionally, the Linux Foundation offers many open source [training courses][13], [events][14] throughout the year, the [LFX Platform][15], and hosts projects that help organizations manage open source utilization and participation, such as:
|
||||
|
||||
The [TODO Group][16] provides resources to setup and run an open source program office, including their [extensive guides][17].
|
||||
|
||||
The [Openchain Project][18] maintains an international standard for sharing what software package licenses are included in a larger package, including information on the various licensing requirements so enterprises can ensure they are complying with all of the legal requirements.
|
||||
|
||||
The [FinOps Foundation][19] is fostering an, “evolving cloud financial management discipline and cultural practice that enables organizations to get maximum business value by helping engineering, finance, technology, and business teams to collaborate on data-driven spending decisions.”.
|
||||
|
||||
The [Software Data Package Exchange (SPDX)][20] is an open standard for communication software bill of materials (SBOMs) so it is clear to every user which pieces of software are included in the overall package.
|
||||
|
||||
Again, this is just a snippet of the projects at the Linux Foundation that are working to help organizations adapt, utilize, contribute, and donate open source projects.
|
||||
|
||||
The bottom line: Enterprises are increasingly turning to open source software projects to solve common problems and innovate beyond the baseline, and the Linux Foundation is here to help.
|
||||
|
||||
The post [Why Do Enterprises Use and Contribute to Open Source Software][21] appeared first on [Linux Foundation][22].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linux.com/news/why-do-enterprises-use-and-contribute-to-open-source-software/
|
||||
|
||||
作者:[Dan Whiting][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://openjsf.org/projects/
|
||||
[2]: https://letsencrypt.org/
|
||||
[3]: https://www.aswf.io/
|
||||
[4]: https://linuxfoundation.org/tools/open-source-in-entertainment/
|
||||
[5]: https://linuxfoundation.org/tools/carbon-footprint-of-nfts/
|
||||
[6]: https://www.lfenergy.org/
|
||||
[7]: https://linuxfoundation.org/tools/paving-the-way-to-battle-climate-change-how-two-utilities-embraced-open-source-to-speed-modernization-of-the-electric-grid/
|
||||
[8]: https://www.dronecode.org/projects/
|
||||
[9]: https://openssf.org/
|
||||
[10]: https://kubernetes.io/
|
||||
[11]: https://linuxfoundation.org/projects/
|
||||
[12]: https://linuxfoundation.org/tools/guide-to-enterprise-open-source/
|
||||
[13]: https://training.linuxfoundation.org/
|
||||
[14]: https://events.linuxfoundation.org/
|
||||
[15]: https://lfx.linuxfoundation.org/
|
||||
[16]: https://todogroup.org/
|
||||
[17]: https://linuxfoundation.org/resources/open-source-guides/
|
||||
[18]: https://www.openchainproject.org/resources
|
||||
[19]: https://www.finops.org/introduction/what-is-finops/
|
||||
[20]: https://spdx.dev/
|
||||
[21]: https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/
|
||||
[22]: https://www.linuxfoundation.org/
|
120
sources/talk/20220609 SSL Certificates- Make the Right Choice.md
Normal file
120
sources/talk/20220609 SSL Certificates- Make the Right Choice.md
Normal file
@ -0,0 +1,120 @@
|
||||
[#]: subject: "SSL Certificates: Make the Right Choice"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/ssl-certificates-make-the-right-choice/"
|
||||
[#]: author: "Jitendra Bhojwani https://www.opensourceforu.com/author/jitendra-bhojwani/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
SSL Certificates: Make the Right Choice
|
||||
======
|
||||
Increasingly sophisticated techniques are being used to hack into data today. So it has become extremely important to use even better ways to protect your customers’ data. SSL certification is one such way. This article looks at the different types of SSL certificates and how to choose one that suits your organisation.
|
||||
|
||||
![SSL-certificate][1]
|
||||
|
||||
*Increasingly sophisticated techniques are being used to hack into data today. So it has become extremely important to use even better ways to protect your customers’ data. SSL certification is one such way. This article looks at the different types of SSL certificates and how to choose one that suits your organisation.*
|
||||
|
||||
SSL certificates are an apt solution for securing data in transit. They create an automated mechanism to encrypt the transfer of data between the server and browser (or site and visitor). This encryption can only be decrypted by the intended system. So it discourages hackers from stealing data, and offers complete security against transit attacks on it.
|
||||
|
||||
Along with securing communication, SSL certificates also build trust with customers and help you emerge as a credible business by displaying virtual trust icons like a padlock, HTTPS prefix, and a green address bar. So let’s learn about the major types of SSL certificates and how to choose the one that works best for you.
|
||||
|
||||
### SSL certificate options: Similarities and differences
|
||||
|
||||
Let’s first discuss the basic similarity all SSL certificates share. Regardless of their type, price and scope, every SSL certificate encrypts the to-and-fro communication between the site’s server and the Internet browser of your visitor.
|
||||
|
||||
The difference lies in the terms and conditions of the validation process and the number of domains/subdomains it covers, etc. Proceeding to purchase an SSL certificate without first reviewing your present and future needs may result in costly mistakes, and you may end up paying a hefty amount for advanced features that are irrelevant to your business. Or you may get tempted to buy a cheap certificate that isn’t a perfect fit for your business needs.
|
||||
Due to the crucial role it plays, an SSL certificate is issued by an official certificate authority after a thorough verification procedure to confirm the legitimacy of ownership. So, this certificate not only encrypts the communication between websites and audiences, but also ensures the legal position of a site. It plays a vital role in building trust.
|
||||
|
||||
As you have now understood why we need a SSL certificate, we can discuss the different types of popular SSL certificates, along with their benefits and issuance procedures.
|
||||
|
||||
### Domain validation (DV) SSL certificate
|
||||
|
||||
The most basic of the three types of SSL certificates, the DV or domain validation certificate confirms the ownership of a domain through an automated online process. All you have to do is to complete a few basic steps to prove that you are the legitimate owner of the domain to get this certificate. Though easiest to get, this type of certificate helps in building only a basic level of trust.
|
||||
|
||||
After completing the DV certification procedure, you are allocated trust-building visual elements — a static seal, a padlock icon, and an HTTPS prefix in your URL.
|
||||
|
||||
Cheapest prices and quick, automated processes are the two major benefits of a DV certificate. On the flip side, you get only the basic trust signs that aren’t enough to satisfy the security concerns of more demanding customers or visitors.
|
||||
|
||||
*Important to know:* DV misses the most important trust sign — vetting the real, legal business that owns the domain name. For instance, suppose Mr X buys a domain ‘abc.com’ to lure gullible people into investing money in a business that seems genuine. Being a legitimate domain owner, he can get a DV through an automated process. With HTTPS URLs and other trust signs, it is easy to gain people’s trust too. However, the company (or fraud mechanism) behind this domain isn’t vetted/verified, which makes it easier for Mr X to continue duping investors of their hard-earned money.
|
||||
|
||||
Is DV SSL the right choice for you?: DV is best for a small and general website, which doesn’t demand or require any sensitive information that can be misused like credit card numbers, social security information, or details of a financial portfolio. For websites that post children’s stories, general e-magazines, personal blogs, professional portfolios, and other static websites on general topics, a DV certificate is a perfect and cheap solution. Securing more mission-critical sites that collect sensitive data like credit card numbers and social security details is a different story though.
|
||||
|
||||
### Organisation validation (OV) SSL certificate
|
||||
|
||||
As the name suggests, the OV certificate not only validates the domain ownership but also vets the real identity of the organisation to which the domain officially belongs. It builds an extra layer of trust for visitors who have stronger concerns, by displaying the key information about the business. Interested visitors just need to check the details of the certificate to ascertain the credibility of the company.
|
||||
|
||||
As compared to a DV certificate, an OV certification requires a more detailed process carried out by an authorised certificate authority that demands and vets key documents representing the legal status of the company. Hence, along with domain ownership, this certificate also assures that it is owned by a legitimate organisation.
|
||||
|
||||
Though the issuance process is more expensive and demanding, this type of certificate does empower you to position your company as a legal, real company doing legitimate business. It makes you stand out and even more concerned visitors are able to trust your organisation.
|
||||
|
||||
Is OV the right choice for you?: Sites that ask for sensitive data that can be misused by threat actors should obtain this certificate. E-commerce sites with online payment gateways, digital health practitioners, government websites that demand citizens’ information, defence-related websites, online trading platforms, or professional networking sites are all the right candidates for obtaining an OV certificate.
|
||||
|
||||
### Extended validation (EV) SSL certificate
|
||||
|
||||
In the digital domain, visuals matter a lot. A company seal, security icons, or even assuring colours (like green) can go a long way in leaving a lasting impression, winning you a big deal or helping you forge business relations with dynamic brands.
|
||||
|
||||
The vetting procedure for issuing an EV SSL certificate is quite stringent and involves a manual process as well. It starts by verifying the ownership of the domain. After that, the certification authority asks for your identification number. Next, it gets your legal working contact number from relevant authentic sources. That contact number is manually verified by calling your office and talking with the real person. Only after satisfying all such verification parameters can you get the EV certificate.
|
||||
|
||||
Unlike an OV certificate, you don’t just get a static site seal with a basic look, but get dynamic seals as well. Additionally, the full legal company name is displayed in the address bar along with a green-coloured padlock. Added to this, the entire address bar turns green as soon as your site loads. All these visible signs vouch for the legality of your firm, build a ‘visual comfort zone’ and reaffirm the credibility of your organisation.
|
||||
|
||||
Such certificates satisfy the sophisticated digital security vetting parameters of global brands and corporate conglomerates. If highly expensive items like gold and diamond jewellery are being sold on a website, then such superior trust factors satisfy the higher trust demands of buyers. Though this certificate is the most expensive among all the SSL certificates, it is worth investing in the extra dollars as it has the potential to significantly boost your sales revenue.
|
||||
|
||||
### Scope of different SSL certificates
|
||||
|
||||
Apart from the type of certificate, the other crucial question is: how many digital properties you want your certificate to cover? If you own a single domain property and do not want to expand in the foreseeable future, then a single DV would do for you. But what if you own, say, 20 different domains — most of which deal with e-commerce or collect sensitive client information? It wouldn’t be practical to buy the more expensive EV certificate for each of these domains. Here is some guidance on that.
|
||||
|
||||
### Wildcard SSL certificate
|
||||
|
||||
With a single wildcard SSL certificate you can protect the main domain and practically unlimited sub-domains related to it. For instance, yoursite.com (the main domain) may have three subdomains:
|
||||
|
||||
* mail.yoursite.com
|
||||
* login.yoursite.com
|
||||
* ftp.yoursite.com
|
||||
|
||||
This certificate relieves you from the stress and expenses of purchasing a separate certificate for every domain after going through the complete validation process, followed by an installation process for each. It also saves you a lot of time on repetitive processes and almost eliminates potential errors.
|
||||
|
||||
| - |
|
||||
| :- |
|
||||
| Note: Both DV and OV offer wildcard certificate options. |
|
||||
|
||||
### Multi-domain (or SAN SSL) certificate
|
||||
|
||||
One level above the wildcard SSL certificate is the multi-domain certificate, which helps to secure primary domains and their related subdomains. It does everything that a wildcard certificate can do, and more. If you own multiple domains and want a uniform and standard SSL security for all, then a multi-domain certificate is the right choice for you.
|
||||
|
||||
### Is SSL certification only about visual trust signs?
|
||||
|
||||
Obviously, when you spend significant money on an SSL certificate you would like to get more than security icons or trust signals. Well, your certification authority does offer a specific amount of warranty or a payback if your customers become victims of a fraud. The amount of this warranty depends upon the type of certificate and how much it costs.
|
||||
|
||||
### How to choose the ideal certificate authority (CA) for SSL
|
||||
|
||||
The next question is: who can judge the judge? It is you. Carefully consider some of the prime factors while finding the right SSL certificate provider/CA for your site. Before buying any certificate, thoroughly vet the reputation, credentials and experience of the certificate authority.
|
||||
|
||||
Also, ask questions. Do they have a credible history? What type of customers do they have in their repertoire? Do they have an impressive portfolio of regular customers? Most importantly, is the company passively following old industry standards, or is it actively investing in research and development on how to prevent the latest cyber frauds? All such questions will help you to make informed decisions and get the best value for your money.
|
||||
|
||||
Also make another very important check: Has any major browser banned the CA? The very objective of the SSL certificate is defeated if the CA has been banned by a major browser.
|
||||
|
||||
### How long does it take for an SSL certificate to be issued?
|
||||
|
||||
The time taken to issue a certificate varies and depends upon the validation procedure and its requirements. A DV certificate, for instance, is issued within minutes as it has the least verification requirements. An OV SSL, with more detailed vetting requirements, can take up to three days for issuance. Since it has the most demanding vetting process, the EV certificate can take up to four days for issuance.
|
||||
|
||||
The validation period of the certificate, along with its credibility and scope, plays an important role in influencing its price. It is always best to use your discretion, and find a fine balance between the price and value of the certificate.
|
||||
|
||||
A few reputed SSL certificates go the extra mile and also offer extra security measures to customers. You can never be secure enough on a digital platform. So it is always best to see if such additional security elements will be helpful. However, your prime focus should be the credibility and portfolio of the company. It isn’t wise to compromise with that just to get some extra security elements.
|
||||
|
||||
SSL certificates encrypt the data and information that customers share with organisations. They help to save customers from data theft and misuse by threat actors. But it’s always advisable to check the credibility and reviews of a certificate authority carefully before buying a SSL certificate from it.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/ssl-certificates-make-the-right-choice/
|
||||
|
||||
作者:[Jitendra Bhojwani][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/jitendra-bhojwani/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/SSL-certificate.jpg
|
@ -0,0 +1,120 @@
|
||||
[#]: subject: "SBOM – SB Doesn’t Stand for Silver Bullet"
|
||||
[#]: via: "https://www.linux.com/news/sbom-sb-doesnt-stand-for-silver-bullet/"
|
||||
[#]: author: "Dan Whiting https://www.linuxfoundation.org/blog/sbom-sb-doesnt-stand-for-silver-bullet/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
SBOM – SB Doesn’t Stand for Silver Bullet
|
||||
======
|
||||
Software Bill of Materials (SBOMs) are like ingredient labels on food. They are critical to keep consumers safe and healthy, they are somewhat standardized, but it is a lot more exciting to grow or make the food rather than the label.
|
||||
|
||||
### What is an SBOM?
|
||||
|
||||
What is an SBOM? In short, it is a way to tell another party all of the software that is used in the stack that makes up an application. One benefit of having a SBOM is you know what is in there when a vulnerability comes up. You can easily determine if you are vulnerable and where.
|
||||
|
||||
As modern software is built utilizing a base of software already written (no sense in recreating the wheel), it is important that all of the components don’t get lost in the shuffle. It isn’t readily apparent what a particular piece of software utilizes. So, if a vulnerability for Software A arises, you need to know, do I have that piece of software somewhere in my ecosystem, and, if so, where. Then you can remediate if you need to.
|
||||
|
||||
I can’t take credit for the food label analogy used in my introduction. I heard it from [Allan Friedman][1], a Senior Advisor and Strategist at the [U.S. Cybersecurity and Infrastructure Security Agency][2] (CISA) and a key SBOM advocate, when he presented about SBOMs at the RSA Conference 2022 with [Kate Stewart][3], the VP of Dependable Embedded Systems here at the Linux Foundation. Allan made the point that food labels only provide information. The consumer needs to read and understand them and take appropriate action. For instance, if they are allergic to peanuts, they can look at an ingredient label and determine if they can safely eat the food.
|
||||
|
||||
SBOMs are similar – they tell a person what software is used as an “ingredient” so someone can determine if they need to take action if a vulnerability arises. It isn’t a silver bullet, but it is a vital tool. Without SBOMs no one can track what component “ingredients” are in their software applications.
|
||||
|
||||
### SBOMs and the Software Supply Chain
|
||||
|
||||
Supply chains are impacting our lives more than just restricting availability of consumer goods. Software supply chains are immensely more complicated now as software is built with pre-existing components. This makes software better, more effective, more powerful, etc. But it also introduces risk as more and more parties touch a particular piece of software. Much like our world has become so interdependent, so has our software.
|
||||
|
||||
Understanding what is in the supply chain for our software helps us effectively secure it. When a new risk emerges, we know what we need to do.
|
||||
|
||||
### SBOMs and Software Security
|
||||
|
||||
SBOMs are increasingly being recognized as an important pillar in any comprehensive software security plan. A global [survey conducted in 2021 Q3 by the Linux Foundation][4] found that 78% of organizations responding plan to use SBOMs in 2022. Additionally, the recently published [Open Source Software Security Mobilization Plan][5] recommends SBOMs be universal and the [U.S. Executive Order on Improving the Nation’s Cybersecurity][6] requires SBOMs be provided for software purchased by the U.S. government. And, as Allan points out in his talk, “We buy everything.” The E.O. actually lays out a nice summary of SBOMs and their benefits:
|
||||
|
||||
The term “Software Bill of Materials” or “SBOM” means a formal record containing the details and supply chain relationships of various components used in building software. Software developers and vendors often create products by assembling existing open source and commercial software components. The SBOM enumerates these components in a product. It is analogous to a list of ingredients on food packaging. An SBOM is useful to those who develop or manufacture software, those who select or purchase software, and those who operate software. Developers often use available open source and third-party software components to create a product; an SBOM allows the builder to make sure those components are up to date and to respond quickly to new vulnerabilities. Buyers can use an SBOM to perform vulnerability or license analysis, both of which can be used to evaluate risk in a product. Those who operate software can use SBOMs to quickly and easily determine whether they are at potential risk of a newly discovered vulnerability. A widely used, machine-readable SBOM format allows for greater benefits through automation and tool integration. The SBOMs gain greater value when collectively stored in a repository that can be easily queried by other applications and systems. Understanding the supply chain of software, obtaining an SBOM, and using it to analyze known vulnerabilities are crucial in managing risk.
|
||||
|
||||
Allan and Kate spent time in their talk going into the current state of SBOMs, challenges, benefits, tools available for creating and sharing SBOMs, what is a minimum SBOM, standards being developed, making them fully automated, and more. Look for some future LF Blog posts digging into these.
|
||||
|
||||
But there are things you can do now.
|
||||
|
||||
### What can you and your organization do now?
|
||||
|
||||
Allan and Kate laid out several things you and your organization can do, starting now. Starting within your organization:
|
||||
|
||||
Next week: Understand origins of software your organization is using
|
||||
|
||||
* Commercial: can you ask for an SBOM?
|
||||
* Open source: do you have an SBOM for the binary or sources you’re importing?
|
||||
|
||||
Three months: Understand what SBOMs your customers will require
|
||||
|
||||
Expectations: which standards, dependency depth, licensing info?
|
||||
|
||||
Six months: Prototype and deploy
|
||||
|
||||
Implement SBOM through using an OSS tool and/or starting a conversation with vendor
|
||||
|
||||
And participate in ongoing discussions to determine best practices for the ecosystem and contribute to open source project any code developed to support SBOMs.
|
||||
|
||||
### But there are also steps you can take as an individual:
|
||||
|
||||
Next week: Start playing with an open source SBOM tool and apply it to a repo
|
||||
|
||||
Three months: Have an SBOM strategy that explicitly identifies tooling needs
|
||||
|
||||
Six months:
|
||||
|
||||
Begin SBOM implementation through using an OSS tool or starting a conversation with vendor
|
||||
Participate in a plugfest and try to consume another’s SBOM
|
||||
|
||||
And make sure to share any open source and commercial tools you find helpful and work with the tools to help harden them, test and report bugs, and push them to scale.
|
||||
|
||||
### How can you shape the future of SBOMs?
|
||||
|
||||
First, I want to highlight some upcoming opportunities they shared to help shape the future of SBOMs. CISA is running public Tooling & Implementation work stream discussions in July 2022. They are the same, but occur at different times to help accommodate more time zones:
|
||||
|
||||
* July 13, 2022 – 3:00-4:30 PM ET
|
||||
* July 21, 2022 – 9:30-11:00 AM ET
|
||||
|
||||
If you want to participate, please email [SBOM@cisa.dhs.gov][7].
|
||||
|
||||
Additionally, there will be “[plugfests][8]” to be announced soon, and they suggested organizations already adopting SBOMs publish case studies and reference tooling workflows to help others.
|
||||
|
||||
### Conclusion
|
||||
|
||||
SBOMs are here to stay. If you aren’t already, get on the train now. It is pulling out of the station, but you still have an opportunity to help shape where it is going and how well the journey goes.
|
||||
|
||||
Allan’s and Kate’s slides are available [here][9]. If you registered to attend the RSA Conference, you can now watch their full presentation on demand [here][10].
|
||||
|
||||
### The Software Package Data ExchangeⓇ (SPDXⓇ)
|
||||
|
||||
The Linux Foundation hosts SPDX, which is an open standard for communicating software bill of material information, including components, licenses, copyrights, and security references. SPDX reduces redundant work by providing a common format for companies and communities to share important data, thereby streamlining and improving compliance. The SPDX specification is an international open standard (ISO/IEC 5962:2021). Learn more at [spdx.dev][11].
|
||||
|
||||
The post [SBOM – SB Doesn’t Stand for Silver Bullet][12] appeared first on [Linux Foundation][13].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linux.com/news/sbom-sb-doesnt-stand-for-silver-bullet/
|
||||
|
||||
作者:[Dan Whiting][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.linuxfoundation.org/blog/sbom-sb-doesnt-stand-for-silver-bullet/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.linkedin.com/in/allanafriedman/
|
||||
[2]: https://www.cisa.gov/
|
||||
[3]: https://www.linkedin.com/in/katestewartaustin/
|
||||
[4]: https://www.linuxfoundation.org/tools/the-state-of-software-bill-of-materials-sbom-and-cybersecurity-readiness/
|
||||
[5]: https://openssf.org/oss-security-mobilization-plan/
|
||||
[6]: https://openssf.org/blog/2021/05/14/how-lf-communities-enable-security-measures-required-by-the-us-executive-order-on-cybersecurity/
|
||||
[7]: https://www.linux.com/mailto:SBOM@cisa.dhs.gov
|
||||
[8]: https://en.wikipedia.org/wiki/Plugtest
|
||||
[9]: https://www.linuxfoundation.org/wp-content/uploads/Tooling-up-Getting-SBOMs-to-Scale_slides.pdf
|
||||
[10]: https://www.rsaconference.com/usa/agenda/session/Tooling%20up%20Getting%20SBOMs%20to%20Scale
|
||||
[11]: https://spdx.dev/
|
||||
[12]: https://www.linuxfoundation.org/blog/sbom-sb-doesnt-stand-for-silver-bullet/
|
||||
[13]: https://www.linuxfoundation.org/
|
@ -0,0 +1,134 @@
|
||||
[#]: subject: "“It’s time to contribute to open source”"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/its-time-to-contributing-to-open-source/"
|
||||
[#]: author: "Abbinaya Kuzhanthaivel https://www.opensourceforu.com/author/abbinaya-swath/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
“It’s time to contribute to open source”
|
||||
======
|
||||
Nilesh Vaghela is an AWS community hero and founder, ElectroMech Corporation, a cloud and open source company. According to him, contributing to open source is a rewarding act in itself. However, it needs commitment and there are many steps involved in the process, right from selecting a project to ensuring your contribution is noticed. In a conversation with Abbinaya Kuzhanthaivel of OSFY, he shares a few tips on how developers can help to improve India’s contributions to open source.
|
||||
|
||||
![Nilesh Vaghela,
|
||||
AWS community hero and
|
||||
founder, ElectroMech Corporation][1]
|
||||
|
||||
##### Q. Can you tell us a bit about your current role and contributions to open source.
|
||||
|
||||
**A.** I am currently an architect working on automation. I lead multiple teams and also contribute majorly to Invinsense, an open source security service platform. I started open source groups in early 1998 and had around 1500 members even then. A group (https://groups.google.com/g/vglug) I am handling now has been very active since 2014-15.
|
||||
|
||||
##### Q. How did you start working with open source projects?
|
||||
|
||||
**A.** I am a mechanical engineer by qualification, and was dealing with modems and UPS systems at my firm ElectroMech Corporation. I slowly got dragged into handling PCs, networking and Linux. I started experimenting in 1996 after getting inspired by seeing over 150 computer servers running on Linux at a Nuclear Science Centre. That’s when I converted my company entirely, focusing on open source for training and support.
|
||||
|
||||
I can proudly say that I was one of the first and early adopters of open source — helping customers to understand what is open source, what are its benefits, what’s available for free, security or code issues, and so on. We got at least four or five customers in Vadodara supporting us, and we eventually promoted ourselves through advertisements in the Yellow Pages. We partnered with Red Hat and the journey continues till now.
|
||||
|
||||
##### Q. How do you think open source has evolved since then?
|
||||
|
||||
A. I can say that, earlier, open source was a passion that fascinated and attracted people to participate. I was particularly impressed hearing user-friendly stories across the world when some Siberian contributors were working to improve water scarcity. It was more like a corporate social responsibility (CSR) activity. A board would be created by people and experts to govern and take projects forward. People would come in for the love of technology without expectations.
|
||||
|
||||
I did not believe then that open source could get commercial, but it is the driving force for most of the innovation and technology today, and many more enterprises are adopting it. We are looking forward to a great balance in contribution to and use of open source, as we have people, communities and big companies coming into play. This is the real future and power of open source.
|
||||
|
||||
##### Q. Could you share some of your challenges?
|
||||
|
||||
A. Initially, I walked alone but people joined once they knew my intentions were good. I created a lot of communities without any expectation, but did get paid indirectly in terms of reputation or fame; some people understood that I was a technical expert and gave projects in the long term. As it was very early days, people started joining the community and contributing without much effort. The goal wasn’t to get business and hence I can say I didn’t really face any hurdles.
|
||||
|
||||
##### Q. What are your leadership mantras and lessons from being a community leader?
|
||||
|
||||
**A.** First, if you want to start a community, then be neutral and don’t harbour a biased opinion. It may look like you are running a community as a leader, but remember those joining you are contributing equally. And never demotivate anyone. Be polite while making comments and addressing queries. Whatever the question, if you don’t want to give an answer, then choose to be quiet. But don’t stop anyone from asking. Help them build expertise.
|
||||
|
||||
Second, don’t involve the community in business. Do not mix and match the goals of your business and community. Have a clear differentiation.
|
||||
|
||||
Always try to encourage people to participate instead of delivering instructions as an expert. If you find people are interested to lead and take initiatives, then give them the stage. Invite and engage them in the community. That will help you to make more community leaders. Also, keep your community simple and don’t involve sponsors in the initial stages.
|
||||
|
||||
##### Q. Who do you look up to for inspiration?
|
||||
|
||||
**A.** Richard Stallman, the father of the open source movement, is my inspiration and I have always admired his projects.
|
||||
|
||||
Apart from him, I have an interesting incident to share that inspired me to work on open source. At the time when I started working on open source, most of the software for the Nuclear Science Centre was based on the Windows OS. However, many scientists wanted to work with Linux based software. And within two or three months, they actually created Linux drivers. This is what fascinated me – that the user can create these drivers which may not be possible in the case of proprietary software. I really liked the fact that open source empowered the user.
|
||||
|
||||
##### Q. Your thoughts on the open source landscape in India and the scope for improvement.
|
||||
|
||||
**A.** India is the largest consumer of open source and we are focusing on becoming a contributor. With so many developers around, we still do not have software giants in India. What we have mostly are service providers and not innovators. More people should become contributors to open source and develop something with international labels.
|
||||
|
||||
The very thought of contributing to open source should begin from the level of schools and colleges. Fortunately, the Gujarat government has already introduced lessons based on Linux from Class 8 to Class 10. It is important to educate and make youngsters aware of open source models.
|
||||
|
||||
Second, we have to develop good mentors. When people start contributing, it is important to find an open source mentor working in that particular project. The mentor gives a small assignment, tries the code and then commits it. If everything goes fine, the contribution is increased gradually. Unfortunately, we have very few mentors available in India. We need to prepare a lot of mentors or maybe connect to those across the world.
|
||||
|
||||
Third, we need to encourage those who come forward to contribute. Once you are a recognised developer or a person contributing to open source development, you also progress in your career and business.
|
||||
|
||||
India can be a major contributor to open source by following such simple methods.
|
||||
|
||||
##### Q. What do you think about the coding requirements to contribute to open source?
|
||||
|
||||
**A.** From my experience, if you know the internal parts, how to develop the application, what code standard you should maintain, and how to manage the team and other best practices, you may not have to actually worry about coding expertise.
|
||||
|
||||
There are other roles too with respect to designing, security maintenance and integration. See what works for you. Develop and strengthen your skill in what you like to do. If you feel coding still interests you, then take the support of fellow developers to learn it.
|
||||
|
||||
##### Q. How do you shortlist a project you would like to contribute to?
|
||||
|
||||
A. You need to understand your top few interest areas and then do your research on the projects happening around them. You need to figure out the area of requirements or openings for contributors and more volunteers. You can start small to practice and then build expertise.
|
||||
|
||||
Avoid going by the trendy topics; what’s important is your individual interest. For instance, DevOps is in high demand now and you may tend to go for a DevOps project. Do not make this mistake.
|
||||
|
||||
You can find open source projects on Cloud Native Computing Foundation ([CNCF][2]), Apache, Fedora, Red Hat, and so on. This way you can also find mentors who are already working on projects and can get proper guidance.
|
||||
|
||||
##### Q. Projects have their own purpose and target audience. Sometimes they even misalign with open source goals. So, what does one check before contributing?
|
||||
|
||||
A. I agree it becomes challenging when somebody starts an open source project and then commercialises it. But this is always a risk, and should not discourage you.
|
||||
|
||||
First try to check out the group — how popular are the contributors working in the group, how long have they been contributing, and how reputed are they. And once you join, observing everyone and everything is the key. Try to learn at least for three to six months, and understand how everything works. You can always leave the project if you find the intention is wrong. But if you feel it’s all right, then go ahead and contribute.
|
||||
|
||||
![The team at ElectroMech Corporation][3]
|
||||
|
||||
There are certain licence checks that you can do, say, like GPL version 3. You can also look at unmodified licence versions like the Apache open source licence.
|
||||
|
||||
##### Q. Do you think big companies will accept contributions from freshers?
|
||||
|
||||
A. Yes, of course. Companies also like mentoring. They usually don’t allow you to contribute directly, but may give you a small assignment initially. A mentor will first try to understand what skill you have and how good you are at it. Once they recognise you have the kind of skill that is needed, they will continue to guide you or assign you to some other mentor based on your skill. The initial stages are very crucial. Many companies do some sort of screening, and you may be allowed to contribute only after you have proved your ability.
|
||||
|
||||
##### Q. What are the initial challenges that contributors have to overcome when picking up projects?
|
||||
|
||||
A. First, you should be very serious about your contribution. There are no written commitments and contributors may tend to take the work lightly. That’s totally wrong. Try to dedicate 8-10 hours or whatever is feasible each day. If you are skipping this commitment because you feel there are no immediate returns, then you will not be a good contributor.
|
||||
Always adhere to a mentor’s guidance strictly at the initial stages. This is very crucial for a healthy contribution. Sometimes it may happen that you believe you are good at something, while your mentor may not assign a project based on that skill. Simply approach your mentor in such scenarios and ask him what you should do, what is your role, and how you can contribute.
|
||||
|
||||
##### Q. Many developers do not get replies after submitting the contribution to a project. How does one make a submission noticeable?
|
||||
|
||||
A. Write a small blog on the project you are planning to contribute to, covering aspects like what you like in it, what you don’t like, and what can be improved. Such a positive and promotional approach can greatly help you.
|
||||
|
||||
Be a part of the group and be involved in activities related to that particular project. Instead of contributing, first try to engage with the group, and this will increase the chances for you to get adopted as a contributor.
|
||||
|
||||
Once you have a better understanding of the project, not only will your work be accepted but you will be able to better align yourself with that project.
|
||||
|
||||
##### Q. How do you overcome a situation where your contribution is not accepted?
|
||||
|
||||
A. Just understand that this can happen for many reasons — maybe you are not in the right project or you have not contributed correctly. If the project is country driven, your request may not be accepted. Hence, remember to have a checklist as stated earlier. Don’t worry if your contribution is not accepted because either you are not fit for the project or the project is not fit for you.
|
||||
|
||||
All I would recommend is try to identify four or five projects, and at least one among those projects you work on will probably be accepted.
|
||||
|
||||
##### Q. What is your message for our readers?
|
||||
|
||||
A. Open source is the driving force behind most of the innovation happening today. Instead of just using open source, let us try to contribute according to our capacity and skills. Contributions can be in terms of code, documentation, testing, blogs, money, etc. It’s time to contribute.
|
||||
|
||||
##### Q. Any hiring plans for ElectroMech Corporation — what are the roles and skill expectations?
|
||||
|
||||
We have requirements in cloud DevOps, and are hiring cloud architects, Python developers, Linux architects and security professionals.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/its-time-to-contributing-to-open-source/
|
||||
|
||||
作者:[Abbinaya Kuzhanthaivel][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/abbinaya-swath/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Nilesh-Vaghela-AWS-community-hero-and-founder-ElectroMech-Corporation.jpg
|
||||
[2]: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwib2vvv3dv3AhVa7XMBHfZSCsIQFnoECAgQAQ&url=https%3A%2F%2Fwww.cncf.io%2F&usg=AOvVaw2LnRyH4SZPDHntRLJU_b3q
|
||||
[3]: https://www.opensourceforu.com/wp-content/uploads/2022/05/The-team-at-ElectroMech-Corporation.jpg
|
@ -0,0 +1,142 @@
|
||||
[#]: subject: "Using habits to practice open organization principles"
|
||||
[#]: via: "https://opensource.com/open-organization/22/6/using-habits-practice-open-organization-principles"
|
||||
[#]: author: "Ron McFarland https://opensource.com/users/ron-mcfarland"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Using habits to practice open organization principles
|
||||
======
|
||||
Follow these steps to implement habits that support open culture and get rid of those that don't.
|
||||
|
||||
![Selfcare, drinking tea on the porch][1]
|
||||
|
||||
Image by: opensource.com
|
||||
|
||||
Habits are a long-term interest of mine. Several years ago, I gave a presentation on habits, both good and bad, and how to expand on good habits and change bad ones. Just recently, I read the habits-focused book Smart Thinking by Art Markman. You might ask what this has to do with [open organization principles.][2] There is a connection, and I'll explain it in this two-part article on managing habits.
|
||||
|
||||
In this first article, I talk about habits, how they work, and—most important—how you can start to change them. In the second article, I review Markman's thoughts as presented in his book.
|
||||
|
||||
### The intersection of principles and habits
|
||||
|
||||
Suppose you learned about open organization principles and although you found them interesting and valuable, you just weren't in the habit of using them. Here's how that might look in practice.
|
||||
|
||||
Community: If you're faced with a significant challenge but think you can't address it alone, you're likely in the habit of just giving up. Wouldn't it be better to have the habit of building a community of like-minded people that collectively can solve the problem?
|
||||
|
||||
Collaboration: Suppose you don't think you're a good collaborator. You like to do things alone. You know that there are cases when collaboration is required, but you don't have a habit of engaging in it. To counteract that, you must build a habit of collaborating more.
|
||||
|
||||
Transparency: Say you like to keep most of what you do and know a secret. However, you know that if you don't share information, you're not likely to get good information from others. Therefore, you must create the habit of being more transparent.
|
||||
|
||||
Inclusivity: Imagine you are uncomfortable working with people you don't know and who are different from you, whether in personality, culture, or language. You know that if you want to be successful, you must work with a wide variety of people. How do you create a habit of being more inclusive?
|
||||
|
||||
Adaptability: Suppose you tend to resist change long after what you're doing is no longer achieving what you had hoped it would. You know you must adapt and redirect your efforts, but how can you create a habit of being adaptive?
|
||||
|
||||
### What is a habit?
|
||||
|
||||
Before I give examples regarding the above principles, I'll explain some of the relevant characteristics of a habit.
|
||||
|
||||
* A habit is a behavior performed repeatedly—so much so that it's now performed without thinking.
|
||||
* A habit is automatic and feels right at the time. The person is so used to it, that it feels good when doing it, and to do something else would require effort and make them feel uncomfortable. They might have second thoughts afterward though.
|
||||
* Some habits are good and extremely helpful by saving you a lot of energy. The brain is 2% of the body's weight but consumes 20% of your daily energy. Because thinking and concentration require a lot of energy, your mind is built to save it through developing unconscious habits.
|
||||
* Some habits are bad for you, so you desire to change them.
|
||||
* All habits offer some reward, even if it is only temporary.
|
||||
* Habits are formed around what you are familiar with and what you know, even habits you don’t necessarily like.
|
||||
|
||||
### The three steps of a habit
|
||||
|
||||
1. Cue (trigger): First, a cue or trigger tells the brain to go into automatic mode, using previously learned habitual behavior. Cues can be things like seeing a candy bar or a television commercial, being in a certain place at a certain time of day, or just seeing a particular person. Time pressure can trigger a routine. An overwhelming atmosphere can trigger a routine. Simply put, something reminds you to behave a certain way.
|
||||
2. Routine: The routine follows the trigger. A routine is a set of physical, mental, and/or emotional behaviors that can be incredibly complex or extremely simple. Some habits, such as those related to emotions, are measured in milliseconds.
|
||||
3. Reward: The final step is the reward, which helps your brain figure out whether a particular activity is worth remembering for the future. Rewards can range from food or drugs that cause physical sensations to joy, pride, praise, or personal self-esteem.
|
||||
|
||||
### Bad habits in a business environment
|
||||
|
||||
Habits aren't just for individuals. All organizations have good and bad institutional habits. However, some organizations deliberately design their habits, while others just let them evolve without forethought, possibly through rivalries or fear. These are some organizational habit examples:
|
||||
|
||||
* Always being late with reports
|
||||
* Working alone or working in groups when the opposite is appropriate
|
||||
* Being triggered by excess pressure from the boss
|
||||
* Not caring about declining sales
|
||||
* Not cooperating among a sales team because of excess competition
|
||||
* Allowing one talkative person to dominate a meeting
|
||||
|
||||
### A step-by-step plan to change a habit
|
||||
|
||||
Habits don't have to last forever. You can change your own behavior. First, remember that many habits can not be changed concurrently. Instead, find a keystone habit and work on it first. This produces small, quick rewards. Remember that one keystone habit can create a chain reaction.
|
||||
|
||||
Here is a four-step framework you can apply to changing any habit, including habits related to open organization principles.
|
||||
|
||||
##### Step one: identify the routine
|
||||
|
||||
Identify the habit loop and the routine in it (for example, when an important challenge comes up that you can't address alone). The routine (the behaviors you do) is the easiest to identify, so start there. For example: "In my organization, no one discusses problems with anyone. They just give up before starting." Determine the routine that you want to modify, change, or just study. For example: "Every time an important challenge comes up, I should discuss it with people and try to develop a community of like-minded people who have the skills to address it."
|
||||
|
||||
##### Step two: experiment with the rewards
|
||||
|
||||
Rewards are powerful because they satisfy cravings. But, we're often not conscious of the cravings that drive our behavior. They are only evident afterward. For example, there may be times in meetings when you want nothing more than to get out of the room and avoid a subject of conversation, even though down deep you know you should figure out how to address the problem.
|
||||
|
||||
To learn what a craving is, you must experiment. That might take a few days, weeks, or longer. You must feel the triggering pressure when it occurs to identify it fully. For example, ask yourself how you feel when you try to escape responsibility.
|
||||
|
||||
Consider yourself a scientist, just doing experiments and gathering data. The steps in your investigation are:
|
||||
|
||||
1. After the first routine, start adjusting the routines that follow to see whether there's a reward change. For example, if you give up every time you see a challenge you can't address by yourself, the reward is the relief of not taking responsibility. A better response might be to discuss the issue with at least one other person who is equally concerned about the issue. The point is to test different hypotheses to determine which craving drives your routine. Are you craving the avoidance of responsibility?
|
||||
2. After four or five different routines and rewards, write down the first three or four things that come to mind right after each reward is received. Instead of just giving up in the face of a challenge, for instance, you discuss the issue with one person. Then, you decide what can be done.
|
||||
3. After writing about your feeling or craving, set a timer for 15 minutes. When it rings, ask yourself whether you still have the craving. Before giving in to a craving, rest and think about the issue one or two more times. This forces you to be aware of the moment and helps you later recall what you were thinking about at that moment.
|
||||
4. Try to remember what you were thinking and feeling at that precise instant, and then 15 minutes after the routine. If the craving is gone, you have identified the reward.
|
||||
|
||||
##### Step three: isolate the cue or trigger
|
||||
|
||||
The cue is often hard to identify because there's usually too much information bombarding you as your behaviors unfold. To identify a cue amid other distractions, you can observe four factors the moment the urge hits you:
|
||||
|
||||
Location: Where did it occur? ("My biggest challenges come out in meetings.")
|
||||
|
||||
Time: When did it occur? ("Meetings in the afternoon, when I'm tired, are the worst time, because I'm not interested in putting forth any effort.")
|
||||
|
||||
Feelings: What was your emotional state? ("I feel overwhelmed and depressed when I hear the problem.")
|
||||
|
||||
People: Who or what type of people were around you at the time, or were you alone? ("In the meetings, most other people don't seem interested in the problem either. Others dominate the discussion.")
|
||||
|
||||
##### Step four: have a plan
|
||||
|
||||
Once you have confirmed the reward driving your behavior, the cues that trigger it, and the behavior itself, you can begin to shift your actions. Follow these three easy steps:
|
||||
|
||||
1. First, plan for the cue. ("In meetings, I'm going to look for and focus my attention on important problems that come up.")
|
||||
2. Second, choose a behavior that delivers the same reward but without the penalties you suffer now. ("I'm going to explore a plan to address that problem and consider what resources and skills I need to succeed. I'm going to feel great when I create a community that's able to address the problem successfully.")
|
||||
3. Third, make the behavior a deliberate choice each and every time, until you no longer need to think about it. ("I'm going to consciously pay attention to major issues until I can do it without thinking. I might look at agendas of future meetings, so I know what to expect in advance. Before and during every meeting, I will ask why should I be here, to make sure I'm focused on what is important."
|
||||
|
||||
##### Plan to avoid forgetting something that must be done
|
||||
|
||||
To successfully start doing something you often forget, follow this process:
|
||||
|
||||
1. Plan what you want to do.
|
||||
2. Determine when you want to complete it.
|
||||
3. Break the project into small tasks as needed.
|
||||
4. With a timer or daily planner, set up cues to start each task.
|
||||
5. Complete each task on schedule.
|
||||
6. Reward yourself for staying on schedule.
|
||||
|
||||
### Habit change
|
||||
|
||||
Change takes a long time. Sometimes a support group is required to help change a habit. Sometimes, a lot of practice and role play of a new and better routine in a low-stress environment is required. To find an effective reward, you need repeated experimentation.
|
||||
|
||||
Sometimes habits are only symptoms of a more significant, deeper problem. In these cases, professional help may be required. But if you have the desire to change and accept that there will be minor failures along the way, you can gain power over any habit.
|
||||
|
||||
In this article, I've used examples of community development using the cue-routine-reward process. It can equally be applied to the other open organization principles. I hope this article got you thinking about how to manage habits through knowing how habits work, taking steps to change habits, and making plans to avoid forgetting things you want done. Whether it's an open organization principle or anything else, you can now diagnose the cue, the routine, and the reward. That will lead you to a plan to change a habit when the cue presents itself.
|
||||
|
||||
In my next article, I'll look at habits through the lens of Art Markman's thoughts on Smart Thinking.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/open-organization/22/6/using-habits-practice-open-organization-principles
|
||||
|
||||
作者:[Ron McFarland][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/coffee_tea_selfcare_wfh_porch_520.png
|
||||
[2]: https://theopenorganization.org/definition/open-organization-definition/
|
@ -0,0 +1,63 @@
|
||||
[#]: subject: "What scrum masters can learn from dancing"
|
||||
[#]: via: "https://opensource.com/article/22/6/scrum-master-dancing"
|
||||
[#]: author: "Kelsea Zhang https://opensource.com/users/kelsea-zhang"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
What scrum masters can learn from dancing
|
||||
======
|
||||
Like dancing, being a scrum master takes coordination, verbal and nonverbal communication, and cooperation.
|
||||
|
||||
![OpenStack Superuser][1]
|
||||
|
||||
Image by: Opensource.com
|
||||
|
||||
Many scrum masters have an obsession with quickly turning their teams into what they want them to be. Once their expectations are not met within some arbitrary time limit, or someone resists their ideas, then the fight begins.
|
||||
|
||||
But the fight takes energy, time, and resources, and most of the time it doesn't solve the problem. In fact, most of the time it worsens the problem. When this happens, it's time for some reflection about the role of the scrum master.
|
||||
|
||||
### Priorities of the scrum master and the team
|
||||
|
||||
Even when a team agrees that a problem is indeed a problem, the team may not agree on what's most urgent. As the scrum master, if you ask the team to make efforts to what the team perceives as a secondary conflict, the team will likely resist. They may cooperate nominally, but in the best case you're only getting a fraction of their potential.
|
||||
|
||||
### Don't be stubborn
|
||||
|
||||
Some scrum masters want to make their company look a very specific way, usually in accordance with common models or methods in the industry. Sometimes they openly confront managers who don't align with their vision of how things "should" be.
|
||||
|
||||
It might feel like you're "fighting the good fight" when you attempt to do this, but that doesn't mean you're making progress. You have important work to do, and while your entire company might eventually be transformed, you have to start somewhere. The more support you gather from your team, the better chance you have of spreading your agile principles throughout the organization.
|
||||
|
||||
### Dancing together
|
||||
|
||||
A wise scrum master takes harmonious steps with their team, without stepping on each other's feet or tripping anyone up. Certainly, they could never be thought to be fighting each other. I call this "dancing together" because like dancing, it takes coordination, verbal and nonverbal communication, and cooperation. And when done even moderately well, it renders something elegant and enjoyable.
|
||||
|
||||
### Awareness
|
||||
|
||||
As a scrum master, you need to reflect on yourself all the time. How are your ideas and actions being received? If there's a sense of resistance or competition, then something is probably wrong, either in how you've been communicating, or how you've been seeking feedback and participation.
|
||||
|
||||
As a scrum master, you need to be aware of your environment. There are ebbs and flows within an organization, times when great change is appropriate and times when fundamental groundwork must be laid. Look for that in your organization, starting with your team. Wait for the right person to be in the right place at the right time, wait for an opportunity, wait for a certain policy, and then integrate agile methodology to drive changes.
|
||||
|
||||
### Get buy-in from the top
|
||||
|
||||
In most organizations, the scrum master ultimately serves the business goals of upper management. Transparency and communication are important. It's your job to understand your organization's objectives. Ask for advice from your managers, and get a clear picture of the intentions and expectations of the rest of the company. A scrum master can help management achieve their goals with expertise and efficiency, but only if you understand the objective.
|
||||
|
||||
### Tango over Foxtrot
|
||||
|
||||
Most of the actual agile transformation in real enterprises is very slow. It is not a fast and furious battle. The scrum master has to step in rhythm with the pace of the enterprise. You must strike a balance between who leads and who flourishes. You don't want to move too slow, or too fast. You must not pursue perfection in everything. Allow for mistakes and misunderstandings. Don't blame each other, but stay focused on creating something vibrant together.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/scrum-master-dancing
|
||||
|
||||
作者:[Kelsea Zhang][a]
|
||||
选题:[lkxed][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/kelsea-zhang
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/LIFE_dance.png
|
@ -0,0 +1,184 @@
|
||||
[#]: subject: "7 summer book recommendations from open source enthusiasts"
|
||||
[#]: via: "https://opensource.com/article/22/6/2022-opensourcecom-summer-reading-list"
|
||||
[#]: author: "Joshua Allen Holm https://opensource.com/users/holmja"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
7 summer book recommendations from open source enthusiasts
|
||||
======
|
||||
Members of the Opensource.com community recommend this mix of books covering everything from a fun cozy mystery to non-fiction works that explore thought-provoking topics.
|
||||
|
||||
![Ceramic mug of tea or coffee with flowers and a book in front of a window][1]
|
||||
|
||||
Image by: Photo by [Carolyn V][2] on [Unsplash][3]
|
||||
|
||||
It is my great pleasure to introduce Opensource.com's 2022 summer reading list. This year's list contains seven wonderful reading recommendations from members of the Opensource.com community. You will find a nice mix of books covering everything from a fun cozy mystery to non-fiction works that explore thought-provoking topics. I hope you find something on this list that interests you.
|
||||
|
||||
Enjoy!
|
||||
|
||||
![Book title 97 Things Every Java Programmer Should Know][4]
|
||||
|
||||
Image by: O'Reilly Press
|
||||
|
||||
**[97 Things Every Java Programmer Should Know: Collective Wisdom from the Experts, edited by Kevlin Henney and Trisha Gee][5]**
|
||||
|
||||
*[Recommendation written by Seth Kenlon][6]*
|
||||
|
||||
Written by 73 different authors working in all aspects of the software industry, the secret to this book's greatness is that it actually applies to much more than just Java programming. Of course, some chapters lean into Java, but there are topics like Be aware of your container surroundings, Deliver better software, faster, and Don't hIDE your tools that apply to development regardless of language.
|
||||
|
||||
Better still, some chapters apply to life in general. Break problems and tasks into small chunks is good advice on how to tackle any problem, Build diverse teams is important for every group of collaborators, and From puzzles to products is a fascinating look at how the mind of a puzzle-solver can apply to many different job roles.
|
||||
|
||||
Each chapter is just a few pages, and with 97 to choose from, it's easy to skip over the ones that don't apply to you. Whether you write Java code all day, just dabble, or if you haven't yet started, this is a great book for geeks interested in code and the process of software development.
|
||||
|
||||
![Book title A City is Not a Computer][7]
|
||||
|
||||
Image by: Princeton University Press
|
||||
|
||||
**[A City is Not a Computer: Other Urban Intelligences, by Shannon Mattern][8]**
|
||||
|
||||
*[Recommendation written by Scott Nesbitt][9]*
|
||||
|
||||
These days, it's become fashionable (if not inevitable) to make everything *smart*: Our phones, our household appliances, our watches, our cars, and, especially, our cities.
|
||||
|
||||
With the latter, that means putting sensors everywhere, collecting data as we go about our business, and pushing information (whether useful or not) to us based on that data.
|
||||
|
||||
This begs the question, does embedding all that technology in a city make it smart? In *A City Is Not a Computer*, Shannon Mattern argues that it doesn't.
|
||||
|
||||
A goal of making cities smart is to provide better engagement with and services to citizens. Mattern points out that smart cities often "aim to merge the ideologies of technocratic managerialism and public service, to reprogram citizens as 'consumers' and 'users'." That, instead of encouraging citizens to be active participants in their cities' wider life and governance.
|
||||
|
||||
Then there's the data that smart systems collect. We don't know what and how much is being gathered. We don't know how it's being used and by whom. There's *so much* data being collected that it overwhelms the municipal workers who deal with it. They can't process it all, so they focus on low-hanging fruit while ignoring deeper and more pressing problems. That definitely wasn't what cities were promised when they were sold smart systems as a balm for their urban woes.
|
||||
|
||||
*A City Is Not a Computer* is a short, dense, well-researched polemic against embracing smart cities because technologists believe we should. The book makes us think about the purpose of a smart city, who really benefits from making a city smart, and makes us question whether we need to or even should do that.
|
||||
|
||||
![Book title git sync murder][10]
|
||||
|
||||
Image by: Tilted Windmill Press
|
||||
|
||||
**[git sync murder, by Michael Warren Lucas][11]**
|
||||
|
||||
*[Recommendation written by Joshua Allen Holm][12]*
|
||||
|
||||
Dale Whitehead would rather stay at home and connect to the world through his computer's terminal, especially after what happened at the last conference he attended. During that conference, Dale found himself in the role of an amateur detective solving a murder. You can read about that case in the first book in this series, *git commit murder*.
|
||||
|
||||
Now, back home and attending another conference, Dale again finds himself in the role of detective. *git sync murder* finds Dale attending a local tech conference/sci-fi convention where a dead body is found. Was it murder or just an accident? Dale, now the "expert" on these matters, finds himself dragged into the situation and takes it upon himself to figure out what happened. To say much more than that would spoil things, so I will just say *git sync murder* is engaging and enjoyable to read. Reading *git commit murder* first is not necessary to enjoy *git sync murder*, but I highly recommend both books in the series.
|
||||
|
||||
Michael Warren Lucas's *git murder* series is perfect for techies who also love cozy mysteries. Lucas has literally written the book on many complex technical topics, and it carries over to his fiction writing. The characters in *git sync murder* talk tech at conference booths and conference social events. If you have not been to a conference recently because of COVID and miss the experience, Lucas will transport you to a tech conference with the added twist of a murder mystery to solve. Dale Whitehead is an interesting, if somewhat unorthodox, cozy mystery protagonist, and I think most Opensource.com readers would enjoy attending a tech conference with him as he finds himself thrust into the role of amateur sleuth.
|
||||
|
||||
![Book title Kick Like a Girl][13]
|
||||
|
||||
Image by: Inner Wings Foundation
|
||||
|
||||
**[Kick Like a Girl, by Melissa Di Donato Roos][14]**
|
||||
|
||||
*[Recommendation written by Joshua Allen Holm][15]*
|
||||
|
||||
Nobody likes to be excluded, but that is what happens to Francesca when she wants to play football at the local park. The boys won't play with her because she's a girl, so she goes home upset. Her mother consoles her by relating stories about various famous women who have made an impact in some significant way. The historical figures detailed in *Kick Like a Girl* include women from throughout history and from many different fields. Readers will learn about Frida Kahlo, Madeleine Albright, Ada Lovelace, Rosa Parks, Amelia Earhart, Marie Curie, Valentina Tereshkova, Florence Nightingale, and Malala Yousafzai. After hearing the stories of these inspiring figures, Francesca goes back to the park and challenges the boys to a football match.
|
||||
|
||||
*Kick Like a Girl* features engaging writing by Melissa Di Donato Roos (SUSE's CEO) and excellent illustrations by Ange Allen. This book is perfect for young readers, who will enjoy the rhyming text and colorful illustrations. Di Donato Roos has also written two other books for children, *How Do Mermaids Poo?* and *The Magic Box*, both of which are also worth checking out.
|
||||
|
||||
![Book title Mine!][16]
|
||||
|
||||
Image by: Doubleday
|
||||
|
||||
**[Mine!: How the Hidden Rules of Ownership Control Our Lives, by Michael Heller and James Salzman][17]**
|
||||
|
||||
*[Recommendation written by Bryan Behrenshausen][18]*
|
||||
|
||||
"A lot of what you know about ownership is wrong," authors Michael Heller and James Salzman write in *Mine!* It's the kind of confrontational invitation people drawn to open source can't help but accept. And this book is certainly one for open source aficionados, whose views on ownership—of code, of ideas, of intellectual property of all kinds—tend to differ from mainstream opinions and received wisdom. In this book, Heller and Salzman lay out the "hidden rules of ownership" that govern who controls access to what. These rules are subtle, powerful, deeply historical conventions that have become so commonplace they just seem incontrovertible. We know this because they've become platitudes: "First come, first served" or "You reap what you sow." Yet we see them play out everywhere: On airplanes in fights over precious legroom, in the streets as neighbors scuffle over freshly shoveled parking spaces, and in courts as juries decide who controls your inheritance and your DNA. Could alternate theories of ownership create space for rethinking some essential rights in the digital age? The authors certainly think so. And if they're correct, we might respond: Can open source software serve as a model for how ownership works—or doesn't—in the future?
|
||||
|
||||
![Book Title Not All Fairy Tales Have Happy Endings][19]
|
||||
|
||||
Image by: Lulu.com
|
||||
|
||||
**[Not All Fairy Tales Have Happy Endings: The Rise and Fall of Sierra On-Line, by Ken Williams][20]**
|
||||
|
||||
*[Recommendation written by Joshua Allen Holm][21]*
|
||||
|
||||
During the 1980s and 1990s, Sierra On-Line was a juggernaut in the computer software industry. From humble beginnings, this company, founded by Ken and Roberta Williams, published many iconic computer games. King's Quest, Space Quest, Quest for Glory, Leisure Suit Larry, and Gabriel Knight are just a few of the company's biggest franchises.
|
||||
|
||||
*Not All Fairy Tales Have Happy Endings* covers everything from the creation of Sierra's first game, [Mystery House][22], to the company's unfortunate and disastrous acquisition by CUC International and the aftermath. The Sierra brand would live on for a while after the acquisition, but the Sierra founded by the Williams was no more. Ken Williams recounts the entire history of Sierra in a way that only he could. His chronological narrative is interspersed with chapters providing advice about management and computer programming. Ken Williams had been out of the industry for many years by the time he wrote this book, but his advice is still extremely relevant.
|
||||
|
||||
Sierra On-Line is no more, but the company made a lasting impact on the computer gaming industry. *Not All Fairy Tales Have Happy Endings* is a worthwhile read for anyone interested in the history of computer software. Sierra On-Line was at the forefront of game development during its heyday, and there are many valuable lessons to learn from the man who led the company during those exciting times.
|
||||
|
||||
![Book title The Soul of a New Machine][23]
|
||||
|
||||
Image by: Back Bay Books
|
||||
|
||||
**[The Soul of a New Machine, by Tracy Kidder][24]**
|
||||
|
||||
*[Recommendation written by Guarav Kamathe][25]*
|
||||
|
||||
I am an avid reader of the history of computing. It's fascinating to know how these intelligent machines that we have become so dependent on (and often take for granted) came into being. I first heard of [The Soul of a New Machine][26] via [Bryan Cantrill][27]'s [blog post][28]. This is a non-fiction book written by [Tracy Kidder][29] and published in 1981 for which he [won a Pulitzer prize][30]. Imagine it's the 1970s, and you are part of the engineering team tasked with designing the [next generation computer][31]. The backdrop of the story begins at Data General Corporation, a then mini-computer vendor who was racing against time to compete with the 32-bit VAX computers from Digital Equipment Corporation (DEC). The book outlines how two competing teams within Data General, both wanting to take a shot at designing the new machine, results in a feud. What follows is a fascinating look at the events that unfold. The book provides insights into the minds of the engineers involved, the management, their work environment, the technical challenges they faced along the way and how they overcame them, how stress affected their personal lives, and much more. Anybody who wants to know what goes into making a computer should read this book.
|
||||
|
||||
There is the 2022 suggested reading list. It provides a variety of great options that I believe will provide Opensource.com readers with many hours of thought-provoking entertainment. Be sure to check out our previous reading lists for even more book recommendations.
|
||||
|
||||
* [2021 Opensource.com summer reading list][32]
|
||||
* [2020 Opensource.com summer reading list][33]
|
||||
* [2019 Opensource.com summer reading list][34]
|
||||
* [2018 Open Organization summer reading list][35]
|
||||
* [2016 Opensource.com summer reading list][36]
|
||||
* [2015 Opensource.com summer reading list][37]
|
||||
* [2014 Opensource.com summer reading list][38]
|
||||
* [2013 Opensource.com summer reading list][39]
|
||||
* [2012 Opensource.com summer reading list][40]
|
||||
* [2011 Opensource.com summer reading list][41]
|
||||
* [2010 Opensource.com summer reading list][42]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/2022-opensourcecom-summer-reading-list
|
||||
|
||||
作者:[Joshua Allen Holm][a]
|
||||
选题:[lkxed][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/holmja
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/tea-cup-mug-flowers-book-window.jpg
|
||||
[2]: https://unsplash.com/@sixteenmilesout?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
||||
[3]: https://unsplash.com/s/photos/tea?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
||||
[4]: https://opensource.com/sites/default/files/2022-06/97_Things_Every_Java_Programmer_Should_Know_1.jpg
|
||||
[5]: https://www.oreilly.com/library/view/97-things-every/9781491952689/
|
||||
[6]: https://opensource.com/users/seth
|
||||
[7]: https://opensource.com/sites/default/files/2022-06/A_City_is_Not_a_Computer_0.jpg
|
||||
[8]: https://press.princeton.edu/books/paperback/9780691208053/a-city-is-not-a-computer
|
||||
[9]: https://opensource.com/users/scottnesbitt
|
||||
[10]: https://opensource.com/sites/default/files/2022-06/git_sync_murder_0.jpg
|
||||
[11]: https://mwl.io/fiction/crime#gsm
|
||||
[12]: https://opensource.com/users/holmja
|
||||
[13]: https://opensource.com/sites/default/files/2022-06/Kick_Like_a_Girl.jpg
|
||||
[14]: https://innerwings.org/books/kick-like-a-girl
|
||||
[15]: https://opensource.com/users/holmja
|
||||
[16]: https://opensource.com/sites/default/files/2022-06/Mine.jpg
|
||||
[17]: https://www.minethebook.com/
|
||||
[18]: https://opensource.com/users/bbehrens
|
||||
[19]: https://opensource.com/sites/default/files/2022-06/Not_All_Fairy_Tales.jpg
|
||||
[20]: https://kensbook.com/
|
||||
[21]: https://opensource.com/users/holmja
|
||||
[22]: https://en.wikipedia.org/wiki/Mystery_House
|
||||
[23]: https://opensource.com/sites/default/files/2022-06/The_Soul_of_a_New_Machine.jpg
|
||||
[24]: https://www.hachettebookgroup.com/titles/tracy-kidder/the-soul-of-a-new-machine/9780316204552/
|
||||
[25]: https://opensource.com/users/gkamathe
|
||||
[26]: https://en.wikipedia.org/wiki/The_Soul_of_a_New_Machine
|
||||
[27]: https://en.wikipedia.org/wiki/Bryan_Cantrill
|
||||
[28]: http://dtrace.org/blogs/bmc/2019/02/10/reflecting-on-the-soul-of-a-new-machine/
|
||||
[29]: https://en.wikipedia.org/wiki/Tracy_Kidder
|
||||
[30]: https://www.pulitzer.org/winners/tracy-kidder
|
||||
[31]: https://en.wikipedia.org/wiki/Data_General_Eclipse_MV/8000
|
||||
[32]: https://opensource.com/article/21/6/2021-opensourcecom-summer-reading-list
|
||||
[33]: https://opensource.com/article/20/6/summer-reading-list
|
||||
[34]: https://opensource.com/article/19/6/summer-reading-list
|
||||
[35]: https://opensource.com/open-organization/18/6/summer-reading-2018
|
||||
[36]: https://opensource.com/life/16/6/2016-summer-reading-list
|
||||
[37]: https://opensource.com/life/15/6/2015-summer-reading-list
|
||||
[38]: https://opensource.com/life/14/6/annual-reading-list-2014
|
||||
[39]: https://opensource.com/life/13/6/summer-reading-list-2013
|
||||
[40]: https://opensource.com/life/12/7/your-2012-open-source-summer-reading
|
||||
[41]: https://opensource.com/life/11/7/summer-reading-list
|
||||
[42]: https://opensource.com/life/10/8/open-books-opensourcecom-summer-reading-list
|
@ -1,94 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (10 ways Ansible is for everyone)
|
||||
[#]: via: (https://opensource.com/article/21/1/ansible)
|
||||
[#]: author: (James Farrell https://opensource.com/users/jamesf)
|
||||
|
||||
10 ways Ansible is for everyone
|
||||
======
|
||||
Expand your knowledge and skills with the top 10 Ansible articles plus
|
||||
five news summaries from 2020.
|
||||
![gears and lightbulb to represent innovation][1]
|
||||
|
||||
Here we are again at the end of another year with a great set of articles about Ansible from Opensource.com. I thought it would be nice to review them in a series of progressively advancing topics. I hope to help stimulate the interest of people just getting started with Ansible. There were also a series of summary articles, which I've included for your casual follow-up.
|
||||
|
||||
### Ansible for beginners
|
||||
|
||||
The first five articles on this year's list are a really good place for Ansible neophytes to start. The first three articles were written by Opensource.com editor Seth Kenlon.
|
||||
|
||||
* If you don't know much about Ansible, [_7 things you can do with Ansible right now_][2] is a great place to start. This is a nice primer that gathers links for managing hardware, cloud, containers, and more.
|
||||
* In [_What's the difference between orchestration and automation?_][3] you will learn some of the terms and baseline technologies that will help kick off your interest in Ansible.
|
||||
* [_How to install software with Ansible_][4] covers a few rudimentary concepts and some good Ansible habits, followed by simple examples on managing software packages on local and remote hosts.
|
||||
* In [_3 lessons I've learned writing Ansible playbooks_][5], set yourself right with good habits handed down by Jeff Geerling, a real Ansible veteran. Source control, documentation, testing, simplification, and optimization are the keys to automation success.
|
||||
* [_My first day using Ansible_][6] outlines Correspondent David Both's thought process for solving a repetitive development task. The article starts with a baseline of what Ansible needs and illustrates some simple plays and tasks.
|
||||
|
||||
|
||||
|
||||
### Ansible projects to try
|
||||
|
||||
Once you have the basics and some good habits, it's time to turn to more specific topics with concrete examples.
|
||||
|
||||
* [_Manage your Raspberry Pi fleet with Ansible_][7] by Ken Fallon walks through an example of deploying and managing fleets of RPi units. It presents concepts of security and maintenance in constrained environments.
|
||||
* In _[Integrate your calendar with Ansible to avoid schedule conflicts][8],_ Nicolas Leiva quickly introduces how to use pre-tasks and conditionals to enforce execution blackout windows in your automation schedule.
|
||||
* Nicolas completes his calendar blackout concept in [_Create an Ansible module for integrating your Google Calendar_][9]. His article dives into writing a custom Ansible module in Go to achieve the desired calendar connection. Nicolas introduces different ways to structure and invoke Go programs and pass the required data to Ansible and receive the desired output.
|
||||
|
||||
|
||||
|
||||
### Elevate your Ansible skills
|
||||
|
||||
Kubernetes is a hot topic these days, and the following articles offer some great examples to learn new skills.
|
||||
|
||||
* In [_Automate your container orchestration with Ansible modules for Kubernetes_][10], Seth Kenlon introduces the Ansible Kubernetes module, walks through a basic Minikube installation for testing, and presents some basic examples of the "k8s" module for pod control.
|
||||
* Jeff Geerling explains the concept of Helm Chart applications, Ansible collections, and executing a fun project to set up your own Minecraft server in a k8s cluster in [_Build a Kubernetes Minecraft server with Ansible's Helm modules_][11].
|
||||
|
||||
|
||||
|
||||
### Other Ansible news
|
||||
|
||||
This year, Mark Phillips delivered a series of "Ansible around the web" news articles covering a wide variety of Ansible topics. They are packed with links to interesting Ansible developments, ranging from basic tutorials, module writing, plugins, Kubernetes, video demonstrations, and Ansible community news. Check them all out—there are valuable nuggets to follow for all interests and skill levels!
|
||||
|
||||
* [_Containers, networks, security, and more Ansible news_][12]
|
||||
* [_Tips for CI/CD pipelines and Windows users, and more Ansible news_][13]
|
||||
* [_Collections signal major shift in Ansible ecosystem, and more Ansible news_][14]
|
||||
* [_Ansible 101 videos with Jeff Geerling, and more Ansible news_][15]
|
||||
* [_Beginner guides, Windows, networking, and more Ansible news_][16]
|
||||
|
||||
|
||||
|
||||
### Have a happy 2021!
|
||||
|
||||
I hope your personal journey with Ansible is already underway and regularly enriched by content from Opensource.com. Tell us in the comments what you might like to learn about Ansible in the coming year, and if you have information to share, please consider [writing an article][17] for Opensource.com.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/1/ansible
|
||||
|
||||
作者:[James Farrell][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/jamesf
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/innovation_lightbulb_gears_devops_ansible.png?itok=TSbmp3_M (gears and lightbulb to represent innovation)
|
||||
[2]: https://opensource.com/article/20/9/ansible
|
||||
[3]: https://opensource.com/article/20/11/orchestration-vs-automation
|
||||
[4]: https://opensource.com/article/20/9/install-packages-ansible
|
||||
[5]: https://opensource.com/article/20/1/ansible-playbooks-lessons
|
||||
[6]: https://opensource.com/article/20/10/first-day-ansible
|
||||
[7]: https://opensource.com/article/20/9/raspberry-pi-ansible
|
||||
[8]: https://opensource.com/article/20/10/calendar-ansible
|
||||
[9]: https://opensource.com/article/20/10/ansible-module-go
|
||||
[10]: https://opensource.com/article/20/9/ansible-modules-kubernetes
|
||||
[11]: https://opensource.com/article/20/10/kubernetes-minecraft-ansible
|
||||
[12]: https://opensource.com/article/20/1/ansible-news-edition-six
|
||||
[13]: https://opensource.com/article/20/2/ansible-news-edition-seven
|
||||
[14]: https://opensource.com/article/20/3/ansible-news-edition-eight
|
||||
[15]: https://opensource.com/article/20/4/ansible-news-edition-nine
|
||||
[16]: https://opensource.com/article/20/5/ansible-news-edition-ten
|
||||
[17]: https://opensource.com/how-submit-article
|
@ -1,249 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Docker Compose: a nice way to set up a dev environment)
|
||||
[#]: via: (https://jvns.ca/blog/2021/01/04/docker-compose-is-nice/)
|
||||
[#]: author: (Julia Evans https://jvns.ca/)
|
||||
|
||||
Docker Compose: a nice way to set up a dev environment
|
||||
======
|
||||
|
||||
Hello! Here is another post about [computer tools that I’ve appreciated][1]. This one is about Docker Compose!
|
||||
|
||||
This post is mostly just about how delighted I was that it does what it’s supposed to do and it seems to work and to be pretty straightforward to use. I’m also only talking about using Docker Compose for a dev environment here, not using it in production.
|
||||
|
||||
I’ve been thinking about this kind of personal dev environment setup more recently because I now do all my computing with a personal cloud budget of like $20/month instead of spending my time at work thinking about how to manage thousands of AWS servers.
|
||||
|
||||
I’m very happy about this because previous to trying Docker Compose I spent two days getting frustrated with trying to set up a dev environment with other tools and Docker Compose was a lot easier and simpler. And then I told my sister about my docker-compose experiences and she was like “I KNOW, DOCKER COMPOSE IS GREAT RIGHT?!?!” So I thought I’d write a blog post about it, and here we are.
|
||||
|
||||
### the problem: setting up a dev environment
|
||||
|
||||
Right now I’m working on a Ruby on Rails service (the backend for a sort of computer debugging game). On my production server, I have:
|
||||
|
||||
* a nginx proxy
|
||||
* a Rails server
|
||||
* a Go server (which proxies some SSH connections with [gotty][2])
|
||||
* a Postgres database
|
||||
|
||||
|
||||
|
||||
Setting up the Rails server locally was pretty straightforward without resorting to containers (I just had to install Postgres and Ruby, fine, no big deal), but then I wanted send `/proxy/*` to the Go server and everything else to the Rails server, so I needed nginx too. And installing nginx on my laptop felt too messy to me.
|
||||
|
||||
So enter `docker-compose`!
|
||||
|
||||
### docker-compose lets you run a bunch of Docker containers
|
||||
|
||||
Docker Compose basically lets you run a bunch of Docker containers that can communicate with each other.
|
||||
|
||||
You configure all your containers in one file called `docker-compose.yml`. I’ve pasted my entire `docker-compose.yml` file here for my server because I found it to be really short and straightforward.
|
||||
|
||||
```
|
||||
version: "3.3"
|
||||
services:
|
||||
db:
|
||||
image: postgres
|
||||
volumes:
|
||||
- ./tmp/db:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_PASSWORD: password # yes I set the password to 'password'
|
||||
go_server:
|
||||
# todo: use a smaller image at some point, we don't need all of ubuntu to run a static go binary
|
||||
image: ubuntu
|
||||
command: /app/go_proxy/server
|
||||
volumes:
|
||||
- .:/app
|
||||
rails_server:
|
||||
build: docker/rails
|
||||
command: bash -c "rm -f tmp/pids/server.pid && source secrets.sh && bundle exec rails s -p 3000 -b '0.0.0.0'"
|
||||
volumes:
|
||||
- .:/app
|
||||
web:
|
||||
build: docker/nginx
|
||||
ports:
|
||||
- "8777:80" # this exposes port 8777 on my laptop
|
||||
```
|
||||
|
||||
There are two kinds of containers here: for some of them I’m just using an existing image (`image: postgres` and `image: ubuntu`) without modifying it at all. And for some I needed to build a custom container image – `build: docker/rails` says to use `docker/rails/Dockerfile` to build a custom container.
|
||||
|
||||
I needed to give my Rails server access to some API keys and things, so `source secrets.sh` puts a bunch of secrets in environment variables. Maybe there’s a better way to manage secrets but it’s just me so this seemed fine.
|
||||
|
||||
### how to start everything: `docker-compose build` then `docker-compose up`
|
||||
|
||||
I’ve been starting my containers just by running `docker-compose build` to build the containers, then `docker-compose up` to run everything.
|
||||
|
||||
You can set `depends_on` in the yaml file to get a little more control over when things start in, but for my set of services the start order doesn’t matter, so I haven’t.
|
||||
|
||||
### the networking is easy to use
|
||||
|
||||
It’s important here that the containers be able to connect to each other. Docker Compose makes that super simple! If I have a Rails server running in my `rails_server` container on port 3000, then I can access that with `http://rails_server:3000`. So simple!
|
||||
|
||||
Here’s a snippet from my nginx configuration file with how I’m using that in practice (I removed a bunch of `proxy_set_header` lines to make it more clear)
|
||||
|
||||
```
|
||||
location ~ /proxy.* {
|
||||
proxy_pass http://go_server:8080;
|
||||
}
|
||||
location @app {
|
||||
proxy_pass http://rails_server:3000;
|
||||
}
|
||||
```
|
||||
|
||||
Or here’s a snippet from my Rails project’s database configuration, where I use the name of the database container (`db`):
|
||||
|
||||
```
|
||||
development:
|
||||
<<: *default
|
||||
database: myproject_development
|
||||
host: db # <-------- this "magically" resolves to the database container's IP address
|
||||
username: postgres
|
||||
password: password
|
||||
```
|
||||
|
||||
I got a bit curious about how `rails_server` was actually getting resolved to an IP address. It seems like Docker is running a DNS server somewhere on my computer to resolve these names. Here are some DNS queries where we can see that each container has its own IP address:
|
||||
|
||||
```
|
||||
$ dig +short @127.0.0.11 rails_server
|
||||
172.18.0.2
|
||||
$ dig +short @127.0.0.11 db
|
||||
172.18.0.3
|
||||
$ dig +short @127.0.0.11 web
|
||||
172.18.0.4
|
||||
$ dig +short @127.0.0.11 go_server
|
||||
172.18.0.5
|
||||
```
|
||||
|
||||
### who’s running this DNS server?
|
||||
|
||||
I dug into how this DNS server is set up a very tiny bit.
|
||||
|
||||
I ran all these commands outside the container, because I didn’t have a lot of networking tools installed in the container.
|
||||
|
||||
**step 1**: find the PID of my Rails server with `ps aux | grep puma`
|
||||
|
||||
It’s 1837916. Cool.
|
||||
|
||||
**step 2**: find a UDP server running in the same network namespace as PID `1837916`
|
||||
|
||||
I did this by using `nsenter` to run `netstat` in the same network namespace as the `puma` process. (technically I guess you could run `netstat -tupn` to just show UDP servers, but my fingers only know how to type `netstat -tulpn` at this point)
|
||||
|
||||
```
|
||||
$ sudo nsenter -n -t 1837916 netstat -tulpn
|
||||
Active Internet connections (only servers)
|
||||
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
|
||||
tcp 0 0 127.0.0.11:32847 0.0.0.0:* LISTEN 1333/dockerd
|
||||
tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 1837916/puma 4.3.7
|
||||
udp 0 0 127.0.0.11:59426 0.0.0.0:* 1333/dockerd
|
||||
```
|
||||
|
||||
So there’s a UDP server running on port `59426`, run by `dockerd`! Maybe that’s the DNS server?
|
||||
|
||||
**step 3**: check that it’s a DNS server
|
||||
|
||||
We can use `dig` to make a DNS query to it:
|
||||
|
||||
```
|
||||
$ sudo nsenter -n -t 1837916 dig +short @127.0.0.11 59426 rails_server
|
||||
172.18.0.2
|
||||
```
|
||||
|
||||
But – when we ran `dig` earlier, we weren’t making a DNS query to port 59426, we were querying port 53! What’s going on?
|
||||
|
||||
**step 4**: iptables
|
||||
|
||||
My first guess for “this server seems to be running on port X but I’m accessing it on port Y, what’s going on?” was “iptables”.
|
||||
|
||||
So I ran iptables-save in the container’s network namespace, and there we go:
|
||||
|
||||
```
|
||||
$ sudo nsenter -n -t 1837916 iptables-save
|
||||
.... redacted a bunch of output ....
|
||||
-A DOCKER_POSTROUTING -s 127.0.0.11/32 -p udp -m udp --sport 59426 -j SNAT --to-source :53
|
||||
COMMIT
|
||||
```
|
||||
|
||||
There’s an iptables rule that sends traffic on port 53 to 59426. Fun!
|
||||
|
||||
### it stores the database files in a temp directory
|
||||
|
||||
One nice thing about this is: instead of managing a Postgres installation on my laptop, I can just mount the Postgres container’s data directory at `./tmp/db`.
|
||||
|
||||
I like this because I really do not want to administer a Postgres installation on my laptop (I don’t really know how to configure Postgres), and conceptually I like having my dev database literally be in the same directory as the rest of my code.
|
||||
|
||||
### I can access the Rails console with `docker-compose exec rails_server rails console`
|
||||
|
||||
Managing Ruby versions is always a little tricky and even when I have it working, I always kind of worry I’m going to screw up my Ruby installation and have to spend like ten years fixing it.
|
||||
|
||||
With this setup, if I need access to the Rails console (a REPL with all my Rails code loaded), I can just run:
|
||||
|
||||
```
|
||||
$ docker-compose exec rails_server rails console
|
||||
Running via Spring preloader in process 597
|
||||
Loading development environment (Rails 6.0.3.4)
|
||||
irb(main):001:0>
|
||||
```
|
||||
|
||||
Nice!
|
||||
|
||||
### small problem: no history in my Rails console
|
||||
|
||||
I ran into a problem though: I didn’t have any history in my Rails console anymore, because I was restarting the container all the time.
|
||||
|
||||
I figured out a pretty simple solution to this though: I added a `/root/.irbrc` to my container that changed the IRB history file’s location to be something that would persist between container restarts. It’s just one line:
|
||||
|
||||
```
|
||||
IRB.conf[:HISTORY_FILE] = "/app/tmp/irb_history"
|
||||
```
|
||||
|
||||
### I still don’t know how well it works in production
|
||||
|
||||
Right now my production setup for this project is still “I made a digitalocean droplet and edited a lot of files by hand”.
|
||||
|
||||
I think I’ll try to use docker-compose to run this thing in production. My guess is that it should work fine because this service is probably going to have at most like 2 users at a time and I can easily afford to have 60 seconds of downtime during a deploy if I want, but usually something goes wrong that I haven’t thought of.
|
||||
|
||||
A few notes from folks on Twitter about docker-compose in production:
|
||||
|
||||
* `docker-compose up` will only restart the containers that need restarting, which makes restarts faster
|
||||
* there’s a small bash script [wait-for-it][3] that you can use to make a container wait for another service to be available
|
||||
* You can have 2 docker-compose.yaml files: `docker-compose.yaml` for DEV, and `docker-compose-prod.yaml` for prod. I think I’ll use this to expose different nginx ports: 8999 in dev and 80 in prod.
|
||||
* folks seemed to agree that docker-compose is fine in production if you have a small website running on 1 computer
|
||||
* one person suggested that Docker Swarm might be better for a slightly more complicated production setup, but I haven’t tried that (or of course Kubernetes, but the whole point of Docker Compose is that it’s super simple and Kubernetes is certainly not simple :) )
|
||||
|
||||
|
||||
|
||||
Docker also seems to have a feature to [automatically deploy your docker-compose setup to ECS][4], which sounds cool in theory but I haven’t tried it.
|
||||
|
||||
### when doesn’t docker-compose work well?
|
||||
|
||||
I’ve heard that docker-compose doesn’t work well:
|
||||
|
||||
* when you have a very large number of microservices (a simple setup is best)
|
||||
* when you’re trying to include data from a very large database (like putting hundreds of gigabytes of data on everyone’s laptop)
|
||||
* on Mac computers, I’ve heard that Docker can be a lot slower than on Linux (presumably because of the extra VM). I don’t have a Mac so I haven’t run into this.
|
||||
|
||||
|
||||
|
||||
### that’s all!
|
||||
|
||||
I spent an entire day before this trying to configure a dev environment by using Puppet to provision a Vagrant virtual machine only to realize that VMs are kind of slow to start and that I don’t really like writing Puppet configuration (I know, huge surprise :)).
|
||||
|
||||
So it was nice to try Docker Compose and find that it was straightforward to get to work!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://jvns.ca/blog/2021/01/04/docker-compose-is-nice/
|
||||
|
||||
作者:[Julia Evans][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://jvns.ca/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://jvns.ca/#cool-computer-tools---features---ideas
|
||||
[2]: https://github.com/yudai/gotty/
|
||||
[3]: https://github.com/vishnubob/wait-for-it
|
||||
[4]: https://docs.docker.com/cloud/ecs-integration/
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (Starryi)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,137 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Configure a Linux workspace remotely from the command line)
|
||||
[#]: via: (https://opensource.com/article/21/1/remote-configuration-xfce4)
|
||||
[#]: author: (David Both https://opensource.com/users/dboth)
|
||||
|
||||
Configure a Linux workspace remotely from the command line
|
||||
======
|
||||
Nearly everything can be done from the Linux command line, including
|
||||
remote configuration of Xfce4.
|
||||
![Coding on a computer][1]
|
||||
|
||||
One of the things I appreciate about Linux versus proprietary operating systems is that almost everything can be managed and configured from the command line. That means that nearly everything can be configured locally or even remotely via an SSH login connection. Sometimes it takes a bit of time spent on Internet searches, but if you can think of a task, it can probably be done from the command line.
|
||||
|
||||
### The problem
|
||||
|
||||
Sometimes it is necessary to make remote modifications to a desktop using the command line. In this particular case, I needed to reduce the number of workspaces on the [Xfce][2] panel from four to three at the request of a remote user. This configuration only required about 20 minutes of searching on the Internet.
|
||||
|
||||
The default workspace count and many other settings for **xfwm4** can be found and changed in the **/usr/share/xfwm4/defaults** file. So setting _workspace_count=4_ to _workspace_count=2_ changes the default for all users on the host. Also, the **xfconf-query** command can be run by non-root users to query and set various attributes for the **xfwm4** window manager. It should be used by the user account that requires the change and not by root.
|
||||
|
||||
In the sample below, I have first verified the current setting of _four_ workspaces, then set the number to _two_, and finally confirmed the new setting.
|
||||
|
||||
|
||||
```
|
||||
[user@test1 ~]# xfconf-query -c xfwm4 -p /general/workspace_count
|
||||
4
|
||||
[user@test1 ~]# xfconf-query -c xfwm4 -p /general/workspace_count -s 2
|
||||
[user@test1 ~]# xfconf-query -c xfwm4 -p /general/workspace_count
|
||||
2
|
||||
[user@test1 ~]#
|
||||
```
|
||||
|
||||
This change takes place immediately and is visible to the user without a reboot or even logging out and back in. I had a bit of fun with this on my workstation by watching the workspace switcher change as I entered commands to set different numbers of workspaces. I get my amusements where I can these days. ;-)
|
||||
|
||||
### More exploration
|
||||
|
||||
Now that I fixed the problem, I decided to explore the **xfconf-query** command in a bit more detail. Unfortunately, there are no man or info pages for this tool, nor is there any documentation in **/usr/share**. The usual fallback of using the **-h** option resulted in little helpful information.
|
||||
|
||||
|
||||
```
|
||||
$ xfconf-query -h
|
||||
Usage:
|
||||
xfconf-query [OPTION…] - Xfconf commandline utility
|
||||
Help Options:
|
||||
-h, --help Show help options
|
||||
Application Options:
|
||||
-V, --version Version information
|
||||
-c, --channel The channel to query/modify
|
||||
-p, --property The property to query/modify
|
||||
-s, --set The new value to set for the property
|
||||
-l, --list List properties (or channels if -c is not specified)
|
||||
-v, --verbose Verbose output
|
||||
-n, --create Create a new property if it does not already exist
|
||||
-t, --type Specify the property value type
|
||||
-r, --reset Reset property
|
||||
-R, --recursive Recursive (use with -r)
|
||||
-a, --force-array Force array even if only one element
|
||||
-T, --toggle Invert an existing boolean property
|
||||
-m, --monitor Monitor a channel for property changes
|
||||
```
|
||||
|
||||
This is not a lot of help, but we can figure out a good bit from it anyway. First, _channels_ are groupings of properties that can be modified. I made the change above to the **general** channel, and the property is **workspace_count**. Let’s look at the complete list of channels.
|
||||
|
||||
|
||||
```
|
||||
$ xfconf-query -l
|
||||
Channels:
|
||||
xfwm4
|
||||
xfce4-keyboard-shortcuts
|
||||
xfce4-notifyd
|
||||
xsettings
|
||||
xfdashboard
|
||||
thunar
|
||||
parole
|
||||
xfce4-panel
|
||||
xfce4-appfinder
|
||||
xfce4-settings-editor
|
||||
xfce4-power-manager
|
||||
xfce4-session
|
||||
keyboards
|
||||
displays
|
||||
keyboard-layout
|
||||
ristretto
|
||||
xfcethemer
|
||||
xfce4-desktop
|
||||
pointers
|
||||
xfce4-settings-manager
|
||||
xfce4-mixer
|
||||
```
|
||||
|
||||
The properties for a given channel can also be viewed using the following syntax. I have used the **less** pager because the result is a long stream of data. I have pruned the listing below but left enough to see the type of entries you can expect to find.
|
||||
|
||||
|
||||
```
|
||||
$ xfconf-query -c xfwm4 -l | less
|
||||
/general/activate_action
|
||||
/general/borderless_maximize
|
||||
/general/box_move
|
||||
/general/box_resize
|
||||
/general/button_layout
|
||||
/general/button_offset
|
||||
<SNIP>
|
||||
/general/workspace_count
|
||||
/general/workspace_names
|
||||
/general/wrap_cycle
|
||||
/general/wrap_layout
|
||||
/general/wrap_resistance
|
||||
/general/wrap_windows
|
||||
/general/wrap_workspaces
|
||||
/general/zoom_desktop
|
||||
(END)
|
||||
```
|
||||
|
||||
You can explore all the channels in this manner. I discovered that the channels generally correspond to the various settings in the **Settings Manager**. The properties are the ones that you would set in those dialogs. Note that not all the icons you will find in the **Settings Manager** dialog window are part of the **Xfce** desktop, so there are no corresponding channels for them. The **Screensaver** is one example because it is a generic GNU screensaver and not unique to **Xfce**. The **Settings Manager** is just a good central place for **Xfce** to locate many of these configuration tools.
|
||||
|
||||
### Documentation
|
||||
|
||||
As mentioned previously, there do not appear to be any man or info pages for the **xconf-query** command, and I found a lot of incorrect and poorly documented information on the Internet. The best documentation I found for **Xfce4** is on the [Xfce website][2], and some specific information on **xconf-query** can be found here.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/1/remote-configuration-xfce4
|
||||
|
||||
作者:[David Both][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/dboth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_laptop_hack_work.png?itok=aSpcWkcl (Coding on a computer)
|
||||
[2]: https://www.xfce.org/
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (Donkey)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,21 +1,21 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Start programming in Racket by writing a "guess the number" game)
|
||||
[#]: via: (https://opensource.com/article/21/1/racket-guess-number)
|
||||
[#]: author: (Cristiano L. Fontana https://opensource.com/users/cristianofontana)
|
||||
[#]: subject: "Start programming in Racket by writing a "guess the number" game"
|
||||
[#]: via: "https://opensource.com/article/21/1/racket-guess-number"
|
||||
[#]: author: "Cristiano L. Fontana https://opensource.com/users/cristianofontana"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Start programming in Racket by writing a "guess the number" game
|
||||
======
|
||||
Racket is a great way to learn a language from the Scheme and Lisp
|
||||
families.
|
||||
Racket is a great way to learn a language from the Scheme and Lisp families.
|
||||
|
||||
![Person using a laptop][1]
|
||||
|
||||
I am a big advocate of learning multiple programming languages. That's mostly because I tend to get bored with the languages I use the most. It also teaches me new and interesting ways to approach programming.
|
||||
|
||||
Writing the same program in multiple languages is a good way to learn their differences and similarities. Previously, I wrote articles showing the same sample data plotting program written in [C & C++][2], JavaScript with [Node.js][3], and [Python and Octave][4].
|
||||
Writing the same program in multiple languages is a good way to learn their differences and similarities. Previously, I wrote articles showing the same sample data plotting program written in [C & C++][2], JavaScript with [Node.js][3], and [Python and Octave][4].
|
||||
|
||||
This article is part of another series about writing a "guess the number" game in different programming languages. In this game, the computer picks a number between one and 100 and asks you to guess it. The program loops until you make a correct guess.
|
||||
|
||||
@ -31,7 +31,6 @@ When I start learning a new language, I usually look for a tutorial that introdu
|
||||
|
||||
Starting with Racket makes sense because it is very mature and versatile, and the community is very active. Since Racket is a Lisp-like language, a major characteristic is that it uses the [prefix notation][9] and a [lot of parentheses][10]. Functions and operators are applied to a list of operands by prefixing them:
|
||||
|
||||
|
||||
```
|
||||
(function-name operand operand ...)
|
||||
|
||||
@ -58,15 +57,14 @@ The major Linux distributions offer packaged versions of Racket, so [installatio
|
||||
|
||||
Here is a version of the "guess the number" program written in Racket:
|
||||
|
||||
|
||||
```
|
||||
#lang racket
|
||||
|
||||
(define (inquire-user number)
|
||||
(display "Insert a number: ")
|
||||
(define guess (string->number (read-line)))
|
||||
(cond [(> number guess) (displayln "Too low") (inquire-user number)]
|
||||
[(< number guess) (displayln "Too high") (inquire-user number)]
|
||||
(define guess (string->number (read-line)))
|
||||
(cond [(> number guess) (displayln "Too low") (inquire-user number)]
|
||||
[(< number guess) (displayln "Too high") (inquire-user number)]
|
||||
[else (displayln "Correct!")]))
|
||||
|
||||
(displayln "Guess a number between 1 and 100")
|
||||
@ -75,14 +73,12 @@ Here is a version of the "guess the number" program written in Racket:
|
||||
|
||||
Save this listing to a file called `guess.rkt` and run it:
|
||||
|
||||
|
||||
```
|
||||
`$ racket guess.rkt`
|
||||
$ racket guess.rkt
|
||||
```
|
||||
|
||||
Here is some example output:
|
||||
|
||||
|
||||
```
|
||||
Guess a number between 1 and 100
|
||||
Insert a number: 90
|
||||
@ -111,9 +107,9 @@ Now for the next line. `(define ...)` is used to declare new variables or functi
|
||||
|
||||
This function recursively calls itself to repeat the question until the user guesses the right number. Note that I am not using loops; I feel that Racket programmers do not like loops and only use recursive functions. This approach is idiomatic to Racket, but if you prefer, [loops are an option][18].
|
||||
|
||||
The first step of the `inquire-user` function asks the user to insert a number by writing that string to the console. Then it defines a variable called `guess` that contains whatever the user entered. The [`read-line` function][19] returns the user input as a string. The string is then converted to a number with the [`string->number` function][20]. After the variable definition, the [`cond` function][21] accepts a series of conditions. If a condition is satisfied, it executes the code inside that condition. These conditions, `(> number guess)` and `(< number guess)`, are followed by two functions: a `displayln` that gives clues to the user and a `inquire-user` call. The function calls itself again when the user does not guess the right number. The `else` clause executes when the two conditions are not met, i.e., the user enters the correct number. The program's guts are this `inquire-user` function.
|
||||
The first step of the `inquire-user` function asks the user to insert a number by writing that string to the console. Then it defines a variable called `guess` that contains whatever the user entered. The [read-line function][19] returns the user input as a string. The string is then converted to a number with the [string->number function][20]. After the variable definition, the [cond function][21] accepts a series of conditions. If a condition is satisfied, it executes the code inside that condition. These conditions, `(> number guess)` and `(< number guess)`, are followed by two functions: a `displayln` that gives clues to the user and a `inquire-user` call. The function calls itself again when the user does not guess the right number. The `else` clause executes when the two conditions are not met, i.e., the user enters the correct number. The program's guts are this `inquire-user` function.
|
||||
|
||||
However, the function still needs to be called! First, the program asks the user to guess a number between 1 and 100, and then it calls the `inquire-user` function with a random number. The random number is generated with the [`random` function][22]. You need to inform the function that you want to generate a number between 1 and 100, but the `random` function generates integer numbers up to `max-1`, so I used 101.
|
||||
However, the function still needs to be called! First, the program asks the user to guess a number between 1 and 100, and then it calls the `inquire-user` function with a random number. The random number is generated with the [random function][22]. You need to inform the function that you want to generate a number between 1 and 100, but the `random` function generates integer numbers up to `max-1`, so I used 101.
|
||||
|
||||
### Try Racket
|
||||
|
||||
@ -124,15 +120,15 @@ Learning new languages is fun! I am a big advocate of programming languages poly
|
||||
via: https://opensource.com/article/21/1/racket-guess-number
|
||||
|
||||
作者:[Cristiano L. Fontana][a]
|
||||
选题:[lujun9972][b]
|
||||
选题:[lkxed][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/cristianofontana
|
||||
[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)
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/laptop_screen_desk_work_chat_text.png
|
||||
[2]: https://opensource.com/article/20/2/c-data-science
|
||||
[3]: https://opensource.com/article/20/6/data-science-nodejs
|
||||
[4]: https://opensource.com/article/20/2/python-gnu-octave-data-science
|
||||
|
@ -1,72 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (duoluoxiaosheng )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to teach open source beyond business)
|
||||
[#]: via: (https://opensource.com/article/21/1/open-source-beyond-business)
|
||||
[#]: author: (Irit Goihman https://opensource.com/users/iritgoihman)
|
||||
|
||||
How to teach open source beyond business
|
||||
======
|
||||
The Beyond program connects future talents in the tech industry with
|
||||
open source culture.
|
||||
![Teacher or learner?][1]
|
||||
|
||||
When I was a university student, I didn't understand the fuss about open source software. I used Linux and open source software but didn't really understand the open source model, how to contribute to projects, or how it could benefit my future career. My development experience consisted mainly of homework assignments and a large final project required for my degree.
|
||||
|
||||
So, when I took my first steps in the tech industry, there was a big learning curve before I felt comfortable. I needed to understand how to join established, sometimes large, and distributed teams working on an ongoing project. I also needed to know how to communicate properly so that my efforts could be recognized.
|
||||
|
||||
I am not special in this regard. This is a common situation among new graduates.
|
||||
|
||||
### Open source gives students a head start
|
||||
|
||||
Since then, as an engineer and later as a manager, I have helped onboard many junior engineers. One of the things I've noticed is that the new graduates who have already contributed to open source projects could onboard quickly and start contributing faster than those without this experience.
|
||||
|
||||
By incorporating open source methodology into academic studies, students can gain experience relevant to the industry, learn to reuse their existing knowledge, and establish a good platform for formulating ideas and sharing knowledge. Practicing open source can make a positive impact on students' technical knowledge and experience. This can help them become more successful in bootstrapping their careers.
|
||||
|
||||
The value of open source methodologies in the tech industry is well-established and shapes the culture of software companies worldwide. Involvement in open source projects and adoption of the [open organization culture][2] has become an industry standard. Companies seek fresh-minded, talented employees who know how to work in open source and cultivate its culture. Therefore, the tech industry must drive the academic world to embrace open source culture as one of the fundamental methodologies to learn in tech studies.
|
||||
|
||||
### Moving open source culture 'Beyond' business
|
||||
|
||||
When I met [Liora Milbaum][3], a senior principal software engineer at Red Hat, I learned we shared an interest in bringing open source culture and principles into academics. Liora had previously founded [DevOps Loft][4], in which she shared DevOps practices with people interested in stepping into this world, and wished to start a similar initiative to teach open source to university students. We decided to launch the [Beyond][5] program to connect future talents in the tech industry with open source culture as Red Hat practices it.
|
||||
|
||||
We started the Beyond program at the [Academic College of Tel Aviv-Yafo][6], where we were warmly welcomed by the information systems faculty. We started by teaching an "Introduction to DevOps'' course to introduce elements of the DevOps tech stack. Our biggest challenge at the start was deciding how to teach what open source is. The answer was simple: by practicing it, of course. We didn't want to deliver yet another old-school academic course; rather, we wanted to expose students to industry standards.
|
||||
|
||||
We created a syllabus that incorporated common open source projects and tools to teach the DevOps stack. The course consisted of lectures and hands-on participation taught by engineers. The students were divided into groups, each one mentored and supported by an engineer. They practiced working in teams, sharing knowledge (both inside and outside of their groups), and collaborating effectively.
|
||||
|
||||
During our second course, "Open source development pillars," for students in the computer science department, we encountered another big obstacle. Two weeks after the course started, we became fully remote as the COVID pandemic hit the globe. We solved this problem by using the same remote collaboration tools with our students that we were using for our daily work at Red Hat. We were amazed at how simple and smooth the transition was.
|
||||
|
||||
![Beyond teaching online][7]
|
||||
|
||||
(Irit Goihman, [CC BY-SA 4.0][8])
|
||||
|
||||
### Successful early outcomes
|
||||
|
||||
The two courses were a huge success, and we even hired one of the top students we taught. The feedback we received was amazing; the students said we positively impacted their knowledge, thinking, and soft skills. A few students were hired for their first tech job based on their open source contributions during the course.
|
||||
|
||||
Other academic institutions have expressed interest in adopting these courses, so we've expanded the program to another university.
|
||||
|
||||
I am fortunate to co-lead this successful initiative with Liora, accompanied by a team of talented engineers. Together, we are helping increase the open source community a bit more.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/1/open-source-beyond-business
|
||||
|
||||
作者:[Irit Goihman][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/iritgoihman
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-lead-teacher-learner.png?itok=rMJqBN5G (Teacher or learner?)
|
||||
[2]: https://opensource.com/open-organization/resources/open-org-definition
|
||||
[3]: https://www.linkedin.com/in/lioramilbaum
|
||||
[4]: https://www.devopsloft.io/
|
||||
[5]: https://research.redhat.com/blog/2020/05/24/open-source-development-course-and-devops-methodology/
|
||||
[6]: https://www.int.mta.ac.il/
|
||||
[7]: https://opensource.com/sites/default/files/pictures/beyond_mta.png (Beyond teaching online)
|
||||
[8]: https://creativecommons.org/licenses/by-sa/4.0/
|
@ -1,98 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (godgithubf)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (3 ways to play video games on Linux)
|
||||
[#]: via: (https://opensource.com/article/21/2/linux-gaming)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
3 ways to play video games on Linux
|
||||
======
|
||||
If you're ready to put down the popcorn and experience games from all
|
||||
angles, start gaming on Linux.
|
||||
![Gaming with penguin pawns][1]
|
||||
|
||||
In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. Today, I'll start with gaming.
|
||||
|
||||
I used to think a "gamer" was a very specific kind of creature, carefully cataloged and classified by scientists after years of study and testing. I never classified myself as a gamer because most of the games I played were either on a tabletop (board games and pen-and-paper roleplaying games), NetHack, or Tetris. Now that games are available on everything from mobile devices, consoles, computers, and televisions, it feels like it's a good time to acknowledge that "gamers" come in all different shapes and sizes. If you want to call yourself a gamer, you can! There's no qualification exam. You don't have to know the Konami Code by heart (or even what that reference means); you don't have to buy and play "triple-A" games. If you enjoy a game from time to time, you can rightfully call yourself a gamer. And if you want to be a gamer, there's never been a better time to use Linux.
|
||||
|
||||
### Welcome to the underground
|
||||
|
||||
Peel back the glossy billboard ads, and underneath, you're sure to find a thriving gaming underground. It's a movement that began with the nascent gaming market before anyone believed money could be made off software that wasn't either a spreadsheet or typing tutor. Indie games have carved out a place in pop culture (believe it or not, [Minecraft, while not open source][2], started out as an indie game) in several ways, proving that in the eyes of players, gameplay comes before production value.
|
||||
|
||||
There's a lot of cross-over in the indie and open source developer space. There's nothing quite like kicking back with your Linux laptop and browsing [itch.io][3] or your distribution's software repository for a little-known but precious gem of an open source game.
|
||||
|
||||
There are all kinds of open source games available, including plenty of [first person shooters][4], puzzle games like [Nodulus][5], systems management games like [OpenTTD][6], racing games like [Jethook][7], tense escape campaigns like [Sauerbraten][8], and too many more to mention (with more arriving each year, thanks to great initiatives like [Open Jam][9]).
|
||||
|
||||
![Jethook game screenshot][10]
|
||||
|
||||
Jethook
|
||||
|
||||
Overall, the experience of delving into the world of open source games is different than the immediate satisfaction of buying whatever a major game studio releases next. Games by the big studios provide plenty of visual and sonic stimuli, big-name actors, and upwards of 60 hours of gameplay. Independent and open source games aren't likely to match that, but then again, major studios can't match the sense of discovery and personal connection you get when you find a game that you just know nobody else _has ever heard of_. And they can't hope to match the sense of urgency you get when you realize that everybody in the world really, really needs to hear about the great game you've just played.
|
||||
|
||||
Take some time to identify the kinds of games you enjoy the most, and then have a browse through your distribution's software repository, [Flathub][11], and open game jams. See what you can uncover and, if you like the game enough, help to promote it!
|
||||
|
||||
### Proton and WINE
|
||||
|
||||
Gaming on Linux doesn't stop with open source, but it is enabled by it. When Valve Software famously brought Linux back into the gaming market a few years ago by releasing their Steam client for Linux, the hope was that it would compel game studios to write code native to Linux systems. Some did, but Valve failed to push Linux as the primary platform even on their own Valve-branded gaming computers, and it seems that most studios have reverted to their old ways of Windows-only games.
|
||||
|
||||
Interestingly, though, the end result has produced more open source code than probably intended. Valve's solution for Linux compatibility has been to create the [Proton][12] project, a compatibility layer to translate Windows games to Linux. At its core, Proton uses [WINE (Wine Is Not an Emulator)][13], the too-good-to-be-true reimplementation of major Windows libraries as open source.
|
||||
|
||||
The game market's spoils have turned out to be a treasure trove for the open source world, and today, most games from major studios can be run on Linux as if they were native.
|
||||
|
||||
Of course, if you're the type of gamer who has to have the latest title on the day of release, you can certainly expect unpleasant surprises. That's not surprising, though, because few major games are released without bugs requiring large patches a week later. Those bugs can be even worse when a game runs on Proton and WINE, so Linux gamers often benefit by refraining from early adoption. The trade-off may be worth it, though. I've played a few games that run perfectly on Proton, only to discover later from angry forum posts that it's apparently riddled with fatal errors when played on the latest version of Windows. In short, it seems that games from major studios aren't perfect, and so you can expect similar-but-different problems when playing them on Linux as you would on Windows.
|
||||
|
||||
### Flatpak
|
||||
|
||||
One of the most exciting developments of recent Linux history is [Flatpak][14], a cross between local containers and packaging. It's got nothing to do with gaming (or doesn't it?), but it enables Linux applications to essentially be distributed universally to any Linux distribution. This applies to gaming because there are often lots of fringe technologies used in games, and it can be pretty demanding on distribution maintainers to keep up with all the latest versions required by any given game.
|
||||
|
||||
Flatpak abstracts that away from the distribution by establishing a common Flatpak-specific layer for application libraries. Distributors of flatpaks know that if a library isn't in a Flatpak SDK, then it must be included in the flatpak. It's simple and straightforward.
|
||||
|
||||
Thanks to Flatpak, the Steam client runs on something obvious like Fedora and on distributions not traditionally geared toward the gaming market, like [RHEL][15] and Slackware!
|
||||
|
||||
### Lutris
|
||||
|
||||
If you're not eager to sign up on Steam, though, there's my preferred gaming client, [Lutris][16]. On the surface, Lutris is a simple game launcher for your system, a place you can go when you know you want to play a game but just can't decide what to launch yet. With Lutris, you can add [all the games you have on your system][17] to create your own gaming library, and then launch and play them right from the Lutris interface. Better still, Lutris contributors (like me!) regularly publish installer scripts to make it easy for you to install games you own. It's not always necessary, but it can be a nice shortcut to bypass some tedious configuration.
|
||||
|
||||
Lutris can also enlist the help of _runners_, or subsystems that run games that wouldn't normally launch straight from your application menu. For instance, if you want to play console games like the open source [Warcraft Tower Defense][18], you must run an emulator, and Lutris can handle that for you (provided you have the emulator installed). Additionally, should you have a GOG.com (Good Old Games) account, Lutris can access it and import games from your library.
|
||||
|
||||
There's no easier way to manage your games.
|
||||
|
||||
### Play games
|
||||
|
||||
Linux gaming is a fulfilling and empowering experience. I used to avoid computer gaming because I didn't feel I had much of a choice. It seemed that there were always expensive games being released, which inevitably got extreme reactions from happy and unhappy gamers alike, and then the focus shifted quickly to the next big thing. On the other hand, open source gaming has introduced me to the _people_ of the gaming world. I've met other players and developers, I've met artists and musicians, fans and promoters, and I've played an assortment of games that I never even realized existed. Some of them were barely long enough to distract me for just one afternoon, while others have provided me hours and hours of obsessive gameplay, modding, level design, and fun.
|
||||
|
||||
If you're ready to put down the popcorn and experience games from all angles, start gaming on Linux.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/2/linux-gaming
|
||||
|
||||
作者:[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/gaming_grid_penguin.png?itok=7Fv83mHR (Gaming with penguin pawns)
|
||||
[2]: https://opensource.com/alternatives/minecraft
|
||||
[3]: https://itch.io/jam/open-jam-2020
|
||||
[4]: https://opensource.com/article/20/5/open-source-fps-games
|
||||
[5]: https://hyperparticle.itch.io/nodulus
|
||||
[6]: https://www.openttd.org/
|
||||
[7]: https://rcorre.itch.io/jethook
|
||||
[8]: http://sauerbraten.org/
|
||||
[9]: https://opensource.com/article/18/9/open-jam-announcement
|
||||
[10]: https://opensource.com/sites/default/files/game_0.png
|
||||
[11]: http://flathub.org
|
||||
[12]: https://github.com/ValveSoftware/Proton
|
||||
[13]: http://winehq.org
|
||||
[14]: https://opensource.com/business/16/8/flatpak
|
||||
[15]: https://www.redhat.com/en/enterprise-linux-8
|
||||
[16]: http://lutris.net
|
||||
[17]: https://opensource.com/article/18/10/lutris-open-gaming-platform
|
||||
[18]: https://ndswtd.wordpress.com/download
|
@ -1,393 +0,0 @@
|
||||
[#]: subject: (Create a countdown clock with a Raspberry Pi)
|
||||
[#]: via: (https://opensource.com/article/21/3/raspberry-pi-countdown-clock)
|
||||
[#]: author: (Chris Collins https://opensource.com/users/clcollins)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
Create a countdown clock with a Raspberry Pi
|
||||
======
|
||||
Start counting down the days to your next holiday with a Raspberry Pi
|
||||
and an ePaper display.
|
||||
![Alarm clocks with different time][1]
|
||||
|
||||
For 2021, [Pi Day][2] has come and gone, leaving fond memories and [plenty of Raspberry Pi projects][3] to try out. The days after any holiday can be hard when returning to work after high spirits and plenty of fun, and Pi Day is no exception. As we look into the face of the Ides of March, we can long for the joys of the previous, well, day. But fear no more, dear Pi Day celebrant! For today, we begin the long countdown to the next Pi Day!
|
||||
|
||||
OK, but seriously. I made a Pi Day countdown timer, and you can too!
|
||||
|
||||
A while back, I purchased a [Raspberry Pi Zero W][4] and recently used it to [figure out why my WiFi was so bad][5]. I was also intrigued by the idea of getting an ePaper display for the little Zero W. I didn't have a good use for one, but, dang it, it looked like fun! I purchased a little 2.13" [Waveshare display][6], which fit perfectly on top of the Raspberry Pi Zero W. It's easy to install: Just slip the display down onto the Raspberry Pi's GIPO headers and you're good to go.
|
||||
|
||||
I used [Raspberry Pi OS][7] for this project, and while it surely can be done with other operating systems, the `raspi-config` command, used below, is most easily available on Raspberry Pi OS.
|
||||
|
||||
### Set up the Raspberry Pi and the ePaper display
|
||||
|
||||
Setting up the Raspberry Pi to work with the ePaper display requires you to enable the Serial Peripheral Interface (SPI) in the Raspberry Pi software, install the BCM2835 C libraries (to access the GPIO functions for the Broadcom BCM 2835 chip on the Raspberry Pi), and install Python GPIO libraries to control the ePaper display. Finally, you need to install the Waveshare libraries for working with the 2.13" display using Python.
|
||||
|
||||
Here's a step-by-step walkthrough of how to do these tasks.
|
||||
|
||||
#### Enable SPI
|
||||
|
||||
The easiest way to enable SPI is with the Raspberry Pi `raspi-config` command. The SPI bus allows serial data communication to be used with devices—in this case, the ePaper display:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo raspi-config`
|
||||
```
|
||||
|
||||
From the menu that pops up, select **Interfacing Options** -> **SPI** -> **Yes** to enable the SPI interface, then reboot.
|
||||
|
||||
#### Install BCM2835 libraries
|
||||
|
||||
As mentioned above, the BCM2835 libraries are software for the Broadcom BCM2385 chip on the Raspberry Pi, which allows access to the GPIO pins and the ability to use them to control devices.
|
||||
|
||||
As I'm writing this, the latest version of the Broadcom BCM 2835 libraries for the Raspberry Pi is v1.68. To install the libraries, you need to download the software tarball and build and install the software with `make`:
|
||||
|
||||
|
||||
```
|
||||
# Download the BCM2853 libraries and extract them
|
||||
$ curl -sSL <http://www.airspayce.com/mikem/bcm2835/bcm2835-1.68.tar.gz> -o - | tar -xzf -
|
||||
|
||||
# Change directories into the extracted code
|
||||
$ pushd bcm2835-1.68/
|
||||
|
||||
# Configure, build, check and install the BCM2853 libraries
|
||||
$ sudo ./configure
|
||||
$ sudo make check
|
||||
$ sudo make install
|
||||
|
||||
# Return to the original directory
|
||||
$ popd
|
||||
```
|
||||
|
||||
#### Install required Python libraries
|
||||
|
||||
You also need some Python libraries to use Python to control the ePaper display, the `RPi.GPIO` pip package. You also need the `python3-pil` package for drawing shapes. Apparently, the PIL package is all but dead, but there is an alternative, [Pillow][8]. I have not tested Pillow for this project, but it may work:
|
||||
|
||||
|
||||
```
|
||||
# Install the required Python libraries
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install python3-pip python3-pil
|
||||
$ sudo pip3 install RPi.GPIO
|
||||
```
|
||||
|
||||
_Note: These instructions are for Python 3. You can find Python 2 instructions on Waveshare's website_
|
||||
|
||||
#### Download Waveshare examples and Python libraries
|
||||
|
||||
Waveshare maintains a Git repository with Python and C libraries for working with its ePaper displays and some examples that show how to use them. For this countdown clock project, you will clone this repository and use the libraries for the 2.13" display:
|
||||
|
||||
|
||||
```
|
||||
# Clone the WaveShare e-Paper git repository
|
||||
$ git clone <https://github.com/waveshare/e-Paper.git>
|
||||
```
|
||||
|
||||
If you're using a different display or a product from another company, you'll need to use the appropriate software for your display.
|
||||
|
||||
Waveshare provides instructions for most of the above on its website:
|
||||
|
||||
* [WaveShare ePaper setup instructions][9]
|
||||
* [WaveShare ePaper libraries install instructions][10]
|
||||
|
||||
|
||||
|
||||
#### Get a fun font (optional)
|
||||
|
||||
You can display your timer however you want, but why not do it with a little style? Find a cool font to work with!
|
||||
|
||||
There's a ton of [Open Font License][11] fonts available out there. I am particularly fond of Bangers. You've seen this if you've ever watched YouTube—it's used _all over_. It can be downloaded and dropped into your user's local shared fonts directory to make it available for any application, including this project:
|
||||
|
||||
|
||||
```
|
||||
# The "Bangers" font is a Open Fonts License licensed font by Vernon Adams (<https://github.com/vernnobile>) from Google Fonts
|
||||
$ mkdir -p ~/.local/share/fonts
|
||||
$ curl -sSL <https://github.com/google/fonts/raw/master/ofl/bangers/Bangers-Regular.ttf> -o fonts/Bangers-Regular.ttf
|
||||
```
|
||||
|
||||
### Create a Pi Day countdown timer
|
||||
|
||||
Now that you have installed the software to work with the ePaper display and a fun font to use, you can build something cool with it: a timer to count down to the next Pi Day!
|
||||
|
||||
If you want, you can just grab the [countdown.py][12] Python file from this project's [GitHub repo][13] and skip to the end of this article.
|
||||
|
||||
For the curious, I'll break down that file, section by section.
|
||||
|
||||
#### Import some libraries
|
||||
|
||||
|
||||
```
|
||||
#!/usr/bin/python3
|
||||
# -*- coding:utf-8 -*-
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from PIL import Image,ImageDraw,ImageFont
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
basedir = Path(__file__).parent
|
||||
waveshare_base = basedir.joinpath('e-Paper', 'RaspberryPi_JetsonNano', 'python')
|
||||
libdir = waveshare_base.joinpath('lib')
|
||||
```
|
||||
|
||||
At the start, the Python script imports some standard libraries used later in the script. You also need to add `Image`, `ImageDraw`, and `ImageFont` from the PIL package, which you'll use to draw some simple geometric shapes. Finally, set some variables for the local `lib` directory that contains the Waveshare Python libraries for working with the 2.13" display, and which you can use later to load the library from the local directory.
|
||||
|
||||
#### Font size helper function
|
||||
|
||||
The next part of the script has a helper function for setting the font size for your chosen font: Bangers-Regular.ttf. It takes an integer for the font size and returns an ImageFont object you can use with the display:
|
||||
|
||||
|
||||
```
|
||||
def set_font_size(font_size):
|
||||
logging.info("Loading font...")
|
||||
return ImageFont.truetype(f"{basedir.joinpath('Bangers-Regular.ttf').resolve()}", font_size)
|
||||
```
|
||||
|
||||
#### Countdown logic
|
||||
|
||||
Next is a small function that calculates the meat of this project: how long it is until the next Pi Day. If it were, say, January, it would be relatively straightforward to count how many days are left, but you also need to consider whether Pi Day has already passed for the year (sadface), and if so, count how very, very many days are ahead until you can celebrate again:
|
||||
|
||||
|
||||
```
|
||||
def countdown(now):
|
||||
piday = datetime(now.year, 3, 14)
|
||||
|
||||
# Add a year if we're past PiDay
|
||||
if piday < now:
|
||||
piday = datetime((now.year + 1), 3, 14)
|
||||
|
||||
days = (piday - now).days
|
||||
|
||||
logging.info(f"Days till piday: {days}")
|
||||
return day
|
||||
```
|
||||
|
||||
#### The main function
|
||||
|
||||
Finally, you get to the main function, which initializes the display and begins writing data to it. In this case, you'll write a welcome message and then begin the countdown to the next Pi Day. But first, you need to load the Waveshare library:
|
||||
|
||||
|
||||
```
|
||||
def main():
|
||||
|
||||
if os.path.exists(libdir):
|
||||
sys.path.append(f"{libdir}")
|
||||
from waveshare_epd import epd2in13_V2
|
||||
else:
|
||||
logging.fatal(f"not found: {libdir}")
|
||||
sys.exit(1)
|
||||
```
|
||||
|
||||
The snippet above checks to make sure the library has been downloaded to a directory alongside the countdown script, and then it loads the `epd2in13_V2` library. If you're using a different display, you will need to use a different library. You can also write your own if you are so inclined. I found it kind of interesting to read the Python code that Waveshare provides with the display. It's considerably less complicated than I would have imagined it to be, if somewhat tedious.
|
||||
|
||||
The next bit of code creates an EPD (ePaper Display) object to interact with the display and initializes the hardware:
|
||||
|
||||
|
||||
```
|
||||
logging.info("Starting...")
|
||||
try:
|
||||
# Create an a display object
|
||||
epd = epd2in13_V2.EPD()
|
||||
|
||||
# Initialize the displace, and make sure it's clear
|
||||
# ePaper keeps it's state unless updated!
|
||||
logging.info("Initialize and clear...")
|
||||
epd.init(epd.FULL_UPDATE)
|
||||
epd.Clear(0xFF)
|
||||
```
|
||||
|
||||
An interesting aside about ePaper: It uses power only when it changes a pixel from white to black or vice-versa. This means when the power is removed from the device or the application stops for whatever reason, whatever was on the screen remains. That's great from a power-consumption perspective, but it also means you need to clear the display when starting up, or your script will just write over whatever is already on the screen. Hence, `epd.Clear(0xFF)` is used to clear the display when the script starts.
|
||||
|
||||
Next, create a "canvas" where you will draw the rest of your display output:
|
||||
|
||||
|
||||
```
|
||||
# Create an image object
|
||||
# NOTE: The "epd.heigh" is the LONG side of the screen
|
||||
# NOTE: The "epd.width" is the SHORT side of the screen
|
||||
# Counter-intuitive...
|
||||
logging.info(f"Creating canvas - height: {epd.height}, width: {epd.width}")
|
||||
image = Image.new('1', (epd.height, epd.width), 255) # 255: clear the frame
|
||||
draw = ImageDraw.Draw(image)
|
||||
```
|
||||
|
||||
This matches the width and height of the display—but it is somewhat counterintuitive, in that the short side of the display is the width. I think of the long side as the width, so this is just something to note. Note that the `epd.height` and `epd.width` are set by the Waveshare library to correspond to the device you're using.
|
||||
|
||||
#### Welcome message
|
||||
|
||||
Next, you'll start to draw something. This involves setting data on the "canvas" object you created above. This doesn't draw it to the ePaper display yet—you're just building the image you want right now. Create a little welcome message celebrating Pi Day, with an image of a piece of pie, drawn by yours truly just for this project:
|
||||
|
||||
![drawing of a piece of pie][14]
|
||||
|
||||
(Chris Collins, [CC BY-SA 4.0][15])
|
||||
|
||||
Cute, huh?
|
||||
|
||||
|
||||
```
|
||||
logging.info("Set text text...")
|
||||
bangers64 = set_font_size(64)
|
||||
draw.text((0, 30), 'PI DAY!', font = bangers64, fill = 0)
|
||||
|
||||
logging.info("Set BMP...")
|
||||
bmp = Image.open(basedir.joinpath("img", "pie.bmp"))
|
||||
image.paste(bmp, (150,2))
|
||||
```
|
||||
|
||||
Finally, _finally_, you get to display the canvas you drew, and it's a little bit anti-climactic:
|
||||
|
||||
|
||||
```
|
||||
logging.info("Display text and BMP")
|
||||
epd.display(epd.getbuffer(image))
|
||||
```
|
||||
|
||||
That bit above updates the display to show the image you drew.
|
||||
|
||||
Next, prepare another image to display your countdown timer.
|
||||
|
||||
#### Pi Day countdown timer
|
||||
|
||||
First, create a new image object that you can use to draw the display. Also, set some new font sizes to use for the image:
|
||||
|
||||
|
||||
```
|
||||
logging.info("Pi Date countdown; press CTRL-C to exit")
|
||||
piday_image = Image.new('1', (epd.height, epd.width), 255)
|
||||
piday_draw = ImageDraw.Draw(piday_image)
|
||||
|
||||
# Set some more fonts
|
||||
bangers36 = set_font_size(36)
|
||||
bangers64 = set_font_size(64)
|
||||
```
|
||||
|
||||
To display a ticker like a countdown, it's more efficient to update part of the image, changing the display for only what has changed in the data you want to draw. The next bit of code prepares the display to function this way:
|
||||
|
||||
|
||||
```
|
||||
# Prep for updating display
|
||||
epd.displayPartBaseImage(epd.getbuffer(piday_image))
|
||||
epd.init(epd.PART_UPDATE)
|
||||
```
|
||||
|
||||
Finally, you get to the timer bit, starting an infinite loop that checks how long it is until the next Pi Day and displays the countdown on the ePaper display. If it actually _is_ Pi Day, you can handle that with a little celebration message:
|
||||
|
||||
|
||||
```
|
||||
while (True):
|
||||
days = countdown(datetime.now())
|
||||
unit = get_days_unit(days)
|
||||
|
||||
# Clear the bottom half of the screen by drawing a rectangle filld with white
|
||||
piday_draw.rectangle((0, 50, 250, 122), fill = 255)
|
||||
|
||||
# Draw the Header
|
||||
piday_draw.text((10,10), "Days till Pi-day:", font = bangers36, fill = 0)
|
||||
|
||||
if days == 0:
|
||||
# Draw the Pi Day celebration text!
|
||||
piday_draw.text((0, 50), f"It's Pi Day!", font = bangers64, fill = 0)
|
||||
else:
|
||||
# Draw how many days until Pi Day
|
||||
piday_draw.text((70, 50), f"{str(days)} {unit}", font = bangers64, fill = 0)
|
||||
|
||||
# Render the screen
|
||||
epd.displayPartial(epd.getbuffer(piday_image))
|
||||
time.sleep(5)
|
||||
```
|
||||
|
||||
The last bit of the script does some error handling, including some code to catch keyboard interrupts so that you can stop the infinite loop with **Ctrl**+**C** and a small function to print "day" or "days" depending on whether or not the output should be singular (for that one, single day each year when it's appropriate):
|
||||
|
||||
|
||||
```
|
||||
except IOError as e:
|
||||
logging.info(e)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
logging.info("Exiting...")
|
||||
epd.init(epd.FULL_UPDATE)
|
||||
epd.Clear(0xFF)
|
||||
time.sleep(1)
|
||||
epd2in13_V2.epdconfig.module_exit()
|
||||
exit()
|
||||
|
||||
def get_days_unit(count):
|
||||
if count == 1:
|
||||
return "day"
|
||||
|
||||
return "days"
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
```
|
||||
|
||||
And there you have it! A script to count down and display how many days are left until Pi Day! Here's an action shot on my Raspberry Pi (sped up by 86,400; I don't have nearly enough disk space to save a day-long video):
|
||||
|
||||
![Pi Day Countdown Timer In Action][16]
|
||||
|
||||
(Chris Collins, [CC BY-SA 4.0][15])
|
||||
|
||||
#### Install the systemd service (optional)
|
||||
|
||||
If you'd like the countdown display to run whenever the system is turned on and without you having to be logged in and run the script, you can install the optional systemd unit as a [systemd user service][17]).
|
||||
|
||||
Copy the [piday.service][18] file on GitHub to `${HOME}/.config/systemd/user`, first creating the directory if it doesn't exist. Then you can enable the service and start it:
|
||||
|
||||
|
||||
```
|
||||
$ mkdir -p ~/.config/systemd/user
|
||||
$ cp piday.service ~/.config/systemd/user
|
||||
$ systemctl --user enable piday.service
|
||||
$ systemctl --user start piday.service
|
||||
|
||||
# Enable lingering, to create a user session at boot
|
||||
# and allow services to run after logout
|
||||
$ loginctl enable-linger $USER
|
||||
```
|
||||
|
||||
The script will output to the systemd journal, and the output can be viewed with the `journalctl` command.
|
||||
|
||||
### It's beginning to look a lot like Pi Day!
|
||||
|
||||
And _there_ you have it! A Pi Day countdown timer, displayed on an ePaper display using a Raspberry Pi Zero W, and starting on system boot with a systemd unit file! Now there are just 350-something days until we can once again come together and celebrate the fantastic device that is the Raspberry Pi. And we can see exactly how many days at a glance with our tiny project.
|
||||
|
||||
But in truth, anyone can hold Pi Day in their hearts year-round, so enjoy creating some fun and educational projects with your own Raspberry Pi!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/3/raspberry-pi-countdown-clock
|
||||
|
||||
作者:[Chris Collins][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/clcollins
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/clocks_time.png?itok=_ID09GDk (Alarm clocks with different time)
|
||||
[2]: https://en.wikipedia.org/wiki/Pi_Day
|
||||
[3]: https://opensource.com/tags/raspberry-pi
|
||||
[4]: https://www.raspberrypi.org/products/raspberry-pi-zero-w/
|
||||
[5]: https://opensource.com/article/21/3/troubleshoot-wifi-go-raspberry-pi
|
||||
[6]: https://www.waveshare.com/product/displays/e-paper.htm
|
||||
[7]: https://www.raspberrypi.org/software/operating-systems/
|
||||
[8]: https://pypi.org/project/Pillow/
|
||||
[9]: https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT
|
||||
[10]: https://www.waveshare.com/wiki/Libraries_Installation_for_RPi
|
||||
[11]: https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL
|
||||
[12]: https://github.com/clcollins/epaper-pi-ex/blob/main/countdown.py
|
||||
[13]: https://github.com/clcollins/epaper-pi-ex/
|
||||
[14]: https://opensource.com/sites/default/files/uploads/pie.png (drawing of a piece of pie)
|
||||
[15]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[16]: https://opensource.com/sites/default/files/uploads/piday_countdown.gif (Pi Day Countdown Timer In Action)
|
||||
[17]: https://wiki.archlinux.org/index.php/systemd/User
|
||||
[18]: https://github.com/clcollins/epaper-pi-ex/blob/main/piday.service
|
@ -1,305 +0,0 @@
|
||||
[#]: subject: (Learn the Lisp programming language in 2021)
|
||||
[#]: via: (https://opensource.com/article/21/5/learn-lisp)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
Learn the Lisp programming language in 2021
|
||||
======
|
||||
A lot of Lisp code lurks inside big codebases, so it's smart to get
|
||||
familiar with the language.
|
||||
![Woman sitting in front of her laptop][1]
|
||||
|
||||
Lisp was invented in 1958, which makes it the second-oldest computer programming language. It has spawned several modern derivatives, including Common Lisp, Emacs Lisp (Elisp), Clojure, Racket, Scheme, Fennel, and GNU Guile.
|
||||
|
||||
People who love thinking about the design of programming languages often love Lisp because of how its syntax and data share the same structure: Lisp code is essentially a list of lists, and its name is an acronym for _LISt Processing_. People who love thinking about the aesthetics of programming languages often hate Lisp because of its frequent use of parentheses for scoping; in fact, it's a common joke that Lisp stands for _Lots of Irritating Superfluous Parentheses_.
|
||||
|
||||
Whether you love or hate its design philosophies, Lisp is an interesting glimpse at the past and, thanks to Clojure and Guile, into the future. You might be surprised how much Lisp code there is lurking within big codebases in any given industry, so it's a good idea to have at least a passing familiarity with the language.
|
||||
|
||||
### Install Lisp
|
||||
|
||||
There are many implementations of Lisp. Popular open source versions include [SBCL][2] and [GNU Common Lisp][3] (GCL). You can install either of these with your distribution's package manager.
|
||||
|
||||
On Fedora Linux:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install gcl`
|
||||
```
|
||||
|
||||
On Debian:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo apt install gcl`
|
||||
```
|
||||
|
||||
For macOS, you can use [MacPorts][4] or [Homebrew][5]:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo port install gcl`
|
||||
```
|
||||
|
||||
For Windows, download a binary from [gnu.org/software/gcl][6].
|
||||
|
||||
For this article, I'm using GCL and its `clisp` command, but most of the principles apply to any Lisp.
|
||||
|
||||
### List processing
|
||||
|
||||
The basic unit of Lisp source code is an _expression_, which is written as a list. For instance, this is a list of an operator (`+`) and two integers (`1` and `2`):
|
||||
|
||||
|
||||
```
|
||||
`(+ 1 2)`
|
||||
```
|
||||
|
||||
It's also a Lisp expression, using a symbol (`+`) that evaluates to a function (addition) and two arguments (`1` and `2`). You can run this expression and others in an interactive Common Lisp environment called REPL (read-eval-print loop). If you're familiar with Python's IDLE, Lisp's REPL should feel somewhat familiar to you.
|
||||
|
||||
To launch a REPL, launch Common Lisp:
|
||||
|
||||
|
||||
```
|
||||
$ clisp
|
||||
[1]>
|
||||
```
|
||||
|
||||
At the REPL prompt, type a few expressions:
|
||||
|
||||
|
||||
```
|
||||
[1]> (+ 1 2)
|
||||
3
|
||||
[2]> (- 1 2)
|
||||
-1
|
||||
[3]> (- 2 1)
|
||||
1
|
||||
[4]> (+ 2 3 4)
|
||||
9
|
||||
```
|
||||
|
||||
### Functions
|
||||
|
||||
Now that you know the basic structure of a Lisp expression, you can utilize Lisp functions in useful ways. The `print` function takes any argument you provide and displays it on your terminal, while the `pprint` function "pretty" prints it. There are other variations on the print function, but `pprint` is nice in REPL:
|
||||
|
||||
|
||||
```
|
||||
[1]> (pprint "hello world")
|
||||
|
||||
"hello world"
|
||||
|
||||
[2]>
|
||||
```
|
||||
|
||||
You can create your own functions with `defun`. The `defun` function requires a name for your function and any parameters you want your function to accept:
|
||||
|
||||
|
||||
```
|
||||
[1]> (defun myprinter (s) (pprint s))
|
||||
MYPRINTER
|
||||
[2]> (myprinter "hello world")
|
||||
|
||||
"hello world"
|
||||
|
||||
[3]>
|
||||
```
|
||||
|
||||
### Variables
|
||||
|
||||
You can create variables in Lisp with `setf`:
|
||||
|
||||
|
||||
```
|
||||
[1]> (setf foo "hello world")
|
||||
"hello world"
|
||||
[2]> (pprint foo)
|
||||
|
||||
"hello world"
|
||||
|
||||
[3]>
|
||||
```
|
||||
|
||||
You can nest expressions within expressions in a kind of pipeline. For instance, you can pretty print the contents of your variable after invoking the `string-upcase` function to convert its characters to uppercase:
|
||||
|
||||
|
||||
```
|
||||
[3]> (pprint (string-upcase foo))
|
||||
|
||||
"HELLO WORLD"
|
||||
|
||||
[4]>
|
||||
```
|
||||
|
||||
Lisp is dynamically typed in the sense that you don't have to declare variable types when setting them. Lisp treats integers as integers by default:
|
||||
|
||||
|
||||
```
|
||||
[1]> (setf foo 2)
|
||||
[2]> (setf bar 3)
|
||||
[3]> (+ foo bar)
|
||||
5
|
||||
```
|
||||
|
||||
If you intend for an integer to be interpreted as a string, you can quote it:
|
||||
|
||||
|
||||
```
|
||||
[4]> (setf foo "2")
|
||||
"2"
|
||||
[5]> (setf bar "3")
|
||||
"3"
|
||||
[6]> (+ foo bar)
|
||||
|
||||
*** - +: "2" is not a number
|
||||
The following restarts are available:
|
||||
USE-VALUE :R1 Input a value to be used instead.
|
||||
ABORT :R2 Abort main loop
|
||||
Break 1 [7]>
|
||||
```
|
||||
|
||||
In this sample REPL session, both `foo` and `bar` are set to quoted numbers, so Lisp interprets them as strings. Math operators can't be used on strings, so REPL drops into a debugger mode. To get out of the debugger, press **Ctrl+D** on your keyboard.
|
||||
|
||||
You can do some introspection on objects using the `typep` function, which tests for a specific data type. The tokens `T` and `NIL` represent _True_ and _False_, respectively.
|
||||
|
||||
|
||||
```
|
||||
[4]> (typep foo 'string)
|
||||
NIL
|
||||
[5]> (typep foo 'integer)
|
||||
T
|
||||
```
|
||||
|
||||
The single quote (`'`) before `string` and `integer` prevents Lisp from (incorrectly) evaluating those keywords as variables:
|
||||
|
||||
|
||||
```
|
||||
[6]> (typep foo string)
|
||||
*** - SYSTEM::READ-EVAL-PRINT: variable STRING has no value
|
||||
[...]
|
||||
```
|
||||
|
||||
It's a shorthand way to protect the terms, normally done with the `quote` function:
|
||||
|
||||
|
||||
```
|
||||
[7]> (typep foo (quote string))
|
||||
NIL
|
||||
[5]> (typep foo (quote integer))
|
||||
T
|
||||
```
|
||||
|
||||
### Lists
|
||||
|
||||
Unsurprisingly, you can also create lists in Lisp:
|
||||
|
||||
|
||||
```
|
||||
[1]> (setf foo (list "hello" "world"))
|
||||
("hello" "world")
|
||||
```
|
||||
|
||||
Lists can be indexed with the `nth` function:
|
||||
|
||||
|
||||
```
|
||||
[2]> (nth 0 foo)
|
||||
"hello"
|
||||
[3]> (pprint (string-capitalize (nth 1 foo)))
|
||||
|
||||
"World"
|
||||
```
|
||||
|
||||
### Exiting REPL
|
||||
|
||||
To end a REPL session, press **Ctrl+D** on your keyboard, or use the `quit` keyword in Lisp:
|
||||
|
||||
|
||||
```
|
||||
[99]> (quit)
|
||||
$
|
||||
```
|
||||
|
||||
### Scripting
|
||||
|
||||
Lisp can be compiled or used as an interpreted scripting language. The latter is probably the easiest option when you're starting, especially if you're already familiar with Python or [shell scripting][7].
|
||||
|
||||
Here's a simple dice roller script written in GNU Common Lisp:
|
||||
|
||||
|
||||
```
|
||||
#!/usr/bin/clisp
|
||||
|
||||
(defun roller (num)
|
||||
(pprint (random (parse-integer (nth 0 num))))
|
||||
)
|
||||
|
||||
(setf userput *args*)
|
||||
(setf *random-state* (make-random-state t))
|
||||
(roller userput)
|
||||
```
|
||||
|
||||
The first line tells your [POSIX][8] terminal what executable to use to run the script.
|
||||
|
||||
The `roller` function, created with `defun`, uses the `random` function to print a pseudo-random number up to, and not including, the zeroth item of the `num` list. The `num` list hasn't been created yet in the script, but the function doesn't get executed until it's called.
|
||||
|
||||
The next line assigns any argument provided to the script at launch time to a variable called `userput`. The `userput` variable is a list, and it's what becomes `num` once it's passed to the `roller` function.
|
||||
|
||||
The penultimate line of the script starts a _random seed_. This provides Lisp with enough entropy to generate a mostly random number.
|
||||
|
||||
The final line invokes the custom `roller` function, providing the `userput` list as its sole argument.
|
||||
|
||||
Save the file as `dice.lisp` and mark it executable:
|
||||
|
||||
|
||||
```
|
||||
`$ chmod +x dice.lisp`
|
||||
```
|
||||
|
||||
Finally, try running it, providing it with a maximum number from which to choose its random number:
|
||||
|
||||
|
||||
```
|
||||
$ ./dice.lisp 21
|
||||
|
||||
13
|
||||
$ ./dice.lisp 21
|
||||
|
||||
7
|
||||
$ ./dice.lisp 21
|
||||
|
||||
20
|
||||
```
|
||||
|
||||
Not bad!
|
||||
|
||||
### Learn Lisp
|
||||
|
||||
Whether you can imagine using Lisp as a utilitarian language for personal scripts, to advance your career, or just as a fun experiment, you can see some particularly inventive uses at the annual [Lisp Game Jam][9] (most submissions are open source, so you can view the code to learn from what you play).
|
||||
|
||||
Lisp is a fun and unique language with an ever-growing developer base and enough historic and emerging dialects to keep programmers from all disciplines happy.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/5/learn-lisp
|
||||
|
||||
作者:[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/OSDC_women_computing_4.png?itok=VGZO8CxT (Woman sitting in front of her laptop)
|
||||
[2]: http://sbcl.org
|
||||
[3]: https://www.gnu.org/software/gcl/
|
||||
[4]: https://opensource.com/article/20/11/macports
|
||||
[5]: https://opensource.com/article/20/6/homebrew-linux
|
||||
[6]: http://mirror.lagoon.nc/gnu/gcl/binaries/stable
|
||||
[7]: https://opensource.com/article/20/4/bash-programming-guide
|
||||
[8]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains
|
||||
[9]: https://itch.io/jam/spring-lisp-game-jam-2021
|
@ -1,75 +0,0 @@
|
||||
[#]: subject: (Get started with Kubernetes using chaos engineering)
|
||||
[#]: via: (https://opensource.com/article/21/5/kubernetes-chaos)
|
||||
[#]: author: (Jessica Cherry https://opensource.com/users/cherrybomb)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
Get started with Kubernetes using chaos engineering
|
||||
======
|
||||
Learn the basics of chaos engineering in this first article in a series
|
||||
celebrating Kubernetes' 11th birthday.
|
||||
![Scrabble letters spell out chaos for chaos engineering][1]
|
||||
|
||||
Kubernetes is turning 11, so I'll be celebrating its birthday by giving you some open source tools that will help you cause chaos. Chaos engineering is part science, part planning, and part experiments. It's the discipline of experimenting on a system to build confidence in the system's capability to withstand turbulent conditions in production.
|
||||
|
||||
Before I start passing out the gifts, in this introductory article, I will explain the basics of how chaos engineering works.
|
||||
|
||||
### How do I get started with chaos engineering?
|
||||
|
||||
In my experience, the best way to start chaos engineering is by taking an incident that has happened before in production and using it as an experiment. Use your past data, make a plan to break your system in a similar way, create a repair strategy, and confirm the outcome turns out exactly how you want. If your plan fails, you have a new way to experiment and move forward toward a new way to handle issues quickly.
|
||||
|
||||
Best of all, you can document everything as you go, which means, over time, your entire system will be fully documented so that anyone can be on call without too many escalations and everyone can have a nice break on weekends.
|
||||
|
||||
### What do you do in chaos engineering?
|
||||
|
||||
Chaos engineering has some science behind how these experiments work. I've documented some of the steps:
|
||||
|
||||
1. **Define a steady state**: Use a monitoring tool to gather data about what your system looks like functionally when there are no problems or incidents.
|
||||
2. **Come up with a hypothesis or use a previous incident:** Now that you have defined a steady state, come up with a hypothesis about what would happen (or has happened) during an incident or outage. Use this hypothesis to generate a series of theories about what could happen and how to resolve the problems. Then you can start a plan to purposely cause the issue.
|
||||
3. **Introduce the problem:** Use that plan to break your system and begin real-world testing. Gather your broken metrics' states, use your planned fix, and keep track of how long it takes before you reach a resolution. Make sure you document everything for future outages.
|
||||
4. **Try to disprove your own hypothesis:** The best part of experimenting is trying to disprove what you think or plan. You want to create a different state, see how far you can take it, and generate a different steady state in the system.
|
||||
|
||||
|
||||
|
||||
Make sure to create a control system in a steady state before you generate the broken variables in another system. This will make it easier to spot the differences in various steady states before, during, and after your experiment.
|
||||
|
||||
### What do I need for chaos engineering?
|
||||
|
||||
The best tools for beginning chaos engineering are:
|
||||
|
||||
* Good documentation practices
|
||||
* A monitoring system to capture your system in a steady state and a non-steady state
|
||||
* Grafana
|
||||
* Prometheus
|
||||
* Chaos engineering tools
|
||||
* Chaos mesh
|
||||
* Litmus
|
||||
* And more that I will cover in future articles
|
||||
* A hypothesis
|
||||
* A plan
|
||||
|
||||
|
||||
|
||||
### Go forth and destroy
|
||||
|
||||
Now that you have the basics in hand, it's time to go forth and destroy your system safely. I would plan to start causing chaos four times a year and work toward monthly destructions.
|
||||
|
||||
Chaos engineering is good practice and a great way to keep your internal documentation up to date. Also, new upgrades or application deployments will be smoother over time, and your daily life will be easier with Kubernetes administration.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/5/kubernetes-chaos
|
||||
|
||||
作者:[Jessica Cherry][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/cherrybomb
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/brett-jordan-chaos-unsplash.jpg?itok=sApp5dVd (Scrabble letters spell out chaos for chaos engineering)
|
@ -1,204 +0,0 @@
|
||||
[#]: subject: (Write your first JavaScript code)
|
||||
[#]: via: (https://opensource.com/article/21/7/javascript-cheat-sheet)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
Write your first JavaScript code
|
||||
======
|
||||
JavaScript was created for the web, but it can do so much more. Learn
|
||||
the basics, then download our cheat sheet so you always have the details
|
||||
at hand.
|
||||
![Code with javascript on white background][1]
|
||||
|
||||
JavaScript is a programming language full of pleasant surprises. Many people first encounter JavaScript as a language for the web. There's a JavaScript engine in all the major browsers, there are popular frameworks such as JQuery, Cash, and Bootstrap to help make web design easier, and there are even programming environments written in JavaScript. It seems to be everywhere on the internet, but it turns out that it's also a useful language for projects like [Electron][2], an open source toolkit for building cross-platform desktop apps with JavaScript.
|
||||
|
||||
JavaScript is a surprisingly multipurpose language with a wide assortment of libraries for much more than just making websites. Learning the basics of the language is easy, and it's a gateway to building whatever you imagine.
|
||||
|
||||
### Install JavaScript
|
||||
|
||||
As you progress with JavaScript, you may find yourself wanting advanced JavaScript libraries and runtimes. When you're just starting, though, you don't have to install JavaScript at all. All major web browsers include a JavaScript engine to run the code. You can write JavaScript using your favorite text editor, load it into your web browser, and see what your code does.
|
||||
|
||||
### Get started with JavaScript
|
||||
|
||||
To write your first JavaScript code, open your favorite text editor, such as [Notepad++][3], [Atom][4], or [VSCode][5]. Because it was developed for the web, JavaScript works well with HTML, so first, just try some basic HTML:
|
||||
|
||||
|
||||
```
|
||||
<[html][6]>
|
||||
<[head][7]>
|
||||
<[title][8]>JS</[title][8]>
|
||||
</[head][7]>
|
||||
<[body][9]>
|
||||
<[p][10] id="example">Nothing here.</[p][10]>
|
||||
</[body][9]>
|
||||
</[html][6]>
|
||||
```
|
||||
|
||||
Save the file, and then open it in a web browser.
|
||||
|
||||
![HTML displayed in browser][11]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][12])
|
||||
|
||||
To add JavaScript to this simple HTML page, you can either create a JavaScript file and refer to it in the page's `head` or just embed your JavaScript code in the HTML using the `<script>` tag. In this example, I embed the code:
|
||||
|
||||
|
||||
```
|
||||
<[html][6]>
|
||||
<[head][7]>
|
||||
<[title][8]>JS</[title][8]>
|
||||
</[head][7]>
|
||||
<[body][9]>
|
||||
<[p][10] id="example">Nothing here.</[p][10]>
|
||||
|
||||
<[script][13]>
|
||||
let myvariable = "Hello world!";
|
||||
|
||||
document.getElementById("example").innerHTML = myvariable;
|
||||
</[script][13]>
|
||||
|
||||
</[body][9]>
|
||||
</[html][6]>
|
||||
```
|
||||
|
||||
Reload the page in your browser.
|
||||
|
||||
![HTML with JavaScript displayed in browser][14]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][12])
|
||||
|
||||
As you can see, the `<p>` tag as written still contains the string "Nothing here," but when it's rendered, JavaScript alters it so that it contains "Hello world" instead. Yes, JavaScript has the power to rebuild (or just help build) a webpage.
|
||||
|
||||
The JavaScript in this simple script does two things. First, it creates a variable called `myvariable` and places the string "Hello world!" into it. Finally, it searches the current document (the web page as the browser is rendering it) for any HTML element with the ID `example`. When it locates `example`, it uses the `innerHTML` function to replace the contents of the HTML element with the contents of `myvariable`.
|
||||
|
||||
Of course, using a custom variable isn't necessary. It's just as easy to populate the HTML element with something being dynamically created. For instance, you could populate it with a timestamp:
|
||||
|
||||
|
||||
```
|
||||
<[html][6]>
|
||||
<[head][7]>
|
||||
<[title][8]>JS</[title][8]>
|
||||
</[head][7]>
|
||||
<[body][9]>
|
||||
<[p][10] id="example">Date and time appears here.</[p][10]>
|
||||
|
||||
<[script][13]>
|
||||
document.getElementById("example").innerHTML = Date();
|
||||
</[script][13]>
|
||||
|
||||
</[body][9]>
|
||||
</[html][6]>
|
||||
```
|
||||
|
||||
Reload the page to see a timestamp generated at the moment the page is rendered. Reload a few times to watch the seconds increment.
|
||||
|
||||
### JavaScript syntax
|
||||
|
||||
In programming, **syntax** refers to the rules of how sentences (or "lines") are written. In JavaScript, each line of code must end in a semicolon (`;`) so that the JavaScript engine running your code understands when to stop reading.
|
||||
|
||||
Words (or "strings") must be enclosed in quotation marks (`"`), while numbers (or "integers") go without.
|
||||
|
||||
Almost everything else is a convention of the JavaScript language, such as variables, arrays, conditional statements, objects, functions, and so on.
|
||||
|
||||
### Creating variables in JavaScript
|
||||
|
||||
Variables are containers for data. You can think of a variable as a box where you can put data to share with your program. Creating a variable in JavaScript is done with two keywords you choose based on how you intend to use the variable: `let` and `var`. The `var` keyword denotes a variable intended for your entire program to use, while `let` creates variables for specific purposes, usually inside functions or loops.
|
||||
|
||||
JavaScript's built-in `typeof` function can help you identify what kind of data a variable contains. Using the first example, you can find out what kind of data `myvariable` contains by modifying the displayed text to:
|
||||
|
||||
|
||||
```
|
||||
<string>
|
||||
let myvariable = "Hello world!";
|
||||
document.getElementById("example").innerHTML = typeof(myvariable);
|
||||
</string>
|
||||
```
|
||||
|
||||
This renders "string" in your web browser because the variable contains "Hello world!" Storing different kinds of data (such as an integer) in `myvariable` would cause a different data type to be printed to your sample web page. Try changing the contents of `myvariable` to your favorite number and then reloading the page.
|
||||
|
||||
### Creating functions in JavaScript
|
||||
|
||||
Functions in programming are self-contained data processors. They're what makes programming _modular_. It's because functions exist that programmers can write generic libraries that, for instance, resize images or keep track of the passage of time for other programmers (like you) to use in their own code.
|
||||
|
||||
You create a function by providing a custom name for your function followed by any amount of code enclosed within braces.
|
||||
|
||||
Here's a simple web page featuring a resized image and a button that analyzes the image and returns the true image dimensions. In this example code, the `<button>` HTML element uses the built-in JavaScript function `onclick` to detect user interaction, which triggers a custom function called `get_size`:
|
||||
|
||||
|
||||
```
|
||||
<[html][6]>
|
||||
<[head][7]>
|
||||
<[title][8]>Imager</[title][8]>
|
||||
</[head][7]>
|
||||
<[body][9]>
|
||||
|
||||
<[div][15]>
|
||||
<[button][16] onclick="get_size(document.getElementById('myimg'))">
|
||||
Get image size
|
||||
</[button][16]>
|
||||
</[div][15]>
|
||||
|
||||
<[div][15]>
|
||||
<[img][17] style="width: 15%" id="myimg" src="penguin.png" />
|
||||
</[div][15]>
|
||||
|
||||
<[script][13]>
|
||||
function get_size(i) {
|
||||
let w = i.naturalWidth;
|
||||
let h = i.naturalHeight;
|
||||
alert(w + " by " + h);
|
||||
}
|
||||
</[script][13]>
|
||||
|
||||
</[body][9]>
|
||||
</[html][6]>
|
||||
```
|
||||
|
||||
Save the file and load it into your web browser to try the code.
|
||||
|
||||
![Custom get_size function returns image dimensions][18]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][12])
|
||||
|
||||
### Cross-platform apps with JavaScript
|
||||
|
||||
You can see from the code sample how JavaScript and HTML work closely together to create a cohesive user experience. This is one of the great strengths of JavaScript. When you write code in JavaScript, you inherit one of the most common user interfaces of modern computing regardless of platform: the web browser. Your code is cross-platform by nature, so your application, whether it's just a humble image size analyzer or a complex image editor, video game, or whatever else you dream up, can be used by everyone with a web browser (or a desktop, if you deliver an Electron app).
|
||||
|
||||
Learning JavaScript is easy and fun. There are lots of websites with tutorials available. There are also over a million JavaScript libraries to help you interface with devices, peripherals, the Internet of Things, servers, file systems, and lots more. And as you're learning, keep our [**JavaScript cheat sheet**][19] close by so you remember the fine details of syntax and structure.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/7/javascript-cheat-sheet
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[lixin555](https://github.com/lixin555)
|
||||
校对:[校对者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/code2.png?itok=JCJTJszs (Code with javascript on white background)
|
||||
[2]: https://www.electronjs.org/
|
||||
[3]: https://opensource.com/article/16/12/notepad-text-editor
|
||||
[4]: https://opensource.com/article/20/12/atom
|
||||
[5]: https://opensource.com/article/20/6/open-source-alternatives-vs-code
|
||||
[6]: http://december.com/html/4/element/html.html
|
||||
[7]: http://december.com/html/4/element/head.html
|
||||
[8]: http://december.com/html/4/element/title.html
|
||||
[9]: http://december.com/html/4/element/body.html
|
||||
[10]: http://december.com/html/4/element/p.html
|
||||
[11]: https://opensource.com/sites/default/files/pictures/plain-html.jpg (HTML displayed in browser)
|
||||
[12]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[13]: http://december.com/html/4/element/script.html
|
||||
[14]: https://opensource.com/sites/default/files/uploads/html-javascript.jpg (HTML with JavaScript displayed in browser)
|
||||
[15]: http://december.com/html/4/element/div.html
|
||||
[16]: http://december.com/html/4/element/button.html
|
||||
[17]: http://december.com/html/4/element/img.html
|
||||
[18]: https://opensource.com/sites/default/files/uploads/get-size.jpg (Custom get_size function returns image dimensions)
|
||||
[19]: https://opensource.com/downloads/javascript-cheat-sheet
|
@ -1,118 +0,0 @@
|
||||
[#]: subject: "How to Recover Arch Linux Install via chroot"
|
||||
[#]: via: "https://www.debugpoint.com/2021/07/recover-arch-linux/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Recover Arch Linux Install via chroot
|
||||
======
|
||||
This quick guide explains some of the steps which may come in handy to recover an Arch Linux Install.
|
||||
|
||||
Being a rolling release, sometimes things breaks in [Arch Linux][1]. Not because of your own actions, but hundreds of other reasons such as new Kernel vs your hardware, or software compatibility. But still, Arch Linux is still better and provides the latest packages and applications.
|
||||
|
||||
But sometimes, it gives you trouble and you end up with a blinking cursor and nothing else.
|
||||
|
||||
So, in those scenarios, instead of re-formatting or reinstalling, you may want to try to recover the installation including the data before giving up your hope. This guide outlines some steps in that direction.
|
||||
|
||||
### Recover Arch Linux Installation
|
||||
|
||||
* First step is to create a bootable LIVE USB with Arch Linux. Download the .ISO from this link and create a bootable .ISO. You can check out this guide on [how to create bootable .ISO using Etcher][2]. Remember this step require another working stable system obviously as your current system is not usable.
|
||||
|
||||
[download arch linux][3]
|
||||
|
||||
* You need to know on which partition your Arch Linux is installed. This is a very important step. If you don’t know, you can use GParted to find out. Or check in your Grub menu, Or you can run the below command to find out. This will list all of your disk partitions with their size, labels.
|
||||
|
||||
```
|
||||
sudo lsblk -o name,mountpoint,label,size,uuid
|
||||
```
|
||||
|
||||
* Once done, plug-in the USB stick and boot from it. And you should see the Arch Linux prompt in the LIVE medium.
|
||||
|
||||
* Now, mount to the Arch Linux partition using below. Change the /dev/sda3 to your respective partition.
|
||||
|
||||
```
|
||||
/dev/sda3
|
||||
```
|
||||
|
||||
```
|
||||
mount /dev/sda3 /mntarch-chroot /mnt
|
||||
```
|
||||
|
||||
* The arch-chroot command will mount your Arch Linux partition in the terminal, so login using your Arch credentials. Now, at this stage, you have the following options, based on what you want.
|
||||
|
||||
* You can take backups of your data by going through /home folders. In case, troubleshooter doesn’t work. You may copy the files to external USB or another partition.
|
||||
|
||||
* Verify the log files, specially the pacman logs. Because, unstable system may be caused by upgrading some packages such graphics driver or any other driver. Based on the log, you may want to downgrade any specific package if you want.
|
||||
* You may use the below command to view last 200 lines of the pacman log file to find out any failing items or dependency removal.
|
||||
|
||||
```
|
||||
tail -n 200 /var/log/pacman.log | less
|
||||
```
|
||||
|
||||
* The above command gives you the 200 lines from the end of the pacman.log file to verify. Now, carefully check which of the packages were updates since your successful boot.
|
||||
|
||||
* And note down the package name and version somewhere. And you may try to downgrade packages one-by-one or if you think a specific package created a problem. Use the -U switch of pacman command to downgrade.
|
||||
|
||||
```
|
||||
pacman -U <package name>
|
||||
```
|
||||
|
||||
* You can run the following to start your Arch system after downgrading, if any.
|
||||
|
||||
```
|
||||
exec /sbin/init
|
||||
```
|
||||
|
||||
* Check the status of your display manager, whether if there are any errors. Sometimes, display manager creates a problem which can’t communicate with X Server. For example, if you are using lightdm, then you can check its status via below.
|
||||
|
||||
```
|
||||
systemctl status lightdm
|
||||
```
|
||||
|
||||
* Or, may want to start it via below command and check what is the error.
|
||||
|
||||
```
|
||||
lightdm --test-mode --debug
|
||||
```
|
||||
|
||||
* Here is an example of lightdm failure which caused an unstable Arch system.
|
||||
|
||||
![lightdm - test mode][4]
|
||||
|
||||
* Or check via kicking off the X server using startx.
|
||||
|
||||
```
|
||||
startx
|
||||
```
|
||||
|
||||
* In my experience, if you see errors in the above command, try to install another display manager such as sddm and enable it. It may eliminate the error.
|
||||
|
||||
* Try the above steps, based on the state of your system, and troubleshoot. For errors specific to display manager lightdm, we have a [guide][5] which you may want to check out.
|
||||
* If you are using sddm, then check out [these troubleshooting steps][6] if something works.
|
||||
|
||||
### Closing Notes
|
||||
|
||||
Every installation is different. And above steps may/may not work for you. But it is worth a try and as per experience, it works. If it works, well, good for you. Either way, do let me know in the comment box below, how it goes.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2021/07/recover-arch-linux/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://www.debugpoint.com/tag/arch-linux
|
||||
[2]: https://www.debugpoint.com/2021/01/etcher-bootable-usb-linux/
|
||||
[3]: https://archlinux.org/download/
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2021/03/lightdm-test-mode.jpg
|
||||
[5]: https://www.debugpoint.com/2021/03/failed-to-start-lightdm/
|
||||
[6]: https://wiki.archlinux.org/title/SDDM#Troubleshooting
|
@ -2,7 +2,7 @@
|
||||
[#]: via: "https://www.debugpoint.com/2021/08/enable-minimize-maximize-elementary/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
@ -1,148 +0,0 @@
|
||||
[#]: subject: "10 Features Why GNOME 42 is the Greatest Release Ever"
|
||||
[#]: via: "https://www.debugpoint.com/2022/03/gnome-42-release/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
10 Features Why GNOME 42 is the Greatest Release Ever
|
||||
======
|
||||
We think these GNOME 42 release features make it one of the great releases in GNOME’s history. Here’s why.
|
||||
|
||||
The GNOME Desktop is the most widely used desktop environment today. And it is probably the only desktop that new users to Linux experience for the first time. GNOME is the default desktop environment for Ubuntu and Fedora Linux. Hence its user base is in millions.
|
||||
|
||||
The upcoming GNOME 42 releases soon. And perhaps it’s one of the best releases so far in terms of new features, adoption of modern tech and moving away from the legacy codebase.
|
||||
|
||||
The core, look and feel under the hood changes – everything looks different for new and experienced users.
|
||||
|
||||
![GNOME 42 Desktop][1]
|
||||
|
||||
In this article, we would like to give you a tour of 10 features of GNOME 42, which makes it a significant release.
|
||||
|
||||
### Great Features of GNOME 42 Release
|
||||
|
||||
#### 1. Libadwaita and GTK4
|
||||
|
||||
The libadwaita library is the modern building block for GTK4 applications. It’s the GTK4 port of the libhandy library that defines the visual language of the GNOME desktop. The adoption of libadwaita is complex, and it impacts almost every modules component of the modern GNOME desktop, including the native applications. Imagine how difficult it is for a complete libadwaita and GTK4 adoption in development efforts, testing and other regressions.
|
||||
|
||||
The work started in GNOME 41 is now nearing completion in this GNOME 42 release. But what are the changes?
|
||||
|
||||
The libadwaita and GTK4 changes are visible in every user interface of the entire desktop. For example, you can see the flat buttons, well-justified labels, new colours, rounded corners, refined controls, etc.
|
||||
|
||||
Hence, from Files to Web, the Shell controls, menu items – everything would look stunning with libadwaita and GTK4 in the GNOME 42 release.
|
||||
|
||||
#### 2. Updated GNOME Shell Theme
|
||||
|
||||
The GNOME default Shell theme changed in several places. In this release, those items’ menus, notifications, and overall look are more compact.
|
||||
|
||||
The menu items at the top bar, such as the Calendar or the system tray menu, are now closer to the top bar. The spacing between the text and options inside the menu is decreased.
|
||||
|
||||
![GNOME 42 Shell updates][2]
|
||||
|
||||
The on-screen display notifications are changed. Earlier, it used to be the large boxes with notification labels that are now changed to “pills” with a lesser display footprint.
|
||||
|
||||
![Revamped OSD and menu in GNOME 42][3]
|
||||
|
||||
And also, some inside performance boost makes GNOME 42 much faster than its predecessors.
|
||||
|
||||
#### 3. Adaptive Dark Theme
|
||||
|
||||
If you love dark themes and want your app to honour the system’s dark look, you are in for a treat. The GNOME 42, with the help of libadwaita, brings native dark mode for all the supported applications.
|
||||
|
||||
If you choose a dark theme for GNOME Shell, the apps also follow that shell’s system style.
|
||||
|
||||
For example, if you choose the below option in the new Text editor, it changes to a dark theme when you change the GNOME Shell theme.
|
||||
|
||||
![This option makes it follow dark and light theme automatically][4]
|
||||
|
||||
However, this feature needs to be implemented by the app developer to consume the exposed Shell settings.
|
||||
|
||||
#### 4. Revamped System Settings with new Appearances
|
||||
|
||||
The fulcrum of the entire GNOME desktop is its settings window. From the settings window, you can tweak most of the desktop behaviour. The setting application itself is a complex app, and it’s ported to libadwaita. So, the looks of it changed with new styled widgets and controls.
|
||||
|
||||
One of the vital changes in the Settings window is the new Appearance page. This page gives you the option to view and toggle the desktop theme between light and dark.
|
||||
|
||||
The Sharing page in the settings window gives you a redesigned remote desktop dialog showing options and preferences for remote desktop connection via RDP (not VNC).
|
||||
|
||||
![Appearance page in Settings][5]
|
||||
|
||||
#### 5. Wallpaper that switches automatically with theme
|
||||
|
||||
The above appearance page in settings also gives you a nice side-by-side look of the light and dark version. And when you change the system theme, the wallpaper also changes automatically! This is by far the most remarkable feature that GNOME 42 release brings.
|
||||
|
||||
#### 6. Files icon change
|
||||
|
||||
The default folder icons in Files (Nautilus) didn’t change for many years. In my opinion, everything changed over the years, but this piece remains the same. In GNOME 42, the folder icons colour in the Files file manager changes to light blue.
|
||||
|
||||
Arguably, blue might not be the best colour considering every aspect. But blue still goes well with GNOME’s default wallpaper and other component pallets. And a change to the default Files look is always welcome.
|
||||
|
||||
![Files with new color folders in GNOME 42][6]
|
||||
|
||||
#### 7. A brand new text editor
|
||||
|
||||
A new Text Editor replaces the famous and fabulous Gedit in GNOME 42. The Gedit is a powerful and time-tested utility, and replacing all of its functionality takes time. The new Text Editor is built in GTK4 from scratch and brings some outstanding features, including built-in themes and light and dark mode. More features are expected to arrive in Text Editor in future.
|
||||
|
||||
To be clear, Gedit doesn’t go away. It’s still there in the respective Linux distribution’s repo, and you can install it whatever you want.
|
||||
|
||||
You can read our exclusive piece on Gedit and GNOME Text Editor below.
|
||||
|
||||
[Features about GNOME Text Editor][7]
|
||||
|
||||
[Why Gedit is the great text editor][8]
|
||||
|
||||
#### 8. A native screenshot tool
|
||||
|
||||
One of the best features of the GNOME 42 release is the built-in screenshot and screen recording tool. You do not install any additional app for this. Your life will be easier with this tool, which takes care of the screenshot and screen recording with its nifty user interface when you press the `Print Screen` button.
|
||||
|
||||
In earlier releases, hitting the Print Screen takes the entire desktop screenshot and saves it. Now, you need to hit Enter key after pressing Print Screen from the keyboard.
|
||||
|
||||
![GNOME 42 introduces new screenshot tool][9]
|
||||
|
||||
#### 9. Stunning Wallpapers
|
||||
|
||||
A set of awesome wallpapers is about to treat you and give your favourite GNOME 42 desktop a visual uplift. And the wallpapers also have a dark version, which is set automatically when you choose dark over light.
|
||||
|
||||
#### 10. Other Changes
|
||||
|
||||
Some of the misc changes in the GNOME 42 release is the Eye of GNOME (image viewer) received a much-needed performance boost, Web browser GNOME Web now support hardware acceleration and user interface update in Maps. Also, a new Console application is a nice add on to this release which replaces GNOME Terminal.
|
||||
|
||||
So, that’s about significant changes. But many changes make GNOME 42 release is one of the biggest releases in its history.
|
||||
|
||||
### How to get GNOME 42
|
||||
|
||||
GNOME 42 [was released on March 23, 2022][10], and you get to experience it via [GNOME OS][11] right away.
|
||||
|
||||
If you plan to get it via Linux Distribution, you have to wait for a little. [Ubuntu 22.04 LTS][12] will feature GNOME 42 (partial), due April 2022. And [Fedora 36][13], which is expected in April as well.
|
||||
|
||||
If you are an Arch Linux user, GNOME 42 will arrive soon in the main extra repo. Keep a watch on [this page][14] or check your Arch system via the usual `pacman -Syu` command.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/03/gnome-42-release/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-42-Desktop.jpg
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-42-Shell-updates.jpg
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/03/Revamped-OSD-and-menu-in-GNOME-42.jpg
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2022/03/This-option-makes-it-folow-dar-and-light-theme-automatically.jpg
|
||||
[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/Appearance-page-in-Settings.jpg
|
||||
[6]: https://www.debugpoint.com/wp-content/uploads/2022/03/Files-with-new-color-folders-in-GNOME-42.jpg
|
||||
[7]: https://www.debugpoint.com/2021/12/gnome-text-editor/
|
||||
[8]: https://www.debugpoint.com/2021/04/gedit-features/
|
||||
[9]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-42-introduces-new-screenshot-tool.jpg
|
||||
[10]: https://release.gnome.org/42/
|
||||
[11]: https://os.gnome.org/
|
||||
[12]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/
|
||||
[13]: https://www.debugpoint.com/2022/02/fedora-36/
|
||||
[14]: https://archlinux.org/groups/x86_64/gnome/
|
@ -1,193 +0,0 @@
|
||||
[#]: subject: "10 Things to Do After Installing Ubuntu 22.04 [With Bonus Tip]"
|
||||
[#]: via: "https://www.debugpoint.com/2022/04/10-things-to-do-ubuntu-22-04-after-install/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
10 Things to Do After Installing Ubuntu 22.04 [With Bonus Tip]
|
||||
======
|
||||
You may want to try a summary of 10 things after installing Ubuntu 22.04 LTS “Jammy Jellyfish” (GNOME Edition).
|
||||
|
||||
I am sure you are excited to experience the brand new Ubuntu 22.04 LTS and its shiny new features. If you have already installed or upgraded from the prior release, you may want to customise your system before you start using it. Although the customisations are subjective and vary with use cases. However, we give you 10 pointers that you can do after installing Ubuntu 22.04 LTS. I hope it helps.
|
||||
|
||||
### 10 Things to Do After Installing Ubuntu 22.04
|
||||
|
||||
#### 1. Update Your System
|
||||
|
||||
Firstly, you should do some housekeeping after installing Ubuntu 22.04 LTS. Before you begin using the new system and configuring it, ensure that it is up to date with the latest packages from the Ubuntu Jammy repo. So, open a terminal window and run the below commands. Or, open Software Updater from the search.
|
||||
|
||||
```
|
||||
sudo apt update && sudo apt upgrade
|
||||
```
|
||||
|
||||
![Update your Ubuntu 22.04 LTS System][1]
|
||||
|
||||
Software application takes some time to load for the first time; hence you must do it as a number one step to save time later. It is best if you wait until the update finishes. Once the update is complete, open the Software App and ensure it completes downloading the app metadata.
|
||||
|
||||
Finally, when everything completes, reboot your system to proceed.
|
||||
|
||||
#### 2. Opt-In/Opt-Out from data collection and history settings
|
||||
|
||||
Secondly, it’s essential to review the privacy settings before using the system. Because we are all concerned about our usage data, location tracking, etc. So, to check them, open Settings from search and go to Privacy. The items you should review are Location Services and File History usage in your system. Make sure to change them as per your need.
|
||||
|
||||
![Review the privacy settings][2]
|
||||
|
||||
#### 3. Configure KB shortcuts
|
||||
|
||||
To effectively use Ubuntu 22.04 system, keyboard shortcuts are essential. It helps your work faster. So, ideally, keyboard shortcuts are pre-configured, but you may want to change them based on your habits from `Settings > Keyboard > View and Customize Shortcuts`.
|
||||
|
||||
![Configure Keyboard shortcuts in Ubuntu 22.04][3]
|
||||
|
||||
#### 4. Prepare for the backup
|
||||
|
||||
If you plan to use the system for a longer duration, it is super important to create a system checkpoint just after installation. Because in the future, if something goes wrong, you can always revert to your system as a fresh install.
|
||||
|
||||
Ubuntu 22.04 comes with the built-in backup tool – Backups. You can go ahead and use it to create a system checkpoint.
|
||||
|
||||
However, we recommend you use the great backup and restore tool TImeshift. It has many additional options and is well documented for heavy usage. To install Timeshift, you can use software or the terminal commands mentioned below.
|
||||
|
||||
As of writing this post, this Timeshift PPA is yet to be updated for Jammy Jellyfish. So, I would recommend you wait for a couple of days to install it via PPA. You can also monitor PPA updates [here][4]. You can always use the built-in backup tool as mentioned above.
|
||||
|
||||
After installation, launch Timeshift and follow the on-screen instructions to create a system restore point.
|
||||
|
||||
```
|
||||
sudo add-apt-repository -y ppa:teejee2008/ppasudo apt-get updatesudo apt-get install timeshift
|
||||
```
|
||||
|
||||
#### 5. Explore the New Features
|
||||
|
||||
Once you complete the above set of housekeepings, it’s time for you to explore the new features of Ubuntu 22.04. We covered the unique features of Ubuntu 22.04 and its flavours in detail in dedicated posts. You may want to check them out below.
|
||||
|
||||
* [Ubuntu 22.04 LTS – GNOME][5]
|
||||
* [Ubuntu MATE 22.04 LTS][6]
|
||||
* [Kubuntu 22.04 LTS][7]
|
||||
* [Xubuntu 22.04 LTS][8]
|
||||
* [Ubuntu Budgie 22.04 LTS][9]
|
||||
* [Lubuntu 22.04 LTS][10]
|
||||
* [Ubuntu Kylin 22.04 LTS][11]
|
||||
* [Ubuntu Studio 22.04 LTS][12]
|
||||
* [Ubuntu 20.04 vs Ubuntu 22.04 – Differences][13]
|
||||
|
||||
#### 6. Experience the first-ever Accent Colour in Ubuntu
|
||||
|
||||
In addition to the above items, you may find the new accent colour interesting in this release. This is one of the new features which was due for a long time. So, in the Appearance settings, you can find the selected colour options.
|
||||
|
||||
You can choose your favourite colour and see the selection, the folder icon gradient changes with the colour. However, you can not select the custom colour at the moment. I am sure it will eventually come up in future releases.
|
||||
|
||||
![How Accent colour change impact looks in Ubuntu 22.04 LTS][14]
|
||||
|
||||
#### 7. Dark Mode and new controls
|
||||
|
||||
Besides that accent colour, this release, alongside GNOME 42, brings new style changes, thanks to GTK4 and libadwaita adoption. With this change, the built-in dark mode can apply across the desktop and application that supports it. Also, the controls such as buttons, notifications, rounded corners, scroll bars, etc. all are more stylish and compact in this release.
|
||||
|
||||
All of these together make this release a beautiful one.
|
||||
|
||||
#### 8. Install GNOME Extensions
|
||||
|
||||
Additionally, you can take advantage of hundreds of excellent GNOME Extensions available. For example, you may want to customise the default Dock, Or, like a super cool blur effect, etc. – you can quickly achieve these using the extensions.
|
||||
|
||||
We list here some of the exciting extensions you may want to try out after installing this release.
|
||||
|
||||
* [Blur My Shell][15] – get an exciting blur effect on the default shell
|
||||
* [Floating Dock][16] – make your dock float wherever you want
|
||||
* Dash to Dock: Enables you to control your Dash across the screen with various options.
|
||||
* Caffeine: Enables you more productively.
|
||||
* [Time ++][17]: Super handy extension to give you an alarm clock, stopwatch, time tracker, Pomodoro, and todo.txt manager – all together.
|
||||
* [NetSpeed][18]: Show your internet download and upload speed in the system tray.
|
||||
|
||||
Before installing the above extensions, open a terminal prompt and install the chrome-gnome-shell using the below command to enable extensions.
|
||||
|
||||
```
|
||||
sudo apt-get install chrome-gnome-shell
|
||||
```
|
||||
|
||||
Then go to [https://extensions.gnome.org][19] and enable the extensions for Firefox.
|
||||
|
||||
If you use the Snap version of Firefox, then the extension connectivity won’t work. So, uninstall the Firefox Snap version and [use an alternate installation][20] Or use a different browser (Such as Google Chrome, Chromium) that has a .deb version. Or, install the extension using the manual steps [outlined here in this article][21].
|
||||
|
||||
#### 9. Configure Email Client
|
||||
|
||||
Moreover, a native desktop email client is always preferable over browser-based email access. Hence, I would recommend you configure Thunderbird with your email service provider. The setup is more straightforward and wizard-driven. It helps for offline and drafting work for heavy email users.
|
||||
|
||||
Alternatively, if you do not like Thunderbird, try to check out options – you can read our list of [top free native Linux desktop email clients list][22] and choose your favourite.
|
||||
|
||||
#### 10. Install some additional packages and Software
|
||||
|
||||
In addition to the above items, you should install some additional packages and software because Ubuntu doesn’t come with extra apps other than the native GNOME applications. We list here some of the important applications needed for basic desktop usage.
|
||||
|
||||
You can install them using the Software application.
|
||||
|
||||
* GIMP – Advanced photo editor
|
||||
* VLC – Media play that plays anything without the need for additional codecs
|
||||
* Google Chrome – Browser for Google users.
|
||||
* Leafpad – A lightweight text editor (even lightweight from default gedit)
|
||||
* Synaptic – A far better package manager
|
||||
|
||||
Moreover, while installing Ubuntu, if you have not selected to install the restricted software to play audio and video media files, you can do it now. Because GNOME default Video player (Totem) can not play the basic mp4, etc. files without restricted software.
|
||||
|
||||
So, to install them, open the terminal and run the below command to install.
|
||||
|
||||
```
|
||||
sudo apt install ubuntu-restricted-extras
|
||||
```
|
||||
|
||||
You can now play most video/audio files without any problem in Ubuntu.
|
||||
|
||||
#### Bonus Tip 💡
|
||||
|
||||
Finally, I recommend you set up Flatpak the first time after installing Ubuntu 22.04 LTS. Because over time, I am sure you would install many Flatpak applications.
|
||||
|
||||
To set up Flatpak, [visit this page][23] and follow the instructions.
|
||||
|
||||
Once you complete the setup, I recommend installing the below two Flatpak apps. The Extension application helps you manage the GNOME Extensions installed in your system. Other than that, the Flatseal application helps you manage Flatpak applications’ permissions in a super friendly way.
|
||||
|
||||
* [Flatseal][24] – Manage Flatpak permissions
|
||||
* [Extensions][25] – Manage GNOME extensions
|
||||
|
||||
### Summary
|
||||
|
||||
Also, one of the crucial debatable things to do after installing Ubuntu 22.04 is to delete Snap. Deleting Snap is a bit advanced process and may lead to an unstable system because of the tight coupling of Snap in Ubuntu.
|
||||
|
||||
That said, I hope this list gives you and new users of Ubuntu some idea about making a productive Ubuntu 22.04 LTS desktop.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/04/10-things-to-do-ubuntu-22-04-after-install/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2022/04/Update-your-Ubuntu-22.04-LTS-System.jpg
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2022/04/Review-the-privacy-settings.jpg
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/04/Configure-Keyboard-shortcuts-in-Ubuntu-22.04.jpg
|
||||
[4]: https://launchpad.net/~teejee2008/+archive/ubuntu/timeshift/+packages
|
||||
[5]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/
|
||||
[6]: https://www.debugpoint.com/2022/04/ubuntu-mate-22-04-lts/
|
||||
[7]: https://www.debugpoint.com/2022/04/kubuntu-22-04-lts/
|
||||
[8]: https://www.debugpoint.com/2022/04/xubuntu-22-04-lts/
|
||||
[9]: https://www.debugpoint.com/2022/04/ubuntu-budgie-22-04-lts/
|
||||
[10]: https://www.debugpoint.com/2022/04/lubuntu-22-04-lts/
|
||||
[11]: https://www.debugpoint.com/2022/04/ubuntu-kylin-22-04-lts/
|
||||
[12]: https://www.debugpoint.com/2022/04/ubuntu-studio-22-04-lts/
|
||||
[13]: https://www.debugpoint.com/2022/04/difference-ubuntu-22-04-20-04/
|
||||
[14]: https://www.debugpoint.com/wp-content/uploads/2022/04/How-Accent-colour-change-impact-looks-in-Ubuntu-22.04-LTS.jpg
|
||||
[15]: https://extensions.gnome.org/extension/3193/blur-my-shell/
|
||||
[16]: https://extensions.gnome.org/extension/3730/floating-dock/
|
||||
[17]: https://extensions.gnome.org/extension/1238/time/
|
||||
[18]: https://extensions.gnome.org/extension/104/netspeed/
|
||||
[19]: https://extensions.gnome.org/
|
||||
[20]: https://www.debugpoint.com/2021/09/remove-firefox-snap-ubuntu/
|
||||
[21]: https://www.debugpoint.com/2021/10/manual-installation-gnome-extension/
|
||||
[22]: https://www.debugpoint.com/2019/06/best-email-client-linux-windows/
|
||||
[23]: https://flatpak.org/setup/
|
||||
[24]: https://flathub.org/apps/details/com.github.tchx84.Flatseal
|
||||
[25]: https://flathub.org/apps/details/org.gnome.Extensions
|
@ -1,196 +0,0 @@
|
||||
[#]: subject: "Ubuntu 20.04 vs 22.04: What Has Changed Between the Two LTS Releases?"
|
||||
[#]: via: "https://itsfoss.com/ubuntu-20-04-vs-22-04/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Ubuntu 20.04 vs 22.04: What Has Changed Between the Two LTS Releases?
|
||||
======
|
||||
|
||||
Ubuntu 20.04 was an impressive release with a [list of exciting features][1].
|
||||
|
||||
Even with GNOME 3.36 on board, we had a fair share of visual upgrades. Now, Ubuntu 22.04 LTS comes packed with GNOME 42. So, naturally, there should be a variety of visual refinements.
|
||||
|
||||
Not just limited to the look and feel, [Ubuntu 22.04 LTS has numerous interesting features][2] to offer as well.
|
||||
|
||||
Here, I try to compare the feature offerings between the two to help you decide if you should upgrade.
|
||||
|
||||
### 1\. Support Lifespan
|
||||
|
||||
Undoubtedly, both being LTS ([Long-Term Release][3]) versions, you can pick any of them and still be able to use them for a couple of years, at the very least.
|
||||
|
||||
To be accurate, Ubuntu 22.04 will be supported with maintenance updates for **five years** until **April 2027**.
|
||||
|
||||
And, Ubuntu 20.04 LTS will be supported until **2025**, meaning, you have **three more years** of software update support.
|
||||
|
||||
### 2\. Logo and Branding
|
||||
|
||||
Ubuntu’s branding focused on a purple accent for some elements like toggles, sliders, etc. on Ubuntu 20.04 LTS.
|
||||
|
||||
However, with Ubuntu 22.04 LTS, they focused on a different accent color with changes to the icon theme as well.
|
||||
|
||||
Not to forget, the [new Ubuntu 22.04 logo looks weird][4], and as of now, we do not have a proper logo file available to use on images.
|
||||
|
||||
The logo associated with Ubuntu 20.04 was clean, without any solid rectangle structure attached to it.
|
||||
|
||||
![][5]
|
||||
|
||||
Accordingly, the boot animation has changed as well, reflecting the latest branding.
|
||||
|
||||
### 3\. Accent Color Selection
|
||||
|
||||
With Ubuntu 20.04, you couldn’t select custom accent colors. You had to stick with the default or customize things yourself with [GNOME Tweaks][6].
|
||||
|
||||
![Ubuntu 20.04 vs Ubuntu 22.04 \(Appearance setting\)][7]
|
||||
|
||||
However, that changes with Ubuntu 22.04 LTS, you can finally [select additional accent colors in Ubuntu 22.04 LTS][8].
|
||||
|
||||
### 4\. Wallpapers
|
||||
|
||||
![Ubuntu 20.04 vs Ubuntu 22.04 \(Desktop featuring default wallpapers\)][9]
|
||||
|
||||
It is obvious to expect a new wallpaper that reflects the name of the Ubuntu upgrade.
|
||||
|
||||
Ubuntu 22.04 is code named as “**Jammy Jellyfish**“, so the new wallpaper illustrates the same beautifully:
|
||||
|
||||
On the other hand, Ubuntu 20.04 is code named “**Focal Fossa**”, which refers to a cat-like predator based found in Madagascar.
|
||||
|
||||
Both have similar color combinations, but I tend to like the new one.
|
||||
|
||||
### 5\. Log in Screen and Lock screen
|
||||
|
||||
As per the changes to the default theme and accent colors, the choices for the log-in and lock screen have differences.
|
||||
|
||||
Both of the lock screens offer a blurred view of the default wallpapers, with Ubuntu 20.04 turning out to be darker than Ubuntu 22.04.
|
||||
|
||||
![Ubuntu 20.04 vs Ubuntu 22.04 \(Lockscreen\)][10]
|
||||
|
||||
The log in screen is entirely different in Ubuntu 22.04 with a black background, here’s how it looks:
|
||||
|
||||
![Ubuntu 20.04 vs Ubuntu 22.04 \(Log in screen\)][11]
|
||||
|
||||
### 6\. Appearance Settings & Dark Mode Improvements
|
||||
|
||||
Ubuntu 20.04 did feature a dark mode to keep up with modern standards. With Ubuntu 22.04 LTS, the dark mode has improved to provide you with a complete system-wide dark mode experience.
|
||||
|
||||
![Ubuntu 20.04 vs Ubuntu 22.04 \(Appearance settings\)][12]
|
||||
|
||||
Along with the new dark mode implementation, you get to see an entire revamp for the appearance settings, giving you more options in an organized manner.
|
||||
|
||||
Furthermore, you can notice that Ubuntu 22.04 LTS no longer features the standard theme, so it’s either entirely light or dark.
|
||||
|
||||
### 7\. GNOME 42 and the horizontal layout
|
||||
|
||||
Ubuntu 20.04 makes use of GNOME 3.36.8 to provide a stable experience without a lot of appearance tweaks.
|
||||
|
||||
But, all thanks to GNOME 42, the dark mode improvements, appearance tweaks, it’s all part of the [GNOME 42 features][13].
|
||||
|
||||
Not just the visual changes, but the entire workflow should feel a bit different with the revamped activities view, app menu, and further adjustments:
|
||||
|
||||
![Ubuntu 20.04 vs Ubuntu 22.04 \(Activities\)][14]
|
||||
|
||||
The three finger swipe also provides a smooth and rich experience for accessing the activity overview.
|
||||
|
||||
Ubuntu 22.04 did not implement the horizontal dock. But, it’s still a significant change to offer something different for a good user experience.
|
||||
|
||||
The application menu also looks a tad different, including the virtual desktops in the same view compared to Ubuntu 20.04.
|
||||
|
||||
![Ubuntu 20.04 vs Ubuntu 22.04 \(App menu\)][15]
|
||||
|
||||
### 8\. Multitasking Capabilities
|
||||
|
||||
Ubuntu 22.04 now includes a dedicated menu in the system settings to facilitate enhancements to multitasking with the use of Hot Corner, Screen Edges, Workspace tweaks, and more.
|
||||
|
||||
![][16]
|
||||
|
||||
You do not find these options with Ubuntu 20.04 LTS.
|
||||
|
||||
### 9\. Linux kernel version
|
||||
|
||||
Ubuntu 22.04 features multiple Linux Kernel versions as per the product. Ubuntu 22.04 Desktop uses [Linux Kernel 5.17][17].
|
||||
|
||||
The desktop version also uses a rolling HWE kernel for previous-gen hardware based on Linux Kernel 5.15, to exist until the first point release.
|
||||
|
||||
Ubuntu 22.04 server uses non-rolling Linux Kernel 5.15 LTS.
|
||||
|
||||
On the other hand, Ubuntu 20.04.4, features [Linux Kernel 5.13][18] at the time of writing this.
|
||||
|
||||
### 10\. Shrinking the Dock in Ubuntu 22.04
|
||||
|
||||
Surprisingly, you can shrink the dock on Ubuntu 22.04 to change the default look. You need to disable the “Panel” mode under the Dock settings in Appearance tweaks, as shown in the image below:
|
||||
|
||||
![][19]
|
||||
|
||||
It may not be a massive change, but some do appreciate a compact dock, instead of having the dock stick to the entire left side of the screen, ditching the Unity-type look.
|
||||
|
||||
### 11\. Screenshot tool
|
||||
|
||||
Ubuntu 20.04 LTS utilized GNOME’s screenshot tool to get things done. It was a simple and effective tool.
|
||||
|
||||
![][20]
|
||||
|
||||
With GNOME 42 on board, Ubuntu 22.04 LTS has the latest screenshot tool and received upgrades to its UI with a modern layout, and the ability to record the screen as well.
|
||||
|
||||
### 12\. File Manager
|
||||
|
||||
The file manager has a refreshed look/feel compared to Ubuntu 20.04 LTS. Of course, the standard theme on Ubuntu 20.04 can no longer be seen with Ubuntu 22.04 LTS, so that’s a part of the visible change.
|
||||
|
||||
![][21]
|
||||
|
||||
### 13\. Software Center
|
||||
|
||||
Ubuntu 22.04 LTS features an improved software center that provides you more information on the software, clarifying the ratings, project details, download size, status, and more.
|
||||
|
||||
![][22]
|
||||
|
||||
Ubuntu 20.04 LTS did have improvements to it back then, but it is a simpler software center comparatively.
|
||||
|
||||
![Ubuntu 22.04 LTS \(Software Center\)][23]
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
Ubuntu 22.04 LTS is certainly a major overhaul in terms of user experience compared to Ubuntu 20.04.
|
||||
|
||||
Some changes may not be as functional as they look, so as per your preferences, it is best to evaluate your requirements if you want to switch to the latest Ubuntu 22.04 LTS or stick to Ubuntu 20.04 LTS.
|
||||
|
||||
What do you think about the difference between the two LTS releases? Are the differences compelling enough for you to switch? Let me know your thoughts in the comments section below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/ubuntu-20-04-vs-22-04/
|
||||
|
||||
作者:[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://itsfoss.com/ubuntu-20-04-release-features/
|
||||
[2]: https://itsfoss.com/ubuntu-22-04-release-features/
|
||||
[3]: https://itsfoss.com/long-term-support-lts/
|
||||
[4]: https://news.itsfoss.com/ubuntu-new-logo/
|
||||
[5]: https://itsfoss.com/wp-content/uploads/2022/04/cof_orange_hex.jpg
|
||||
[6]: https://itsfoss.com/gnome-tweak-tool/
|
||||
[7]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-20-04-appearance.jpg
|
||||
[8]: https://news.itsfoss.com/ubuntu-22-04-accent-color/
|
||||
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/04/ubuntu-20-04-desktop.jpg?ssl=1
|
||||
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2022/04/ubuntu-20-04-lockscreen-1.png?ssl=1
|
||||
[11]: https://itsfoss.com/wp-content/uploads/2022/04/login-screen.png
|
||||
[12]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-20-04-dark-mode.jpg
|
||||
[13]: https://news.itsfoss.com/gnome-42-features/
|
||||
[14]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-20-04-activities.jpg
|
||||
[15]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-20-04-application-view.jpg
|
||||
[16]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-multitasking.jpg
|
||||
[17]: https://news.itsfoss.com/linux-kernel-5-17-release/
|
||||
[18]: https://news.itsfoss.com/linux-kernel-5-13-release/
|
||||
[19]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-dock-shrink.jpg
|
||||
[20]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-20-04-screenshot.jpg
|
||||
[21]: https://itsfoss.com/wp-content/uploads/2022/04/filemanager.jpg
|
||||
[22]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-20-04-software-center.jpg
|
||||
[23]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-software.jpg
|
@ -1,346 +0,0 @@
|
||||
[#]: subject: "Things to do After Installing Ubuntu 22.04"
|
||||
[#]: via: "https://itsfoss.com/things-to-do-after-installing-ubuntu-22-04/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Things to do After Installing Ubuntu 22.04
|
||||
======
|
||||
|
||||
_**Here is a list of simple tweaks and things to do after installing Ubuntu 22.04, to get a smoother and better experience.**_
|
||||
|
||||
I presume that you are absolutely new to Ubuntu while sharing these tips. If you are an existing Ubuntu user, some tips may sound too elementary to you. However, you’ll still find a few good tweaks that are specific to the [new Ubuntu 22.04 features][1].
|
||||
|
||||
### Things to do after installing Ubuntu 22.04 LTS “Jammy Jellyfish”
|
||||
|
||||
Again, what I recommend here is based on my experience and preference. Yours could be different from mine. Skim around and see if you get some interesting and useful advice.
|
||||
|
||||
Another thing. Most of the suggestions are for the default GNOME desktop environment. If you are using the default Ubuntu, you should be good. If you have doubt, please [check the Ubuntu version][2] and [desktop environment you are using][3].
|
||||
|
||||
Let’s see them one by one.
|
||||
|
||||
#### 1\. Getting your system ready with updates and repositories
|
||||
|
||||
The first thing you should do after installing Ubuntu is to update it. Linux works on a local database of available packages and it needs to be synced for you to be able to install any software.
|
||||
|
||||
It is straightforward to [update Ubuntu][4]. You can run the software updater from the menu (press the Windows key and search for software updater):
|
||||
|
||||
![][5]
|
||||
|
||||
Now, make sure that you have [universe and multiverse repositories enabled][6]. These repositories should be enabled already, but no harm in verifying that. You’ll have access to a lot more software with these repositories.
|
||||
|
||||
Search for Software & Updates in the menu:
|
||||
|
||||
![][7]
|
||||
|
||||
Check the boxes in front of the repositories:
|
||||
|
||||
![][8]
|
||||
|
||||
#### 2\. Install media codecs to play various kinds of media files
|
||||
|
||||
To play media files like MP3, MPEG4, AVI, etc, you’ll need to install media codecs. Ubuntu doesn’t install it by default because of copyright issues in various countries.
|
||||
|
||||
You can install these media codecs as an individual [using the Ubuntu Restricted Extra package][9]. It installs media codecs and [Microsoft True Type Fonts on your Ubuntu system][10].
|
||||
|
||||
You can install it by using this command:
|
||||
|
||||
```
|
||||
|
||||
sudo apt install ubuntu-restricted-extras
|
||||
|
||||
```
|
||||
|
||||
If you encounter the EULA or the license screen, remember to use the tab key to select between the options and then hit enter to confirm your choice.
|
||||
|
||||
![Press tab to select OK and press enter][11]
|
||||
|
||||
#### 3\. Install applications of your choice from the software center or the web
|
||||
|
||||
A fresh installed Ubuntu system will have only a limited set of necessary applications installed.
|
||||
|
||||
For the rest, you can find them in the software center, through the apt package manager, or get them from their official websites.
|
||||
|
||||
Look into the software center first and see if the application is available here.
|
||||
|
||||
![][12]
|
||||
|
||||
Some applications provide an easy-to-use DEB file on their website. For example, to [install Google Chrome on Ubuntu][13], you can download it from its official website.
|
||||
|
||||
Usually, you double-click on the deb file and install the application using the software center. If it opens the deb file in archive manager, [use this trick][14] to make it work.
|
||||
|
||||
#### 4\. Enjoy gaming on Linux with Steam Proton
|
||||
|
||||
There are plenty of tools that allow you to play games on Linux. Steam is perhaps the most convenient, mainstream way of getting thousands of games.
|
||||
|
||||
[Install Steam on Ubuntu][15] and [enable Steam Play][16]. You should have access to a good set of games, provided your system has enough hardware configuration to run all kinds of games.
|
||||
|
||||
Needs some suggestions? Check this list of [indie games for Linux users][17].
|
||||
|
||||
#### 5\. Get familiar with auto-updates
|
||||
|
||||
Your Ubuntu system automatically checks for system updates and installs them automatically when needed.
|
||||
|
||||
This check happens when your system starts. If you try to perform a system update or install an application at this time, you’ll see a warning or message to wait.
|
||||
|
||||
You can control the auto-updates behavior if you like.
|
||||
|
||||
![][18]
|
||||
|
||||
#### 6\. Give your Ubuntu a different color
|
||||
|
||||
Ubuntu 22.04 gives you the ability to choose a different color than the usual orange. There are nine other colors to choose from. From the Settings-Appearance, select the color you want and it will give change the accent color of your system.
|
||||
|
||||
![][19]
|
||||
|
||||
#### 7\. Get familiar with the new screenshot tool
|
||||
|
||||
Ubuntu 22.04 has a new screenshot tool that also includes the screencast (video recording of desktop) option.
|
||||
|
||||
When you press the Print Screen button to take the screenshot, it opens the UI and gives you the option to take the screenshot of the selected area, entire screen, or current application window. The screenshots are copied to the clipboard and saved to the Screenshots folder under the Pictures directory.
|
||||
|
||||
![][20]
|
||||
|
||||
You can also record the screen with the screencast option available in the same interface (click the video camera icon). It lets you record the entire screen and works very well under Wayland.
|
||||
|
||||
#### 8\. Experiment with the dock
|
||||
|
||||
Go to the Appearance Settings and you’ll see the option for disabling Panel mode.
|
||||
|
||||
![][21]
|
||||
|
||||
This will shrink the launcher on the left side and make it look like the Vanilla GNOME launcher. You should use it with ‘auto-hide’ option for better experience.
|
||||
|
||||
You may [move the launcher to the bottom][22] or the right side if you like. There are plenty of [ways to customize the dock in Ubuntu][23].
|
||||
|
||||
#### 9\. Get GNOME Tweaks tool for additional customization
|
||||
|
||||
Though the system settings application now includes several new options, [GNOME Tweaks still provides additional customization options][24].
|
||||
|
||||
With GNOME Tweaks, you can move the windows control button on the left, change themes, change the lock screen background, etc. More on its usage later. For the moment, just get this tool from the software center or use the apt command.
|
||||
|
||||
![][25]
|
||||
|
||||
#### 10\. Minimize to click
|
||||
|
||||
When you click an icon in the launcher, it opens the application. You click the icon again and nothing happens.
|
||||
|
||||
I don’t like this. I prefer that when I click on the icon of an application in focus, it gets minimized.
|
||||
|
||||
If you share the same preference, use this command in the terminal to [enable minimize on click in Ubuntu][26]:
|
||||
|
||||
```
|
||||
|
||||
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'
|
||||
|
||||
```
|
||||
|
||||
#### 11\. Get familiar with the terminal
|
||||
|
||||
![][27]
|
||||
|
||||
Speaking of the terminal, please don’t be too scared of this awesome tool. I know that the command line gives cold feet to many new Linux users. However, knowing a little could help you big in long run.
|
||||
|
||||
I am not going to teach you the basics of the Linux command line here. Though I have written a pretty good post that tells you several [useful information on using the terminal in Ubuntu][28]. You should read the article even if you can use the terminal every now and then.
|
||||
|
||||
#### 12\. Few tweaks for laptop users
|
||||
|
||||
If you are using Ubuntu 22.04 on a laptop, here are a few tips on improving your performance and getting rid of annoyances.
|
||||
|
||||
You’ll notice that you have to press the left touchpad button for the left mouse button action. This is annoying. Enable the tap for click option and just tap the touchpad anywhere to get the left mouse click.
|
||||
|
||||
![][29]
|
||||
|
||||
From the Power settings, **enable the battery percentage display** to keep a track of the remaining battery on your laptop.
|
||||
|
||||
![][30]
|
||||
|
||||
Since you’ll be using your system on battery power, **choose an appropriate power profile** under the Power settings.
|
||||
|
||||
![][31]
|
||||
|
||||
This is perhaps not entirely for laptop users. By default, Ubuntu locks the screen after 5 minutes of inactivity and puts the system in suspend mode after 20 minutes of activity.
|
||||
|
||||
I don’t like entering my password so frequently. I **prefer to lock the screen at my convenience**. If you share the same feeling, you can also disable this behavior.
|
||||
|
||||
![][32]
|
||||
|
||||
#### 13\. Disable characters from GNOME search
|
||||
|
||||
The GNOME Search is an excellent tool for finding installed applications, files, etc. However, you’ll notice that it often shows matching ‘characters’.
|
||||
|
||||
![Emojis Desktop Search Ubuntu][33]
|
||||
|
||||
Actually, your Ubuntu system has built-in emoji support. Apart from the regular emoticons, the system also has support for letters in various languages like Thai, Latin, Vietnamese, etc.
|
||||
|
||||
When you search for something, the term could also match these special characters. Click on it and it gets copied to the clipboard and you can paste them wherever you want.
|
||||
|
||||
If you are not going to use this feature, you should disable the characters’ search.
|
||||
|
||||
![][34]
|
||||
|
||||
#### 14\. Use the night light feature to reduce eye strain at night
|
||||
|
||||
My favorite feature and I am glad it now works in the multi-monitor settings as well.
|
||||
|
||||
[Enable the night light feature][35] so that it adds a yellow tint to the screen which is less pinching than the white light at night.
|
||||
|
||||
Go to Settings -> Displays, switch to Night Light tab, and enable it. You can also set the ‘yellowness’ as per your liking.
|
||||
|
||||
![][36]
|
||||
|
||||
#### 15\. Enable fractional scaling if you’ve got a 4K screen
|
||||
|
||||
If you have a 2K or 4K screen, you’ll find that the icons, fonts and folders look too small. You should enable the fractional scaling and scale the size that suits your preference.
|
||||
|
||||
![][37]
|
||||
|
||||
#### 16\. Know that you have the option to go back to Xorg
|
||||
|
||||
Ubuntu 22.04 defaults to Wayland once again if you don’t have an Nvidia system. Wayland is the modern replacement of the legacy x server and it works very well with the newer GNOME components.
|
||||
|
||||
However, some older applications may not work properly under Wayland. For example, most screen recording tools don’t support Wayland yet.
|
||||
|
||||
If you encounter such a situation where a must-use application doesn’t work in Wayland, log out from the session and click on the gear icon in the bottom right to [switch to the X display session][38].
|
||||
|
||||
#### 17\. Classic GNOME is still available
|
||||
|
||||
Speaking of options, you can also access the classic GNOME. If you are not aware, the classic GNOME or GNOME version 2 was a popular desktop choice before GNOME 3 arrived with radical new changes around 2011.
|
||||
|
||||
GNOME 2 gave birth to the Cinnamon and MATE desktop environment because its die-hard users just didn’t want to give up on the classic interface. Perhaps that’s the reason why GNOME Classic has always been a part of Ubuntu even though it moved to Unity and (modern) GNOME.
|
||||
|
||||
Though it says classic, it doesn’t look as dated as it was in 2010.
|
||||
|
||||
![GNOME Classic][39]
|
||||
|
||||
When you log out of the system, click on the user name and you should see a gear symbol at the bottom. Click on it and you should see the classic GNOME option here.
|
||||
|
||||
#### 18\. Know about cleaning your system
|
||||
|
||||
The classic apt autoremove command is a good way to remove packages that are not required anymore.
|
||||
|
||||
```
|
||||
|
||||
sudo apt autoremove
|
||||
|
||||
```
|
||||
|
||||
I think it is also part of the software updater tool now meaning it runs the autoremove command after running updates or so I have noticed.
|
||||
|
||||
Apart from that, there are a [few more ways to clean up your Ubuntu system][40]. GUI tools like Stacer are now available in the repositories and you may use them to clean your system without going into the command line.
|
||||
|
||||
#### 19\. Master the keyboard shortcuts
|
||||
|
||||
I am not asking you to ditch the mouse altogether but trust me on this using the keyboard shortcut saves plenty of time.
|
||||
|
||||
From the application switcher to opening the terminal, things feel a lot faster with the correct shortcuts at your finger.
|
||||
|
||||
![keyboard switching with key shortcut in Ubuntu][41]
|
||||
|
||||
I have an entire article dedicated to [keyboard shortcuts in Ubuntu][42]. Feel free to check that out.
|
||||
|
||||
#### 20\. Use the ‘do not disturb mode to focus on work
|
||||
|
||||
There are plenty of productivity tools available for Ubuntu but this little hack is my favorite.
|
||||
|
||||
When I am working on something that requires my complete focus, like writing this article, I enable the Do Not Disturb mode.
|
||||
|
||||
![][43]
|
||||
|
||||
With that, the notifications from messaging services stop appearing on the screen and I don’t get distracted. Once I am back to relaxed working, I disable it again.
|
||||
|
||||
#### 21\. Get back the original Firefox or go for some other browser
|
||||
|
||||
Ubuntu 22.04 Jammy Jellyfish comes with the Snap version of Firefox. It takes longer to start and forces you to log in to the accounts again and again.
|
||||
|
||||
Try the Snap version of Firefox first. If it works for you, good. If not and you feel fed up with the Firefox experience, you have two options:
|
||||
|
||||
* Switch to another browser like Brave, Vivaldi, LibreWolf, etc
|
||||
* Switch to Firefox ESR or a non-Snap version of Firefox
|
||||
|
||||
|
||||
|
||||
Firefox ESR (extended support release) doesn’t come with the latest feature like the regular Firefox but it is maintained for security and stability fixes.
|
||||
|
||||
There are a couple of ways of [getting the non-Snap version of Firefox][44] as described by Jim at Ubuntu Handbook. However, it is slightly more complicated than just adding a PPA.
|
||||
|
||||
#### 22\. Get missing Windows back if you use a dual boot system
|
||||
|
||||
During the early testing of Ubuntu 22.04, I noticed a known bug that came with the new Grub 2.6. It had disabled the os-prober by default. This means that Grub won’t check for the presence of other operating systems. In other words, it won’t see Windows (or other Linux distributions) if you opted for a dual boot system.
|
||||
|
||||
Now, I haven’t checked if this issue has been fixed or not but if you face this issue with your dual boot system, then edit the /etc/default/grub file to add GRUB_DISABLE_OS_PROBER=false to this file. Save this file, [update grub][45] and Grub should see other operating systems now.
|
||||
|
||||
#### Where to go from here?
|
||||
|
||||
![][46]
|
||||
|
||||
Honestly, you could do a lot more even after you have done all the points I mentioned in this list here. There is no end to things you could do after installing Ubuntu 22.04.
|
||||
|
||||
If you are new, there is plenty to explore. If you are an experienced one, you could still spend considerable time tweaking and setting up your system as per your liking.
|
||||
|
||||
It all comes down to personal preference. Some people would just do some basic changes and go on with using the operating system. Some folks would spend hours setting everything to perfection.
|
||||
|
||||
Now that I have finished my recommendations, I would like your views. Did you find some useful tips here? What other usual stuff do you do after installing Ubuntu?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/things-to-do-after-installing-ubuntu-22-04/
|
||||
|
||||
作者:[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/ubuntu-22-04-release-features/
|
||||
[2]: https://itsfoss.com/how-to-know-ubuntu-unity-version/
|
||||
[3]: https://itsfoss.com/find-desktop-environment/
|
||||
[4]: https://itsfoss.com/update-ubuntu/
|
||||
[5]: https://itsfoss.com/wp-content/uploads/2022/04/software-updater-ubuntu-22-04.jpg
|
||||
[6]: https://itsfoss.com/ubuntu-repositories/
|
||||
[7]: https://itsfoss.com/wp-content/uploads/2022/04/software-and-updates-tool.jpg
|
||||
[8]: https://itsfoss.com/wp-content/uploads/2022/04/enable-additional-repo-ubuntu-22-04.jpg
|
||||
[9]: https://itsfoss.com/install-media-codecs-ubuntu/
|
||||
[10]: https://itsfoss.com/install-microsoft-fonts-ubuntu/
|
||||
[11]: https://itsfoss.com/wp-content/uploads/2020/02/installing_ubuntu_restricted_extras.jpg
|
||||
[12]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-software-center-22-04-800x539.png
|
||||
[13]: https://itsfoss.com/install-chrome-ubuntu/
|
||||
[14]: https://itsfoss.com/cant-install-deb-file-ubuntu/
|
||||
[15]: https://itsfoss.com/install-steam-ubuntu-linux/
|
||||
[16]: https://itsfoss.com/steam-play/
|
||||
[17]: https://itsfoss.com/best-indie-rpg-games-linux/
|
||||
[18]: https://itsfoss.com/wp-content/uploads/2020/04/auto-updates-ubuntu-800x361.png
|
||||
[19]: https://itsfoss.com/wp-content/uploads/2022/03/ubuntu-22-04-appearance-settings.png
|
||||
[20]: https://news.itsfoss.com/wp-content/uploads/2022/03/ubuntu-22-04-screenshot-ui.jpg
|
||||
[21]: https://itsfoss.com/wp-content/uploads/2022/04/panel-mode-ubuntu-22-800x529.png
|
||||
[22]: https://itsfoss.com/move-unity-launcher-bottom/
|
||||
[23]: https://itsfoss.com/customize-ubuntu-dock/
|
||||
[24]: https://itsfoss.com/gnome-tweak-tool/
|
||||
[25]: https://itsfoss.com/wp-content/uploads/2020/04/gnome-tweaks-tool-ubuntu-20-04-800x551.png
|
||||
[26]: https://itsfoss.com/click-to-minimize-ubuntu/
|
||||
[27]: https://itsfoss.com/wp-content/uploads/2021/12/linux-terminal-introduction.png
|
||||
[28]: https://itsfoss.com/basic-terminal-tips-ubuntu/
|
||||
[29]: https://itsfoss.com/wp-content/uploads/2022/04/tap-to-click-ubuntu-22-800x483.png
|
||||
[30]: https://itsfoss.com/wp-content/uploads/2022/04/show-battery-percentage-ubuntu-22-800x489.png
|
||||
[31]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-new-power-profile-800x489.png
|
||||
[32]: https://itsfoss.com/wp-content/uploads/2022/04/Power-Settings-in-Ubuntu.jpg
|
||||
[33]: https://itsfoss.com/wp-content/uploads/2020/04/emojis-desktop-search-ubuntu.jpg
|
||||
[34]: https://itsfoss.com/wp-content/uploads/2020/04/search-settings-control-ubuntu-800x534.png
|
||||
[35]: https://itsfoss.com/night-shift-flux-ubuntu-linux/
|
||||
[36]: https://itsfoss.com/wp-content/uploads/2020/04/nightlight-ubuntu-20-04.png
|
||||
[37]: https://itsfoss.com/wp-content/uploads/2022/04/fractional-scaling-in-ubuntu-22-04-800x674.png
|
||||
[38]: https://itsfoss.com/switch-xorg-wayland/
|
||||
[39]: https://itsfoss.com/wp-content/uploads/2022/04/gnome-classic-ubuntu-22-800x450.png
|
||||
[40]: https://itsfoss.com/free-up-space-ubuntu-linux/
|
||||
[41]: https://itsfoss.com/wp-content/uploads/2022/02/keyboard-switch-shortcut-ubuntu.jpeg
|
||||
[42]: https://itsfoss.com/ubuntu-shortcuts/
|
||||
[43]: https://itsfoss.com/wp-content/uploads/2022/04/don-not-disturb-ubuntu-22.jpg
|
||||
[44]: https://ubuntuhandbook.org/index.php/2022/04/install-firefox-deb-ubuntu-22-04/
|
||||
[45]: https://itsfoss.com/update-grub/
|
||||
[46]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-neofetch-lolcat-800x445.png
|
@ -1,46 +0,0 @@
|
||||
[#]: subject: "Following Musk’s Acquisition Of Twitter, An Open Source Alternative Is Exploding"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/04/following-musks-acquisition-of-twitter-an-open-source-alternative-is-exploding/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Following Musk’s Acquisition Of Twitter, An Open Source Alternative Is Exploding
|
||||
======
|
||||
![220405-ROB-Elon-Musk-Twitter-jg-af752e][1]
|
||||
|
||||
Although we don’t yet know what Elon Musk’s acquisition of Twitter means for the platform, one Twitter alternative is already thriving as a result of the news. According to [Mastodon’s][2] founder, the open source social media platform that describes itself as the “biggest decentralised social network on the internet” has been “exploding” since Musk’s takeover.
|
||||
|
||||
Employees and users have been shaken by the news of Twitter’s purchase, since Musk has stated that he intends to take a much more hands-off approach to content management. As is customary when Twitter makes a contentious move, some users have vowed to abandon the platform, while opponents have pushed the hashtag #RIPTWITTER to the top of the search results.
|
||||
|
||||
In this scenario, at least some angry users appear to be considering Mastodon as a possible replacement. Mastodon says it experienced “an influx of approx. 41,287 users” hours after the Twitter takeover was revealed. In a blog post, Mastodon founder Eugen Rochko stated that roughly 30,000 of those were new users.
|
||||
|
||||
According to data from analytics firm Sensor Tower, Mastodon’s official iOS and Android apps are also witnessing an increase in usage. According to the company, the apps have been downloaded 5,000 times since Monday, “or about 10% of its lifetime total” downloads. On the App Store’s social media app charts, the app is presently placed No. 32.
|
||||
|
||||
This isn’t the first time Mastodon has benefited from Twitter’s problems. Following controversy over Twitter’s decision to remove user handles from the character restriction for @-replies, the startup gained popularity for a brief while in 2017. (back when Twitter changed its product so infrequently even mundane changes were fodder for mass outrage). Mastodon had another surge in popularity in 2019, after users in India were enraged by moderation practises.
|
||||
|
||||
Mastodon had previously been mentioned as a possible Twitter alternative, although it has yet to gain traction in the public. However, its current popularity coincides with Twitter’s exploration of how it could become an open-source protocol, similar to Mastodon.
|
||||
|
||||
Mastodon, unlike Twitter, is not a single, centralised service. Though the interface resembles Twitter (it has a 500-character restriction but is otherwise very similar to Twitter), it is based on an open-source protocol. Users can form and maintain their own “instances,” each with its own set of rules for membership, moderation, and other critical policies. Users can also take their followers with them from one instance to the next.
|
||||
|
||||
Mastodon has its own instances, mastodon.social and mastodon.online, although Rochko claims that these are overburdened and recommends that new users sign up using the official applications and join other Mastodon communities. Mastodon also makes its code available on GitHub because it’s open source, something Musk has praised when it comes to Twitter’s algorithms.
|
||||
|
||||
All of this adds to the difficulty for new users who may not be familiar with Mastodon’s structure or how it functions. Those who stay long enough may notice some important new features. End-to-end encrypted communications is in the works, as is “very amazing groups functionality,” according to Rochko.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/04/following-musks-acquisition-of-twitter-an-open-source-alternative-is-exploding/
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/220405-ROB-Elon-Musk-Twitter-jg-af752e-696x348.jpg
|
||||
[2]: https://joinmastodon.org/communities
|
@ -1,87 +0,0 @@
|
||||
[#]: subject: "Trinity Desktop Environment (TDE) Latest Release Brings PolicyKit Support and Updates"
|
||||
[#]: via: "https://www.debugpoint.com/2022/05/tde-release-r14-0-12/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Trinity Desktop Environment (TDE) Latest Release Brings PolicyKit Support and Updates
|
||||
======
|
||||
Trinity Desktop Environment (TDE) brings the latest application updates, bug fixes, and enhancements to its release Trinity R14.0.12.
|
||||
|
||||
Trinity Desktop Environment is a Fork of KDE version 3.5 and a continuation of feature updates and bug fixes by a small development team. This independent and standalone desktop project is still alive today for those who believe how excellent the KDE 3 desktop methodology is.
|
||||
|
||||
Trinity Desktop Environment release R14.0.12 brings new applications, enhancements and significant bug fixes.
|
||||
|
||||
[TDE release R14.0.12][1] is the 12th maintenance release of the R14.0 series built upon its previous iteration released in Oct 2021. This release brings new applications, 10+ enhancements, bug fixes and support for the latest [Ubuntu 22.04 Jammy Jellyfish][2] and other distributions.
|
||||
|
||||
![Trinity Desktop Environment – TDE release R14.0.12][3]
|
||||
|
||||
### Trinity Desktop Environment – TDE release R14.0.12
|
||||
|
||||
Firstly, TDE R14.0.12 introduces Polkit-agent-tde and Polkit-tqt, which helps with the PolicyKit authentication triggered by the TQt interfaces. That means, when required, the admin password prompt is now invoked via PolicyKit for authentication. Also, a new embeddable lightweight markdown document viewer is introduced in this release.
|
||||
|
||||
Secondly, the list of enhancements includes the Konsole applications improvements, support for complex characters and HTML5 in Quanta (web dev editor), and support for Let’s Encrypt certificates. Not only that, TDE’s overall look is improved in addition to translation updates, and support for Python3 are some of the exciting enhancements in this release.
|
||||
|
||||
Moreover, on the building aspect, several packages migrated to the CMake build system while automake build system dropped for others.
|
||||
|
||||
Other than that, the application bug fixes include, Kaffeine seeing a fix on the libdvdcss codec detection in its player module, Amarok fixing errors for the latest Ruby programming language, and KMail correcting the email redirection to the default account.
|
||||
|
||||
Among all, other notable core bug fixes include a timeout fix in dbus service startup and a system hang fix during the shutdown.
|
||||
|
||||
Furthermore, following the other Linux distribution’s latest releases, TDE R14.0.12 introduces Ubuntu 22.04 LTS Jammy Jellyfish support, dropped support for Debian Jessie and improvements for Gentoo.
|
||||
|
||||
All of these changes with some additional updates for developers who build applications for this KDE 3.5 tech can be found in the official changelog of TDE R14.0.12 on this [page][4].
|
||||
|
||||
Finally, you should be happy to know that Good ol’ Trinity Desktop Environment is available for all mainstream Linux Distribution for installation, including Ubuntu, Fedora, Arch Linux, etc. A list of installation instructions is available [here][5].
|
||||
|
||||
#### Installing TDE in Ubuntu 22.04 LTS
|
||||
|
||||
Open a terminal and run the following commands in sequence to install this desktop environment. Also, make sure to log off after completion and choose TDE from the login. While installing, the installer would prompt you to choose the display manager. Choose the option gdm (GNOME Display Manager).
|
||||
|
||||
```
|
||||
sudo gedit /etc/apt/sources.list
|
||||
```
|
||||
|
||||
Add the following line and save the file.
|
||||
|
||||
```
|
||||
deb http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-sb jammy deps-r14 main-r14deb-src http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-sb jammy deps-r14 main-r14
|
||||
```
|
||||
|
||||
```
|
||||
wget http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-keyring.debsudo dpkg -i trinity-keyring.debsudo apt updatesudo apt install kubuntu-default-settings-trinity kubuntu-desktop-trinity
|
||||
```
|
||||
|
||||
### Video walkthrough of this release
|
||||
|
||||
Here’s a quick video we prepared for you of this release. Don’t forget to subscribe to us!
|
||||
|
||||
![Trinity Desktop Environment TDE R14 0 12 Walkthrough Video][6]
|
||||
|
||||
As always, make sure to check out the official [contribution][7] page to help the dev team with your expertise and capacity.
|
||||
|
||||
*Via Release announcement*
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/05/tde-release-r14-0-12/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://wiki.trinitydesktop.org/Release_Notes_For_R14.0.12
|
||||
[2]: https://www.debugpoint.com/2022/04/ubuntu-studio-22-04-lts/
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Trinity-Desktop-Environment-TDE-release-R14.0.12.jpg
|
||||
[4]: https://wiki.trinitydesktop.org/Release_Notes_For_R14.0.12
|
||||
[5]: https://wiki.trinitydesktop.org/Category:Installation
|
||||
[6]: https://youtu.be/qoGylRyAJEo
|
||||
[7]: https://www.trinitydesktop.org/helpwanted.php
|
@ -1,115 +0,0 @@
|
||||
[#]: subject: "Tails 5 Review: A Perfect Privacy-Focused Linux"
|
||||
[#]: via: "https://www.debugpoint.com/2022/05/tails-5-review/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Tails 5 Review: A Perfect Privacy-Focused Linux
|
||||
======
|
||||
Here’s a quick review of Debian-based Tails 5, released a while back, refreshing its core modules with Debian 11 Bullseye.
|
||||
|
||||
Before we jump into the review of Tails 5, it’s worth mentioning what Tails are about. Tails, aka The Amnesic Incognito Live System, is a [privacy-focussed Linux Distribution][1] which uses the Tor network to protect you while browsing the web. Tails are based on Debian stable branch and come with many goodies such as an IRC client, Tor browser, email clients, and messengers to help you roam around on the web anonymously.
|
||||
|
||||
![Tails 5 Desktop Running GNOME 3.38][2]
|
||||
|
||||
### Tails 5 Review
|
||||
|
||||
#### ISO, Installation
|
||||
|
||||
Tails are available as a complete installation ISO image with an additional image capable of running from the USB drive itself. If you plan to use Tails, you should first think about your primary purpose for using Tails. And choose the ISO you want.
|
||||
|
||||
I would recommend that everyone be ready with a Tails USB stick. It’s handy on many occasions. For example, if you want to be anonymous for a short time and travel with public Wi-Fi, you might want to create a bootable Thumb drive to carry.
|
||||
|
||||
Both images are around 1.2GB in size and are available for download from the official website.
|
||||
|
||||
Installation of Tails is a little different, and you can find the guide [here][3].
|
||||
|
||||
#### First Impression
|
||||
|
||||
The first-time boot of Tails asks you to confirm the keyboard layout and language and followed by connecting to the Tor network. If you are not familiar with the Tor network, it gives two easy options. The Easier option is recommended for all users as it takes care of connecting to the Tor network with bridge setup, etc. You can also choose the “safer” option if you know what the options mean.
|
||||
|
||||
Once you complete the setup, you get a nice and clean GNOME Desktop environment which comes as default with Tails with additional applications. The GNOME version for Tails 5 is GNOME 3.38.6 stable which is the pre-GNOME 40 desktop with the traditional application menu with a vertical dock and workspaces.
|
||||
|
||||
You don’t need anything fancy desktop while using Tails for some critical work. GNOME 3.38x does just fine and it’s fast.
|
||||
|
||||
![Tails Welcome Screen][4]
|
||||
|
||||
![Tails 5 – Initial Tor Setup][5]
|
||||
|
||||
#### Tor Network and Application Updates
|
||||
|
||||
At its core, Tails 5 is based on [Debian 11 Bullseye][6](which is the current stable version) and [Linux Kernel 5.10][7].
|
||||
|
||||
The application list of Tails is mostly curated for privacy oriented work. The Tails application list includes the Tor Browser, Tor Connection Manager, and Onion Circuits Manager. During my test, the Tor network connected properly without any problem.
|
||||
|
||||
In addition to that, this release introduces Kleopatra (replaces Seahorse) which is a Certification manager to GnuPG and helps to manage OpenPGP certificates and keys.
|
||||
|
||||
One of the essential features of Tails is the persistance storage configuration which is required if you use Tails via a USB stick. Tails 5 imprves the Persistance Storage option to make it more faster and rubust in nature.
|
||||
|
||||
Furthermore, the application stack in Tails 5.0 refreshed with their respective stable version according to Debian Bullseye listed below.
|
||||
|
||||
* Tor Browser 11.0.11
|
||||
* GNOME 3.38.6
|
||||
* MAT 0.12
|
||||
* Audacity 2.4.2
|
||||
* GNOME Disks 3.38
|
||||
* GIMP 2.10.22
|
||||
* Inkscape 1.0
|
||||
* LibreOffice 7.0
|
||||
|
||||
Tails packages all necessary applications to help with your purpose of anonymity, and those are acihved by its specific applications as listed here.
|
||||
|
||||
* Password manager – KeePassXC
|
||||
* Pidgin Internet messenger
|
||||
* Thunderbird Email Client
|
||||
* Tor Browser and Connection Manager
|
||||
* Onion Circuit manager
|
||||
* Application for configuring Persistance Storage
|
||||
* GtkHash checks for files
|
||||
* Root Terminal
|
||||
|
||||
A tool called Additional Software that Tails includes; it helps run the different applications from the local media instead of downloading them after each boot.
|
||||
|
||||
#### Performance
|
||||
|
||||
The performance of Tails is stable and depends on GNOME Desktop. During my test, it behaved well, no major surprises of problems. Overall desktop feel is faster considering it is still GNOME 3.38 version.
|
||||
|
||||
So, during the performance test at idle, it was consuming around 4% CPU on average and memory is at 1.6 GB. It may be a little higher for an idle state, but being a privacy-focused distro, background processes, and daemon running contributed to this metric.
|
||||
|
||||
Also, the network histroy shows a continuous packaet traction at an idle state which I believe is due to some daemon running continuously.
|
||||
|
||||
![Tails 5 Performance shows continuous network ping][8]
|
||||
|
||||
### Closing Notes
|
||||
|
||||
Privacy is more important than ever today. And Tails is the best Linux distro for privacy-focused people out there. With the solid Debian stable base, GNOME desktop and [robust documentation,][9] Tails is a “go-to” distro for security researchers and advanced users. Moreover, the Tails team did an excellent job with its nicely crafted documentation which takes care of most of the problems you may face while using it. With that said, if you want to try out Tails 5, visit [this page for download][10] and read the installation [guide][11].
|
||||
|
||||
A word of caution: While using Tails, try not to visit banks or financial websites or make any transactions requiring 2FA authentication.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/05/tails-5-review/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://www.debugpoint.com/2022/04/privacy-linux-distributions-2022/
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2022/05/Tails-5-Desktop-Running-GNOME-3.38.jpg
|
||||
[3]: https://tails.boum.org/install/linux/index.en.html
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2022/05/Tails-Welcome-Screen.jpg
|
||||
[5]: https://www.debugpoint.com/wp-content/uploads/2022/05/Tails-5-Initial-Tor-Setup.jpg
|
||||
[6]: https://www.debugpoint.com/2021/05/debian-11-features/
|
||||
[7]: https://www.debugpoint.com/2020/12/linux-kernel-5-10-release-announcement/
|
||||
[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/Tails-5-Performance-shows-continuous-network-ping.jpg
|
||||
[9]: https://tails.boum.org/doc/index.en.html
|
||||
[10]: https://tails.boum.org/install/index.en.html
|
||||
[11]: https://tails.boum.org/install/linux/index.en.html
|
@ -1,127 +0,0 @@
|
||||
[#]: subject: "KDE Plasma 5.25: Top New Features and Release Details"
|
||||
[#]: via: "https://www.debugpoint.com/2022/05/kde-plasma-5-25"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
KDE Plasma 5.25: Top New Features and Release Details
|
||||
======
|
||||
We will give you the feature summary of the KDE Plasma 5.25 desktop environment (upcoming).
|
||||
|
||||
KDE Plasma 5.25 is the 27th version of KDE Plasma desktop, not an LTS release. This release is followed by the prior [5.24 LTS][1], released in February. KDE Plasma 5.25 brings several exciting updates on the desktop UI, polished applets, widgets, a good set of gesture updates for touch-based devices and a massive list of bug fixes. Plasma 5.25 is based on Qt 5.15.2 and KDE Frameworks 5.94.
|
||||
|
||||
KDE Plasma releases on June 14, 2022, but before that following milestones are to be met:
|
||||
|
||||
* Soft feature freeze: May 5, 2022 (Completed)
|
||||
* Beta: May 19, 2022
|
||||
* Final release: June 14, 2022
|
||||
|
||||
The list of bug fixes and features is around 400+, and it’s challenging to cover them in a single article. We filtered out in this article some of the essential and visual changes which are more impactful straightaway to the general user base.
|
||||
|
||||
### KDE Plasma 5.25 – Top New Features
|
||||
|
||||
#### Plasma Workspace & Desktop
|
||||
|
||||
Perhaps the most important visual change in KDE Plasma 5.25 is accent colour change based on the Wallpaper. As reported earlier, this change gives the final touch to the entire accent colour functionality and makes it complete with dynamic colour, custom colour and pre-sets. The option is available in the Appearance module. ([MR#1325)][2]
|
||||
|
||||
![KDE Plasma 5.25 – Accent Colour Change Based on the wallpaper][3]
|
||||
|
||||
In addition, the accent colour change to the title bar was [also implemented][4] in the Breeze Classic theme and made it more consistent across the desktop.
|
||||
|
||||
Another exciting change that KDE Plasma 5.25 brings is an option for Themes to make the Panel float. When selected, the Panel detaches itself from the bottom of the screen with rounded corners and gives a floating feeling. The option is available in the additional settings in Edit Panel mode. Here’s how it looks. ([MR#714)][5]
|
||||
|
||||
In addition to that, the power profiles menu in the system tray now has [icons][6] with their names in the [tooltip][7].
|
||||
|
||||
The login and logout screen see a [small UI change][8] to display avatar and profile name with longer user names.
|
||||
|
||||
Also, the spacing between the avatar icon and name with the logout screen action buttons is [increased][9] to give a more consistent look.
|
||||
|
||||
A fix was made to the Plasma Desktop to prevent widgets from [retaining position][10]when resolution changes back from fullscreen gaming. The widgets remember their position for respective resolutions.
|
||||
|
||||
The plasma Workspace module [reverts][11]to the lock screen behaviour on mouse move, which was removed accidentally earlier.
|
||||
|
||||
The Digital Clock “Copy to Clipboard” menu is now [more clean][12] with the removal of duplicate items and separate entries when seconds are enabled.
|
||||
|
||||
#### KWin Updates
|
||||
|
||||
KWin introduces an [option to hide][13] minimised windows in KDE Plasma 5.25. In addition to that, the desktop grid effect is [completely replaced][14] with the QML Version.
|
||||
|
||||
Furthermore, it is now possible to switch between display specific resolutions which are not visible to the operating system in Wayland. The change adds [libxcvt][15] dependency in Kwin, and details of this change can be found [here][16].
|
||||
|
||||
With this release, the switching between the dark and light mode is more smooth and animated thanks to this [MR][17], inspired by GNOME. It was not smooth earlier and now looks more professional behaviour.
|
||||
|
||||
#### Changes in Discover
|
||||
|
||||
The application page of Discover is now complete with [more focused details][18] at the top with Application metadata and images. The spacing of the app name, ratings and developer with the image at the header section with the summary in the middle. And rest at the bottom. Here’s a side by side comparison of the earlier version with 5.25.
|
||||
|
||||
One tiny yet impactful change in Discover related to Flatpak apps. Discover now [shows][19] a message with an action button to clean Flatpak data for uninstalled apps.
|
||||
|
||||
Moreover, Discover now [shows the required permissions][20]of the Flatpak applications before you install them. In addition, if you are planning to install proprietary software, you get a warning message saying the potential consequences of using those (such as Microsoft Teams).
|
||||
|
||||
#### Application and Applet Changes
|
||||
|
||||
The System Monitor (KSystemStats) shows new [information about your window system][21] whether you are running X11 or Wayland. This should also display on the overview screen of the KSysGuard.
|
||||
|
||||
The Open With Dialog of XGD Portal sees a [complete UI rework][22]. The top section label is merged into one single information line for better clarity. Also, the search field is now visible for all modes, and the Show More button is moved up beside Search with better clarity. You can look at the below image (Credit KDE Team) for this change.
|
||||
|
||||
The Plasma Applet for NetworkManager now [shows][23] the WiFi frequency connection nection details to help distinguish which frequency you are connected to in the same SSID (same Wi-Fi Router). It’s really helpful if both the band have the same Wifi Accent point name and you cannot distinguish between 4G or 5G.
|
||||
|
||||
The cuttlefish icon viewer now helps you [open the file path via the file manager][24] directly of the selected icon.
|
||||
|
||||
Plasma desktop now gives a [more organised view][25]in “Recent Documents” with the ability to show “non-file” items such as RDP or remote connections.
|
||||
|
||||
Moreover, the spell checker module in KRunner now [detects][26] the search language and gives you results.
|
||||
|
||||
When you run into an error, the KInfocenter now gives you [more information][27] about the error. The new design gives you what is the error, why it happened, whether you can fix it by yourself and how to report it to the devs. This is a nifty change that has a more significant impact. Here’s a side by side view of the change.
|
||||
|
||||
### Closing Notes
|
||||
|
||||
Along with the above changes, this release improves several gestures for touch devices and a massive list of performance and bug fixes (counting 150+), which will enhance the KDE Plasma 5.25 experience for all of its users.
|
||||
|
||||
If you want to give a hand on testing, read the [contribution guide][28], and you can try the [unstable edition of KDE Neon][29] until the BETA release.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/05/kde-plasma-5-25
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://www.debugpoint.com/2022/03/kde-plasma-5-24-review/
|
||||
[2]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1325
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/KDE-Plasma-5.25-Accent-Colour-Change-Based-on-wallpaper-1024x611.jpg
|
||||
[4]: https://invent.kde.org/plasma/breeze/-/merge_requests/182
|
||||
[5]: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/714
|
||||
[6]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1585
|
||||
[7]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1668
|
||||
[8]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1654
|
||||
[9]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1647
|
||||
[10]: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/608
|
||||
[11]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1707
|
||||
[12]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1693
|
||||
[13]: https://invent.kde.org/plasma/kwin/-/merge_requests/2341
|
||||
[14]: https://invent.kde.org/plasma/kwin/-/merge_requests/2327
|
||||
[15]: https://gitlab.freedesktop.org/xorg/lib/libxcvt
|
||||
[16]: https://bugs.kde.org/448398
|
||||
[17]: https://invent.kde.org/plasma/kwin/-/merge_requests/2088
|
||||
[18]: https://invent.kde.org/plasma/discover/-/merge_requests/246
|
||||
[19]: https://invent.kde.org/plasma/discover/-/merge_requests/297
|
||||
[20]: https://invent.kde.org/plasma/discover/-/merge_requests/282
|
||||
[21]: https://invent.kde.org/plasma/ksystemstats/-/merge_requests/34
|
||||
[22]: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/94
|
||||
[23]: https://invent.kde.org/plasma/plasma-nm/-/merge_requests/112
|
||||
[24]: https://invent.kde.org/plasma/plasma-sdk/-/merge_requests/32
|
||||
[25]: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/551
|
||||
[26]: https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/122
|
||||
[27]: https://invent.kde.org/plasma/kinfocenter/-/merge_requests/90
|
||||
[28]: https://community.kde.org/Get_Involved
|
||||
[29]: https://neon.kde.org/download
|
@ -1,118 +0,0 @@
|
||||
[#]: subject: "10 Best Features of Fedora 36 That Makes it a Powerful Release"
|
||||
[#]: via: "https://www.debugpoint.com/2022/05/fedora-36-features/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
10 Best Features of Fedora 36 That Makes it a Powerful Release
|
||||
======
|
||||
If you are excited about the Fedora 36 release, here’s a quick summary of the 10 best Fedora 36 features that you should check out before trying.
|
||||
|
||||
![Fedora 36 Workstation Desktop][1]
|
||||
|
||||
Fedora 36 releases on May 10, 2022, and it brings a list of special features across the desktop, flavours, internal structures and more. Before installing or upgrading it, you should know about the unique features. Here they are.
|
||||
|
||||
### Best Fedora 36 Features
|
||||
|
||||
#### 1. GNOME 42 as Default Workstation Desktop
|
||||
|
||||
The most important feature of Fedora 36 is the brand new GNOME 42, which comes as default with the Fedora Workstation edition. With the Fedora Workstation edition, you get the original GNOME 42 version without any customisation, unlike Ubuntu. Hence to experience the vanilla GNOME 42, Fedora 36 is the perfect choice for you.
|
||||
|
||||
Firstly, GNOME 42 brings the modern GTK4 and libadwaita based Shell and native applications. Most native GNOME apps are already ported to GTK4, giving a revamped look with friendly UI components. You should notice the difference in every nook and corner of the desktop.
|
||||
|
||||
Not only that, this version of GNOME introduces the Dark and Light Style in the Appearance section. The native applications also adapt to the light and dark styles automatically. Moreover, the wallpaper can also change based on the style, and you can create [dark and light versions of the wallpaper][2].
|
||||
|
||||
Furthermore, GNOME 42 brings a [new text editor][3], a new screenshot and screencast tool and well designed on-screen display. You may want to read the [features of GNOME 42 here in detail][4].
|
||||
|
||||
#### 2. Linux Kernel 5.17
|
||||
|
||||
In addition to that, Fedora 36 also brings the latest mainline Linux Kernel 5.17, which has support for all the modern GPU, CPU and other improvements. The updates in this Kernel include temperature support for the AMD Zen family of devices, a long-standing Floppy Disk hangs bug, a handful of ARM/SoC support and performance improvements across all subsystems.
|
||||
|
||||
You can read our [detailed Linux Kernel 5.17][5] coverage to learn more.
|
||||
|
||||
#### 3. Wayland by Default for NVIDIA Proprietary Drivers
|
||||
|
||||
Perhaps the most impactful change in this release is the decision from Fedora to make [Wayland as default][6] session with NVIDIA proprietary driver. If you remember, Wayland was the default server since Fedora 22, but it has not defaulted when the NVIDIA proprietary driver is in use. And it changes now. So, while updating or installing an NVIDIA system, check the session type before login.
|
||||
|
||||
#### 4. Systemd Messages Updates
|
||||
|
||||
Other than the above changes, the systemd messages become more friendly with a small but impactful change on how the messages are logged in this release. In Fedora 36, the systemd messages show the unit name with the usual name. For example, if it shows “Network Manager”, it would now show “NetworkManager.service” and the name. This will help debug some problems in a system requiring scrolling through thousands of messages.
|
||||
|
||||
![More detailed journalctl messages in Fedora 36][7]
|
||||
|
||||
#### 5. System Font Changes
|
||||
|
||||
On top of the above changes, the default font type is changing to Noto Font from DejaVu fonts. This will provide a better experience and consistent text rendering across the desktop. So, google-noto-sans* packages will be installed by default to replace dejavu*.
|
||||
|
||||
#### 6. Updated Spins
|
||||
|
||||
That’s not all the changes, the official Fedora flavours or Spins are also refreshed with their stable versions. Not all desktop environments get major releases in a year, but you always get the latest bugfix versions with Fedora.
|
||||
|
||||
Here’s a quick recap of the version of the official Fedora Spins in this release.
|
||||
|
||||
* Fedora KDE with KDE Plasma 5.24
|
||||
* Fedora with Xfce 4.16
|
||||
* Fedora with LXQt 1.1
|
||||
* Fedora MATE-Compiz with MATE 1.24
|
||||
|
||||
#### 7. Tool Chain Updates
|
||||
|
||||
Many Fedora users are the developers who use it for their personal or professional work. For programmers or developers, the toolchain is important. Because Fedora features the latest compilers, databases and other dependent packages. Here’s a quick list of packages and applications:
|
||||
|
||||
* PHP 8.1
|
||||
* Ruby on Rails 7.0
|
||||
* OpenJDK 17
|
||||
* Django 4.0
|
||||
* gcc 12
|
||||
* glibc 2.35
|
||||
* Golang 1.18
|
||||
* OpenSSL 3.0
|
||||
* Ruby 3.1
|
||||
* Ansible 5
|
||||
* Firefox 100
|
||||
* LibreOffice 7.3
|
||||
|
||||
#### 8. Single User as Admin
|
||||
|
||||
The majority of the Fedora workstation installations are single-user types than the shared or enterprise users. Hence, Fedora 36 makes the single user as administrator by default during installation with this release. The Anaconda installer sets the admin option by default.
|
||||
|
||||
#### 9. RPM Structure
|
||||
|
||||
The internal RPM package database in the Fedora system is located under `/var` today. With this release, it is [moving][8] to `/usr` directory. The primary reason is consistency with other RPM-based distributions such as openSUSE and Fedora rpm-ostree based systems (Kinoite, Silverblue, etc.)
|
||||
|
||||
#### 10. NetworkManager Configuration
|
||||
|
||||
Finally, this release removes the NetworkManager legacy configuration file support (ifcfg files). This is a classic case of Fedora being a pioneer in adopting new methods, deprecating the older way of doing things. The NetworkManager evolved over the years and now uses more streamlined configuration files called keyfiles. Hence, it is no longer necessary to support the older ifcfg files for compatibility reasons. For more details about this change, visit this [excellent article][9] from Fedora Magazine.
|
||||
|
||||
### Closing Notes
|
||||
|
||||
In addition to the above changes, this release brings many more under the hood performance tweaks and bug fixes which you can read [here][10].
|
||||
|
||||
Fedora 36 releases on May 10, 2022.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/05/fedora-36-features/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2022/05/Fedora-36-Workstation-Desktop.jpg
|
||||
[2]: https://www.debugpoint.com/2022/04/custom-light-dark-wallpaper-gnome/
|
||||
[3]: https://www.debugpoint.com/2021/12/gnome-text-editor/
|
||||
[4]: https://www.debugpoint.com/2022/03/gnome-42-release/
|
||||
[5]: https://www.debugpoint.com/2022/03/linux-kernel-5-17/
|
||||
[6]: https://www.debugpoint.com/wp-admin/.org/wiki/Changes/WaylandByDefaultOnNVIDIA
|
||||
[7]: https://www.debugpoint.com/wp-content/uploads/2022/05/More-detailed-journalctl-messages-in-Fedora-36.jpg
|
||||
[8]: https://fedoraproject.org/wiki/Changes/RelocateRPMToUsr
|
||||
[9]: https://fedoramagazine.org/converting-networkmanager-from-ifcfg-to-keyfiles/
|
||||
[10]: https://fedoraproject.org/wiki/Releases/36/ChangeSet
|
@ -1,207 +0,0 @@
|
||||
[#]: subject: "Fedora 35 v Fedora 36: What’s the Difference?"
|
||||
[#]: via: "https://news.itsfoss.com/fedora-35-v-fedora-36/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Fedora 35 v Fedora 36: What’s the Difference?
|
||||
======
|
||||
Fedora 36 is here. It’s a significant upgrade. So, what’s different from Fedora 35? Should you upgrade now? Let’s take a look.
|
||||
|
||||
![fedora comparison][1]
|
||||
|
||||
Fedora 36 is an impressive release with a [list of interesting feature upgrades][2].
|
||||
|
||||
While Fedora 35 included GNOME 41 and [debuted with a new KDE variant][3] (Fedora Kinoite) and several other technical changes, Fedora 36 is another interesting upgrade.
|
||||
|
||||
Fedora 36 packs in GNOME 42 with new feature additions, and some usual technical improvements.
|
||||
|
||||
What’s different between the two releases?
|
||||
|
||||
Here, we shall be focusing on the key changes considering the desktop user experience along with some technical differences.
|
||||
|
||||
#### 1. Support Lifespan
|
||||
|
||||
If you are reading this when we published this article, you still have the time to continue using Fedora 35 or upgrade to Fedora 36.
|
||||
|
||||
Fedora 35 will be supported until **November 2022**. Typically, every Fedora release gets support for 13 months.
|
||||
|
||||
So, you can expect Fedora 36 to be maintained until **June 2023**.
|
||||
|
||||
#### 2. Desktop Environment Choices
|
||||
|
||||
The primary offering for Fedora 35 features GNOME 41, and Fedora 36 comes with GNOME 42.
|
||||
|
||||
In addition to its GNOME editions, you can also find KDE and LXQt versions as other popular variants.
|
||||
|
||||
With Fedora 35, you get the option to use KDE Plasma 5.22 or LXQt 0.17.
|
||||
|
||||
And, with Fedora 36, you can find KDE Plasma 5.24 and LXQt 1.0 as your options.
|
||||
|
||||
#### 3. Wayland by Default for Nvidia
|
||||
|
||||
With Fedora 35, you already had Wayland by default for desktop sessions (initially introduced with Fedora 34), excluding proprietary Nvidia drivers.
|
||||
|
||||
Now, with Fedora 36, if you use a proprietary Nvidia driver, the GDM sessions will use Wayland by default.
|
||||
|
||||
#### 4. Wallpapers
|
||||
|
||||
Fedora always features some kind of artistic/creative wallpaper. You can see the default wallpaper difference in action here:
|
||||
|
||||
![][4]
|
||||
|
||||
![][5]
|
||||
|
||||
In addition to the default, Fedora 36 also comes with a newer collection of wallpapers.
|
||||
|
||||
Fedora 36 also includes dark/light variants of the wallpapers to blend in with the new dark mode theme preference.
|
||||
|
||||
![][6]
|
||||
|
||||
![][7]
|
||||
|
||||
#### 5. Appearance Menu & Dark Theme
|
||||
|
||||
Thanks to GNOME 42, Fedora 36 now features a new Appearance option in the system settings that lets you switch to a system-wide dark/light theme.
|
||||
|
||||
![Fedora 36 (Appearance menu)][8]
|
||||
|
||||
With Fedora 35, you did not have any options to enable a dark theme, which was a bummer at the time.
|
||||
|
||||
And, as mentioned previously, with the theme preferences, the background also changes automatically.
|
||||
|
||||
#### 6. Settings Menu
|
||||
|
||||
![][9]
|
||||
|
||||
![][10]
|
||||
|
||||
Fedora 36 received an upgrade to the settings menu with new options, dark mode support, and subtle changes to the look with an enhanced GNOME experience.
|
||||
|
||||
#### 7. Login and Lockscreen
|
||||
|
||||
You will also notice differences in the login screen with a darker default avatar ditching the red icon, making them look cleaner.
|
||||
|
||||
![][11]
|
||||
|
||||
![][12]
|
||||
|
||||
While I mention the details for the font changes later in the article, the lock screen lets you notice that significantly with the change in font size for the clock/time in the lock screen.
|
||||
|
||||
Of course, the blur effect for the background remains in both.
|
||||
|
||||
![][13]
|
||||
|
||||
![][14]
|
||||
|
||||
#### 7. Linux Kernel
|
||||
|
||||
Fedora releases always include the latest and greatest Linux Kernel available. So, if you’re using the up-to-date version of Fedora 35/46, you will be getting the same Linux Kernel.
|
||||
|
||||
With Fedora 36, you get [Linux Kernel 5.17][15] out of the box which comes with a range of next-gen hardware support and improvements.
|
||||
|
||||
And, Fedora 35 featured Linux Kernel 5.14, but now you can find Linux Kernel 5.17.
|
||||
|
||||
#### 8. Screenshot UI
|
||||
|
||||
Yet another exciting [feature upgrade in GNOME 42][16]. The screenshot user interface is entirely different in Fedora 36 with an added ability to record the screen.
|
||||
|
||||
![][17]
|
||||
|
||||
![][18]
|
||||
|
||||
In Fedora 35, you can take screenshots similarly using the GNOME Screenshot app, but it does not have an integrated screen recording feature.
|
||||
|
||||
In addition to this, on Fedora 36, you get the ability to take a screenshot when you perform a right-click on the title bar of a window.
|
||||
|
||||
![Fedora 36][19]
|
||||
|
||||
You don’t get to see this feature on Fedora 35.
|
||||
|
||||
#### 9. File Manager
|
||||
|
||||
File Manager isn’t functionally different. However, with the user interface overhaul, icon changes, and improvements, Fedora 36 features a snappier file manager overall.
|
||||
|
||||
![][20]
|
||||
|
||||
![][21]
|
||||
|
||||
I never liked the icon theme on Fedora 35. So, that’s a pretty good upgrade for users like me.
|
||||
|
||||
Of course, you can always look for [GTK icon themes][22] to personalize the experience.
|
||||
|
||||
#### 10. Software Center
|
||||
|
||||
![Software Center on Fedora 36][23]
|
||||
|
||||
The software center has received improvements in Fedora 36 for its user experience and being more responsive to different screen resolutions.
|
||||
|
||||
You get all the essential details when comes to an app you select to view/install on Fedora, 35 and 36. Hence, the difference is limited to the overall UI and UX.
|
||||
|
||||
![Software Center on Fedora 35][24]
|
||||
|
||||
#### 11. Default Font Changes
|
||||
|
||||
Fedora 35 relies on multiple fonts for various languages. By default, it uses the DejaVu font, however, when you select a different language like Chinese, Japanese, Korean, etc, it has other defaults.
|
||||
|
||||
So, to make things consistent, Fedora 36 is making **Noto Fonts** the default, which supports various languages, and are generally higher quality fonts.
|
||||
|
||||
#### 12. Technical Changes
|
||||
|
||||
If you are looking to explore all the details, the official changelog would be better. However, to highlight a few important things, these are some of the noteworthy upgrades in Fedora 36:
|
||||
|
||||
* Golang 1.18
|
||||
* Ruby 3.1
|
||||
* GNOME Text Editor replacing Gedit
|
||||
* Subtle changes to the terminal application
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
Unlike Ubuntu LTS releases (for instance, [20.04 vs 22.04][25]), when it comes to Fedora, you do have some time to upgrade, but you will have to eventually upgrade to keep getting updates/security fixes.
|
||||
|
||||
If you do not like the changes with newer Fedora releases, you may want to try Ubuntu or switch to an Arch Linux distro like [Manjaro][26].
|
||||
|
||||
*What do you think about the latest Fedora 36 release? Let us know your thoughts in the comments below.*
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/fedora-35-v-fedora-36/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-35-vs-fedora-36.jpg
|
||||
[2]: https://news.itsfoss.com/fedora-36-release-date-features/
|
||||
[3]: https://news.itsfoss.com/fedora-35-release/
|
||||
[4]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-35-wallpaper.jpg
|
||||
[5]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-wallpaper.jpg
|
||||
[6]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-35-wallpaper-collection.jpg
|
||||
[7]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-wallpaper-collection.jpg
|
||||
[8]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-appearance.png
|
||||
[9]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-35-settings.jpg
|
||||
[10]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-settings.png
|
||||
[11]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-35-login.jpg
|
||||
[12]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-login.jpg
|
||||
[13]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-35-lockscreen.jpg
|
||||
[14]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-lockscreen.jpg
|
||||
[15]: https://news.itsfoss.com/linux-kernel-5-17-release/
|
||||
[16]: https://news.itsfoss.com/gnome-42-features/
|
||||
[17]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-35-screenshot.jpg
|
||||
[18]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-screenshot-ui.jpg
|
||||
[19]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-take-screenshot.jpg
|
||||
[20]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-35-file-manager.png
|
||||
[21]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-file-manager.png
|
||||
[22]: https://itsfoss.com/best-gtk-themes/
|
||||
[23]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-software-center.png
|
||||
[24]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-35-software-center.png
|
||||
[25]: https://itsfoss.com/ubuntu-20-04-vs-22-04/
|
||||
[26]: https://news.itsfoss.com/manjaro-linux-experience/
|
@ -1,132 +0,0 @@
|
||||
[#]: subject: "How to Upgrade to Fedora 36 from Fedora 35 Workstation (GUI and CLI Method)"
|
||||
[#]: via: "https://www.debugpoint.com/2022/05/upgrade-fedora-36-from-fedora-35/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Upgrade to Fedora 36 from Fedora 35 Workstation (GUI and CLI Method)
|
||||
======
|
||||
Complete steps to upgrade to fedora 36 from fedora 35 workstation edition with gui and cli method.
|
||||
|
||||
Fedora 36 brings several important features such as the beautiful GNOME 42, Linux Kernel 5.17, default font changes and many stunning features. Moreover, Fedora 36 also brings Wayland display server as the default NVIDIA proprietary driver. Plus several other significant changes that Fedora 36 brings, which you can read here in our [top 10 feature coverage][1].
|
||||
|
||||
If you plan to upgrade to Fedora 36 from Fedora 35 workstation edition, here are the steps you need to perform.
|
||||
|
||||
![Fedora 36 Workstation Desktop][2]
|
||||
|
||||
### Upgrade to Fedora 36
|
||||
|
||||
There are two methods to upgrade to Fedora 36 workstation. The first is the command line method (CLI), and the second is the GUI method which is completely graphical. We will cover both ways in this guide.
|
||||
|
||||
However, before you get excited to upgrade, there is some housekeeping that you should do.
|
||||
|
||||
#### Steps to Follow before upgrading to Fedora 36
|
||||
|
||||
Firstly, Open GNOME Software and check for any pending updates. Or, open a terminal and run the following command to ensure that your system is up-to-date.
|
||||
|
||||
```
|
||||
sudo dnf update
|
||||
```
|
||||
|
||||
After the above command is complete, reboot your system to ensure all the updates are applied.
|
||||
|
||||
Secondly, take backups of your important documents such as pictures, docs or videos from your home directory to a safe place (perhaps a separate partition or USB stick). The Fedora upgrade process never fails, but if you use NVIDIA or any specific hardware with a dual boot system, I recommend you take backups.
|
||||
|
||||
Third, install the [Extensions Flatpak application][3] and disable all the GNOME Extensions (for the GNOME desktop). The primary reason is not all the extensions are ported yet to GNOME 42. Hence it is safe to disable all of them before upgrading. And you can enable them later after you complete the upgrade process.
|
||||
|
||||
Moreover, glance over the [Fedora 36 common bugs page][4] and the [forum][5] for any ongoing major bugs which may impact the upgrade process. Don’t spend much time on this.
|
||||
|
||||
Finally, the upgrade process takes some time (in hours), so ensure you have sufficient time and a stable internet connection.
|
||||
|
||||
#### How to Upgrade to Fedora 36 Workstation
|
||||
|
||||
##### Graphical Method (GUI)
|
||||
|
||||
After the official release of Fedora 36, you should see a prompt in GNOME Software showing that an upgrade is available. If you do not see any prompt, don’t worry. Wait for a day or two, and you should have it.
|
||||
|
||||
Also, you can visit the Updates tab in GNOME Software and see if it is available.
|
||||
|
||||
Click on the notification and hit Download to start the upgrade process. The upgrader will download the required packages and prompt you to restart. Hit restart to continue the upgrade process.
|
||||
|
||||
Fedora will apply the upgrades during reboot.
|
||||
|
||||
##### Command-Line method (CLI)
|
||||
|
||||
Firstly, you can follow the below steps, even if Fedora 36 is not yet released. And you can follow the same steps after the official release.
|
||||
|
||||
If you are comfortable with the command line, you can use the dnf upgrade command to perform the upgrade process.
|
||||
|
||||
Open up the terminal and run the below command:
|
||||
|
||||
```
|
||||
sudo dnf upgrade --refresh
|
||||
```
|
||||
|
||||
This command will refresh the packages for the new upgrade stream to get ready for Fedora 36.
|
||||
|
||||
Next, install the dnf upgrade plugin by running the below command. This is required for the upgrade process.
|
||||
|
||||
```
|
||||
sudo dnf install dnf-plugin-system-upgrade
|
||||
```
|
||||
|
||||
Make sure your system is up-to-date by running the below command and installing any necessary pending updates. Do it once again (if you have done it via pre-upgrade steps)
|
||||
|
||||
```
|
||||
sudo dnf --refresh upgrade
|
||||
```
|
||||
|
||||
Initiate the download process by running the below command. This command will fetch all required packages and save them locally before the upgrade.
|
||||
|
||||
```
|
||||
sudo dnf system-upgrade download --releasever=36
|
||||
```
|
||||
|
||||
If you installed many packages and applications manually and are unsure whether they are correctly supported by Fedora 36, run the above command with “–allowerasing” flag. When you provide this, dnf will remove the packages that are blockers for your system upgrade.
|
||||
|
||||
The above command displays what will be replaced, updated, upgraded, or downgraded. Carefully glance through the list if you want to review the list. Or, you can check the red-marked items and start the upgrade process—something like below.
|
||||
|
||||
![Fedora 36 upgrade via CLI][6]
|
||||
|
||||
![Review the RED marked items][7]
|
||||
|
||||
![Start the Fedora 36 Upgrade from CLI][8]
|
||||
|
||||
Remember, the download size ideally is in GB, so that it might take some time based on your internet speed.
|
||||
|
||||
After the above command is complete, run the below command to start the upgrade.
|
||||
|
||||
```
|
||||
sudo dnf system-upgrade reboot
|
||||
```
|
||||
|
||||
The system will reboot automatically and wait until the entire upgrade process completes. As I mentioned earlier, this might take time in terms of hours, depending on your system hardware. Hence be patient.
|
||||
|
||||
You will be greeted with a brand new Fedora 36 system if all goes well.
|
||||
|
||||
Good luck! 🤞
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/05/upgrade-fedora-36-from-fedora-35/
|
||||
|
||||
作者:[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/04/fedora-34-features/
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2022/05/Fedora-36-Workstation-Desktop2.jpg
|
||||
[3]: https://flathub.org/apps/details/org.gnome.Extensions
|
||||
[4]: https://fedoraproject.org/wiki/Common_F36_bugs
|
||||
[5]: https://ask.fedoraproject.org/tags/c/common-issues/141/none/f36/l/latest
|
||||
[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Fedora-36-upgrade-via-CLI.jpg
|
||||
[7]: https://www.debugpoint.com/wp-content/uploads/2022/05/Review-the-RED-marked-items.jpg
|
||||
[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/Start-the-Fedora-36-Upgrade-from-CLI.jpg
|
@ -1,104 +0,0 @@
|
||||
[#]: subject: "What’s new in Fedora Workstation 36"
|
||||
[#]: via: "https://fedoramagazine.org/whats-new-fedora-36-workstation/"
|
||||
[#]: author: "Merlin Cooper https://fedoramagazine.org/author/mxanthropocene/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
What’s new in Fedora Workstation 36
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
The latest release of Fedora Workstation 36 continues the Fedora Project’s ongoing commitment to delivering the latest innovations in the open source world. This article describes some of the notable user-facing changes that appear in this version.
|
||||
|
||||
### GNOME 42
|
||||
|
||||
Fedora Workstation 36 includes the latest version of the GNOME desktop environment. GNOME 42 includes many improvements and new features. Just some of the improvements include:
|
||||
|
||||
* Significantly improved input handling, resulting in lower input latency and improved responsiveness when the system is under load. This is particularly beneficial for games and graphics applications.
|
||||
* The Wayland session is now the default for those who use Nvidia’s proprietary graphics driver.
|
||||
* A universal dark mode is now available.
|
||||
* A new interface has been added for taking screenshots and screen video recordings.
|
||||
|
||||
In addition, many of the core apps have been ported to GTK 4, and the shell features a number of subtle refinements.
|
||||
|
||||
#### Refreshed look and feel
|
||||
|
||||
![GNOME 42 as featured in Fedora Workstation 36][2]
|
||||
|
||||
GNOME Shell features a refreshed look and feel, with rounder and more clearly separated elements throughout. All the symbolic icons have been updated and the top bar is no longer rounded.
|
||||
|
||||
#### Universal dark mode option
|
||||
|
||||
In Settings > Appearance, you can now choose a dark mode option which applies a dark theme to all supported applications. In addition, the pre-installed wallpapers now include dark mode variants. Dark themes can help reduce eye-strain when there is low ambient light, can help conserve battery life on devices with OLED displays, and can reduce the risk of burn-in on OLED displays. Plus, it looks cool!
|
||||
|
||||
#### New screenshot interface
|
||||
|
||||
![Taking screenshots and screen video recordings is now easier than ever][3]
|
||||
|
||||
Previously, pressing the Print Screen key simply took a screenshot of the entire screen and saved it to the Pictures folder. If you wanted to customize your screenshots, you had to remember a keyboard shortcut, or manually open the Screenshots app and use that to take the screenshot you wanted. This was inconvenient.
|
||||
|
||||
Now, pressing Print Screen presents you with an all-new user interface that allows you to take a screenshot of either your entire screen, just one window, or a rectangular selection. You can also choose whether to hide or show the mouse pointer, and you can also now take a screen video recording from within the new interface.
|
||||
|
||||
#### Core applications
|
||||
|
||||
![Apps made in GTK 4 + libadwaita feature a distinct visual style][4]
|
||||
|
||||
GNOME’s core applications have seen a number of improvements. A number of them have been ported to GTK 4 and use libadwaita, a new widget library that implements GNOME’s Human Interface Guidelines.
|
||||
|
||||
* Files now includes the ability to sort files by creation date, and includes some visual refinements, such as a tweaked headerbar design and file renaming interface.
|
||||
* The Software app now includes a more informative update interface, and more prominently features GNOME Circle apps.
|
||||
* The Settings app now has a more visually appealing interface matching the visual tweaks present throughout GNOME Shell.
|
||||
* Text Editor replaces Gedit by default. Text Editor is an all-new app built in GTK 4 and libadwaita. You can always reinstall Gedit by searching for it in the Software app.
|
||||
|
||||
#### Wayland support on Nvidia’s proprietary graphics driver
|
||||
|
||||
In previous versions, Fedora Workstation defaulted to the X display server when using Nvidia’s proprietary graphics driver – now, Fedora Workstation 36 uses the Wayland session by default when using Nvidia’s proprietary graphics driver.
|
||||
|
||||
If you experience issues with the Wayland session, you can always switch back to the Xorg session by clicking the gear icon at the bottom-right corner of the login screen and choosing “GNOME on Xorg”.
|
||||
|
||||
### Under-the-hood changes throughout Fedora Linux 36
|
||||
|
||||
* When installing or upgrading packages with DNF or PackageKit, weak dependencies that have been manually removed will no longer be reinstalled. That is to say: if _foo_ is installed and it has _bar_ as a weak dependency, and _bar_ is then removed, _bar_ will not be reinstalled when _foo_ is updated.
|
||||
* The Noto fonts are now used by default for many languages. This provides greater coverage for different character sets. For users who write in the Malayalam script, the new Meera and RIT Rachana fonts are now the default.
|
||||
* systemd messages now include unit names by default rather than just the description, making troubleshooting easier.
|
||||
|
||||
![systemd messages shows unit names by default][5]
|
||||
|
||||
### Upgrade now!
|
||||
|
||||
You can upgrade your system through GNOME Software, via _[dnf system-upgrade][6]_ in the terminal, or [download the live ISO image][7] from the official website.
|
||||
|
||||
### Also check out…
|
||||
|
||||
There are always cool things happening in the Fedora Project!
|
||||
|
||||
* The social links in the upper right corner on Fedora Magazine now include our official [Fedora YouTube prescence][8], [Fedora Matrix homeserver][9], and the [Fedora Discussion][10] website!
|
||||
* Fedora Discussion has been lightly renovated! Come and chat with us! ☺️
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/whats-new-fedora-36-workstation/
|
||||
|
||||
作者:[Merlin Cooper][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/mxanthropocene/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2022/04/fedora36workstation-816x345.jpg
|
||||
[2]: https://fedoramagazine.org/wp-content/uploads/2022/03/fw36-1-1024x640.png
|
||||
[3]: https://fedoramagazine.org/wp-content/uploads/2022/03/scrui.png
|
||||
[4]: https://fedoramagazine.org/wp-content/uploads/2022/03/libadwaitat-1024x633.png
|
||||
[5]: https://fedoramagazine.org/wp-content/uploads/2022/03/systemdmsg.png
|
||||
[6]: https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/
|
||||
[7]: https://getfedora.org/en/workstation/download/
|
||||
[8]: https://www.youtube.com/channel/UCnIfca4LPFVn8-FjpPVc1ow
|
||||
[9]: https://chat.fedoraproject.org/#/welcome
|
||||
[10]: https://discussion.fedoraproject.org/
|
@ -1,214 +0,0 @@
|
||||
[#]: subject: "10 Things to Do After Installing Fedora 36 Workstation [With Bonus Tip]"
|
||||
[#]: via: "https://www.debugpoint.com/2022/05/10-things-to-do-fedora-36-after-install/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
10 Things to Do After Installing Fedora 36 Workstation [With Bonus Tip]
|
||||
======
|
||||
I am sure you have already updated or installed Fedora 36 Workstation Edition. With that said, here’s our traditional article – “10 Things to Do After Installing Fedora 36”, to give you some post-install tweak ideas.
|
||||
|
||||
This guide is primarily for the Fedora 36 Workstation edition, i.e., GNOME Desktop. Because it is the default version and the most popular in terms of the user base. Hence, to make yourself more productive and tweak the entire desktop in the best possible way, here are the 10 things you can do after installing Fedora 36 Workstation Edition (GNOME).
|
||||
|
||||
### 10 Things to Do After Installing Fedora 36 Workstation
|
||||
|
||||
#### 1. Update DNF Configuration
|
||||
|
||||
Before you make any updates or changes in your system, it’s worth checking the dnf package manager configuration file for existing settings. The DNF is the default package manager (like apt) for Fedora Linux.
|
||||
|
||||
If you are a long time Fedora Linux user, you may know that dnf package downloads are sometimes slower despite having high-speed internet.
|
||||
|
||||
You can use the max_parallel_downloads option, among other tricks, in the /etc/dnf/dnf.conf file to make it faster.
|
||||
|
||||
This option takes a number (from 3 to 20) as its value which you specify in the file, and that many numbers of packages can be downloaded parallelly using dnf.
|
||||
|
||||
```
|
||||
sudo gnome-text-editor /etc/dnf/dnf.conf
|
||||
```
|
||||
|
||||
```
|
||||
max_parallel_downloads=10
|
||||
```
|
||||
|
||||
Open the config file using any text editor and add the below line.
|
||||
|
||||
After the update, your file should look like the one below. Save and close the file.
|
||||
|
||||
#### 2. Update your system
|
||||
|
||||
After you make the above changes and perform any other work, it’s always a good idea to update your system to ensure all the latest packages are downloaded and installed. You can open the Software application and go to the Updates Tab. Or, open a terminal and use the following command to update your system.
|
||||
|
||||
```
|
||||
sudo dnf update
|
||||
```
|
||||
|
||||
```
|
||||
sudo dnf upgrade
|
||||
```
|
||||
|
||||
![dnf update][1]
|
||||
|
||||
#### 3. Firmware Updates
|
||||
|
||||
If your hardware manufacturer supports a special firmware package for Linux, you can quickly check them and get those updates via the following sequence of commands. However, it may not always be available, but it is worth trying.
|
||||
|
||||
```
|
||||
sudo fwupdmgr refresh --forcesudo fwupdmgr get-updatessudo fwupdmgr update
|
||||
```
|
||||
|
||||
#### 4. Change Touchpad settings
|
||||
|
||||
If you are a Laptop user, check whether the “Tap to Click” option is enabled in the settings. Open the Settings application, navigate to the “Mouse and Touchpad” tab and verify.
|
||||
|
||||
#### 5. Enable RPM Fusion
|
||||
|
||||
The RPM Fusion library is a set of packages and applications provided by the community. For example, DVD or media codecs, etc. The Official Fedora repo does not offer them because of proprietary in nature. You can read our complete guide here to [enable RPM Fusion in Fedora][2]. Or, run the following commands in sequence to make it available for Fedora 36.
|
||||
|
||||
```
|
||||
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
|
||||
```
|
||||
|
||||
```
|
||||
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
|
||||
```
|
||||
|
||||
After the above commands are complete, run the following to update your system.
|
||||
|
||||
```
|
||||
sudo dnf upgrade --refreshsudo dnf groupupdate core
|
||||
```
|
||||
|
||||
#### 6. Install GNOME Tweaks
|
||||
|
||||
The GNOME Tweaks is the essential application for Fedora 36 Workstation. It helps you to manage many areas of your GNOME desktop. After installation, you can launch it via the application menu. To install, run the following commands from the terminal.
|
||||
|
||||
```
|
||||
sudo dnf install gnome-tweak-tool
|
||||
```
|
||||
|
||||
#### 7. Enable Flatpak and Install Extensions
|
||||
|
||||
The more we are moving ahead with the adaptation of sandboxing of applications, Flatpak is becoming more and more essential on the Linux desktop. Arguably, Flatpak performs better and is widely adopted compared to Snap.
|
||||
|
||||
Hence, you should enable Flatpak beforehand as you continue to make your system productive.
|
||||
|
||||
Open a terminal and run the below command to enable Flatpak.
|
||||
|
||||
```
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
```
|
||||
|
||||
Then you can check out several applications available in [Flathub][3] to install.
|
||||
|
||||
However, one particular application that we recommend installing via Flathub is “[Extensions][4]“. This application helps you manage all the installed GNOME Extensions in your system. You can enable/disable them, launch settings of individual extensions and many such housekeeping tasks related to extensions. To install, open a terminal and run the below command. Once completed, you can launch the Extension application from the application menu.
|
||||
|
||||
```
|
||||
flatpak install flathub org.gnome.Extensions
|
||||
```
|
||||
|
||||
Alternatively, another application, “[Extension Manager][5]“, gives you some additional settings, and you may also try that via the below command.
|
||||
|
||||
```
|
||||
flatpak install flathub com.mattjakeman.ExtensionManager
|
||||
```
|
||||
|
||||
#### 8. Enable GNOME Extensions
|
||||
|
||||
Since we are talking about extensions, you need to set up your system before you install them. Open a terminal and run the below command to install the plugin to enable the hook to install extensions via the Firefox web browser.
|
||||
|
||||
```
|
||||
sudo dnf install chrome-gnome-shell
|
||||
```
|
||||
|
||||
Then open Firefox, and [visit this page][6]. And at the top, click on “install browser extension” and Continue.
|
||||
|
||||
![Add Browser Add-on for GNOME Shell Extension][7]
|
||||
|
||||
#### 9. Install these recommended GNOME Extensions
|
||||
|
||||
There are hundreds of GNOME Extensions available for various needs on the [official website][8]. However, here’s a curated list that we think should be installed by everyone while using Fedora 36 with the latest GNOME 42 desktop.
|
||||
|
||||
**Dash to Dock** (for COSMIC): Convert the bottom dock to a fully functional application dock with features such as autohide, extend to edges, move around and always show.
|
||||
|
||||
**GSConnet**: Install this extension if you want to get notification and SMS alerts from your Android mobile phone to the GNOME desktop. This is an alternative to KDE Connect for GNOME Desktop.
|
||||
|
||||
**Just Perfection**: This extension helps you make any changes to your GNOME Shell. You can change the visibility of almost all components of GNOME Shell, behaviour tweaks and customise panels, and more.
|
||||
|
||||
[Blur My Shell:][9]The default GNOME activities background is grey while showing the wallpaper of the workspaces. This extension makes your background wallpaper blur and gives a nice blurry drop shadow to the workspaces. And it comes with many other options as well.
|
||||
|
||||
[Net Speed Simplified:][10]This extension shows the data transfer speed of your active network as upload/download speed right at the top panel.
|
||||
|
||||
#### 10. Install Recommended Applications
|
||||
|
||||
The default GNOME Desktop brings very minimal required applications. They are not sufficient for a functioning and productive desktop. Hence, here’s a quick list of commands with essential applications that you can install, including a media player, torrent client, image editor, and more.
|
||||
|
||||
Copy and paste these into the terminal to install.
|
||||
|
||||
```
|
||||
sudo dnf install -y vlcsudo dnf install -y steamsudo dnf install -y transmissionsudo dnf install -y gimpsudo dnf install -y gearysudo dnf install -y dropbox nautilus-dropboxsudo dnf install -y unzip p7zip p7zip-plugins unrar
|
||||
```
|
||||
|
||||
If you prefer Flatpaks, here’s the command for that.
|
||||
|
||||
```
|
||||
flatpak install flathub org.videolan.VLCflatpak install flathub com.valvesoftware.Steamflatpak install flathub com.transmissionbt.Transmissionflatpak install flathub org.gimp.GIMPflatpak install flathub org.gnome.Gearyflatpak install flathub com.dropbox.Client
|
||||
```
|
||||
|
||||
### Bonus Tip(s)
|
||||
|
||||
And finally, here are three bonus tips exclusively for you.
|
||||
|
||||
#### Enable Battery percentage
|
||||
|
||||
If you want to view the battery percentage at the system tray, run the following command to show it via settings.
|
||||
|
||||
```
|
||||
gsettings set org.gnome.desktop.interface show-battery-percentage true
|
||||
```
|
||||
|
||||
#### Install nice looking fonts
|
||||
|
||||
GNOME desktop’s default font on Fedora 36 is perfect. But if you crave more, here are some of the cool fonts you can install. After installation, you can use GNOME Tweak Tool to change.
|
||||
|
||||
```
|
||||
sudo dnf install -y 'google-roboto*' 'mozilla-fira*' fira-code-fonts
|
||||
```
|
||||
|
||||
#### TLP
|
||||
|
||||
Last but not least, you should install TLP if you are a Laptop user. TLP is a great utility to help optimise your Laptop’s battery. This utility comes with various command-line options to tweak and view reports about power consumption. All you need to do is install and forget it. It takes care of the basic power-saving optimisations.
|
||||
|
||||
```
|
||||
sudo dnf install tlp tlp-rdw
|
||||
```
|
||||
|
||||
### Closing Notes
|
||||
|
||||
I hope you enjoyed reading these tips and applied some of them. So, what is your favourite must-do post-install tip? Let me know in the comment box down below!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/05/10-things-to-do-fedora-36-after-install/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2020/10/dnf-update.png
|
||||
[2]: https://www.debugpoint.com/2020/07/enable-rpm-fusion-fedora-rhel-centos/
|
||||
[3]: https://flathub.org/
|
||||
[4]: https://flathub.org/apps/details/org.gnome.Extensions
|
||||
[5]: https://flathub.org/apps/details/com.mattjakeman.ExtensionManager
|
||||
[6]: https://extensions.gnome.org/
|
||||
[7]: https://www.debugpoint.com/wp-content/uploads/2022/03/Add-Browser-Add-on-for-GNOME-Shell-Extension.jpg
|
||||
[8]: https://extensions.gnome.org/
|
||||
[9]: https://extensions.gnome.org/extension/3193/blur-my-shell/
|
||||
[10]: https://extensions.gnome.org/extension/3724/net-speed-simplified/
|
@ -1,336 +0,0 @@
|
||||
[#]: subject: "How To Upgrade To Fedora 36 From Fedora 35 [Workstation And Server]"
|
||||
[#]: via: "https://ostechnix.com/upgrade-to-fedora-36-from-fedora-35/"
|
||||
[#]: author: "sk https://ostechnix.com/author/sk/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How To Upgrade To Fedora 36 From Fedora 35 [Workstation And Server]
|
||||
======
|
||||
A Step By Step Guide To Upgrade Fedora 35 To Fedora 36
|
||||
|
||||
Fedora 36 has been released! This step by step tutorial tutorial explains how to upgrade to Fedora 36 from Fedora 35 and older versions. If you're already using Fedora 35, you can now safely upgrade to Fedora 36 desktop or server edition for latest features, performance and stability improvements.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Before upgrading to Fedora 36, you need to do a few important tasks.
|
||||
|
||||
1. It is strongly RECOMMENDED to Backup your important data before upgrading to Fedora 36. This should be your first step when you want to upgrade any system, regardless of the underlying operating system. Make sure you've backup of all important files, directories, configuration settings, browser bookmarks, and dot files etc.
|
||||
2. Fedora 36 upgrade will probably take several minutes to complete. So make sure you've stable Internet connection and uninterrupted power supply.
|
||||
3. During upgrade, your system will reboot automatically to apply updates. So ensure that there aren't any important jobs currently running (E.g. Scheduled backups).
|
||||
4. See the Fedora 36 common issues and decide if you want to proceed.
|
||||
5. Upgrades to the very next release (e.g. 35 to 36) as well as upgrades skipping one release (e.g. 34 to 36) are both supported. Upgrades across more than two releases are not supported. For example - you can't go from Fedora 33 to 36. It might work sometimes. However, if you encounter with any issues, you won't get any support. In such cases, first upgrade to next release (i.e. 33 to 34) and then try to upgrade from 34 to 36. It is always recommended to upgrade to next release before it reaches EOL.
|
||||
|
||||
Well, without further ado, let us start Fedora 36 upgrade task!
|
||||
|
||||
### Upgrade to Fedora 36 From Fedora 35
|
||||
|
||||
We can upgrade to Fedora 36 via GNOME software (GUI) and from command line (CLI). First, we will see the Graphical method using GNOME Software. This is suitable for those who use Fedora desktop edition.
|
||||
|
||||
Before get started, update your Fedora 35 system:
|
||||
|
||||
```
|
||||
$ sudo dnf --refresh update
|
||||
```
|
||||
|
||||
```
|
||||
$ sudo dnf upgrade
|
||||
```
|
||||
|
||||
Reboot your system to apply the updates:
|
||||
|
||||
```
|
||||
$ sudo reboot
|
||||
```
|
||||
|
||||
Let us check the current version using the following commands:
|
||||
|
||||
```
|
||||
$ cat /etc/fedora-release
|
||||
```
|
||||
|
||||
To view the detailed version output, run this instead:
|
||||
|
||||
```
|
||||
$ cat /etc/os-release
|
||||
```
|
||||
|
||||
![Display Fedora Version][1]
|
||||
|
||||
Now, follow any one of the below methods to upgrade Fedora to 36 desktop or server.
|
||||
|
||||
#### 1. Upgrade To Fedora 36 Workstation Via GNOME Software
|
||||
|
||||
**Step 1:** Open your Gnome Software Center and go to **Updates** section. You will see a notification that says - **Fedora 36 Now Available**. Click the Download button to download Fedora 36 packages.
|
||||
|
||||
![Download Fedora 36 From Gnome Software][2]
|
||||
|
||||
The required packages will be downloaded now. This will take a while depending on the Internet speed.
|
||||
|
||||
![Downloading Fedora Linux 36][3]
|
||||
|
||||
**Step 2:** Once the download is complete, you will be prompted to restart and upgrade. Click the "Restart & Upgrade" button to continue installing the updates.
|
||||
|
||||
![Click Restart And Upgrade Button][4]
|
||||
|
||||
**Step 3:** A new pop up window will appear and prompt you to click **Restart & Install Upgrade**. Just click on it to reboot your Fedora system.
|
||||
|
||||
![Click Restart And Install Upgrade Button][5]
|
||||
|
||||
After system reboot, the downloaded packages will be installed. This will take a while depending on the number of packages to install. Make sure your system is plugged into the power outlet and you have uninterrupted power supply.
|
||||
|
||||
![Installing Updates][6]
|
||||
|
||||
After installing the updates, the system will automatically reboot into the brand new Fedora 36 desktop.
|
||||
|
||||
You can check if your Fedora system is up-to-date under **Updates** section in Gnome Software.
|
||||
|
||||
![Check For Updates In Gnome Software][7]
|
||||
|
||||
Congratulations! We've successfully upgraded to Fedora 36!
|
||||
|
||||
**Step 4:** Open a Terminal window and check the installed Fedora version using command:
|
||||
|
||||
```
|
||||
$ cat /etc/fedora-release
|
||||
Fedora release 36 (Thirty Six)
|
||||
```
|
||||
|
||||
To view the detailed output, run:
|
||||
|
||||
```
|
||||
$ cat /etc/os-release
|
||||
```
|
||||
|
||||
**Sample output:**
|
||||
|
||||
```
|
||||
NAME="Fedora Linux"
|
||||
VERSION="36 (Workstation Edition)"
|
||||
ID=fedora
|
||||
VERSION_ID=36
|
||||
VERSION_CODENAME=""
|
||||
PLATFORM_ID="platform:f36"
|
||||
PRETTY_NAME="Fedora Linux 36 (Workstation Edition)"
|
||||
ANSI_COLOR="0;38;2;60;110;180"
|
||||
LOGO=fedora-logo-icon
|
||||
CPE_NAME="cpe:/o:fedoraproject:fedora:36"
|
||||
HOME_URL="https://fedoraproject.org/"
|
||||
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f36/system-administrators-guide/"
|
||||
SUPPORT_URL="https://ask.fedoraproject.org/"
|
||||
BUG_REPORT_URL="https://bugzilla.redhat.com/"
|
||||
REDHAT_BUGZILLA_PRODUCT="Fedora"
|
||||
REDHAT_BUGZILLA_PRODUCT_VERSION=36
|
||||
REDHAT_SUPPORT_PRODUCT="Fedora"
|
||||
REDHAT_SUPPORT_PRODUCT_VERSION=36
|
||||
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
|
||||
VARIANT="Workstation Edition"
|
||||
VARIANT_ID=workstation
|
||||
```
|
||||
|
||||
![Check Fedora 36 Version From Terminal][8]
|
||||
|
||||
Alternatively, You can check the Fedora version under **Settings -> About** section.
|
||||
|
||||
![Check Fedora 36 Version From Settings Section][9]
|
||||
|
||||
#### 2. Upgrade To Fedora 36 Server From Commandline
|
||||
|
||||
This method is for those who runs Fedora server edition in their system.
|
||||
|
||||
**Step 1:** Update Fedora 35 server using command:
|
||||
|
||||
```
|
||||
$ sudo dnf --refresh update
|
||||
```
|
||||
|
||||
```
|
||||
$ sudo dnf upgrade
|
||||
```
|
||||
|
||||
Reboot your system to apply the updates.
|
||||
|
||||
```
|
||||
$ sudo reboot
|
||||
```
|
||||
|
||||
**Step 2:** Install dnf upgrade plugin by running the following command:
|
||||
|
||||
```
|
||||
$ sudo dnf install dnf-plugin-system-upgrade
|
||||
```
|
||||
|
||||
**Step 3:** Download Fedora 36 packages using command:
|
||||
|
||||
```
|
||||
$ sudo dnf system-upgrade download --releasever=36
|
||||
```
|
||||
|
||||
This command will download all latest packages and display the summary of what packages are going to be replaced, updated, upgraded, or downgraded. This task should take several minutes to complete as it downloads a lot of packages.
|
||||
|
||||
If some of your packages have unsatisfied dependencies, the upgrade will refuse to continue until you run it again with an extra `--allowerasing` option.
|
||||
|
||||
```
|
||||
$ sudo dnf system-upgrade download --releasever=36 --allowerasing
|
||||
```
|
||||
|
||||
**Step 4:** Once all packages are downloaded, run the following command to start actual upgrade.
|
||||
|
||||
```
|
||||
$ sudo dnf system-upgrade reboot
|
||||
```
|
||||
|
||||
Your system will reboot automatically and upgrade task will start to install all downloaded packages.
|
||||
|
||||
Upon successful upgrade, the system reboots into the new Fedora 36 server edition.
|
||||
|
||||
That's it. Start using your newly upgraded Fedora 36 server system.
|
||||
|
||||
### Fedora Post-upgrade Tasks
|
||||
|
||||
In this section, we will discuss about a few post-upgrade tasks such as changing the hostname, removing unwanted packages, updating configuration files, deleting orphaned symlinks, and cleaning up old kernels etc.
|
||||
|
||||
The steps provided below are applicable for both Fedora desktop and server editions.
|
||||
|
||||
#### 1. Change Hostname
|
||||
|
||||
I usually use distribution's name as hostname. For example, the hostname for my Fedora 34 desktop would be **fedora34**. If you're anything like me, change the hostname to match with your current version.
|
||||
|
||||
To **change hostname**, run:
|
||||
|
||||
```
|
||||
$ sudo hostnamectl set-hostname fedora36
|
||||
```
|
||||
|
||||
#### 2. Clean DNF Metadata Cache
|
||||
|
||||
After upgrade, the cached metadata and transacation can cleared using the following commands:
|
||||
|
||||
```
|
||||
$ sudo dnf system-upgrade clean
|
||||
```
|
||||
|
||||
```
|
||||
$ sudo dnf clean packages
|
||||
```
|
||||
|
||||
#### 3. Remove Old Packages
|
||||
|
||||
List all packages with broken or unsatisfied dependencies, run:
|
||||
|
||||
```
|
||||
$ sudo dnf update
|
||||
```
|
||||
|
||||
```
|
||||
$ sudo dnf repoquery --unsatisfied
|
||||
```
|
||||
|
||||
List all duplicate packages using command:
|
||||
|
||||
```
|
||||
$ sudo dnf repoquery --duplicates
|
||||
```
|
||||
|
||||
List all packages that are not in the repositories:
|
||||
|
||||
```
|
||||
$ sudo dnf list extras
|
||||
```
|
||||
|
||||
If you don't need them anymore, simply run the following commands to remove old, and unused packages.
|
||||
|
||||
```
|
||||
$ sudo dnf remove $(sudo dnf repoquery --extras --exclude=kernel,kernel-*)
|
||||
```
|
||||
|
||||
```
|
||||
$ sudo dnf autoremove
|
||||
```
|
||||
|
||||
#### 4. Clean Up Retired Packages
|
||||
|
||||
A few packages will be retired in each Fedora release. They could be obsolete or the maintainer abandoned the packages. The retired packages packages will not get any updates. Not even security updates.
|
||||
|
||||
To remove obsolete and retired packages, run:
|
||||
|
||||
```
|
||||
$ sudo dnf install remove-retired-packages
|
||||
```
|
||||
|
||||
```
|
||||
$ remove-retired-packages
|
||||
```
|
||||
|
||||
#### 5. Update System Configuration Files
|
||||
|
||||
To update system configuration files, use `rpmconf` tool.
|
||||
|
||||
To install `rpmconf` tool, run:
|
||||
|
||||
```
|
||||
$ sudo dnf install rpmconf
|
||||
```
|
||||
|
||||
Once the install is complete, run the following command:
|
||||
|
||||
```
|
||||
$ sudo rpmconf -a
|
||||
```
|
||||
|
||||
#### 6. Clean Up Old Kernels
|
||||
|
||||
The `dnf autoremove` command will not remove any unused kernels to avoid unintentional Kernel removals. If you want to remove old kernels, you can use the following command:
|
||||
|
||||
```
|
||||
$ sudo dnf remove $(dnf repoquery --installonly --latest-limit=-3)
|
||||
```
|
||||
|
||||
The above command will remove all old kernels and retain only the latest 3 kernels.
|
||||
|
||||
**Heads Up:** It is HIGHLY RECOMMENDED to **keep at least two kernels**. Because, if there is a problem in the current Kernel version after upgrading, you can safely switch to the older kernel.
|
||||
|
||||
#### 7. Remove Broken Symlinks
|
||||
|
||||
After system upgrade, there would be some unused symlinks left in your system. You need to **find and delete the dangling soft links or symlinks** that don't point anywhere.
|
||||
|
||||
To find broken symlinks in `/usr` directory, run:
|
||||
|
||||
```
|
||||
$ sudo symlinks -r /usr | grep dangling
|
||||
```
|
||||
|
||||
To remove the dangling symlinks, run:
|
||||
|
||||
```
|
||||
$ sudo symlinks -r -d /usr
|
||||
```
|
||||
|
||||
### Conclusion
|
||||
|
||||
In this guide, we have seen how to upgrade to Fedora 36 from Fedora 35 via Gnome Software center and from terminal. At the end, we included a few post-upgrade steps that needs to done to cleanup the fedora system.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://ostechnix.com/upgrade-to-fedora-36-from-fedora-35/
|
||||
|
||||
作者:[sk][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://ostechnix.com/wp-content/uploads/2022/05/Display-Fedora-Version.png
|
||||
[2]: https://ostechnix.com/wp-content/uploads/2022/05/Download-Fedora-36-From-Gnome-Software.png
|
||||
[3]: https://ostechnix.com/wp-content/uploads/2022/05/Downloading-Fedora-Linux-36.png
|
||||
[4]: https://ostechnix.com/wp-content/uploads/2022/05/Click-Restart-And-Upgrade-Button.png
|
||||
[5]: https://ostechnix.com/wp-content/uploads/2022/05/Click-Restart-And-Install-Upgrade-Button.png
|
||||
[6]: https://ostechnix.com/wp-content/uploads/2022/05/Installing-Updates.png
|
||||
[7]: https://ostechnix.com/wp-content/uploads/2022/05/Check-For-Updates-In-Gnome-Software.png
|
||||
[8]: https://ostechnix.com/wp-content/uploads/2022/05/Check-Fedora-36-Version-From-Terminal.png
|
||||
[9]: https://ostechnix.com/wp-content/uploads/2022/05/Check-Fedora-36-Version-From-Settings-Section.png
|
@ -1,194 +0,0 @@
|
||||
[#]: subject: "How to Dual Boot Ubuntu 22.04 LTS and Windows 11"
|
||||
[#]: via: "https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/"
|
||||
[#]: author: "James Kiarie https://www.linuxtechi.com/author/james/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "robsean"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Dual Boot Ubuntu 22.04 LTS and Windows 11
|
||||
======
|
||||
Hey guys, in this guide we will demonstrate how to configure a dual-boot setup of Ubuntu 22.04 LTS (Jammy Jellyfish) alongside Windows 11.
|
||||
|
||||
For this to work, you need to have Windows 11 already installed on your PC. You will then need to create a separate partition on your hard drive on which Ubuntu 22.04 will be installed. We will go over all this, so don’t worry.
|
||||
|
||||
##### Prerequisites
|
||||
|
||||
Before setting sail with the dual-boot setup, here is what you need.
|
||||
|
||||
* A bootable USB drive of Ubuntu 22.04 You can download Ubuntu 22.04 ISO image by heading over to the [Ubuntu 22.04 download page][1]. With the ISO image in place, grab a 16GB USB drive and use Rufus application to make it bootable.
|
||||
|
||||
* A fast and stable internet connection
|
||||
|
||||
### Step 1) Create a Free Partition on Your Hard Drive
|
||||
|
||||
As mentioned in the introduction, we first and foremost need to create a separate partition on the hard drive on which we are going to install Ubuntu 22.04.
|
||||
|
||||
So, open the disk management utility by pressing Windows Key + R
|
||||
|
||||
In the dialogue box, type diskmgmt.msc and hit ENTER.
|
||||
|
||||
![][2]
|
||||
|
||||
The disk management console displays the current disk partitions as you can see below. We are going to create a partition for installing Ubuntu by Shrinking ‘Volume E’. This might be different in your setup, but just follow along and you will get the drift.
|
||||
|
||||
![][3]
|
||||
|
||||
So, right-click on the volume that you want to shrink and select ‘Shrink’.
|
||||
|
||||
![][4]
|
||||
|
||||
A pop-up dialogue box will appear as shown below. Specify the amount of space to shrink in MB and click ‘Shrink’.
|
||||
|
||||
This is the space that is designated for the Ubuntu 22.04 installation.
|
||||
|
||||
![][5]
|
||||
|
||||
After shrinking the space, it will appear as ‘Unallocated’ or ‘Free Space’ as shown.
|
||||
|
||||
![][6]
|
||||
|
||||
With the free space in place, now plug the bootable USB medium into your PC and reboot your system. Also, be sure to access the BIOS setup and modify the boot priority to have the USB drive as the first priority. Save the BIOS changes and proceed to boot.
|
||||
|
||||
### Step 2) Begin the installation
|
||||
|
||||
On the first screen, you will get the GRUB menu displayed as shown. Select the first option ‘Try or Install Ubuntu’ and press ENTER.
|
||||
|
||||
![][7]
|
||||
|
||||
Ubuntu 22.04 will start loading as shown below. This takes a minute at most.
|
||||
|
||||
![][8]
|
||||
|
||||
Thereafter, the installation wizard will pop open providing you with two options: ‘Try Ubuntu’ and ‘Install Ubuntu’. Since our mission is to install Ubuntu, select the latter.
|
||||
|
||||
![][9]
|
||||
|
||||
Next, select your preferred Keyboard layout and click ‘Continue’.
|
||||
|
||||
![][10]
|
||||
|
||||
In the ‘Updates and Other Software’ step, select ‘Normal Installation’ in order to install the GUI version of Ubuntu and check the rest of the options to allow download of updates and installation of third-party software for graphics, WiFi hardware and other utilities.
|
||||
|
||||
Then click ‘Continue’.
|
||||
|
||||
![][11]
|
||||
|
||||
The next step provides two options for installation. The first option -’Erase disk and install Ubuntu’ – completely wipes out your drive and installs Ubuntu’. But since this is a dual boot setup, this option will be disastrous to your existing Windows installation.
|
||||
|
||||
Therefore, select ‘Something else’ and click ‘Continue’.
|
||||
|
||||
![][12]
|
||||
|
||||
The partition table will be displayed with all the existing disk partitions. So far, we only have the NTFS partitions and the free space we shrunk earlier.
|
||||
|
||||
For Ubuntu 22.04, we will create the following partitions:
|
||||
|
||||
* /boot – 1 GB
|
||||
* /home – 10 GB
|
||||
* / – 12 GB
|
||||
* Swap – 2 GB
|
||||
* EFI – 300 MB
|
||||
|
||||
To get started with the partitions, click on the [ + ] sign below the ‘Free Space’ partition.
|
||||
|
||||
![][13]
|
||||
|
||||
Fill in the /boot partition details as shown then click ‘OK’.
|
||||
|
||||
![][14]
|
||||
|
||||
Next up, specify the /home partition and click ‘OK’.
|
||||
|
||||
![][15]
|
||||
|
||||
Next, define the / ( root ) partition and click ‘OK’.
|
||||
|
||||
![][16]
|
||||
|
||||
To define swap space, set the size and select ‘Swap area’ for the ‘Use as:’ option.
|
||||
|
||||
![][17]
|
||||
|
||||
Finally, create an EFI system partition if you are using UEFI boot mode. We will assign 300 MB to the EFI partition.
|
||||
|
||||
![][18]
|
||||
|
||||
Below is a summary of the partitions in our partition table.
|
||||
|
||||
![][19]
|
||||
|
||||
To continue with the installation, click ‘Install Now’. On the pop-up shown below, click ‘Continue’ to save the changes to the disk.
|
||||
|
||||
![][20]
|
||||
|
||||
Next, the installation wizard will auto-detect your location. Simply click ‘Continue’.
|
||||
|
||||
![][21]
|
||||
|
||||
Next, create a login user by specifying the name, computer’s name and password. Then click ‘Continue’.
|
||||
|
||||
![][22]
|
||||
|
||||
At this point, the installation wizard will copy all the Ubuntu files and packages to the manually created hard drive partitions and install the required software packages.
|
||||
|
||||
This process takes quite a while, so be patient. In our case, it took roughly 30 minutes.
|
||||
|
||||
![][23]
|
||||
|
||||
Once the installation is completed, click on ‘Restart Now’ to reboot the system.
|
||||
|
||||
![][24]
|
||||
|
||||
At this point, remove your bootable USB drive and press ‘ENTER’
|
||||
|
||||
![][25]
|
||||
|
||||
When the system restarts, you will find all options for both Ubuntu and Windows 11.
|
||||
|
||||
Select ‘Ubuntu’ to boot into your new Ubuntu 22.04 installation. To boot into Windows 11, select the entry labeled ‘Windows Recovery Environment.
|
||||
|
||||
![][26]
|
||||
|
||||
And there you have it. We have demonstrated how to dual-boot Windows 11 with Ubuntu 22.04.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/
|
||||
|
||||
作者:[James Kiarie][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.linuxtechi.com/author/james/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://releases.ubuntu.com/22.04/
|
||||
[2]: https://www.linuxtechi.com/wp-content/uploads/2022/05/diskmgmt-msc-command-windows11.png
|
||||
[3]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Disk-Management-Console-Windows11.png
|
||||
[4]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Shrink-Volume-Windows11.png
|
||||
[5]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Shrink-Volume-Size-Windows11.png
|
||||
[6]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Free-Space-Disk-Management-Console-Windows11.png
|
||||
[7]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Install-Ubuntu-Linux.png
|
||||
[8]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Ubuntu-22-04-Loading-Screen.png
|
||||
[9]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-Install-Ubuntu-Linux.png
|
||||
[10]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Keyboard-Layout-Ubuntu-22-04.png
|
||||
[11]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Normal-Installation-Option-During-Ubuntu-22-04-Installation.png
|
||||
[12]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Something-else-ubuntu-installation.png
|
||||
[13]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Free-Space-for-Ubuntu-22-04-Installation.png
|
||||
[14]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Boot-Partition-Ubuntu-22-04-LTS.png
|
||||
[15]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Home-Partition-For-Ubuntu-22-04.png
|
||||
[16]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Root-Partition-For-Ubuntu-22-04.png
|
||||
[17]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Swap-Area-Ubuntu-22-04.png
|
||||
[18]: https://www.linuxtechi.com/wp-content/uploads/2022/05/EFI-System-Partition-Ubuntu-22-04.png
|
||||
[19]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Install-Now-Ubuntu-22-04.png
|
||||
[20]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Write-Changes-Disk-Ubuntu-22-04.png
|
||||
[21]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Location-for-Ubuntu-22-04-Installation.png
|
||||
[22]: https://www.linuxtechi.com/wp-content/uploads/2022/05/UserName-Hostname-Ubuntu-22-04-lts-Installation.png
|
||||
[23]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Installation-Progress-Ubuntu-22-04.png
|
||||
[24]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Restart-After-Ubuntu-22-04-LTS-Installation.png
|
||||
[25]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Remove-Installation-Media-after-Ubuntu-22-04-Installation.png
|
||||
[26]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Dual-Boot-Grub-Bootloader-Screen-Ubuntu-22-04.png
|
@ -1,273 +0,0 @@
|
||||
[#]: subject: "How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 / 20.04 / 18.04"
|
||||
[#]: via: "https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/"
|
||||
[#]: author: "sk https://ostechnix.com/author/sk/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "robsean"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 / 20.04 / 18.04
|
||||
======
|
||||
This tutorial explains how to boot into **rescue mode** or **emergency mode**in Ubuntu 22.04, 20.04 and 18.04 LTS editions.
|
||||
|
||||
As you might already know, **Runlevels** are replaced with **Systemd targets** in many Linux distributions such as RHEL 7 / RHEL 8 and Ubuntu 16.04 LTS and newer versions. For more details about runlevels and systemd target, refer to [this guide][1].
|
||||
|
||||
This guide is specifically written for Ubuntu, however the steps given below should work on most Linux distributions that use **Systemd** as the default service manager.
|
||||
|
||||
Before getting into the topic, let us have a brief understanding about what is rescue mode and emergency mode and what is the purpose of these both modes.
|
||||
|
||||
### What Is Rescue Mode?
|
||||
|
||||
The **rescue mode** is equivalent to **single user mode** in Linux distributions that use **SysV** as the default service manager. In rescue mode, all local filesystems will be mounted, only some important services will be started. However, no normal services (E.g network services) won't be started.
|
||||
|
||||
The rescue mode is helpful in situations where the system can't boot normally. Also, we can perform some important rescue operations, such as [reset root password][2], in rescue mode.
|
||||
|
||||
### What Is Emergency Mode?
|
||||
|
||||
In contrast to the rescue mode, nothing is started in the **emergency mode**. No services are started, no mount points are mounted, no sockets are established, nothing. All you will have is just a **raw shell**. Emergency mode is suitable for debugging purposes.
|
||||
|
||||
First, we will see how to boot into rescue mode and emergency mode in Ubuntu 22.04 and 20.04 LTS distributions. The procedure for entering rescue mode in Ubuntu 22.04 and 20.04 LTS is exactly the same!
|
||||
|
||||
### Boot Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS
|
||||
|
||||
We can boot into rescue mode in two ways.
|
||||
|
||||
#### Method 1
|
||||
|
||||
Power on your Ubuntu system. Hit the ESC key right after the BIOS logo disappears to display the Grub menu.
|
||||
|
||||
In the GRUB menu, choose the first entry and press **"e"** to edit it.
|
||||
|
||||
![GRUB Menu In Ubuntu 22.04 / 20.04 LTS][3]
|
||||
|
||||
Hit the DOWN arrow and find the line that starts with the word **"linux"** and add the following line at the end of it. To reach the end, just press **CTRL+e** or use the **END** key or **LEFT/RIGHT** arrows in your keyboard.
|
||||
|
||||
```
|
||||
systemd.unit=rescue.target
|
||||
```
|
||||
|
||||
![Edit Grub Boot Menu Entries To Enter Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS][4]
|
||||
|
||||
After adding the above line, hit **Ctrl+x** or**F10** to boot into rescue mode.
|
||||
|
||||
After a few seconds, you will be landed in the rescue mode (single user mode) as root user. You will be prompted to press ENTER to enter the maintenance mode.
|
||||
|
||||
Here is how rescue mode looks like in Ubuntu 22.04 / 20.04 LTS systems:
|
||||
|
||||
![Boot Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS][5]
|
||||
|
||||
Now do whatever you want to do in the rescue mode. You may need to mount the root (**/**) file system in read/write mode before doing any operations in rescue mode.
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
![Mount Root File System In Read Write Mode In Ubuntu 22.04 / 20.04 LTS][6]
|
||||
|
||||
Once done, press **"Ctrl+d"** to boot into normal mode. Alternatively, you can type any one of the following commands to boot into normal mode.
|
||||
|
||||
```
|
||||
systemctl default
|
||||
```
|
||||
|
||||
Or,
|
||||
|
||||
```
|
||||
exit
|
||||
```
|
||||
|
||||
If you want to reboot the system instead of booting into normal mode, enter:
|
||||
|
||||
```
|
||||
systemctl reboot
|
||||
```
|
||||
|
||||
#### Method 2
|
||||
|
||||
In this method, you don't need to edit the grub boot menu entries.
|
||||
|
||||
Power on the system and choose **"Advanced options for Ubuntu"** from the Grub boot menu.
|
||||
|
||||
![Choose Advanced Options For Ubuntu From Grub Boot Menu][7]
|
||||
|
||||
Next, you will see the list of available Ubuntu versions with Kernel versions. Choose the **"Recovery mode"** in the grub boot menu in Ubuntu.
|
||||
|
||||
![Choose Recovery Mode In Grub Boot Menu In Ubuntu 22.04 / 20.04 LTS][8]
|
||||
|
||||
After a few seconds, you will see the Ubuntu recovery menu. From the recovery menu, choose **"Drop to root shell prompt"** option and hit the ENTER key.
|
||||
|
||||
![Enter Into Root Shell Prompt In Ubuntu 22.04 / 20.04 LTS][9]
|
||||
|
||||
Now you will be landed in the rescue mode.
|
||||
|
||||
![Ubuntu Maintenance Mode][10]
|
||||
|
||||
Mount the root (**/**) file system in read/write mode by entering the following command:
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
![Mount Root File System In Read Write Mode In Ubuntu][11]
|
||||
|
||||
Do whatever you want to do in the rescue mode.
|
||||
|
||||
Once done, type exit to return back to the recovery menu.
|
||||
|
||||
```
|
||||
exit
|
||||
```
|
||||
|
||||
Finally, choose **"Resume normal boot"** option and hit the ENTER key.
|
||||
|
||||
![Boot Into Normal Mode In Ubuntu][12]
|
||||
|
||||
Press ENTER key again to exit recovery mode and continue booting into normal mode.
|
||||
|
||||
![Exit The Recovery Mode In Ubuntu][13]
|
||||
|
||||
If you don't want to boot into normal mode, type **"reboot"** and press ENTER from the maintenance mode to restart your system.
|
||||
|
||||
### Boot Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS
|
||||
|
||||
When the GRUB boot menu appears, press **"e"** to edit it.
|
||||
|
||||
![GRUB Menu In Ubuntu 22.04 / 20.04 LTS][14]
|
||||
|
||||
Find the line that starts with the word **"linux"** and add the following line at the end of it.
|
||||
|
||||
```
|
||||
systemd.unit=emergency.target
|
||||
```
|
||||
|
||||
![Edit Grub Boot Menu Entries To Enter Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS][15]
|
||||
|
||||
After adding the above line, hit **Ctrl+x** or**F10** to boot into emergency mode.
|
||||
|
||||
After a few seconds, you will be landed in the emergency mode as `root` user. You will be prompted to press ENTER to enter the maintenance mode.
|
||||
|
||||
Here is how emergency mode looks like in Ubuntu 22.04 / 20.04 LTS system:
|
||||
|
||||
![Boot Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS][16]
|
||||
|
||||
Now do whatever you want to do in the emergency mode. You may need to mount the root (**/**) file system in read/write mode before doing any operations in this mode.
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
Once done, press **"Ctrl+d"** to boot into normal mode. Alternatively, you can type any one of the following commands to boot into normal mode.
|
||||
|
||||
```
|
||||
systemctl default
|
||||
```
|
||||
|
||||
Or,
|
||||
|
||||
```
|
||||
exit
|
||||
```
|
||||
|
||||
If you want to reboot the system instead of booting into normal mode, enter:
|
||||
|
||||
```
|
||||
systemctl reboot
|
||||
```
|
||||
|
||||
### Boot Into Rescue Mode In Ubuntu 18.04 LTS
|
||||
|
||||
Boot your Ubuntu system. When the Grub menu appears, choose the first entry and press **e** to edit. (To reach the end, just press **CTRL+e** or use the END key or LEFT/RIGHT arrows in your keyboard):
|
||||
|
||||
![Grub Menu][17]
|
||||
|
||||
If you don't see the Grub menu, just hit ESC key right after the BIOS logo disappears.
|
||||
|
||||
Find the line that starts with word **"linux"**and add the following line at the end of that line (To reach the end, just press **CTRL+e** or use the END key or LEFT/RIGHT arrows in your keyboard):
|
||||
|
||||
```
|
||||
systemd.unit=rescue.target
|
||||
```
|
||||
|
||||
![Edit Grub Menu][18]
|
||||
|
||||
Once you added the above line, just press **CTRL+x** or **F10** to continue to boot into rescue mode. After a few seconds, you will be landed in the rescue mode (single user mode) as root user.
|
||||
|
||||
Here is how rescue mode looks like in Ubuntu 18.04 LTS server:
|
||||
|
||||
![Ubuntu Rescue Mode][19]
|
||||
|
||||
Next, type the following command to mount root (**/**) file system into read/write mode.
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
### Boot Into Emergency Mode
|
||||
|
||||
Booting your Ubuntu into emergency is as same as above method. All you have to do is replace **"systemd.unit=rescue.target"** with **"systemd.unit=emergency.target"** when editing grub menu.
|
||||
|
||||
![Edit Grub Menu][20]
|
||||
|
||||
Once you added "systemd.unit=emergency.target", press **Ctrl+x** or **F10** to continue booting into emergency mode.
|
||||
|
||||
![Ubuntu Emergency Mode][21]
|
||||
|
||||
Finally, you can mount root filesystem into read/write mode with command:
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
### Switch Between Rescue And Emergency Modes
|
||||
|
||||
If you are in rescue mode, you don't have to edit the grub boot entry as I mentioned above. Instead, just type the following command to switch to emergency mode instantly:
|
||||
|
||||
```
|
||||
systemctl emergency
|
||||
```
|
||||
|
||||
Similarly, to switch from emergency to rescue mode, type:
|
||||
|
||||
```
|
||||
systemctl rescue
|
||||
```
|
||||
|
||||
### Conclusion
|
||||
|
||||
You know now what is rescue and emergency modes and how to boot into those modes in Ubuntu 22.04, 20.04 and 18.04 LTS systems. Like I already mentioned, the steps provided here will work on many recent Linux versions that uses Systemd.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/
|
||||
|
||||
作者:[sk][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://ostechnix.com/check-runlevel-linux/
|
||||
[2]: https://ostechnix.com/how-to-reset-or-recover-root-user-password-in-linux/
|
||||
[3]: https://ostechnix.com/wp-content/uploads/2022/05/GRUB-Menu-In-Ubuntu-22.04-LTS.png
|
||||
[4]: https://ostechnix.com/wp-content/uploads/2022/05/Edit-Grub-Boot-Menu-Entries-To-Enter-Into-Rescue-Mode-In-Ubuntu-22.04-LTS.png
|
||||
[5]: https://ostechnix.com/wp-content/uploads/2022/05/Boot-Into-Rescue-Mode-In-Ubuntu-22.04.png
|
||||
[6]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-File-System-In-Read-Write-Mode-In-Ubuntu.png
|
||||
[7]: https://ostechnix.com/wp-content/uploads/2022/05/Choose-Advanced-Options-For-Ubuntu-From-Grub-Boot-Menu.png
|
||||
[8]: https://ostechnix.com/wp-content/uploads/2022/05/Choose-Recovery-Mode-In-Grub-Boot-Menu-In-Ubuntu.png
|
||||
[9]: https://ostechnix.com/wp-content/uploads/2022/05/Enter-Into-Root-Shell-Prompt-In-Ubuntu.png
|
||||
[10]: https://ostechnix.com/wp-content/uploads/2022/05/Ubuntu-Maintenance-Mode.png
|
||||
[11]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-File-System-In-Read-Write-Mode-In-Ubuntu-1.png
|
||||
[12]: https://ostechnix.com/wp-content/uploads/2022/05/Boot-Into-Normal-Mode-In-Ubuntu.png
|
||||
[13]: https://ostechnix.com/wp-content/uploads/2022/05/Exit-The-Recovery-Mode-In-Ubuntu.png
|
||||
[14]: https://ostechnix.com/wp-content/uploads/2022/05/GRUB-Menu-In-Ubuntu-22.04-LTS.png
|
||||
[15]: https://ostechnix.com/wp-content/uploads/2022/05/Edit-Grub-Boot-Menu-Entries-To-Enter-Into-Emergency-Mode-In-Ubuntu.png
|
||||
[16]: https://ostechnix.com/wp-content/uploads/2018/12/Boot-Into-Emergency-Mode-In-Ubuntu-20.04-LTS.png
|
||||
[17]: https://ostechnix.com/wp-content/uploads/2018/12/Grub-menu.png
|
||||
[18]: https://ostechnix.com/wp-content/uploads/2018/12/Edit-grub-menu.png
|
||||
[19]: https://ostechnix.com/wp-content/uploads/2018/12/Ubuntu-rescue-mode.png
|
||||
[20]: https://ostechnix.com/wp-content/uploads/2018/12/emergency-mode.png
|
||||
[21]: https://ostechnix.com/wp-content/uploads/2018/12/emergency-mode-1.png
|
@ -1,191 +0,0 @@
|
||||
[#]: subject: "Install Specific Package Version With Apt Command in Ubuntu"
|
||||
[#]: via: "https://itsfoss.com/apt-install-specific-version-2/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "robsean"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Install Specific Package Version With Apt Command in Ubuntu
|
||||
======
|
||||
|
||||
Want to install a specific version of a package in Ubuntu? You can do that ‘easily’ in the following manner:
|
||||
|
||||
```
|
||||
sudo apt install package_name=package_version
|
||||
```
|
||||
|
||||
How do you know which versions are available for a certain package? Use this command:
|
||||
|
||||
```
|
||||
apt list --all-versions package_name
|
||||
```
|
||||
|
||||
In the screenshot below, you can see that I have two versions of VLC available and I use the command to install the older version:
|
||||
|
||||
![install specific versions apt ubuntu][1]
|
||||
|
||||
Sounds like a simple task, right? But things are not as simple as they look. There are several ifs and buts involved here.
|
||||
|
||||
This tutorial will cover all the important aspects of installing a specific program version using apt or apt-get commands.
|
||||
|
||||
### Things to know about installing a specific version of a program
|
||||
|
||||
You need to know a few things about how APT and repositories work in Ubuntu and Debian-based distributions.
|
||||
|
||||
#### No older versions from the same source
|
||||
|
||||
Ubuntu doesn’t keep older versions of packages in the repository. You may see more than one version in specific cases, temporarily. For example, you run the apt update (but not upgrade), and a new version is available. You may see two versions for the same package in the apt cache. But as soon as the package is upgraded to the new version, the older version is removed from the cache as well as the repositories.
|
||||
|
||||
#### Use multiple sources for different versions
|
||||
|
||||
To get multiple versions of the same package, you’ll have to add multiple sources. For example, VLC is in version 3.x. Adding the [VLC daily build PPA][2] will give the (unstable) version 4.x.
|
||||
|
||||
Similarly, **you can download a DEB file with a different version and install it**.
|
||||
|
||||
#### The higher version always gets the priority
|
||||
|
||||
If you have the same package available from more than one source, by default, Ubuntu will install the highest available version.
|
||||
|
||||
In the previous example, if I install VLC, it will install version 4.x, not 3.x.
|
||||
|
||||
#### The older version gets upgraded to the available newer version
|
||||
|
||||
That’s another potential problem. Even if you install the older version of a package, it gets upgraded to the newer version (if available). You have to [hold the package and stop it from upgrading][3].
|
||||
|
||||
#### Dependencies also need to be installed
|
||||
|
||||
If the package has dependencies, you’ll have to install the required version of the dependent packages as well.
|
||||
|
||||
Now that you know a few potential issues let’s see how to tackle them.
|
||||
|
||||
### Installing specific version of a package
|
||||
|
||||
I am taking the example of VLC in this tutorial. VLC version 3.0.16 is available in Ubuntu’s repositories. I added the daily build PPA and that gives me the release candidate of VLC version 4.0.
|
||||
|
||||
As you can see, I have two VLC versions available in the system right now:
|
||||
|
||||
![install specific versions apt ubuntu][4]
|
||||
|
||||
```
|
||||
[email protected]:~$ apt list -a vlc
|
||||
Listing... Done
|
||||
vlc/jammy 4.0.0~rc1~~git20220516+r92284+296~ubuntu22.04.1 amd64
|
||||
vlc/jammy 3.0.16-1build7 amd64
|
||||
vlc/jammy 3.0.16-1build7 i386
|
||||
```
|
||||
|
||||
Since the higher version takes priority, using ‘apt install vlc’ will result in the installation of VLC 4.0. But I want to install the older version 3.0.16 for the sake of this tutorial.
|
||||
|
||||
```
|
||||
sudo apt install vlc=3.0.16-1build7
|
||||
```
|
||||
|
||||
But here’s the thing. The vlc package has several dependencies and those dependencies also need specific versions. However, Ubuntu tries to install the available higher versions for them, and thus, you get the classic ‘[you have held broken packages][5]‘ error.
|
||||
|
||||
![problem installing specific version apt ubuntu][6]
|
||||
|
||||
To fix this, you have to provide specific versions of all the dependent packages it complains about. So that command becomes something like this:
|
||||
|
||||
```
|
||||
sudo apt install vlc=3.0.16-1build7 \
|
||||
vlc-bin=3.0.16-1build7 \
|
||||
vlc-plugin-base=3.0.16-1build7 \
|
||||
vlc-plugin-qt=3.0.16-1build7 \
|
||||
vlc-plugin-video-output=3.0.16-1build7 \
|
||||
vlc-l10n=3.0.16-1build7 \
|
||||
vlc-plugin-access-extra=3.0.16-1build7 \
|
||||
vlc-plugin-notify=3.0.16-1build7 \
|
||||
vlc-plugin-samba=3.0.16-1build7 \
|
||||
vlc-plugin-skins2=3.0.16-1build7 \
|
||||
vlc-plugin-video-splitter=3.0.16-1build7 \
|
||||
vlc-plugin-visualization=3.0.16-1build7
|
||||
```
|
||||
|
||||
In case you are wondering, the trailing \ at the end of each line is just a way to write a single command over multiple lines.
|
||||
|
||||
**Does it work? In many cases, it will.** But I have chosen a complicated example of VLC, which has lots of dependencies. Even the mentioned dependencies have dependencies on other packages. It gets messy.
|
||||
|
||||
An alternative is to specify the source while installing.
|
||||
|
||||
#### Alternatively, specify the repository source
|
||||
|
||||
You have added multiple sources, so you should have some idea about the sources the package comes from.
|
||||
|
||||
Use the command below and search for the repository:
|
||||
|
||||
```
|
||||
apt-cache policy | less
|
||||
```
|
||||
|
||||
Focus on the lines that come after the repository name:
|
||||
|
||||
```
|
||||
500 http://security.ubuntu.com/ubuntu jammy-security/multiverse i386 Packages
|
||||
release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=multiverse,b=i386
|
||||
origin security.ubuntu.com
|
||||
```
|
||||
|
||||
You can specify the o,l,a, etc parameters.
|
||||
|
||||
In my original example, I want to install VLC from Ubuntu’s repository (to get 3.16) instead of the PPA (which gives me 4).
|
||||
|
||||
So the command below will install VLC 3.16 along with all the dependencies:
|
||||
|
||||
```
|
||||
sudo apt install -t "o=ubuntu" vlc
|
||||
```
|
||||
|
||||
![install from repository source][7]
|
||||
|
||||
Looks good? But the problem comes when you have to update the system. Then it complains about not finding the specified version.
|
||||
|
||||
**What else can be done?**
|
||||
|
||||
To install an older version, remove the source of the newer version from your system (if possible). It helps get rid of the dependencies hell issues.
|
||||
|
||||
If that’s not possible, check if you can get it in some other packaging formats like Snap, Flatpak, AppImage, etc. In fact, Snap and Flatpak also allow you to choose and install from available versions. Since the applications are sandboxed, it’s easier to manage the dependencies for different versions.
|
||||
|
||||
#### Hold the package and prevent upgrade
|
||||
|
||||
If you manage to install a specific program version, you may want to avoid accidentally upgrading to the newer version. It’s not too complicated to achieve this.
|
||||
|
||||
```
|
||||
sudo apt-mark hold package_name
|
||||
```
|
||||
|
||||
You can remove the hold so that it can be upgraded later:
|
||||
|
||||
```
|
||||
sudo apt-mark unhold package_name
|
||||
```
|
||||
|
||||
Note that dependencies of a package are not automatically held. They need to be individually mentioned.
|
||||
|
||||
### Conclusion
|
||||
|
||||
As you can see, there is a provision to install the selected version of a program. Things only get complicated if the package has dependencies. Then you get into the dependency hell.
|
||||
|
||||
I hope you learned a few new things in this tutorial. If you have questions or suggestions to improve it, please let me know in the comment section.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/apt-install-specific-version-2/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://itsfoss.com/wp-content/uploads/2022/05/install-specific-versions-apt-ubuntu.png
|
||||
[2]: https://launchpad.net/~videolan/+archive/ubuntu/master-daily
|
||||
[3]: https://itsfoss.com/prevent-package-update-ubuntu/
|
||||
[4]: https://itsfoss.com/wp-content/uploads/2022/05/install-specific-versions-apt-ubuntu.png
|
||||
[5]: https://itsfoss.com/held-broken-packages-error/
|
||||
[6]: https://itsfoss.com/wp-content/uploads/2022/05/problem-installing-specific-version-apt-ubuntu-800x365.png
|
||||
[7]: https://itsfoss.com/wp-content/uploads/2022/05/install-from-repository-source-800x578.png
|
@ -1,218 +0,0 @@
|
||||
[#]: subject: "Add, Delete And Grant Sudo Privileges To Users In Fedora 36"
|
||||
[#]: via: "https://ostechnix.com/add-delete-and-grant-sudo-privileges-to-users-in-fedora/"
|
||||
[#]: author: "sk https://ostechnix.com/author/sk/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Add, Delete And Grant Sudo Privileges To Users In Fedora 36
|
||||
======
|
||||
Create sudo user in Fedora
|
||||
|
||||
Using `sudo` program, we can elevate the ability of a normal user to run administrative tasks, without giving away the `root` user's password in Linux operating systems. This guide explains how to add, delete and grant sudo privileges to users in Fedora 36 desktop and server editions.
|
||||
|
||||
I've divided this guide in three sections. The first section teaches you how to create a new user. In the second section, you'll learn how to give sudo access to the existing user. And in the last section, you will know how to remove sudo access from a user. I've also provided example commands in each section, so you can understand it better.
|
||||
|
||||
First, we will start with giving sudo access to a new user.
|
||||
|
||||
### 1. Create A New User In Fedora
|
||||
|
||||
Login to your Fedora system as `root` user or `sudo` user.
|
||||
|
||||
We can use either `useradd` or `adduser` commands to create users in Linux.
|
||||
|
||||
For the purpose of this guide, I am going to create a new user called **"senthil"** using `adduser` command.
|
||||
|
||||
To do so, I run the following command with `sudo` or `root` privilege:
|
||||
|
||||
```
|
||||
$ sudo adduser senthil
|
||||
```
|
||||
|
||||
Next, I am going to set a password to the newly created user "senthil" with `passwd` command:
|
||||
|
||||
```
|
||||
$ sudo passwd senthil
|
||||
```
|
||||
|
||||
![Create A New User In Fedora][1]
|
||||
|
||||
We just created a normal user called "senthil". This user has not been given sudo access yet. So he can't perform any administrative tasks.
|
||||
|
||||
You can verify if an user has sudo access or not like below.
|
||||
|
||||
```
|
||||
$ sudo -l -U senthil
|
||||
```
|
||||
|
||||
**Sample output:**
|
||||
|
||||
```
|
||||
User senthil is not allowed to run sudo on fedora.
|
||||
```
|
||||
|
||||
![Check If An User Has Sudo Access][2]
|
||||
|
||||
As you can see, the user "senthil" is not yet allowed to run sudo. Let us go ahead and give him sudo access in the following steps.
|
||||
|
||||
### 2. Grant Sudo Privileges To Users In Fedora
|
||||
|
||||
To add a normal user to **sudoers** group, simply add him/her to the `wheel` group.
|
||||
|
||||
For those wondering, the `wheel` is a special group in some Unix-like operating systems (E.g. RHEL based systems). All the members of `wheel` group are allowed to perform administrative tasks. Wheel group is similar to `sudo` group in Debian-based systems.
|
||||
|
||||
We can add users to sudoers list in two ways. The first method is by using `chmod` command.
|
||||
|
||||
#### 2.1. Add Users To Sudoers Using Usermod Command
|
||||
|
||||
```
|
||||
Usermod
|
||||
```
|
||||
|
||||
To grant sudo privileges to a user called "senthil", just add him to the `wheel` group using `usermod` command as shown below:
|
||||
|
||||
```
|
||||
$ sudo usermod -aG wheel senthil
|
||||
```
|
||||
|
||||
Here, `-aG` refers append to a supplementary group. In our case, it is `wheel` group.
|
||||
|
||||
Verify if the user is in the sudoers list with command:
|
||||
|
||||
```
|
||||
$ sudo -l -U senthil
|
||||
```
|
||||
|
||||
If you output something like below, it means the user has been given sudo access and he can able to perform all administrative tasks.
|
||||
|
||||
```
|
||||
Matching Defaults entries for senthil on fedora:
|
||||
!visiblepw, always_set_home, match_group_by_gid, always_query_group_plugin,
|
||||
env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE KDEDIR LS_COLORS",
|
||||
env_keep+="MAIL QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE",
|
||||
env_keep+="LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES",
|
||||
env_keep+="LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE",
|
||||
env_keep+="LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY",
|
||||
secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/var/lib/snapd/snap/bin
|
||||
|
||||
User senthil may run the following commands on fedora:
|
||||
(ALL) ALL
|
||||
```
|
||||
|
||||
![Add A User To Sudoers Group Using Usermod Command][3]
|
||||
|
||||
As you see in the above output, the user "Senthil" can run ALL commands on any host.
|
||||
|
||||
#### 2.2. Add Users To Sudoers By Editing Sudoers Configuration File
|
||||
|
||||
The another way to add users to sudoers list is by directly adding him/her to the sudoers configuration file.
|
||||
|
||||
Edit sudoers configuration file using command:
|
||||
|
||||
```
|
||||
$ sudo visudo
|
||||
```
|
||||
|
||||
This will open `/etc/sudoers` file in your **Vi** editor or whatever you have in your `$PATH`. Scroll down until you find following entry:
|
||||
|
||||
```
|
||||
root ALL=(ALL) ALL
|
||||
```
|
||||
|
||||
Right after the above entry, add the following line:
|
||||
|
||||
```
|
||||
senthil ALL=(ALL) ALL
|
||||
```
|
||||
|
||||
![Add Users To Sudoers Group By Editing Sudoers Configuration File][4]
|
||||
|
||||
Here, the line `ALL=(ALL) ALL` refers the user "senthil" can perform any commands on any host. Replace "senthil" with your own username. Save the file and close it.
|
||||
|
||||
That's it. The user has been granted sudo access.
|
||||
|
||||
#### 2.3. Verify Sudo Users
|
||||
|
||||
Log out from the current session and log back in as the newly created sudo user. Alternatively, you can directly switch to the other user, without having to log out from the current session, using the following command:
|
||||
|
||||
```
|
||||
$ sudo -i -u senthil
|
||||
```
|
||||
|
||||
![Switch To New User In Fedora Linux][5]
|
||||
|
||||
Now, verify if the user can able to perform any administrative task with `sudo` permission:
|
||||
|
||||
```
|
||||
$ sudo dnf --refresh update
|
||||
```
|
||||
|
||||
![Run Dnf Update Command With Sudo][6]
|
||||
|
||||
Great! The user can able to run the `dnf update` command with sudo privilege. From now on, the user can perform all commands prefixed with sudo.
|
||||
|
||||
### 3. Delete Sudo Access From A User
|
||||
|
||||
Make sure you logged out of the user's session and log back in as `root` or some other sudo user. Because you can't delete the sudo access of the currently logged in user.
|
||||
|
||||
We can remove sudo privileges from an user without having to entirely delete the user account.
|
||||
|
||||
To do so, use `gpasswd` command to revoke sudo permissions from a user:
|
||||
|
||||
```
|
||||
$ sudo gpasswd -d senthil wheel
|
||||
```
|
||||
|
||||
**Sample output:**
|
||||
|
||||
```
|
||||
Removing user senthil from group wheel
|
||||
```
|
||||
|
||||
This will only remove sudo privilege of the given user. The user still exists in the system
|
||||
|
||||
Verify if the sudo access has been removed using command:
|
||||
|
||||
```
|
||||
$ sudo -l -U senthil
|
||||
User senthil is not allowed to run sudo on fedora35.
|
||||
```
|
||||
|
||||
![Delete Sudo Access From A User Using Gpasswd Command][7]
|
||||
|
||||
#### 3.1. Permanently Delete User
|
||||
|
||||
If you don't need the user any more, you can permanently remove the user from the system using `userdel` command like below.
|
||||
|
||||
```
|
||||
$ sudo userdel -r senthil
|
||||
```
|
||||
|
||||
The above command will delete the user "senthil" along with his `home` directory and mail spool.
|
||||
|
||||
### Conclusion
|
||||
|
||||
This concludes how to add, delete and grant sudo privileges to users in Fedora 36 operating system. This method is same for other RPM-based systems as well.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://ostechnix.com/add-delete-and-grant-sudo-privileges-to-users-in-fedora/
|
||||
|
||||
作者:[sk][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://ostechnix.com/wp-content/uploads/2022/05/Create-A-New-User-In-Fedora.png
|
||||
[2]: https://ostechnix.com/wp-content/uploads/2022/05/Check-If-An-User-Has-Sudo-Access.png
|
||||
[3]: https://ostechnix.com/wp-content/uploads/2022/05/Add-A-User-To-Sudoers-Group-Using-Usermod-Command.png
|
||||
[4]: https://ostechnix.com/wp-content/uploads/2022/05/Add-Users-To-Sudoers-Group-By-Editing-Sudoers-Configuration-File.png
|
||||
[5]: https://ostechnix.com/wp-content/uploads/2022/05/Switch-To-New-User-In-Fedora-Linux.png
|
||||
[6]: https://ostechnix.com/wp-content/uploads/2022/05/Run-Dnf-Update-Command-With-Sudo.png
|
||||
[7]: https://ostechnix.com/wp-content/uploads/2022/05/Delete-Sudo-Access-From-A-User-Using-Gpasswd-Command.png
|
@ -2,7 +2,7 @@
|
||||
[#]: via: "https://opensource.com/article/22/6/static-linking-linux"
|
||||
[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: translator: "robsean"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
@ -1,163 +0,0 @@
|
||||
[#]: subject: "How to Install FFmpeg in Ubuntu and Other Linux"
|
||||
[#]: via: "https://www.debugpoint.com/2022/06/install-ffmpeg-ubuntu/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "aREversez"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Install FFmpeg in Ubuntu and Other Linux
|
||||
======
|
||||
This tutorial outlines the steps required to install FFmpeg in Ubuntu and Other Linux systems.
|
||||
|
||||
The ffmpeg is a collection library and software program to manipulate multimedia files. The entire ffmpeg is a robust set of libraries that allows you to convert, stream, and manipulate audio and video files. Many frontend Linux applications use it as backend hence depends on it. For example, a screen recording application may need ffmpeg to convert recorded streams to gif images.
|
||||
|
||||
Popular applications and services that use FFmpeg are VLC Media Player, YouTube, Blender, Kodi, Shotcut, and Handbrake – to name a few.
|
||||
|
||||
Fun fact: NASA’s Mars 2020 mission rover Perseverance used FFmpeg to complete and process images and video before beaming back to Earth!
|
||||
|
||||
### About ffmpeg package
|
||||
|
||||
The [ffmpeg][1] itself is a powerful program as a command-line utility. It is available for Linux, Windows, and macOS and supports many architectures. It is written in C and Assembly, providing extensive performance and a cross-platform utility.
|
||||
|
||||
#### The Core
|
||||
|
||||
The core of ffmpeg is the command-line utility or programs. They can be used on the command line or called from any programming language. For example, you can use these from your shell program, python script, etc.
|
||||
|
||||
* ffmpeg: Used to convert audio and video streams, including sources from LIVE streams such as TV cards
|
||||
* ffplay: Media player bundled in this package to play media
|
||||
* ffprobe: Command line tool to show media information – can output as txtm csv, xml, json formats
|
||||
|
||||
### FFmpeg Installation
|
||||
|
||||
Installing FFmpeg is easy in Ubuntu and other Linux distributions. Open a terminal prompt and run the following commands to install.
|
||||
|
||||
#### Ubuntu and similar distro
|
||||
|
||||
```
|
||||
sudo apt install ffmpeg
|
||||
```
|
||||
|
||||
#### Fedora
|
||||
|
||||
For Fedora Linux, you need to add the [RPM Fusion repo][2] for FFmpeg. The official Fedora repo doesn’t have the FFmpeg package.
|
||||
|
||||
```
|
||||
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
|
||||
```
|
||||
|
||||
```
|
||||
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-
|
||||
```
|
||||
|
||||
```
|
||||
sudo dnf install ffmpeg
|
||||
```
|
||||
|
||||
#### Arch Linux
|
||||
|
||||
```
|
||||
pacman -S ffmpeg
|
||||
```
|
||||
|
||||
After the successful installation, you can verify the installation using the below command.
|
||||
|
||||
```
|
||||
ffmpeg --version
|
||||
```
|
||||
|
||||
![FFmpeg installed in Ubuntu Linux][3]
|
||||
|
||||
### Example: How to do basic tasks using ffmpeg
|
||||
|
||||
First, let me give you a simple example of the basic syntax. Consider the following example. It simply converts an mp4 file to mkv file.
|
||||
|
||||
1. Convert a basic video file
|
||||
|
||||
```
|
||||
ffmpeg -i big_buck_bunny.mp4 big_buck_bunny.mkv
|
||||
```
|
||||
|
||||
Of course, this is the easiest method, but it’s not complete because it doesn’t have the bit rate, resolution and other attributes of the video file required for the conversion.
|
||||
|
||||
1. Convert an audio file
|
||||
|
||||
Secondly, you can convert an audio file using a similar command.
|
||||
|
||||
```
|
||||
ffmpeg -i sunny_day.ogg sunny_day.mp3
|
||||
```
|
||||
|
||||
1. Convert with an audio and video codec
|
||||
|
||||
Finally, the following example can convert a video file using specified codecs. The parameter `-c` with `a` or `v` defines audio and video, respectively. The below command uses `libvpx` video and `libvorbis` audio codec for conversion.
|
||||
|
||||
```
|
||||
ffmpeg -i big_buck_bunny.mp4 -c:v libvpx -c:a libvorbis big_buck_bunny.webm
|
||||
```
|
||||
|
||||
### How to find out about the available codecs, encoders and decoders in your system?
|
||||
|
||||
#### List all codecs
|
||||
|
||||
To list all the codecs available, run the below command.
|
||||
|
||||
```
|
||||
ffmpeg -codecs
|
||||
```
|
||||
|
||||
This command lists all the codecs available with their capability, whether they support decoding or encoding, etc. Moreover, they are identified with the position as per the below table.
|
||||
|
||||
```
|
||||
D..... = Decoding supported.E.... = Encoding supported..V... = Video codec..A... = Audio codec..S... = Subtitle codec...I.. = Intra frame-only codec....L. = Lossy compression.....S = Lossless compression
|
||||
```
|
||||
|
||||
![FFmpeg Codec list][4]
|
||||
|
||||
#### List all encoders
|
||||
|
||||
Listing all the encoders is accessible via the below command.
|
||||
|
||||
```
|
||||
ffmpeg -encoders
|
||||
```
|
||||
|
||||
#### List all decoders
|
||||
|
||||
Similarly, the decoders list you can get via the below command.
|
||||
|
||||
```
|
||||
ffmpeg -decoders
|
||||
```
|
||||
|
||||
#### Details
|
||||
|
||||
You can also get more details about the encoders or decoders using the parameter -h.
|
||||
|
||||
```
|
||||
ffmpeg -h decoder=mp3
|
||||
```
|
||||
|
||||
### Summary
|
||||
|
||||
I hope you learned the basics of FFmpeg and its commands. You can learn more about the program via the official [documentation][5].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/06/install-ffmpeg-ubuntu/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[aREversez](https://github.com/aREversez)
|
||||
校对:[校对者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/lkxed
|
||||
[1]: https://ffmpeg.org/
|
||||
[2]: https://www.debugpoint.com/2020/07/enable-rpm-fusion-fedora-rhel-centos/
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-installed-in-Ubuntu-Linux.jpg
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-Codec-list.jpg
|
||||
[5]: https://ffmpeg.org/documentation.html
|
@ -1,85 +0,0 @@
|
||||
[#]: subject: "6 Linux word processors you need to try"
|
||||
[#]: via: "https://opensource.com/article/22/6/word-processors-linux"
|
||||
[#]: author: "Don Watkins https://opensource.com/users/don-watkins"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
6 Linux word processors you need to try
|
||||
======
|
||||
Check out one of my favorite open source word processors to put your ideas to paper.
|
||||
|
||||
![Typewriter with hands][1]
|
||||
|
||||
Image by: rawpixel.com. CC0.
|
||||
|
||||
Writers are always looking for better ways to put their words and ideas into readable formats to share with their readers. My first experiences with word processing came in my Apple II days when I used AppleWorks and later FrEDWriter, which was a free word processing application created in 1985. It was the standard for my students, many of whom came from households that lacked the money to purchase proprietary software.
|
||||
|
||||
### Abiword
|
||||
|
||||
When I made the switch to Linux in the late 1990's, I was looking for high quality writing software that I could use and recommend to students who chose to follow my lead in the world of open source software. The first word processor I became familiar with was [AbiWord][2]. The name AbiWord is derived from the Spanish word, abierto, which means open. It was Initially released in 1998 and it has been under continuous development. It is licensed as GPLv2. It supports basic word processing such as lists, indents and character formats. It supports a variety of import and export file formats including `.doc`, `.html`, `.docx`, and `.odt`.
|
||||
|
||||
![Image of Abiword][3]
|
||||
|
||||
### Etherpad
|
||||
|
||||
[Etherpad][4] is an open source group editing project. It allows you to edit documents in real time much like Google Drive. The main difference is that it is entirely open source. According to their website you can, "write articles, press releases, to-do lists, together with your friends, fellow students or colleagues, all working on the same document at the same time." The source code is readily available to look at. Etherpad is licensed as Apache 2.0. You can use Etherpad in the cloud or download and [install][5] it on your own Linux computer.
|
||||
|
||||
### Cryptpad
|
||||
|
||||
[CryptPad][6] is a collaboration suite that is end-to-end encrypted. It is licensed with GPLv3 and its source code is available on [GitHub][7]. It was developed by [Xwiki][8] Labs. It is an alternative to Google Drive and is self hosted. According to their website, "CryptPad is built to enable collaboration. It synchronizes changes to documents in real time. Because all data is encrypted, the service and its administrators have no way of seeing the content being edited and stored.” Cryptpad offers extensive [documentation][9] for users.
|
||||
|
||||
### Focuswriter
|
||||
|
||||
[FocusWriter][10] is a simple distraction free editor. It uses a hideaway interface that you access by moving your mouse to the edges of the screen. It is licensed with GPLv3 and it's available on Linux with Flatpak,via DEB on [Ubuntu][11], and RPM on [Fedora][12]. This is an example of the FocusWriter desktop. A very simple and intuitive interface where the menu automatically hides until you move your mouse pointer to the top or sides of the screen. Files are saved by default as an `.odt`, but it also supports plain text, `.docx`, and Rich text.
|
||||
|
||||
![Image of FocusWriter][13]
|
||||
|
||||
### LibreOffice Writer
|
||||
|
||||
[LibreOffice Writer][14] is my favorite. I have been using it for over a dozen years. It has all the features I need including formatting for rich text. It also has the largest array of import and export options I have seen in any word processor. There are dozens of templates available for specialty formats like [APA][15] for research and publication. I love that I can export directly to PDF and ‘epub' from any word processor. LibreOffice Writer is free software with the Mozilla Public License 2.0. The s[ource code][16] for LibreOffice is from the Document Foundation. LibreOffice comes standard with most Linux distribution. It is also available as Flatpak, Snap, and AppImage. In addition, you can download and install it on MacOS and Windows.
|
||||
|
||||
![Image of LibreOffice work space][17]
|
||||
|
||||
### OpenOffice Writer
|
||||
|
||||
Apache [OpenOffice Writer][18] is a complete word processor. It's simple enough for memos yet complex enough to write your first book. According to their website, OpenOffice Writer automatically saves documents in ‘open document format'. Documents can also be saved in `.doc`, `.docx`, Rich Text, and other formats. OpenOffice Writer is licensed with an Apache License 2.0. Source code and is available on [GitHub][19].
|
||||
|
||||
There is a wealth of free open source software waiting for you to discover. They are great for getting your everyday tasks done and you can also contribute to their development. What is your favorite Linux word processor application?
|
||||
|
||||
Image by: (Don Watkins, CC BY-SA 4.0)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/word-processors-linux
|
||||
|
||||
作者:[Don Watkins][a]
|
||||
选题:[lkxed][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/don-watkins
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/typewriter-hands.jpg
|
||||
[2]: https://www.abisource.com/
|
||||
[3]: https://opensource.com/sites/default/files/2022-05/abiword.png
|
||||
[4]: https://etherpad.org/#
|
||||
[5]: https://github.com/ether/etherpad-lite#installation
|
||||
[6]: https://cryptpad.fr/what-is-cryptpad.html
|
||||
[7]: https://github.com/xwiki-labs/cryptpad
|
||||
[8]: https://github.com/xwiki-labs
|
||||
[9]: https://docs.cryptpad.fr/en/user_guide/index.html
|
||||
[10]: https://gottcode.org/focuswriter/
|
||||
[11]: https://packages.ubuntu.com/jammy/focuswriter
|
||||
[12]: https://src.fedoraproject.org/rpms/focuswriter
|
||||
[13]: https://opensource.com/sites/default/files/2022-05/focuswriter.png
|
||||
[14]: https://www.libreoffice.org/discover/writer/
|
||||
[15]: https://extensions.libreoffice.org/en/extensions/show/apa-style-paper-template
|
||||
[16]: https://www.libreoffice.org/about-us/source-code/
|
||||
[17]: https://opensource.com/sites/default/files/2022-05/Libreofficewriter.png
|
||||
[18]: https://www.openoffice.org/product/writer.html
|
||||
[19]: https://github.com/apache/openoffice
|
@ -1,110 +0,0 @@
|
||||
[#]: subject: "Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else"
|
||||
[#]: via: "https://itsfoss.com/amberol-music-player/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else
|
||||
======
|
||||
Though the world of music is dominated by streaming services, it has not discouraged developers from creating music players for desktop computers.
|
||||
|
||||
Recently, I came across a beautiful looking new music player for the Linux desktop. It’s called Amberol and I was awestruck by its beauty.
|
||||
|
||||
![amberol music player interface][1]
|
||||
|
||||
Looks good, no? Let’s take a closer look at it.
|
||||
|
||||
### Amberol, the cute looking music player for Linux
|
||||
|
||||
Looking good is one of the two (or few) things it does. The other thing is playing music.
|
||||
|
||||
And that’s about it. [Amberol][2] doesn’t have additional fancy (and useful) features like album art generation, metadata editing, lyrics display or playlists and library management.
|
||||
|
||||
It’s not like these features will be added in future releases. Amberol just wants to play music. That’s it.
|
||||
|
||||
#### The stunning UI
|
||||
|
||||
Amberol is written in Rust and GTK like most new GNOME applications.
|
||||
|
||||
It has an adaptive UI that changes color based on the album color you are playing. The gradient effect gives it a modern, sleek look that would surely be part of your Linux ricing screenshots.
|
||||
|
||||
![amberol music player][3]
|
||||
|
||||
Since the UI does not have the traditional handlebar and menu, it gives the application a unified look.
|
||||
|
||||
#### Playlists
|
||||
|
||||
It generates a playlist automatically from the files present in the folder you add. It is displayed in the lefthand sidebar.
|
||||
|
||||
![amberol playlist][4]
|
||||
|
||||
You can see how long the entire playlist will play the music in the top left corner. Clicking on the ‘correct sign’ allows you to select songs and remove them from the playlist.
|
||||
|
||||
If you want, you can hide the playlist sidebar.
|
||||
|
||||
![amberol without playlist][5]
|
||||
|
||||
#### Music playing options
|
||||
|
||||
You can see the progress of the songs on the interface. The player integrates well with the media control buttons on the keyboard. You can play/pause and change tracks with the dedicated media keys (if you have it on your system).
|
||||
|
||||
Amberol does give you a few more options for playing the music. You can turn on the shuffle to play music in random order. You may also put a song on repeat and keep on playing it till you get bored of it.
|
||||
|
||||
![amberol music playing options][6]
|
||||
|
||||
The handlebar menu at the bottom gives you the option to add a file or folder and show available keyboard shortcuts.
|
||||
|
||||
![amberol keyboard shortcuts][7]
|
||||
|
||||
You may also disable the UI color changing to match the album art from here.
|
||||
|
||||
### Installing Amberol on Linux
|
||||
|
||||
Amberol is [available as Flatpak][8]. Please ensure that [your system has Flatpak support enabled][9].
|
||||
|
||||
To install Amberol, open a terminal and use the following command:
|
||||
|
||||
```
|
||||
flatpak install flathub io.bassi.Amberol
|
||||
```
|
||||
|
||||
Once installed search for the application in the menu and start from here.
|
||||
|
||||
On the first run, it asks you to add music files or folders. You can also drag and drop files.
|
||||
|
||||
![amberol first run][10]
|
||||
|
||||
### Conclusion
|
||||
|
||||
Personally, I prefer streaming services because I don’t have a good collection of local music. But I know there are people who have/had a huge collection of CDs that are now saved on the hard disk.
|
||||
|
||||
Amberol is a beautiful-looking application and it is good enough for playing local music. The main attraction is the adaptive UI based on the album art.
|
||||
|
||||
I let you play with it and share your experience in the comment section.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/amberol-music-player/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-music-player-interface-800x693.png
|
||||
[2]: https://apps.gnome.org/app/io.bassi.Amberol/
|
||||
[3]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-music-player-800x580.png
|
||||
[4]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-playlist-800x548.png
|
||||
[5]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-without-playlist-800x693.png
|
||||
[6]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-music-playing-options-800x548.png
|
||||
[7]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-keyboard-shortcuts-800x528.png
|
||||
[8]: https://flathub.org/apps/details/io.bassi.Amberol
|
||||
[9]: https://itsfoss.com/flatpak-guide/
|
||||
[10]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-first-run-800x693.png
|
@ -0,0 +1,137 @@
|
||||
[#]: subject: "Rufus for Linux? Here Are the Best Live USB Creating Tools"
|
||||
[#]: via: "https://itsfoss.com/live-usb-creator-linux/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Rufus for Linux? Here Are the Best Live USB Creating Tools
|
||||
======
|
||||
Rufus is an open-source utility to create bootable USB drives. It is straightforward to use, with available options to tweak as per your requirements. Not just the ease of use, it is also incredibly fast to make bootable USB drives.
|
||||
|
||||
Unfortunately, Rufus is not available for Linux, it is only exclusive to Windows. So, most of us who have used it on Windows, look for Rufus alternatives on Linux.
|
||||
|
||||
If you are in the same boat, fret not, we have some excellent alternatives for various use-cases.
|
||||
|
||||
Let us explore some Rufus alternatives for Linux:
|
||||
|
||||
### 6 Best Live USB Creation Tools for Linux
|
||||
|
||||
All the options listed are entirely open-source and work perfectly fine with Linux distributions.
|
||||
|
||||
**Note:** *The list is in no particular order of ranking.*
|
||||
|
||||
#### 1. BalenaEtcher
|
||||
|
||||
![balena etcher 2022][1]
|
||||
|
||||
BalenaEtcher or Etcher is a good option for multiple platforms (Windows, macOS), including Linux users.
|
||||
|
||||
You do not get any advanced options here. Hence, it is pleasantly easy to use. Simply select the ISO (image file) and proceed to flash it on the target USB drive.
|
||||
|
||||
It is completely open-source and validates your drive after the process. Furthermore, it auto-selects connected USB drives to avoid choosing any hard disk if you accidentally wipe it.
|
||||
|
||||
You can refer to our [handy guide][2] to install it on Linux.
|
||||
|
||||
[BalenaEtcher][3]
|
||||
|
||||
#### 2. Fedora Media Writer
|
||||
|
||||
![fedora media writer][4]
|
||||
|
||||
Fedora Media Writer is particularly known to help you create live USB for Fedora Linux distribution. It can download the ISO file for you if you do not have it already.
|
||||
|
||||
It is also an excellent utility to fix your USB drive if you cannot format it for an issue caused by other bootable USB creation tools.
|
||||
|
||||
Fret not, you can also select a custom image (apart from Fedora Linux) to create a bootable USB.
|
||||
|
||||
You can find the [Flatpak][5] package on Flathub for the latest version on any Linux distribution. Refer to our [Flatpak guide][6] if you’re new to this.
|
||||
|
||||
[Fedora Media Writer][7]
|
||||
|
||||
#### 3. Startup Disk Creator
|
||||
|
||||
![startup disk creator][8]
|
||||
|
||||
If you are using Ubuntu on your system, you already have a bootable USB creator pre-installed, i.e., Startup Disk Creator.
|
||||
|
||||
You can use it to select the desired ISO file (preferably any Ubuntu version) and choose the target USB device to proceed.
|
||||
|
||||
Once you confirm the action, it will proceed with writing the data to complete the bootable drive.
|
||||
|
||||
#### 4. SUSE Studio Imagewriter
|
||||
|
||||
![imagewriter suse][9]
|
||||
|
||||
SUSE Studio Imagewriter is a simple live USB creator.
|
||||
|
||||
I did not find it in the software center for Ubuntu, but it was available in the community repositories (Manjaro) and AUR. So, you can take a look at it if it is available for your Linux distribution.
|
||||
|
||||
[SUSE Studio Imagewriter][10]
|
||||
|
||||
#### 5. UNetbootin
|
||||
|
||||
![unetbootin][11]
|
||||
|
||||
UNetbootin is a live USB creator that supports Linux, Windows, and macOS. You get a few options to tweak, in case you want to explore all the available drives, and can also select a distribution to download the ISO file automatically.
|
||||
|
||||
It is not specific for any Linux distribution, unlike some options above. So, it supports a wide variety of distributions and system utilities.
|
||||
|
||||
[UNetbootin][12]
|
||||
|
||||
#### 6. Ventoy
|
||||
|
||||
![ventoy screenshot 2022][13]
|
||||
|
||||
Ventoy is an interesting bootable USB solution that lets you simply copy-paste the image to create a live USB drive.
|
||||
|
||||
You only have to install Ventoy to the USB drive, which makes two separate partitions. One of the partitions is used to store ISO images that you can simply paste into the USB drive to make it bootable.
|
||||
|
||||
Interestingly, you can also use it to [create multiboot USB][14].
|
||||
|
||||
It is available for Windows and Linux.
|
||||
|
||||
[Ventoy][15]
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
Ventoy seems like an exciting choice among the options above if you need multiple Linux distributions on your USB drive without needing to repeatedly flash it.
|
||||
|
||||
For simplicity, distro-specific tools can be a good pick, like Startup Disk Creator for Ubuntu, and Fedora Image Writer for Fedora Linux.
|
||||
|
||||
SUSE Image Studio is an interesting option, but may not be the most convenient one.
|
||||
|
||||
If you do not have any specific preferences, BalenaEtcher should be a straightforward option, with UNetbootin as a suitable alternative to it.
|
||||
|
||||
What do you prefer to create a bootable USB drive? Let me know your thoughts in the comments below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/live-usb-creator-linux/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][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/lkxed
|
||||
[1]: https://itsfoss.com/wp-content/uploads/2022/06/balena-etcher-2022-800x537.png
|
||||
[2]: https://itsfoss.com/install-etcher-linux/
|
||||
[3]: https://www.balena.io/etcher/
|
||||
[4]: https://itsfoss.com/wp-content/uploads/2022/06/fedora-media-writer.png
|
||||
[5]: https://itsfoss.com/what-is-flatpak/
|
||||
[6]: https://itsfoss.com/flatpak-guide/
|
||||
[7]: https://flathub.org/apps/details/org.fedoraproject.MediaWriter
|
||||
[8]: https://itsfoss.com/wp-content/uploads/2022/06/startup-disk-creator.png
|
||||
[9]: https://itsfoss.com/wp-content/uploads/2022/06/imagewriter-suse.png
|
||||
[10]: https://software.opensuse.org/package/imagewriter
|
||||
[11]: https://itsfoss.com/wp-content/uploads/2022/06/unetbootin.png
|
||||
[12]: https://unetbootin.github.io/
|
||||
[13]: https://itsfoss.com/wp-content/uploads/2022/06/ventoy-screenshot-2022.png
|
||||
[14]: https://itsfoss.com/multiple-linux-one-usb/
|
||||
[15]: https://www.ventoy.net/
|
@ -0,0 +1,154 @@
|
||||
[#]: subject: "Using Ansible to automate software installation on my Mac"
|
||||
[#]: via: "https://opensource.com/article/22/6/install-software-macos-ansible-homebrew"
|
||||
[#]: author: "Servesha Dudhgaonkar https://opensource.com/users/serveshadudhgaonkar"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Using Ansible to automate software installation on my Mac
|
||||
======
|
||||
In this demo, I install one of my must-have writing tools, Asciidoctor, on macOS using Ansible.
|
||||
|
||||
![Getting started with Perlbrew][1]
|
||||
|
||||
Image by: freephotocc via Pixabay CC0
|
||||
|
||||
On most systems, there are several ways to install software. Which one you use depends on the source of the application you're installing. Some software comes as a downloadable wizard to walk you through an install process, while others are files you just download and run immediately.
|
||||
|
||||
On macOS, a whole library of open source applications is available from Unix commands like [Homebrew][2] and [MacPorts][3]. The advantage of using commands for software installation is that you can automate them, and my favorite tool for automation is Ansible. Combining Ansible with Homebrew is an efficient and reproducible way to install your favorite open source applications.
|
||||
|
||||
This article demonstrates how to install one of my must-have writing tools, Asciidoctor, on macOS using Ansible. Asciidoctor is an open source text processor, meaning that it takes text written in a specific format (in this case, Asciidoc) and transforms it into other popular formats (such as HTML, PDF, and so on) for publishing. Ansible is an open source, agentless, and easy-to-understand automation tool. By using Ansible, you can simplify and automate your day-to-day tasks.
|
||||
|
||||
Note: While this example uses macOS, the information applies to all kinds of open source software on all platforms compatible with Ansible (including Linux, Windows, Mac, and BSD).
|
||||
|
||||
### Installing Ansible
|
||||
|
||||
You can install Ansible using `pip`, the Python package manager. First, install `pip` :
|
||||
|
||||
```
|
||||
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||
$ python ./get-pip.py
|
||||
```
|
||||
|
||||
Next, install Ansible using `pip` :
|
||||
|
||||
```
|
||||
$ sudo python -m pip install --user ansible
|
||||
```
|
||||
|
||||
#### Installing Ansible using Homebrew
|
||||
|
||||
Alternately, you can install Ansible using the [Homebrew package manager][4]. If you've already installed Ansible with `pip`, skip this step because you've already achieved the same result!
|
||||
|
||||
```
|
||||
$ brew install ansible
|
||||
```
|
||||
|
||||
### Configuring Ansible
|
||||
|
||||
To set up Ansible, you first must create an inventory file specifying which computer or computers you want your Ansible script (called a playbook) to operate on.
|
||||
|
||||
Create an inventory file in a terminal or using your favorite text editor. In a terminal, type the following, replacing `your-host-name` with the name of your computer:
|
||||
|
||||
```
|
||||
$ cat << EOF >> inventory
|
||||
[localhost\]
|
||||
your-host-name
|
||||
EOF
|
||||
```
|
||||
|
||||
If you don't know your computer's hostname, you can get it using the `hostname` command. Alternately, go to the Apple menu, open System Preferences, then click Sharing. Your computer's hostname is beneath the computer name at the top of Sharing preference pane.
|
||||
|
||||
### Installing Asciidoctor using Ansible
|
||||
|
||||
In this example, I'm only installing applications on the computer I'm working on, which is also known by the term localhost. To start, create a `playbook.yml` file and copy the following content:
|
||||
|
||||
```
|
||||
- name: Install software
|
||||
hosts: localhost
|
||||
become: false
|
||||
vars:
|
||||
Brew_packages:
|
||||
- asciidoctor
|
||||
install_homebrew_if_missing: false
|
||||
```
|
||||
|
||||
In the first [YAML sequence][5], you name the playbook (`Install software` ), provide the target (`localhost` ), and confirm that administrative privileges are not required. You also create two variables that you can use later in the playbook: `Brew_packages` and`install_homebrew_if_missing`.
|
||||
|
||||
Next, create a YAML mapping called `pre_tasks`, containing the logic to ensure that Homebrew itself is installed on the computer where you're running the playbook. Normally, Ansible can verify whether an application is installed or not, but when that application is the package manager that helps Ansible make that determination in the first place, you have to do it manually:
|
||||
|
||||
```
|
||||
pre_tasks:
|
||||
- name: Ensuring Homebrew Is Installed
|
||||
stat:
|
||||
path: /usr/local/bin/brew
|
||||
register: homebrew_check
|
||||
|
||||
- name: Fail If Homebrew Is Not Installed and install_homebrew_if_missing Is False
|
||||
fail:
|
||||
msg: Homebrew is missing, install from http://brew.sh
|
||||
when:
|
||||
- not homebrew_check.stat.exists
|
||||
- not install_homebrew_if_missing
|
||||
|
||||
- name: Installing Homebrew
|
||||
shell: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||
when:
|
||||
- not homebrew_check.stat.exists
|
||||
- install_homebrew_if_missing
|
||||
```
|
||||
|
||||
Finally, create a YAML mapping called `tasks` containing a call to the Homebrew module (it's a built-in module from Ansible) to install Asciidoctor in the event that it's not already present:
|
||||
|
||||
```
|
||||
tasks:
|
||||
- name: Install Asciidoctor
|
||||
homebrew:
|
||||
name: asciidoctor
|
||||
state: present
|
||||
```
|
||||
|
||||
### Running an Ansible playbook
|
||||
|
||||
You run an Ansible playbook using the `ansible-playbook` command:
|
||||
|
||||
```
|
||||
$ ansible-playbook -i inventory playbook.yml
|
||||
```
|
||||
|
||||
The `-i` option specifies the `inventory` file you created when setting up Ansible. You can optionally add `-vvvv` to direct Ansible to be extra verbose when running the playbook, which can be useful when troubleshooting.
|
||||
|
||||
After the playbook has run, verify that Ansible has successfully installed Asciidoctor on your host:
|
||||
|
||||
```
|
||||
$ asciidoctor -v
|
||||
Asciidoctor X.Y.Z https://asciidoctor.org
|
||||
Runtime Environment (ruby 2.6.8p205 (2021-07-07 revision 67951)...
|
||||
```
|
||||
|
||||
### Adapt for automation
|
||||
|
||||
You can add more software to the `Brew_packages` variable in this article's example playbook. As long as there's a Homebrew package available, Ansible installs it. Ansible only takes action when required, so you can leave all the packages you install in the playbook, effectively building a manifest of all the packages you have come to expect on your computer.
|
||||
|
||||
Should you find yourself on a different computer, perhaps because you're at work or you've purchased a new one, you can quickly install all the same applications in one go. Better still, should you switch to Linux, the Ansible playbook is still valid either by using Homebrew for Linux or by making a few simple updates to switch to a different package manager.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/install-software-macos-ansible-homebrew
|
||||
|
||||
作者:[Servesha Dudhgaonkar][a]
|
||||
选题:[lkxed][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/serveshadudhgaonkar
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/coffee_cafe_brew_laptop_desktop.jpg
|
||||
[2]: https://opensource.com/article/20/6/homebrew-mac
|
||||
[3]: https://opensource.com/article/20/11/macports
|
||||
[4]: https://opensource.com/article/20/6/homebrew-mac
|
||||
[5]: https://www.redhat.com/sysadmin/yaml-beginners
|
@ -0,0 +1,95 @@
|
||||
[#]: subject: "WiFi 6 Promises Much More than Faster Speeds"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/wifi-6-promises-much-more-than-faster-speeds/"
|
||||
[#]: author: "Sharon Katta https://www.opensourceforu.com/author/sharon-katta/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
WiFi 6 Promises Much More than Faster Speeds
|
||||
======
|
||||
WiFi 6 increases the network connectivity, and has been developed to ensure the trillions of devices connected in the near future continue to work seamlessly and efficiently. Though it was certified in 2019, it faced a few challenges in testing due to the pandemic. This article gives an overview of this technology.
|
||||
|
||||
![WiFi-6][1]
|
||||
|
||||
The next-generation standard in WiFi technology, termed ‘WiFi 6’, is also known as ‘AX WiFi’ or ‘802.11ax’. Developed to meet the exponential increase in demand for devices in the world, it can be used for virtual reality (VR) and smart home devices as well. It is an improvement on the current 802.11ac WiFi standard and meets current challenges in terms of capacity, efficiency, coverage and performance.
|
||||
|
||||
![Figure 1: WiFi 6][2]
|
||||
|
||||
Researched in 2014, this standard was invented in 2018 and launched by the IEEE High Efficiency WLAN Study Group (HEW SG). It began certifications in late 2019, with Samsung’s Galaxy Note 10 and Ruckus R750 employing this technology. Specified to operate between the 1GHz and 6GHz bands, WiFi 6 focuses mainly between the 2.4GHz and 5GHz frequencies.
|
||||
|
||||
In an average household today, nine devices are connected to WiFi. WiFi 6 aims at improving the network rather than boosting the speed for individual devices.
|
||||
|
||||
### Features of WiFi 6
|
||||
|
||||
**Multi-user, multi-input, multi-output (MU-MIMO):** This communication between routers and multiple devices concurrently. It supports four simultaneous data streams, added to which one user can have a considerable bandwidth of incoming data from a smart router, both on the 2.4GHz and 5GHz frequencies.
|
||||
**1024-QAM:** This helps WiFi 6 encode more bits per packet. There is a 25 per cent increase in throughput. Not only does it improve efficiency in high-traffic situations, it also maximises data rates. This is a huge advantage for modern enterprise applications.
|
||||
**Orthogonal frequency-division multiplexing (OFDM):** This allows four times as many subcarriers and increases speed by 11 per cent. The expanded signal allows for greater simultaneous packet delivery across users. Hence, the wait time between packets and latency is reduced.
|
||||
*Increased channel width:* The 160MHz channel communication is added to the 80MHz band, thus doubling the channel width. This allows routers to handle more users and provide larger streams per user.
|
||||
*Target wake time (TWT):* This feature is unique to WiFi 6. It allows each device to independently negotiate wake time for transmission and reception. This helps to increase total sleep time and maximise battery life. TWT enables many additional networking options, especially for IoT devices.
|
||||
*Improved security:* All WiFi 6 devices will need to include Wi-Fi Protected Access 3 (WPA3). This will lead to encryption of unauthenticated traffic, robust password protection against brute-force dictionary attacks, and superior data reliability for sensitive information with 192-bit encryption.
|
||||
*Beamforming:* With eight support antennas, beamforming helps to improve data rates, and the range is extended by directing signals towards specific clients at once. It offers a backup for rapidly moving devices that may face issues with MU-MIMO. Beamforming also helps to control transmissions from antennas that cause signals to interfere on purpose. The signal can then be redirected to a new direction.
|
||||
|
||||
### Devices that support WiFi 6
|
||||
|
||||
Until recently, WiFi 5 was the standard used for routers, repeaters, mesh networks and many WiFi clients. WiFi 6 was launched in 2019. There will be some compatibility issues for the earlier devices that supported WiFi 5 — they will be able to utilise the WiFi 6 network but not be able to receive support for the same.
|
||||
|
||||
WiFi 6 routers are backward-compatible, and it is better to make sure that the network is ready for that.
|
||||
|
||||
WiFi 6 enables lower battery consumption, making it a great choice for any environment, including the Internet of Things (IoT). It reduces unnecessary data activity, and tells devices when to put their data to sleep and when to be active. As a result, unnecessary data activity is reduced, and performance and battery life are maximised.
|
||||
|
||||
The Samsung Galaxy Note 10 and Ruckus R750 were the world’s first smartphone and access point certified to support Wi-Fi 6, with the latest generation of the Apple iPhone following suit. The Wi-Fi Alliance has set up its certification programme, and new wireless products hitting the market are expected to start applying for compliance certification. The devices listed below are already WiFi 6 enabled:
|
||||
|
||||
* iPhone 11 and after
|
||||
* Samsung Galaxy S10, S20, Note 10, and Note 20
|
||||
* Apple computers with M1 processors
|
||||
* Smart TVs
|
||||
|
||||
> To take advantage of the improvements in the 802.11ax standard fully, both hardware and software functionalities have to be built on this WiFi technology.
|
||||
|
||||
### Hardware testing
|
||||
|
||||
To unlock the full potential of the latest devices, a WiFi 6 router is needed to run the network. This was an expensive affair a few years ago, but now we have a number of options even for mesh systems, gaming routers, range extenders, and more. The best purchase can be made only when hands-on testing is done. Beating all its competitors, the current king in terms of speed for WiFi 6 routers is TP-Link Archer AX6000. This router was able to transmit data wirelessly at a rate of 1523 Mbps up to a distance of 1.5 metres (5 feet).
|
||||
|
||||
One important thing to remember here is that these routers do not magically increase speeds. The theoretical maximum of achieving 9.6 Gbps is unlikely. This high theoretical speed can be split up across a whole network of devices.
|
||||
|
||||
WiFi 6 emphasises quality connectivity in areas where connected devices are densely populated. It does not increase the speed of each device exponentially but ensures these operate at an optimum level.
|
||||
|
||||
Only the combination of a faster plan from the Internet service providers (ISPs) along with the WiFi 6 router, can fulfil its true potential. The real challenge is for the ISPs, as they need new fibre rollouts to capitalise on this next-gen technology. An important question is: when faster ISP speeds come, will the existing hardware become redundant?
|
||||
|
||||
### Applications of WiFi 6
|
||||
|
||||
**Large public venues (LPVs):** Stadiums and convention centres are a few of the common areas where thousands of devices connect to WiFi at the same time. WiFi 6 can help to improve attendee experiences, increase customer interactions, and create value-added services like viewing instant replays or ordering food from one’s seat at an event. WiFi 6 allows LPV owners to create new business opportunities.
|
||||
**Transport hubs:** Public transport stations are also an area where people attempt to connect to the network simultaneously. OFDMA and BSS colouring in WiFi 6 provide the necessary tools needed to overcome this challenge.
|
||||
**IoT and smart city deployments:** Power efficiencies in WiFi 6 enable IoT devices to go into sleep mode and turn on their transmitters at predefined intervals to prolong field time without much maintenance.
|
||||
**Education:** Libraries, auditoriums, and lecture halls at college and university campuses have the highest density of WiFi users during the day, and almost no one at night. WiFi 6 is a perfect choice in this situation.
|
||||
|
||||
### The challenges
|
||||
|
||||
WiFi 6 does not promise an increase in speed, but is an upgrade designed to make sure the speeds of our devices within a given range/area doesn’t slow down a few years down the road. There are three major challenges it faces though, which are often overlooked.
|
||||
Improving the functionality of unsupported devices: Even though WiFi 6 is backward- compatible, justice to it can only be done when this technology is used to the maximum. This means devices need to be upgraded each time.
|
||||
|
||||
Speed and performance outside the internal network: WiFi 6 can provide excellent connectivity for services like cloud file shares. However, the assets and resources of ISPs can affect speed and performance.
|
||||
|
||||
*Coverage issues:* Transmission and bandwidths are capped according to the regulations prevalent in each country. Hence, the coverage of WiFi 6 may be restricted to ensure this cap is met.
|
||||
|
||||
In spite of these challenges, companies like Aruba, Asus, AT&T, Boingo, Broadcom, Cisco, Comcast, CommScope, Cypress, Extreme Networks, Intel, Netgear, Orange, Qualcomm, TP-Link and Xiaomi are all focusing on the potential WiFi 6 has.
|
||||
|
||||
(LCTT 译注:选题删除了原文中的相关产品推荐部分。)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/wifi-6-promises-much-more-than-faster-speeds/
|
||||
|
||||
作者:[Sharon Katta][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/sharon-katta/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/WiFi-6.jpg
|
||||
[2]: https://www.opensourceforu.com/wp-content/uploads/2022/05/WiFi-6-1.jpg
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user