Merge branch 'master' of https://github.com/LCTT/TranslateProject into translating

This commit is contained in:
geekpi 2022-06-08 08:48:01 +08:00
commit 14aa3101d0
14 changed files with 854 additions and 610 deletions

View 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&amp;rep=rep1&amp;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

View File

@ -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

View File

@ -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 youll 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 youve 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 youve done some testing, you can log your results in the test day [web][5][application][6]. If youre 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/

View File

@ -0,0 +1,101 @@
[#]: 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: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work
======
Linus Torvalds releases Linux Kernel 5.19 RC1 for testing, bringing a vast amount of changes.
Following the [Linux Kernel 5.18][1] release last month, Linus Torvalds announced the first release candidate availability of Linux Kernel 5.19. With this announcement, the official merge window of Linux Kernel 5.19 closes, meaning no new features are to be accepted unless its critical.
A brief look at the new items in Linux Kernel 5.19 shows regular updates across CPU, GPU, networking, storage and core modules. In addition, the code cleanups, removal of obsolete hardware and continuous support for future chipsets are the highlight of this release.
Without further introduction, lets take a look at the new features.
### Linux Kernel 5.19 New Features (RC1)
#### Processor
First and foremost, Linux Kernel 5.19 begins [initial support][2]for the LoongArch CPU family. It is developed by the Chinese company [Loongson][3]. LoongArch CPUs are the general general-purpose, MIPS architecture-compatible microprocessors. Although the support is now available, you can not boot Linux in these CPUs because some code is still under review. And hopefully, they will be already in the 5.20 version.
The new [Intel IFS driver lands][4] in this version which helps to detect hardware issues before deployment and after. It will help detect CPU faults at the circuit level at an early stage.
The power management and thermal work have continued for the last couple of Kernel releases for Intel CPUs. And [this release][5] also is no exception. Firstly, the Intel Run-Time Average Power Limiting (RAPL) support was added for Raptor and Alder Lake family. Second, the P-state driver is improved to handle frequency variance and CPU based scaling support is added to the passive devfreq.
While the thermal and power dominated Intel CPUs, AMD sees more performance updates in its own CPU families. Firstly, more updates were [introduced][6] in the Instruction-Based Sampling (IBS) module for AMD Zen 4 CPUs are planned for the end of this year. Moreover, PerfMonV2 is introduced in this release giving more performance monitoring capabilities.
Furthermore, the a.out support is removed in this release. Also, the Renesas H8/300 CPU architecture support is removed as its obsolete by now.
#### Major ARM update
Finally, the mainline Linux Kernel can [support multiple ARM platforms][7] with this release. This is a big step in this version, which is heard in Linuss opening note on this Rc1 release. This is a long process that started with Linux 3.7 and spanned more than a decade of work and patches.
![Linux Kernel 5.19 Rc1 release announcement mentions ARM changes][8]
#### Graphics and Storage Updates
The storage subsystem sees performance improvements across popular file systems. The significant changes include Apple M1 NVMe controller support and better support for the XFS file system. In addition, enhancements arrive for Btrfs, F2FS and exFAT file systems.
One of the exciting metrics in terms of LOC is Linux Kernel 5.19 adds around [half-million lines of code][9] for the Graphics driver alone. It includes graphics updates across AMD RDNA, CDNA, Intels Raptor Lake, Intels DG2/Alchemist and more.
#### Important Networking Changes
Looking at the massive growth in the data transmission, the support for Big TCP lands which helps the data centre traffic at a range of 400GBit. It also aims to give lower latency in high-performance networking environments.
The Multi-Path TCP (MPTCP) continues its improvements. In addition to that, Qualcomm ath11k WiFi driver adds wake-on-lan support in this version. Also, support is added for Realtek 8852ce chipset, MediaTek T700 modems and Rensas RZ/V2M
#### Other Notable Features
Firstly, the famous random number generator in Kernel [continues][10] its improvements in this release.
Second, the famous and emerging Framework Modular Laptop gets this release Chrome OS EC Driver support. The Framework laptop now can take advantage of ChromeOSs embedded controller as a non-Chromebook device.
Moreover, more updates arrive at Wacom tabs and other related devices. It [includes][11] improved support for Lenovo Thinkpad TrackPoint II, Google Whiskers Touchpad, Lenovo X12 TrackPoint, etc.
### Linux Kernel 5.19 Download
If you want to test and try this release candidate, download the release tarball [here][12]. Or refer below for a direct link to tar and diffs.
| - | - | - | - | - | - | - | - | - |
| :- | :- | :- | :- | :- | :- | :- | :- | :- |
| mainline: | 5.19-rc1 | 2022-06-06 | [tarball][13] | | [patch][14] | | [view diff][15] | [browse][16] |
There will be multiple kernel iterations until the final release, expected around July 2022.
*[Via Kernel mailing list.][17]*
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/06/linux-kernel-5-19-rc1/
作者:[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/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

View File

@ -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: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
OpenInfra Foundation Launches directed funding To Support Open Source Projects
======
![open-infra-berlin-event][1]
The OpenInfra Foundation, formerly known as the OpenStack Foundation until it expanded its scope beyond its flagship project a few years ago, announced today an intriguing new way for companies to fund open source projects within the foundation. Corporate members of open source foundations have traditionally supported the organisation by paying a membership fee, which the foundations then distribute as they see fit. The OpenInfra foundation is now launching a new Directed Funding model that allows members to direct their funds directly to a project.
The foundation previously did not allow this because, as Bryce pointed out, it can create mixed incentives and a pay-for-play dynamic, which the organisation has always tried to avoid. However, there was a lot of interest in the community to support specific projects, which makes sense given that the foundation is now home to a wider variety of projects, but not every member is heavily invested in every project.
Bryce stated that the foundations leadership and board spent a significant amount of time considering how to reconcile the foundations core principles with this new model. As a result, the model tries to combine the best of the OpenStack/OpenInfra technical governance model, which has worked well over the last decade, with these new financial considerations.
Under this directed funding model, each new project will have its own legal entity that will hold the project funding. To ensure that the new projects are legitimate, an OpenInfra Platinum member (currently nine, including Ant Group, Huawei, Meta, Microsoft, and Red Hat) must serve as the projects sponsor, after which other organisations can join the project fund. If a sponsoring company is not already an OpenInfra member, it must become one. All of these funding members then form a project fund governing board, which decides on the fees for creating a budget. Meanwhile, the OpenInfra Foundation will provide these projects with community-building services.
This new model will, for the time being, only apply to new projects that join the foundation. Bryce and Collier noted that there may be some existing projects where the organisation could retroactively apply this new model, but that is not currently on the roadmap.
The OpenInfra foundation has added projects such as Kata Containers for increased container security, Airship for infrastructure lifecycle management, the Startling X edge compute stack, and the Zuul CI/CD platform since it expanded beyond OpenStack.
“The most important thing weve learned from each of these successful projects is that collaboration is key and the more breadth in the ecosystem of support the better,” said Thierry Carrez, general manager of the OpenInfra Foundation. “In fact, weve found that the most successful open source projects are funded by multiple companies, because they are able to combine their resources to achieve a much stronger rate of return.”
This new model is clearly a way for the OpenInfra Foundation to bring new projects — and new members — into the fold. Its models for managing open source projects in a multi-party ecosystem — both through the new directed funds and its more traditional approach — may not be suitable for every project, as the leadership team readily admits. Even if the OpenInfra Foundation only receives a small percentage of projects, the number of open-source projects is increasing as the demand for these sophisticated cloud infrastructure projects grows, all while they become more complex.
The Foundation also announced a couple of milestone releases for its various projects, including version 2.0 of Kata Containers, version 5.0 of Zuul, and the release of StarlingX 6.0.
“The Foundation celebrates its 10 anniversary this year, and as we look to our next decade of open infrastructure, were building momentum on what makes our model so successful: aligning companies and individuals who wish to work together, providing them with a framework and tools to effectively collaborate, and helping them invest their funds to best help the project they care about,” said Collier.
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/06/openinfra-foundation-launches-directed-funding-to-support-open-source-projects/
作者:[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/open-infra-berlin-event.png

View File

@ -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/

View File

@ -2,7 +2,7 @@
[#]: via: (https://opensource.com/article/21/6/qtcreator)
[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (hadisi1993)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -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 dont 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, computers 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

View File

@ -0,0 +1,141 @@
[#]: subject: "Integrating Zeek with ELK Stack"
[#]: via: "https://www.opensourceforu.com/2022/06/integrating-zeek-with-elk-stack/"
[#]: author: "Tridev Reddy https://www.opensourceforu.com/author/tridev-reddy/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Integrating Zeek with ELK Stack
======
Zeek is an open source network security monitoring tool. This article discusses how to integrate Zeek with ELK.
![Integrating-Zeek-with-ELK-Stack-Featured-image][1]
In the article titled Network Security Monitoring Made Easy with Zeek published in the March 2022 edition of this magazine, we looked into the capabilities of Zeek and learned how to get started with it. We will now take our learning experience a bit further and see how to integrate it with ELK (also know as Elasticsearch, Kibana, Beats, and Logstash).
For this, we will use a tool called Filebeat, which monitors, collects and forwards the logs to Elasticsearch. We will configure Filebeat with Zeek, so that the data collected by the latter will be forwarded and centralised in our Kibana dashboard.
### Installing Filebeat
Lets first set up Filebeat with Zeek. To install Filebeat using *apt*, give the following command:
```
sudo apt install filebeat
```
Next, we need to configure the *.yml* file, which is present in the etc*/filebeat/* folder:
```
sudo nano /etc/filebeat/filebeat.yml
```
We need to configure only two things here. In the *Filebeat* Input section, change the type to log and uncomment the *enabled*: false and change it to true. We also need to specify the path of where the logs are stored, i.e., we need to specify */opt/zeek/logs/current/*.log*
Once this is done, the first part of the settings should look similar to whats shown in Figure 1.
![Figure 1: Filebeat config (a)][2]
The second thing to be changed in the Elasticsearch output section is under *Outputs.* Uncomment the output.elasticsearch and hosts. Make sure the URL of the host and port number are similar to what you configured while installing ELK. We kept it as localhost with port number 9200.
In the same section, uncomment the user name and password at the bottom, and enter the user name and password of the elastic user that you generated while configuring ELK after installation. Once this is done, refer to Figure 2 and check the settings.
![Figure 2: Filebeat config (b)][3]
Now that we have completed installing and configuring , we need to configure Zeek so that it stores the logs in JSON format. For that, ensure your Zeek instance is stopped. If its not, execute the command given below to stop it:
```
cd /opt/zeek/bin
./zeekctl stop
```
Now we need to add a small line in the local.zeek, which is present in the *opt/zeek/share/zeek/site/* directory.
Open the file as root and add the following line:
```
@load policy/tuning/json-logs.zeek
```
Refer to Figure 3 and make sure the settings are done correctly.
![Figure 3: local.zeek file][4]
As we have changed a few configurations of Zeek, we need to re-deploy it, which can be done by executing the following command:
```
cd /opt/zeek/bin
./zeekctl deploy
```
Now we need to enable the Zeek module in Filebeat so that it forwards the logs from Zeek. Execute the following command:
```
sudo filebeat modules enable zeek
```
We are almost ready; in the last step, configure the *zeek.yml* file to mention what type of data is to be logged. This can be done by modifying the */etc/filebeat/modules.d/zeek.yml* file.
In this *.yml file*, we must mention the directory where these specified logs are stored. We know that the logs are stored in the current folder, which has several files like *dns.log*, *conn.log, dhcp.log,* and many more. We need to mention each path in each section. You can leave unwanted files by changing the enabled value to false, if and only if you dont want logs from that file/program.
For example, for *dns*, make sure the enabled value is true and the path is mentioned as:
```
var.paths: [ “/opt/zeek/logs/current/dns.log”, “/opt/zeek/logs/*.dns.json” ]
```
Repeat this for the rest of the files. We did this for a few that we needed. We added everything that was mainly required. You can do the same. Refer to Figure 4.
![Figure 4: zeek.yml configuration][5]
Now its time to start the Filebeat. Execute the following commands:
```
sudo filebeat setup
sudo service filebeat start
```
Now that everything is done, lets move to our Kibana dashboard and check whether we are receiving the data from Zeek via Filebeat or not.
![Figure 5: Dashboard of Kibana (Destination Geo)][6]
Navigate to the dashboard; you can see a clear statistical analysis of the data it has captured (Figure 5 and Figure 6).
![Figure 6: Dashboard of Kibana (Network)][7]
Now lets move to the Discover tab and check the results by filtering using the query:
```
event.module: “zeek”
```
This query will filter all the data it received in a certain time and show us only the data from the module named Zeek (Figure 7).
![Figure 7: Filtered data by event.module query][8]
### Acknowledgements
*The authors are grateful to Sibi Chakkaravarthy Sethuraman, Sudhakar Ilango, Nandha Kumar R. and Anupama Namburu at the School of Computer Science and Engineering, VIT-AP for their continuous guidance and support. A special thanks to the Center for Excellence in Artificial Intelligence and Robotics (AIR).*
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/06/integrating-zeek-with-elk-stack/
作者:[Tridev Reddy][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/tridev-reddy/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Integrating-Zeek-with-ELK-Stack-Featured-image.jpg
[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Filebeat-config-a.jpg
[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-Filebeat-config-b.jpg
[4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-3-local.zeek-file-1.jpg
[5]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-4-zeek.yml-configuration.jpg
[6]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-5-Dashboard-of-Kibana-Destination-Geo.jpg
[7]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-6-Dashboard-of-Kibana-Network-1.jpg
[8]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-7-Filtered-data-by-event.jpg

View File

@ -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: " "
[#]: publisher: " "
[#]: url: " "
Fedora Linux 37 的内核 5.18 测试周到了,一起来做贡献吧!
======
![][1]
Fedora 内核团队正在为 Linux 内核 5.18 进行最终集成。这个版本刚刚发布,很快就会出现在 Fedora 中。因此Fedora 内核和 QA 团队组织了一个测试周,截止日期为 **2022 年 6 月 12 日,星期日。** 请参阅 [wiki page][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)
校对:[校对者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]: https://testdays.fedoraproject.org/events/136
[4]: https://docs.fedoraproject.org/en-US/quick-docs/kernel/howto-kernel-testday/

View File

@ -1,230 +0,0 @@
[#]: 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: " "
[#]: publisher: " "
[#]: url: " "
Simula 诞生之前的面向对象程序设计
======
想象一下,你坐在河边,河岸上如茵绿草,不远处湍急河流;午后的阳光慵懒惬意,使人陷入冥想哲思,不觉开始思考眼前的河流是否真实存在。诚然,几米外确实有河水奔流而下。不过,我们所称为“河流”的存在究竟是什么呢?毕竟,河水奔流不息,一直处于变化之中。似乎,“河流”这个词无法指代任何固定不变的事物。
2009 年Clojure 的创始人 <ruby>里奇·希基<rt>Rich Hickey</rt></ruby> 发表了[一场精彩的演讲][1],探讨了为什么上文那样的哲学发问会给面向对象程序设计带来难题。他认为,人们看待计算机程序中的对象与看待河流的逻辑是一样的:对象是固定不变的。可实际上,许多对象或者说全部对象都无时无刻不处于变化之中。所以,这种逻辑并不正确,我们无法区分在不同状态下同一对象实例的不同之处。程序中没有时间的概念。人们只是单纯地用着同一个名字,以期在引用对象时,对象能够处于预期的状态中。这样,我们也就难免会遇到 <ruby>故障<rt>bugs</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年代末尼加德受雇于挪威防务科学研究中心该研究中心附属于挪威军方。在那里他负责设计蒙特卡洛模拟方法用于核反应堆设计与操作研究。最初那些模拟实验完全通过人工开展后来实验在 Ferranti Mercury 电脑[1][3] 上编入程序运行。尼加德随后发现,将这些模拟实验输入电脑需要一种更有效的方式。
尼加德设计的这种模拟实验就是人们所知的“离散事件模型”,模拟记录了一系列事件随着时间改变系统状态的过程。但是问题的关键在于模拟可以从一个事件跳跃到另一个事件中,因为事件是离散的,事件之间的系统不存在任何变化。根据尼加德和达尔在 1966 年发表的一篇关于 Simula 的论文,这种模型被迅速应用于“神经网络、通信系统、交通流量、生产系统、管理系统、社会系统等”[2][4] 领域的分析。因此,尼加德认为,其他人描述模拟实验时,可能也需要更高层级的模型。于是他开始物色人才,帮助他完成他称之为“模拟语言”或者“蒙特卡洛编译器”的项目[3][5]。
达尔当时也受雇于挪威防务科学研究中心,专攻语言设计,此时也加入了尼加德的项目。在接下来一年左右的时间,尼加德和达尔携手开发了 Simula 0 语言。[4][6] 这一语言的早期版本仅仅是在 ALGOL 60 基础上进行的较小拓展当时也只是打算将其用作预处理程序而已。Simula 0 远不及后来的编程语言复杂,其基本语言结构是“<ruby><rt>stations</rt></ruby>”与“<ruby>乘客<rt>customers</rt></ruby>”,这些结构可以用于针对具体某些离散事件网络建立模型。通过模拟飞机起飞的过程,尼加德和达尔给出了一个例子。[5][7] 但是尼加德和达尔最后想出了一个更加通用的语言结构,可以同时表示“站”和“乘客”,也可以为更广泛的模拟建立模型。这就是后来 Simula 的第一个主要版本,它改变了 Simula 作为 ALGOL 专属包的定位,使其转变为通用编程语言。
Simula I 没有“<ruby><rt>stations</rt></ruby>”和“<ruby>乘客<rt>customers</rt></ruby>”的语言结构,但它可以通过使用“进程”再现这些结构。一个进程包含大量数据属性,这些属性与作为进程 _操作规程_ 的单个行为相联系。你可能会把进程当作是只有单个方法的对象,比如 `run()`。不过这种类比并不全面因为每个进程的操作规程都可以随时暂停、随时恢复因为这种操作规程属于协同程序的一种。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][8] 在该案例中,进程就好比订单:通过寻找可用的机器,订单得以发出;如果没有可用的机器,订单就会搁置;而一旦有机器空出来,订单就会执行下去。这种订单流程的概念被用以例证若干种不同的订单实例,不过这些实例并未调用任何方法。这类程序的主体仅仅是创建进程,并使其运行。
历史上第一个 Simula I 编译器发布于 1965 年。尼加德和达尔在离开挪威防务科学研究中心之后就进入了挪威计算机中心工作Simula I 也是在这里日渐流行起来的。当时Simula I 在 UNIVAC 公司的计算机和Burroughs 公司的 B5500 计算机上均可执行。[7][9] 尼加德和达尔两人与一家名为 ASEA 的瑞典公司达成了咨询协议,运用 Simula 模拟加工车间。但是,尼加德和达尔随后就意识到 Simula 也可以写一些和模拟完全不搭边的程序。
奥斯陆大学教授 <ruby>斯坦因·克罗达尔<rt>Stein Krogdahl</rt></ruby> 曾写过关于 Simula 的发展史,称“真正能够促使新开发的通用语言快速发展的催化剂”就是[一篇题为<ruby>《记录处理》<rt>Record Handling</rt></ruby>的论文][10],作者是英国计算机科学家 <ruby>查尔斯·安东尼·理查德·霍尔<rt>C.A.R. Hoare</rt></ruby>。[8][11] 假如你现在读霍尔的这篇论文,你就不会怀疑这句话。当人们谈及面向对象语言的发展史时,如果没有提起霍尔的大名,那绝对是不可能的。以下内容摘自霍尔的《记录处理》一文:
> 该方案设想,在程序执行期间,计算机内部存在任意若干条记录,每条记录都代表着程序员在过去、现在或未来所需的某个对象。程序对现有记录的数量保持动态控制,并可以根据当前任务的要求创建新的记录或删除现有记录。
> 计算机中的每条记录都必须属于数量有限但互不重合的记录类型中的一类;程序员可以根据需要声明尽可能多的记录类型,并借助标识符为各个类型命名。记录类型的命名可能是普通词汇,比如“牛”、“桌子”以及“房子”,同时,归属于这些类型的记录分别代表一头“牛”、一张“桌子”以及一座“房子”。
霍尔在这片论文中并未提到子类的概念,但是达尔非常感谢霍尔,是他引导了两人发现了这一概念。[9][12] 尼加德和达尔注意到 Simula I 的进程通常具有相同的元素,所以引入父类来执行共同元素就会非常方便。这也强化了“进程”这一概念本身可以用作父类的可能性,也就是说,并非每种类型都必须用作只有单个操作规程的进程。这就是 Simula 语言迈向通用化的第二次飞跃此时Simula 67 真正成为了通用编程语言。正是如此变化让尼加德和达尔萌生了给 Simula 改名的想法,想让人们意识到 Simula 不仅仅可以用作模拟。[10][13] 不过,考虑到 “Simula”这个名字的知名度已经很高了另取名字恐怕会带来不小的麻烦。
1967年尼加德和达尔与 <ruby>控制数据公司<rt>Control Data</rt></ruby> 签署协议着手开发Simula 的新版本Simula 67。同年六月份的一场会议中来自 <ruby>控制数据公司<rt>Control Data</rt></ruby>、奥斯陆大学以及挪威计算机中心的代表与尼加德和达尔两人会面,意在为这门新语言制定标准与规范。最终,会议发布了 [《Simula 67 通用基础语言》][14],确定了该语言的发展方向。
Simula 67 编译器的开发由若干家供应商负责。<ruby>Simula 用户协会<rt>The Association of Simula Users</rt></ruby>ASU也随后成立并于每年举办年会。不久Simula 67 的用户就遍及了23个国家。[11][15]
### 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保留了进程模型不过只有在使用 <ruby>`进程`类<rt>Process class</rt></ruby><ruby>`模拟`块<rt>Simulation block</rt></ruby> 的时候才能调用。
为了表现出进程是如何运行的,我决定对下述场景进行模拟。想象一下,有这么一座村庄,村庄的旁边有条小河边,小河里有很多的鱼。但是,村里多的村民却只有一条鱼竿。有些村民胃口很大,每隔一个小时就饿了。他们一饿,就会拿着鱼竿去钓鱼。如果一位村民正在等鱼竿,另一位村民自然也用不了。这样一来,村民们就会为了钓鱼排起长长的队伍。假如村民要等五、六分钟才能钓到一条鱼,那么这样等下去,村民们的身体状况就会变得越来越差。再假如,一位村民已经到了骨瘦如柴的地步,最后他可能就会饿死。
这个例子多少有些奇怪,虽然我也不说不出来为什么我脑袋里最先想到的是这样的故事,但是就这样吧。我们把村民们当作 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][18] 先把影响其他对象的nouns 对象和 actors 对象放在一边,我们先来想一想运行中的进程。我们可以将程序的总控制权交予 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] 订阅获取最新文章每四周更新一篇。_
_TwoBitHistory 文章回顾……_
> 嗨,大家好!很遗憾,我最近没有时间写新文章,但是我刚刚更新了我的 RSS 记录,整合了目前为止我私下对一些关键人物的采访,比如 Ramanathan Guha 和 Dan Libby。<https://t.co/WYPhvpTGqB>
>
> — TwoBitHistory (@TwoBitHistory) [December 18, 2018][22]
1. Jan Rune Holmevik, “The History of Simula,” accessed January 31, 2019, <http://campus.hesge.ch/daehne/2004-2005/langages/simula.htm>. [↩︎][23]
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&amp;rep=rep1&amp;type=pdf][24]. [↩︎][25]
3. Stein Krogdahl, “The Birth of Simula,” 2, accessed January 31, 2019, <http://heim.ifi.uio.no/~steinkr/papers/HiNC1-webversion-simula.pdf>. [↩︎][26]
4. ibid. [↩︎][27]
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>. [↩︎][28]
6. Dahl and Nygaard (1966), 676. [↩︎][29]
7. Dahl and Nygaard (1978), 257. [↩︎][30]
8. Krogdahl, 3. [↩︎][31]
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>. [↩︎][32]
10. Dahl and Nygaard (1978), 265. [↩︎][33]
11. Holmevik. [↩︎][34]
12. Krogdahl, 4. [↩︎][35]
--------------------------------------------------------------------------------
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
[3]: tmp.2ZIthXB4S6#fn:1
[4]: tmp.2ZIthXB4S6#fn:2
[5]: tmp.2ZIthXB4S6#fn:3
[6]: tmp.2ZIthXB4S6#fn:4
[7]: tmp.2ZIthXB4S6#fn:5
[8]: tmp.2ZIthXB4S6#fn:6
[9]: tmp.2ZIthXB4S6#fn:7
[10]: https://archive.computerhistory.org/resources/text/algol/ACM_Algol_bulletin/1061032/p39-hoare.pdf
[11]: tmp.2ZIthXB4S6#fn:8
[12]: tmp.2ZIthXB4S6#fn:9
[13]: tmp.2ZIthXB4S6#fn:10
[14]: http://web.eah-jena.de/~kleine/history/languages/Simula-CommonBaseLanguage.pdf
[15]: tmp.2ZIthXB4S6#fn:11
[16]: https://www.gnu.org/software/cim/
[17]: https://gist.github.com/sinclairtarget/6364cd521010d28ee24dd41ab3d61a96
[18]: tmp.2ZIthXB4S6#fn:12
[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
[23]: tmp.2ZIthXB4S6#fnref:1
[24]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&rep=rep1&type=pdf
[25]: tmp.2ZIthXB4S6#fnref:2
[26]: tmp.2ZIthXB4S6#fnref:3
[27]: tmp.2ZIthXB4S6#fnref:4
[28]: tmp.2ZIthXB4S6#fnref:5
[29]: tmp.2ZIthXB4S6#fnref:6
[30]: tmp.2ZIthXB4S6#fnref:7
[31]: tmp.2ZIthXB4S6#fnref:8
[32]: tmp.2ZIthXB4S6#fnref:9
[33]: tmp.2ZIthXB4S6#fnref:10
[34]: tmp.2ZIthXB4S6#fnref:11
[35]: tmp.2ZIthXB4S6#fnref:12

View File

@ -0,0 +1,74 @@
[#]: 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)
商业之上是开源
======
The Beyond Program 连接起未来科技行业的人才和开源文化。
![Teacher or learner?][1]
那时,我还是一个大学生,我不明白人们为什么那么吹捧开源软件。我也使用 Linux 和开源软件,但是我不明白开源的运作模式,如何参加一个开源项目,并且它是如何影响我的职业生涯的。我的开发经验主要是家庭作业和学位需要的一个大型项目。
所以,当我开始踏足科技行业时,我发现我还有很多知识需要学习。我需要明白如何加入一个可能拥有很大的团队,并且分散在不同地方的正在进行中的项目。我还要学会正确的沟通以保证我付出点努力不白费。
我在这个行业并不优秀。我只是众多毕业生中的一员。
### 开源让毕业生点起点更高
作为一个工程师,一个管理者,从那时起我开始帮助刚入行的工程师。我发现,有开源经验的毕业生比没有开源经验的毕业生能更快的入门。
通过将开源方法纳入学术研究,学生们可以获得相关的行业经验,学会利用他们自己的知识,并建立一个陈述观点和分享知识的平台。参与开源项目可以对学生的技术知识和经验产生积极影响。这可以帮助他们更好的规划自己的职业生涯。
开源在科技行业的价值是塑造并完善全球软件公司的文化。参与开源项目并采用[开放组织文化][2]正在成为行业普遍现象。公司寻求知道如何在开源领域工作并培养其文化的思想新颖,才华横溢的员工。
因此,科技行业必须推动学术界将开源文化作为学习科技研究的基本方法之一。
### 商业之上是开源文化
当我遇到红帽的高级软件工程师 [Liora Milbaum][3] 时我发现我们对将开源文化和规则引入学术界有着共同的兴趣。Liora 之前创立了 [DevOps Loft][4], 在其中,她与有兴趣进入这个行业的人们分享了 DevOps 实践,并希望发起一个类似的项目,教授大学生开源。我们决定启动 [Beyond][5] program将科技行业拥抱开源精神的人才与红帽的实践联系起来。
我们在 [Academic College of Tel Aviv-Yafo][6] 开始了 Beyond program ,在那里,我们受到了信息系统学院的热烈欢迎。我们从介绍 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)
校对:[校对者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/

View File

@ -1,65 +0,0 @@
[#]: 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: " "
[#]: publisher: " "
[#]: url: " "
如何修复 yay: error while loading shared libraries: libalpm.so.12
======
这篇快速指南是为了帮助你修复 yay error: while loading shared libraries: libalpm.so.12.
如果你在系统中运行 [Arch Linux][1] 的时间更长,那么由于其滚动发布性质以及你的硬件支持,程序可能会损坏。 如果你使用 AUR Helper Yay那么有时由于其他软件包的多次安装升级yay 可能会损坏。
YAY helper 是非常稳定的,但有时它会被搞乱,你不能使用它进行任何安装,直到你修复它。而其中一个令人头疼的错误是这样的:
```
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)
校对:[校对者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://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

View File

@ -0,0 +1,194 @@
[#]: 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: " "
如何双启动 Ubuntu 22.04 LTS 和 Windows 11
======
嗨,伙计们,在这篇指南中,我们将演示如何在 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 ,并按下 <ruby>回车键<rt>ENTER</rt></ruby> 按键。
![][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
* Swap                 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]
接下来,定义 / ( root ) 分区,并单击 <ruby>确定<rt>OK</rt></ruby> 按钮。
![][16]
为定义 swap 空间,设置大小,并在 <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 驱动器,并按下 <ruby>回车键<rt>ENTER</rt></ruby> 按键。
![][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)
校对:[校对者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