Linux中国
1.73K subscribers
777 photos
6.34K links
Linux 中国官方 Telegram 频道
Download Telegram
让系统崩溃的黑天鹅分类

在严重的故障发生之前,找到引起问题的异常事件,并修复它。Media

via https://linux.cn/article-10274-1.html
让系统崩溃的黑天鹅分类

&#22312;&#20005;&#37325;&#30340;&#25925;&#38556;&#21457;&#29983;&#20043;&#21069;&#65292;&#25214;&#21040;&#24341;&#36215;&#38382;&#39064;&#30340;&#24322;&#24120;&#20107;&#20214;&#65292;&#24182;&#20462;&#22797;&#23427;&#12290;<a href="https://dn-linuxcn.qbox.me/data/attachment/album/201811/25/123944dppim8qrrqs8iiru.png">Media</a>&#40657;&#22825;&#40517;Black swan&#29992;&#26469;&#27604;&#21947;&#36896;&#25104;&#20005;&#37325;&#24433;&#21709;&#30340;&#23567;&#27010;&#29575;&#20107;&#20214;&#65288;&#27604;&#22914; 2008 &#24180;&#30340;&#37329;&#34701;&#21361;&#26426;&#65289;&#12290;&#22312;&#29983;&#20135;&#29615;&#22659;&#30340;&#31995;&#32479;&#20013;&#65292;&#40657;&#22825;&#40517;&#26159;&#25351;&#36825;&#26679;&#30340;&#20107;&#24773;&#65306;&#23427;&#24341;&#21457;&#20102;&#20320;&#19981;&#30693;&#36947;&#30340;&#38382;&#39064;&#65292;&#36896;&#25104;&#20102;&#37325;&#22823;&#24433;&#21709;&#65292;&#19981;&#33021;&#24555;&#36895;&#20462;&#22797;&#25110;&#22238;&#28378;&#65292;&#20063;&#19981;&#33021;&#29992;&#20540;&#29677;&#35828;&#26126;&#20070;&#19978;&#30340;&#20854;&#20182;&#26631;&#20934;&#21709;&#24212;&#26469;&#35299;&#20915;&#12290;&#23427;&#26159;&#20107;&#21457;&#20960;&#24180;&#21518;&#20320;&#36824;&#22312;&#32473;&#26032;&#20154;&#35828;&#36215;&#30340;&#20107;&#20214;&#12290;&#20174;&#23450;&#20041;&#19978;&#30475;&#65292;&#40657;&#22825;&#40517;&#26159;&#19981;&#21487;&#39044;&#27979;&#30340;&#65292;&#19981;&#36807;&#26377;&#26102;&#20505;&#25105;&#20204;&#33021;&#25214;&#21040;&#20854;&#20013;&#30340;&#19968;&#20123;&#27169;&#24335;&#65292;&#38024;&#23545;&#26377;&#20851;&#32852;&#30340;&#26576;&#19968;&#31867;&#38382;&#39064;&#20934;&#22791;&#38450;&#24481;&#25514;&#26045;&#12290;&#20363;&#22914;&#65292;&#22823;&#37096;&#20998;&#25925;&#38556;&#30340;&#30452;&#25509;&#21407;&#22240;&#26159;&#21464;&#26356;&#65288;&#20195;&#30721;&#12289;&#29615;&#22659;&#25110;&#37197;&#32622;&#65289;&#12290;&#34429;&#28982;&#36825;&#31181;&#26041;&#24335;&#35302;&#21457;&#30340; bug &#26159;&#29420;&#29305;&#30340;&#12289;&#19981;&#21487;&#39044;&#27979;&#30340;&#65292;&#20294;&#26159;&#24120;&#35265;&#30340;&#37329;&#19997;&#38592;&#21457;&#24067;&#23545;&#36991;&#20813;&#36825;&#31867;&#38382;&#39064;&#26377;&#19968;&#23450;&#30340;&#20316;&#29992;&#65292;&#32780;&#19988;&#33258;&#21160;&#22238;&#28378;&#24050;&#32463;&#25104;&#20102;&#19968;&#31181;&#26631;&#20934;&#27490;&#25439;&#31574;&#30053;&#12290;&#38543;&#30528;&#25105;&#20204;&#30340;&#19987;&#19994;&#24615;&#19981;&#26029;&#25104;&#29087;&#65292;&#19968;&#20123;&#20854;&#20182;&#30340;&#38382;&#39064;&#20063;&#27491;&#36880;&#28176;&#21464;&#24471;&#23481;&#26131;&#29702;&#35299;&#65292;&#34987;&#24402;&#31867;&#21040;&#26576;&#31181;&#39118;&#38505;&#24182;&#26377;&#26222;&#36866;&#30340;&#39044;&#38450;&#31574;&#30053;&#12290;&#20844;&#24067;&#20986;&#26469;&#30340;&#40657;&#22825;&#40517;&#20107;&#20214;&#25152;&#26377;&#31185;&#25216;&#20844;&#21496;&#37117;&#26377;&#29983;&#20135;&#29615;&#22659;&#30340;&#25925;&#38556;&#65292;&#21482;&#19981;&#36807;&#24182;&#19981;&#26159;&#25152;&#26377;&#20844;&#21496;&#37117;&#20250;&#20998;&#20139;&#20182;&#20204;&#30340;&#20107;&#25925;&#20998;&#26512;&#12290;&#37027;&#20123;&#20844;&#24320;&#35752;&#35770;&#20107;&#25925;&#30340;&#20844;&#21496;&#24110;&#20102;&#25105;&#20204;&#30340;&#24537;&#12290;&#19979;&#21015;&#20107;&#25925;&#37117;&#25551;&#36848;&#20102;&#26576;&#19968;&#31867;&#38382;&#39064;&#65292;&#20294;&#23427;&#20204;&#32477;&#23545;&#19981;&#26159;&#21482;&#19968;&#20010;&#23396;&#20363;&#12290;&#25105;&#20204;&#30340;&#31995;&#32479;&#20013;&#37117;&#26377;&#40657;&#22825;&#40517;&#22312;&#28508;&#20239;&#30528;&#65292;&#21482;&#26159;&#26377;&#20123;&#20154;&#36824;&#19981;&#30693;&#36947;&#32780;&#24050;&#12290;&#36798;&#21040;&#19978;&#38480;&#36798;&#21040;&#20219;&#20309;&#31867;&#22411;&#30340;&#38480;…
DevOps 应聘者应该准备回答的 20 个问题

想要建立一个积极,富有成效的工作环境? 在招聘过程中要专注于寻找契合点。Media

via https://linux.cn/article-10275-1.html
DevOps &#24212;&#32856;&#32773;&#24212;&#35813;&#20934;&#22791;&#22238;&#31572;&#30340; 20 &#20010;&#38382;&#39064;

&#24819;&#35201;&#24314;&#31435;&#19968;&#20010;&#31215;&#26497;&#65292;&#23500;&#26377;&#25104;&#25928;&#30340;&#24037;&#20316;&#29615;&#22659;&#65311; &#22312;&#25307;&#32856;&#36807;&#31243;&#20013;&#35201;&#19987;&#27880;&#20110;&#23547;&#25214;&#22865;&#21512;&#28857;&#12290;<a href="https://dn-linuxcn.qbox.me/data/attachment/album/201811/25/210921fh1ipxpphxz5wggg.png">Media</a>&#32856;&#35831;&#19968;&#20010;&#19981;&#21512;&#36866;&#30340;&#20154;<a href="https://www.shrm.org/resourcesandtools/hr-topics/employee-relations/pages/cost-of-bad-hires.aspx">&#20195;&#20215;&#26159;&#24456;&#39640;&#30340;</a>&#12290;&#26681;&#25454; Link &#20154;&#21147;&#36164;&#28304;&#30340;&#39318;&#24109;&#25191;&#34892;&#23448; Jörgen Sundberg &#30340;&#32479;&#35745;&#65292;&#25307;&#32856;&#12289;&#38599;&#20323;&#19968;&#21517;&#26032;&#21592;&#24037;&#23558;&#20250;&#33457;&#36153;&#20844;&#21496;$240,000 &#20043;&#22810;&#65292;&#24403;&#20320;&#36827;&#34892;&#20102;&#19968;&#27425;&#19981;&#21512;&#36866;&#30340;&#25307;&#32856;&#65306;&#20320;&#22833;&#21435;&#20102;&#20182;&#20204;&#30340;&#30693;&#35782;&#25216;&#33021;&#12290;&#20320;&#22833;&#21435;&#20102;&#20182;&#20204;&#30340;&#20154;&#33033;&#12290;&#20320;&#30340;&#22242;&#38431;&#23558;&#21487;&#33021;&#36827;&#20837;&#21040;&#19968;&#20010;&#32452;&#32455;&#21457;&#23637;&#30340;&#38663;&#33633;&#38454;&#27573;&#20320;&#30340;&#20844;&#21496;&#23558;&#20250;&#38754;&#20020;&#32452;&#32455;&#30772;&#35010;&#30340;&#39118;&#38505;&#24403;&#20320;&#22833;&#21435;&#19968;&#21517;&#21592;&#24037;&#30340;&#26102;&#20505;&#65292;&#20320;&#23601;&#20687;&#20002;&#22833;&#20102;&#20844;&#21496;&#29256;&#22270;&#20013;&#30340;&#19968;&#22359;&#12290;&#21516;&#26679;&#20540;&#24471;&#19968;&#25552;&#30340;&#26159;&#21478;&#19968;&#31471;&#30340;&#30171;&#33510;&#12290;&#24212;&#32856;&#21040;&#19968;&#20010;&#38169;&#35823;&#24037;&#20316;&#23703;&#20301;&#30340;&#21592;&#24037;&#20250;&#24863;&#21463;&#21040;&#24456;&#22823;&#30340;&#21387;&#21147;&#20197;&#21450;&#25972;&#20010;&#36523;&#24515;&#30340;&#19981;&#28385;&#24847;&#65292;&#29978;&#33267;&#26159;&#20581;&#24247;&#38382;&#39064;&#12290;&#21478;&#22806;&#19968;&#26041;&#38754;&#65292;&#24403;&#20320;&#25307;&#32856;&#21040;&#21512;&#36866;&#30340;&#20154;&#26102;&#65292;&#26032;&#30340;&#21592;&#24037;&#23558;&#20250;&#65306;&#20016;&#23500;&#20844;&#21496;&#29616;&#26377;&#30340;&#25991;&#21270;&#65292;&#20351;&#20320;&#30340;&#32452;&#32455;&#25104;&#20026;&#19968;&#20010;&#26356;&#22909;&#30340;&#24037;&#20316;&#22330;&#25152;&#12290;&#30740;&#31350;&#34920;&#26126;&#19968;&#20010;&#31215;&#26497;&#30340;&#24037;&#20316;&#25991;&#21270;&#33021;&#22815;&#24110;&#21161;&#26356;&#38271;&#20037;&#25512;&#21160;&#36130;&#21153;&#19994;&#32489;&#22686;&#38271;&#65292;&#32780;&#19988;&#22914;&#26524;&#20320;&#22312;&#19968;&#20010;&#27426;&#24555;&#30340;&#29615;&#22659;&#20013;&#24037;&#20316;&#65292;&#20320;&#26356;&#26377;&#21487;&#33021;&#22312;&#29983;&#27963;&#20013;&#20570;&#30340;&#26356;&#22909;&#12290;&#28909;&#29233;&#21644;&#20320;&#30340;&#32452;&#32455;&#22312;&#19968;&#36215;&#24037;&#20316;&#12290;&#24403;&#20154;&#20204;&#28909;&#29233;&#20182;&#20204;&#25152;&#22312;&#20570;&#30340;&#65292;&#20182;&#20204;&#20250;&#36235;&#21521;&#20110;&#20570;&#30340;&#26356;&#22909;&#12290;&#25307;&#32856;&#20197;&#36866;&#21512;&#25110;&#21152;&#24378;&#29616;&#26377;&#30340;&#25991;&#21270;&#22312; DevOps &#21644;&#25935;&#25463;&#22242;&#22810;&#20013;&#26159;&#24517;&#19981;&#21487;&#23569;&#30340;&#12290;&#20063;&#23601;&#26159;&#35828;&#38599;&#20323;&#21040;&#19968;&#20010;&#33021;&#22815;&#40723;&#21169;&#31215;&#26497;&#21512;&#20316;&#30340;&#20154;&#65292;&#20197;&#20415;&#26469;&#33258;&#19981;&#21516;&#32972;&#26223;&#65292;&#26377;&#30528;&#19981;&#21516;&#30446;&#26631;&#21644;&#24037;&#…
用 Python 和 Conu 测试容器

Conu (container utilities 的简写) 是一个 Python 库,让你编写容器测试变得简单。Media

via https://linux.cn/article-10276-1.html
&#29992; Python &#21644; Conu &#27979;&#35797;&#23481;&#22120;

<a href="https://dn-linuxcn.qbox.me/data/attachment/album/201811/25/215123sq8nep3nn7ccp13m.jpg">Media</a>&#36234;&#26469;&#36234;&#22810;&#30340;&#24320;&#21457;&#20154;&#21592;&#20351;&#29992;&#23481;&#22120;&#24320;&#21457;&#21644;&#37096;&#32626;&#20182;&#20204;&#30340;&#24212;&#29992;&#12290;&#36825;&#24847;&#21619;&#30528;&#21487;&#20197;&#36731;&#26494;&#22320;&#27979;&#35797;&#23481;&#22120;&#20063;&#21464;&#24471;&#24456;&#37325;&#35201;&#12290;<a href="https://github.com/user-cont/conu">Conu</a> (container utilities &#30340;&#31616;&#20889;) &#26159;&#19968;&#20010; Python &#24211;&#65292;&#35753;&#20320;&#32534;&#20889;&#23481;&#22120;&#27979;&#35797;&#21464;&#24471;&#31616;&#21333;&#12290;&#26412;&#25991;&#21521;&#20320;&#20171;&#32461;&#22914;&#20309;&#20351;&#29992;&#23427;&#27979;&#35797;&#23481;&#22120;&#12290;&#24320;&#22987;&#21543;&#39318;&#20808;&#65292;&#20320;&#38656;&#35201;&#19968;&#20010;&#23481;&#22120;&#31243;&#24207;&#26469;&#27979;&#35797;&#12290;&#20026;&#27492;&#65292;&#20197;&#19979;&#21629;&#20196;&#21019;&#24314;&#19968;&#20010;&#21253;&#21547;&#19968;&#20010;&#23481;&#22120;&#30340; Dockerfile &#21644;&#19968;&#20010;&#34987;&#23481;&#22120;&#20282;&#26381;&#30340; Flask &#24212;&#29992;&#31243;&#24207;&#30340;&#25991;&#20214;&#22841;&#12290;<pre class="prettyprint linenums">$ mkdir container_test$ cd container_test$ touch Dockerfile$ touch app.py</pre>&#23558;&#20197;&#19979;&#20195;&#30721;&#22797;&#21046;&#21040; app.py &#25991;&#20214;&#20013;&#12290;&#36825;&#26159;&#24815;&#24120;&#30340;&#22522;&#26412; Flask &#24212;&#29992;&#65292;&#23427;&#36820;&#22238;&#23383;&#31526;&#20018; “Hello Container World&#65281;”&#12290;<pre class="prettyprint linenums">from flask import Flaskapp = Flask(__name__)@app.route('/')def hello_world(): return 'Hello Container World!'if __name__ == '__main__': app.run(debug=True,host='0.0.0.0')</pre>&#21019;&#24314;&#21644;&#26500;&#24314;&#27979;&#35797;&#23481;&#22120;&#20026;&#20102;&#26500;&#24314;&#27979;&#35797;&#23481;&#22120;&#65292;&#23558;&#20197;&#19979;&#25351;&#20196;&#28155;&#21152;&#21040; Dockerfile&#12290;<pre class="prettyprint linenums">FROM registry.fedoraproject.org/fedora-minimal:latestRUN microdnf -y install python3-flask && microdnf clean allADD ./app.py /srvCMD ["python3", "/srv/app.py"]</pre>&#28982;&#21518;&#20351;&#29992; Docker CLI &#24037;&#20855;&#26500;&#24314;&#23481;&#22120;&#12290;<pre class="prettyprint linenums">$ sudo dnf -y install docker$ sudo systemctl start docker$ sudo docker build . -t flaskapp_container</pre>&#25552;&#31034;&#65306;&#21482;&#26377;&#22312;&#31995;&#32479;&#19978;&#26410;&#23433;&#35013; Docker &#26102;&#25165;&#38656;&#35201;&#21069;&#20004;&#20010;&#21629;&#20196;&#12290;&#26500;&#24314;&#20043;&#21518;&#20351;&#29992;&#20197;&#19979;&#21629;&#20196;&#36816;&#34892;&#23481;&#22120;&#12290;<pre class="prettyprint linenums">$ sudo docker run -p 5000:5000 --rm flaskapp_container* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)* Restarting with stat* Debugger is active!* Debugger PIN: 473-505-51</pre>&#26368;&#21518;&#65292;&#20351;&#29992; curl &#26816;&#26597; Flask &#24212;&#29992;&#31243;&#24207;&#26159;&#21542;&#22312;&#23481;&#22120;&#20869;&#27491;&#30830;&#36816;&#34892;&#65306;<pre class="prettyprint linenums">$ curl http://127.0.0.1:5000Hello Container World!</pre>&#29616;&#22312;&#65292;flaskapp_container &#27491;&#22312;&#36816;&#34892;&#24182;&#20934;&#22791;&#22909;&#36827;&#34892;&#27979;&#35797;&#65292;&#20320;&#21487;&#20197;&#20351;&#29992; Ctrl+C &#23558;&#20854;&#20572;&#27490;&#12290;&#21019;&#24314;&#27979;&#35797;&#33050;&#26412;&#22312;&#32534;&#20889;&#27979;&#35797;&#33050;&#26412;&#20043;&#21069;&#65292;&#24517;&#39035;&#23433;&#35013; conu&#12290;&#22312;&#20808;&#21069;&#21019;&#24314;&#30340; container_test &#30446;&#24405;&#20013;&#65292;&#36816;&#34892;&#20197;&#19979;&#21629;&#20196;&#12290;<pre class="prettyprint…
Greg Kroah-Hartman 解释内核社区是如何使 Linux 安全的

由于 Linux 使用量持续扩大,内核社区去提高这个世界上使用最广泛的技术 —— Linux 内核的安全性的重要性越来越高。Media

via https://linux.cn/article-10277-1.html
如何在 Linux 上安装设备驱动程序

学习 Linux 设备驱动如何工作,并知道如何使用它们。Media

via https://linux.cn/article-10278-1.html
&#22914;&#20309;&#22312; Linux &#19978;&#23433;&#35013;&#35774;&#22791;&#39537;&#21160;&#31243;&#24207;

&#23398;&#20064; Linux &#35774;&#22791;&#39537;&#21160;&#22914;&#20309;&#24037;&#20316;&#65292;&#24182;&#30693;&#36947;&#22914;&#20309;&#20351;&#29992;&#23427;&#20204;&#12290;<a href="https://dn-linuxcn.qbox.me/data/attachment/album/201811/25/225946aqxqufjcwjiwdwda.jpg">Media</a>&#23545;&#20110;&#19968;&#20010;&#29087;&#24713; Windows &#25110;&#32773; MacOS &#30340;&#20154;&#65292;&#24819;&#35201;&#20999;&#25442;&#21040; Linux&#65292;&#23427;&#20204;&#37117;&#20250;&#38754;&#20020;&#19968;&#20010;&#33392;&#24040;&#30340;&#38382;&#39064;&#23601;&#26159;&#24590;&#20040;&#23433;&#35013;&#21644;&#37197;&#32622;&#35774;&#22791;&#39537;&#21160;&#12290;&#36825;&#26159;&#21487;&#20197;&#29702;&#35299;&#30340;&#65292;&#22240;&#20026; Windows &#21644; MacOS &#37117;&#26377;&#19968;&#22871;&#26426;&#21046;&#25226;&#36825;&#20010;&#36807;&#31243;&#20570;&#24471;&#38750;&#24120;&#30340;&#21451;&#22909;&#12290;&#27604;&#22914;&#35828;&#65292;&#24403;&#20320;&#25554;&#20837;&#19968;&#20010;&#26032;&#30340;&#30828;&#20214;&#35774;&#22791;&#65292; Windows &#33021;&#22815;&#33258;&#21160;&#26816;&#27979;&#24182;&#20250;&#24377;&#20986;&#19968;&#20010;&#31383;&#21475;&#35810;&#38382;&#20320;&#26159;&#21542;&#35201;&#32487;&#32493;&#39537;&#21160;&#31243;&#24207;&#30340;&#23433;&#35013;&#12290;&#20320;&#20063;&#21487;&#20197;&#20174;&#32593;&#32476;&#19978;&#19979;&#36733;&#39537;&#21160;&#31243;&#24207;&#65292;&#20165;&#20165;&#38656;&#35201;&#21452;&#20987;&#35299;&#21387;&#25110;&#32773;&#26159;&#36890;&#36807;&#35774;&#22791;&#31649;&#29702;&#22120;&#23548;&#20837;&#39537;&#21160;&#31243;&#24207;&#21363;&#21487;&#12290;&#32780;&#36825;&#22312; Linux &#25805;&#20316;&#31995;&#32479;&#19978;&#24182;&#38750;&#36825;&#20040;&#31616;&#21333;&#12290;&#31532;&#19968;&#20010;&#21407;&#22240;&#26159;&#65292; Linux &#26159;&#19968;&#20010;&#24320;&#28304;&#30340;&#25805;&#20316;&#31995;&#32479;&#65292;&#25152;&#20197;&#26377; <a href="https://en.wikipedia.org/wiki/List_of_Linux_distributions">&#25968;&#30334;&#31181; Linux &#21457;&#34892;&#29256;&#30340;&#21464;&#20307;</a>&#12290;&#20063;&#23601;&#26159;&#35828;&#19981;&#21487;&#33021;&#20570;&#19968;&#20010;&#25351;&#21335;&#26469;&#36866;&#24212;&#25152;&#26377;&#30340; Linux &#21457;&#34892;&#29256;&#12290;&#22240;&#20026;&#27599;&#31181; Linux &#23433;&#35013;&#39537;&#21160;&#31243;&#24207;&#30340;&#36807;&#31243;&#37117;&#26377;&#24046;&#24322;&#12290;&#31532;&#20108;&#65292;&#22823;&#22810;&#25968;&#40664;&#35748;&#30340; Linux &#39537;&#21160;&#31243;&#24207;&#20063;&#37117;&#26159;&#24320;&#28304;&#30340;&#65292;&#24182;&#34987;&#38598;&#25104;&#21040;&#20102;&#31995;&#32479;&#20013;&#65292;&#36825;&#20351;&#24471;&#23433;&#35013;&#19968;&#20123;&#24182;&#26410;&#21253;&#21547;&#30340;&#39537;&#21160;&#31243;&#24207;&#21464;&#24471;&#38750;&#24120;&#22797;&#26434;&#65292;&#21363;&#20351;&#24050;&#32463;&#21487;&#20197;&#26816;&#27979;&#22823;&#22810;&#25968;&#30340;&#30828;&#20214;&#35774;&#22791;&#12290;&#31532;&#19977;&#65292;&#19981;&#21516;&#21457;&#34892;&#29256;&#30340;&#35768;&#21487;&#20063;&#26377;&#24046;&#24322;&#12290;&#20363;&#22914;&#65292;<a href="https://fedoraproject.org/wiki/Forbidden_items?rd=ForbiddenItems">Fedora &#31105;&#27490;&#20107;&#39033;</a> &#31105;&#27490;&#21253;&#21547;&#19987;&#26377;&#30340;&#12289;&#21463;&#27861;&#24459;&#20445;&#25252;&#65292;&#25110;&#32773;&#26159;&#36829;&#21453;&#32654;&#22269;&#27861;&#24459;&#30340;&#39537;&#21160;&#31243;&#24207;&#12290;&#32780; Ubuntu &#21017;&#35753;&#29992;&#25143;<a href="https://www.ubuntu.com/licensing">&#36991;&#20813;&#20351;&#29992;&#21463;&#27861;&#24459;&#20445;&#25252;&#25110;&#38381;&#28304;&#30340;&#30828;&#20214;&#35774;&#22791;</a>&#12290;&#20026;&#20102;&#26356;&#22909;&#30340;&#23398;&#20064; Linux &#39537;&#21160;&#31243;&#24207;&#26159;&#22914;&#20309;&#24037;&#20316;&#30340;&#65292;&#25105;…
Linux 中国翻译组成立项目管理委员会,向正规化管理迈出一步

我们在原有的核心成员、译者两层的组织结构的基础上,吸收其它开源组织的管理经验,成立了三层结构的项目管理结构。Media

via https://linux.cn/article-10279-1.html
Linux &#20013;&#22269;&#32763;&#35793;&#32452;&#25104;&#31435;&#39033;&#30446;&#31649;&#29702;&#22996;&#21592;&#20250;&#65292;&#21521;&#27491;&#35268;&#21270;&#31649;&#29702;&#36808;&#20986;&#19968;&#27493;

<a href="https://dn-linuxcn.qbox.me/data/attachment/album/201811/26/133144ba2bcf5he9h9fasv.jpg">Media</a><a href="https://linux.cn/lctt/">Linux &#20013;&#22269;&#32763;&#35793;&#32452;&#65288;LCTT&#65289;</a>&#25104;&#31435;<a href="https://linux.cn/article-9999-1.html">&#24050;&#36926;&#20116;&#24180;</a>&#20102;&#65292;&#36825;&#20123;&#24180;&#26469;&#65292;&#25105;&#20204;&#22312;&#19981;&#26029;&#22320;&#25913;&#36827;&#25105;&#20204;&#30340;&#27969;&#31243;&#12289;&#31649;&#29702;&#12290;&#37492;&#20110;&#24403;&#21069;&#30340;&#20154;&#21592;&#35268;&#27169;&#30340;&#22686;&#22823;&#21644;&#20107;&#21153;&#30340;&#32321;&#22810;&#65292;&#25105;&#20204;&#35748;&#20026;&#38656;&#35201;&#23558;&#31649;&#29702;&#27700;&#24179;&#26356;&#19978;&#19968;&#20010;&#21488;&#38454;&#12290;&#22240;&#27492;&#65292;&#25105;&#20204;&#22312;&#21407;&#26377;&#30340;&#26680;&#24515;&#25104;&#21592;&#12289;&#35793;&#32773;&#20004;&#23618;&#30340;&#32452;&#32455;&#32467;&#26500;&#30340;&#22522;&#30784;&#19978;&#65292;&#21560;&#25910;&#20854;&#23427;&#24320;&#28304;&#32452;&#32455;&#30340;&#31649;&#29702;&#32463;&#39564;&#65292;&#25104;&#31435;&#20102;&#19977;&#23618;&#32467;&#26500;&#30340;&#39033;&#30446;&#31649;&#29702;&#32467;&#26500;&#12290;&#26032;&#30340;&#31649;&#29702;&#23618;&#32423;&#20026;&#65306;<strong>&#35793;&#32773;</strong>&#65306;&#21152;&#20837; LCTT &#32763;&#35793;&#27963;&#21160;&#20013;&#65292;&#24182;&#26377;&#23454;&#38469;&#36129;&#29486;&#32773;&#21363;&#20026;&#35793;&#32773;&#12290;&#39044;&#22791;&#35793;&#32773;&#65306;&#21152;&#20837; LCTT &#65292;&#20294;&#23578;&#26410;&#36827;&#34892;&#23454;&#38469;&#36129;&#29486;&#32773;&#65292;&#35270;&#20026;&#39044;&#22791;&#35793;&#32773;&#12290;<strong>&#26680;&#24515;&#25104;&#21592;</strong>&#65306;&#20570;&#20986;&#37325;&#22823;&#36129;&#29486;&#32773;&#21015;&#20837;&#26680;&#24515;&#25104;&#21592;&#12290;&#21487;&#25191;&#34892;&#26085;&#24120;&#31649;&#29702;&#20219;&#21153;&#12290;&#33635;&#35465;&#25104;&#21592;&#65306;&#38271;&#26399;&#20241;&#30496;&#30340;&#26680;&#24515;&#25104;&#21592;&#21015;&#20837;&#33635;&#35465;&#25104;&#21592;&#12290;&#33635;&#35465;&#25104;&#21592;&#34987;&#25910;&#22238;&#20889;&#20837;&#26435;&#38480;&#65292;&#20294;&#20445;&#30041;&#25237;&#31080;&#26435;&#21644;&#21382;&#21490;&#33635;&#35465;&#12290;<strong>&#31649;&#29702;&#22996;&#21592;</strong>&#65306;&#30001;&#26680;&#24515;&#25104;&#21592;&#20013;&#36873;&#20986;&#65292;&#23545; LCTT &#20107;&#21153;&#36827;&#34892;&#34920;&#20915;&#21644;&#20915;&#31574;&#65292;&#24182;&#36127;&#36131;&#26085;&#24120;&#31649;&#29702;&#20219;&#21153;&#30340;&#26368;&#32456;&#25191;&#34892;&#12290;&#20027;&#24109;&#65306;&#30001;&#31649;&#29702;&#22996;&#21592;&#20013;&#36873;&#20986;&#65292;&#30001;&#29616;&#20219;&#31649;&#29702;&#22996;&#21592;&#36827;&#34892;&#36873;&#20030;&#12290;&#31649;&#29702;&#22996;&#21592;&#32452;&#25104;&#31649;&#29702;&#22996;&#21592;&#20250;&#65288;PMC&#65289;&#65292;&#23545; LCTT &#30340;&#21457;&#23637;&#20107;&#21153;&#36827;&#34892;&#20915;&#31574;&#21644;&#25191;&#34892;&#12290;&#20027;&#35201;&#36127;&#36131;&#65306;&#21046;&#23450;&#21644;&#20248;&#21270;&#36129;&#29486;&#27969;&#31243;&#21644;&#21046;&#24230;&#25552;&#21517;&#21644;&#25237;&#31080; LCTT &#26680;&#24515;&#25104;&#21592;&#12289;&#33635;&#35465;&#25104;&#21592;&#21644;&#20027;&#24109;&#25104;&#21592;&#31649;&#29702;&#20828;&#24213;&#36127;&#36131;&#26680;&#24515;&#25104;&#21592;&#30340;&#31649;&#29702;&#20107;&#21153;&#32780;&#26680;&#24515;&#35793;&#32773;&#20316;&#20026; LCTT &#30340;&#20013;&#22362;&#21147;&#37327;&#65292;&#38500;&#20102;&#21442;&#19982;&#32763;&#35793;&#27963;&#21160;&#20043;&#22806;&#65292;&#36824;&#20855;&#26377;&#22914;&#19979;&#32844;&#26435;&#65306;&#2…
在 Linux 上自定义 bash 命令提示符

尽管很多插件或工具都可以很轻易地满足这一需求,但我们也可以不使用插件和工具,自己手动自定义一些基本的显示方式,例如添加或者修改某些元素、更改前景色、更改背景色等等。Media

via https://linux.cn/article-10280-1.html
&#22312; Linux &#19978;&#33258;&#23450;&#20041; bash &#21629;&#20196;&#25552;&#31034;&#31526;

<a href="https://dn-linuxcn.qbox.me/data/attachment/album/201811/27/111117mkydge86ndem2xfp.jpg">Media</a>&#20247;&#25152;&#21608;&#30693;&#65292;<strong>bash</strong>&#65288;the <strong>B</strong>ourne-<strong>A</strong>gain <strong>Sh</strong>ell&#65289;&#26159;&#30446;&#21069;&#32477;&#22823;&#22810;&#25968; Linux &#21457;&#34892;&#29256;&#20351;&#29992;&#30340;&#40664;&#35748; shell&#12290;&#26412;&#25991;&#23558;&#20250;&#20171;&#32461;&#22914;&#20309;&#36890;&#36807;&#28155;&#21152;&#39068;&#33394;&#21644;&#26679;&#24335;&#26469;&#33258;&#23450;&#20041; bash &#21629;&#20196;&#25552;&#31034;&#31526;&#30340;&#26174;&#31034;&#12290;&#23613;&#31649;&#24456;&#22810;&#25554;&#20214;&#25110;&#24037;&#20855;&#37117;&#21487;&#20197;&#24456;&#36731;&#26131;&#22320;&#28385;&#36275;&#36825;&#19968;&#38656;&#27714;&#65292;&#20294;&#25105;&#20204;&#20063;&#21487;&#20197;&#19981;&#20351;&#29992;&#25554;&#20214;&#21644;&#24037;&#20855;&#65292;&#33258;&#24049;&#25163;&#21160;&#33258;&#23450;&#20041;&#19968;&#20123;&#22522;&#26412;&#30340;&#26174;&#31034;&#26041;&#24335;&#65292;&#20363;&#22914;&#28155;&#21152;&#25110;&#32773;&#20462;&#25913;&#26576;&#20123;&#20803;&#32032;&#12289;&#26356;&#25913;&#21069;&#26223;&#33394;&#12289;&#26356;&#25913;&#32972;&#26223;&#33394;&#31561;&#31561;&#12290;&#22312; Linux &#20013;&#33258;&#23450;&#20041; bash &#21629;&#20196;&#25552;&#31034;&#31526;&#22312; bash &#20013;&#65292;&#25105;&#20204;&#21487;&#20197;&#36890;&#36807;&#26356;&#25913; $PS1 &#29615;&#22659;&#21464;&#37327;&#30340;&#20540;&#26469;&#33258;&#23450;&#20041; bash &#21629;&#20196;&#25552;&#31034;&#31526;&#12290;&#19968;&#33324;&#24773;&#20917;&#19979;&#65292;bash &#21629;&#20196;&#25552;&#31034;&#31526;&#20250;&#26159;&#20197;&#19979;&#36825;&#26679;&#30340;&#24418;&#24335;&#65306;<a href="https://dn-linuxcn.qbox.me/data/attachment/album/201811/27/111320oltgbmz8l3eg891u.png">Media</a>&#22312;&#19978;&#22270;&#36825;&#31181;&#40664;&#35748;&#26174;&#31034;&#24418;&#24335;&#24403;&#20013;&#65292;“sk” &#26159;&#25105;&#30340;&#29992;&#25143;&#21517;&#65292;&#32780; “ubuntuserver” &#26159;&#25105;&#30340;&#20027;&#26426;&#21517;&#12290;&#21482;&#35201;&#25554;&#20837;&#19968;&#20123;&#20197;&#21453;&#26012;&#26464;&#24320;&#22836;&#30340;&#29305;&#27530;&#36716;&#20041;&#23383;&#31526;&#20018;&#65292;&#23601;&#21487;&#20197;&#25353;&#29031;&#20320;&#30340;&#21916;&#22909;&#20462;&#25913;&#21629;&#20196;&#25552;&#31034;&#31526;&#20102;&#12290;&#19979;&#38754;&#25105;&#26469;&#20030;&#20960;&#20010;&#20363;&#23376;&#12290;&#22312;&#24320;&#22987;&#20043;&#21069;&#65292;&#25105;&#24378;&#28872;&#24314;&#35758;&#20320;&#39044;&#20808;&#22791;&#20221; ~/.bashrc &#25991;&#20214;&#12290;<pre class="prettyprint linenums">$ cp ~/.bashrc ~/.bashrc.bak</pre>&#26356;&#25913; bash &#21629;&#20196;&#25552;&#31034;&#31526;&#20013;&#30340; username@hostname &#37096;&#20998;&#22914;&#19978;&#25152;&#31034;&#65292;bash &#21629;&#20196;&#25552;&#31034;&#31526;&#19968;&#33324;&#37117;&#24102;&#26377; “username@hostname” &#37096;&#20998;&#65292;&#36825;&#20010;&#37096;&#20998;&#26159;&#21487;&#20197;&#20462;&#25913;&#30340;&#12290;&#21482;&#38656;&#35201;&#32534;&#36753; ~/.bashrc &#25991;&#20214;&#65306;<pre class="prettyprint linenums">$ vi ~/.bashrc</pre>&#22312;&#25991;&#20214;&#30340;&#26368;&#21518;&#28155;&#21152;&#19968;&#34892;&#65306;<pre class="prettyprint linenums">PS1="ostechnix> "</pre>&#23558;&#19978;&#38754;&#30340; “ostechnix” &#26367;&#25442;&#20026;&#20219;&#24847;&#19968;&#20010;&#20320;&#24819;&#20351;&#29992;&#30340;&#21333;&#35789;&#65292;&#28982;&#21518;&#25353; ESC &#24182;&#36755;&#20837; :wq &#20445;&#23384;&#12289;&#36864;&#20986;&#25991;&#20214;&#12290;&#25191;&#34892;&#20197;&#19979;&#21629;&#20196;&#20351;&#21018;&#25165;&#30340;&#20462;&#25913;&#29983;&#25928;&#65306;<pre class="prettyprint linenums">$ source ~/.bashrc</pre>&#20320;&#23601;…
如何在 Anbox 上安装 Google Play 商店及启用 ARM 支持

Anbox (Anroid in a Box)是一个自由开源工具,它允许你在 Linux 上运行 Android 应用程序。默认情况下,Anbox 没有 Google Play 商店或 ARM 应用支持。Media

via https://linux.cn/article-10281-1.html
&#22914;&#20309;&#22312; Anbox &#19978;&#23433;&#35013; Google Play &#21830;&#24215;&#21450;&#21551;&#29992; ARM &#25903;&#25345;

<a href="https://dn-linuxcn.qbox.me/data/attachment/album/201811/27/115100j1mj9blltf1njvav.png">Media<a href="https://anbox.io/">Anbox &#65288;Anroid in a Box&#65289;&#26159;&#19968;&#20010;&#33258;&#30001;&#24320;&#28304;&#24037;&#20855;&#65292;&#23427;&#20801;&#35768;&#20320;&#22312; Linux &#19978;&#36816;&#34892; Android &#24212;&#29992;&#31243;&#24207;&#12290;&#23427;&#30340;&#24037;&#20316;&#21407;&#29702;&#26159;&#22312; LXC &#23481;&#22120;&#20013;&#36816;&#34892; Android &#36816;&#34892;&#26102;&#29615;&#22659;&#65292;&#37325;&#26032;&#21019;&#24314; Android &#30340;&#30446;&#24405;&#32467;&#26500;&#20316;&#20026;&#21487;&#25346;&#36733;&#30340; loop &#38236;&#20687;&#65292;&#21516;&#26102;&#20351;&#29992;&#26412;&#26426; Linux &#20869;&#26680;&#26469;&#25191;&#34892;&#24212;&#29992;&#12290;&#25454;&#20854;&#32593;&#31449;&#25152;&#36848;&#65292;&#23427;&#30340;&#20027;&#35201;&#29305;&#24615;&#26159;&#23433;&#20840;&#24615;&#12289;&#24615;&#33021;&#12289;&#38598;&#25104;&#21644;&#36235;&#21516;&#65288;&#19981;&#21516;&#22806;&#24418;&#23610;&#23544;&#32553;&#25918;&#65289;&#12290;&#20351;&#29992; Anbox&#65292;&#27599;&#20010; Android &#24212;&#29992;&#25110;&#28216;&#25103;&#23601;&#20687;&#31995;&#32479;&#24212;&#29992;&#19968;&#26679;&#37117;&#22312;&#19968;&#20010;&#21333;&#29420;&#30340;&#31383;&#21475;&#20013;&#21551;&#21160;&#65292;&#23427;&#20204;&#30340;&#34892;&#20026;&#25110;&#22810;&#25110;&#23569;&#31867;&#20284;&#20110;&#24120;&#35268;&#31383;&#21475;&#65292;&#26174;&#31034;&#22312;&#21551;&#21160;&#22120;&#20013;&#65292;&#21487;&#20197;&#24179;&#38138;&#31561;&#31561;&#12290;&#40664;&#35748;&#24773;&#20917;&#19979;&#65292;Anbox &#27809;&#26377; Google Play &#21830;&#24215;&#25110; ARM &#24212;&#29992;&#25903;&#25345;&#12290;&#35201;&#23433;&#35013;&#24212;&#29992;&#65292;&#20320;&#24517;&#39035;&#19979;&#36733;&#27599;&#20010;&#24212;&#29992;&#30340; APK &#24182;&#20351;&#29992; adb &#25163;&#21160;&#23433;&#35013;&#12290;&#27492;&#22806;&#65292;&#40664;&#35748;&#24773;&#20917;&#19979;&#19981;&#33021;&#20351;&#29992; Anbox &#23433;&#35013; ARM &#24212;&#29992;&#25110;&#28216;&#25103; —— &#23581;&#35797;&#23433;&#35013; ARM &#24212;&#29992;&#20250;&#26174;&#31034;&#20197;&#19979;&#38169;&#35823;&#65306;<pre class="prettyprint linenums">Failed to install PACKAGE.NAME.apk: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]</pre>&#20320;&#21487;&#20197;&#22312; Anbox &#20013;&#25163;&#21160;&#35774;&#32622; Google Play &#21830;&#24215;&#21644; ARM &#24212;&#29992;&#25903;&#25345;&#65288;&#36890;&#36807; libhoudini&#65289;&#65292;&#20294;&#36825;&#26159;&#19968;&#20010;&#38750;&#24120;&#22797;&#26434;&#30340;&#36807;&#31243;&#12290;&#20026;&#20102;&#26356;&#23481;&#26131;&#22320;&#22312; Anbox &#19978;&#23433;&#35013; Google Play &#21830;&#24215;&#21644; Google Play &#26381;&#21153;&#65292;&#24182;&#35753;&#23427;&#25903;&#25345; ARM &#24212;&#29992;&#31243;&#24207;&#21644;&#28216;&#25103;&#65288;&#20351;&#29992; libhoudini&#65289;&#65292;<a href="https://geeks-r-us.de/2017/08/26/android-apps-auf-dem-linux-desktop/">geeks-r-us.de&#65288;&#25991;&#31456;&#26159;&#24503;&#35821;&#65289;&#19978;&#30340;&#20154;&#21019;&#24314;&#20102;&#19968;&#20010;&#33258;&#21160;&#25191;&#34892;&#36825;&#20123;&#20219;&#21153;&#30340;&#33050;&#26412;&#12290;&#22312;&#20351;&#29992;&#20043;&#21069;&#65292;&#25105;&#24819;&#26126;&#30830;&#25351;&#20986;&#65292;&#21363;&#20351;&#22312;&#38598;&#25104; libhoudini &#26469;&#25903;&#25345; ARM &#21518;&#65292;&#20063;&#24182;&#38750;&#25152;&#26377; Android &#24212;&#29992;&#21644;&#28216;&#25103;&#37117;&#33021;&#22312; Anbox &#20013;&#36816;&#34892;&#12290;&#26576;&#20123; Android &#24212;&#29992;&#21644;&#28216;&#25103;&#21487;&#33021;&#26681;&#26412;&#19981;&#20250;&#20986;&#29616;&#22312; Google Play &#21830;&#…
2018 重温 Unix 哲学

在现代微服务环境中,构建小型、单一的应用程序的旧策略又再一次流行了起来。Media

via https://linux.cn/article-10282-1.html
2018 &#37325;&#28201; Unix &#21746;&#23398;

&#22312;&#29616;&#20195;&#24494;&#26381;&#21153;&#29615;&#22659;&#20013;&#65292;&#26500;&#24314;&#23567;&#22411;&#12289;&#21333;&#19968;&#30340;&#24212;&#29992;&#31243;&#24207;&#30340;&#26087;&#31574;&#30053;&#21448;&#20877;&#19968;&#27425;&#27969;&#34892;&#20102;&#36215;&#26469;&#12290;<a href="https://dn-linuxcn.qbox.me/data/attachment/album/201811/27/123158rm6qqqjgdffp16dm.jpg">Media</a>1984 &#24180;&#65292;Rob Pike &#21644; Brian W. Kernighan &#22312; AT&T &#36125;&#23572;&#23454;&#39564;&#23460;&#25216;&#26415;&#26399;&#21002;&#19978;&#21457;&#34920;&#20102;&#21517;&#20026; “<a href="http://harmful.cat-v.org/cat-v/">Unix &#29615;&#22659;&#32534;&#31243;</a>” &#30340;&#25991;&#31456;&#65292;&#20854;&#20013;&#20182;&#20204;&#20351;&#29992; BSD &#30340; cat -v &#20363;&#23376;&#26469;&#35748;&#35777; Unix &#21746;&#23398;&#12290;&#31616;&#32780;&#35328;&#20043;&#65292;Unix &#21746;&#23398;&#26159;&#65306;&#26500;&#24314;&#23567;&#22411;&#12289;&#21333;&#19968;&#30340;&#24212;&#29992;&#31243;&#24207; —— &#19981;&#31649;&#29992;&#20160;&#20040;&#35821;&#35328; —— &#21482;&#20570;&#19968;&#20214;&#23567;&#32780;&#32654;&#30340;&#20107;&#24773;&#65292;&#29992; stdin / stdout &#36827;&#34892;&#36890;&#20449;&#65292;&#24182;&#36890;&#36807;&#31649;&#36947;&#36827;&#34892;&#36830;&#25509;&#12290;&#21548;&#36215;&#26469;&#26159;&#19981;&#26159;&#26377;&#28857;&#32819;&#29087;&#65311;&#26159;&#30340;&#65292;&#25105;&#20063;&#36825;&#20040;&#35748;&#20026;&#12290;&#36825;&#23601;&#26159; James Lewis &#21644; Martin Fowler &#32473;&#20986;&#30340; <a href="https://martinfowler.com/articles/microservices.html">&#24494;&#26381;&#21153;&#30340;&#23450;&#20041;</a> &#12290;&#31616;&#21333;&#26469;&#35828;&#65292;&#24494;&#26381;&#21153;&#26550;&#26500;&#30340;&#39118;&#26684;&#26159;&#23558;&#21333;&#20010; &#24212;&#29992;&#31243;&#24207;&#24320;&#21457;&#20026;&#19968;&#22871;&#23567;&#22411;&#26381;&#21153;&#30340;&#26041;&#27861;&#65292;&#27599;&#20010;&#26381;&#21153;&#37117;&#36816;&#34892;&#22312;&#23427;&#30340;&#36827;&#31243;&#20013;&#65292;&#24182;&#29992;&#36731;&#37327;&#32423;&#26426;&#21046;&#36827;&#34892;&#36890;&#20449;&#65292;&#36890;&#24120;&#26159; HTTP &#36164;&#28304; API &#12290;&#34429;&#28982;&#19968;&#20010; *nix &#31243;&#24207;&#25110;&#32773;&#26159;&#19968;&#20010;&#24494;&#26381;&#21153;&#26412;&#36523;&#21487;&#33021;&#38750;&#24120;&#23616;&#38480;&#29978;&#33267;&#19981;&#26159;&#24456;&#26377;&#29992;&#65292;&#20294;&#26159;&#24403;&#36825;&#20123;&#29420;&#31435;&#24037;&#20316;&#30340;&#21333;&#20803;&#32452;&#21512;&#22312;&#19968;&#36215;&#30340;&#26102;&#20505;&#23601;&#26174;&#31034;&#20986;&#20102;&#23427;&#20204;&#30495;&#27491;&#30340;&#22909;&#22788;&#21644;&#24378;&#22823;&#12290;*nix&#31243;&#24207; vs &#24494;&#26381;&#21153;&#19979;&#38754;&#30340;&#34920;&#26684;&#23545;&#27604;&#20102; *nix &#29615;&#22659;&#20013;&#30340;&#31243;&#24207;&#65288;&#20363;&#22914; cat &#25110; lsof&#65289;&#19982;&#24494;&#26381;&#21153;&#29615;&#22659;&#20013;&#30340;&#31243;&#24207;&#12290; *nix &#31243;&#24207;&#24494;&#26381;&#21153;&#25191;&#34892;&#21333;&#20803;&#31243;&#24207;&#20351;&#29992; stdin/stdout&#20351;&#29992; HTTP &#25110; gRPC API&#25968;&#25454;&#27969;&#31649;&#36947;&#65311;&#21487;&#37197;&#32622;&#21644;&#21442;&#25968;&#21270;&#21629;&#20196;&#34892;&#21442;&#25968;&#12289;&#29615;&#22659;&#21464;&#37327;&#21644;&#37197;&#32622;&#25991;&#20214;JSON/YAML &#25991;&#26723;&#21457;&#29616;&#21253;&#31649;&#29702;&#22120;&#12289;man&#12289;makeDNS&#12289;&#29615;&#22659;&#21464;&#37327;&#12289;OpenAPI&#35753;&#25105;&#20204;&#35814;&#32454;&#30340;&#30475;&#30475;&#27599;&#19968;&#34892;&#12290;&#25191;&#34892;&#21333;&#20803;*nix &#31995;&#32479;&#65288;&#22914; Linux&#65289;&#20013;&#30340;&#25191;&#34892;&#21333;&#20803;&#26159;&#19968;&#20010;&#21487;&#25191;&#34892;&#30340;&#25991;&#20214;&#65288;&#20108;&#36827;&#21046;&#25110;&#32773;…
举例说明 alias 和 unalias 命令

一个记住这些如此长的命令的简便方式就是为这些命令创建一个别名。你可以为任何经常重复调用的常用命令创建别名,而不仅仅是长命令。Media

via https://linux.cn/article-10283-1.html
&#20030;&#20363;&#35828;&#26126; alias &#21644; unalias &#21629;&#20196;

<a href="https://dn-linuxcn.qbox.me/data/attachment/album/201811/27/224429noagpp9h5hbi8bk8.jpg">Media</a>&#22914;&#26524;&#19981;&#26159;&#19968;&#20010;&#21629;&#20196;&#34892;&#37325;&#24230;&#29992;&#25143;&#30340;&#35805;&#65292;&#36807;&#20102;&#19968;&#27573;&#26102;&#38388;&#20043;&#21518;&#65292;&#20320;&#23601;&#21487;&#33021;&#24050;&#32463;&#24536;&#35760;&#20102;&#36825;&#20123;&#22797;&#26434;&#19988;&#20887;&#38271;&#30340; Linux &#21629;&#20196;&#20102;&#12290;&#24403;&#28982;&#65292;&#26377;&#24456;&#22810;&#26041;&#27861;&#21487;&#20197;&#35753;&#20320; <a href="https://www.ostechnix.com/easily-recall-forgotten-linux-commands/">&#22238;&#24819;&#36215;&#36951;&#24536;&#30340;&#21629;&#20196;</a>&#12290;&#20320;&#21487;&#20197;&#31616;&#21333;&#30340; <a href="https://www.ostechnix.com/save-commands-terminal-use-demand/">&#20445;&#23384;&#24120;&#29992;&#30340;&#21629;&#20196;</a> &#28982;&#21518;&#25353;&#38656;&#20351;&#29992;&#12290;&#20063;&#21487;&#20197;&#22312;&#32456;&#31471;&#37324; <a href="https://www.ostechnix.com/bookmark-linux-commands-easier-repeated-invocation/">&#26631;&#35760;&#37325;&#35201;&#30340;&#21629;&#20196;</a>&#65292;&#28982;&#21518;&#22312;&#20219;&#20309;&#26102;&#20505;&#20320;&#24819;&#35201;&#30340;&#26102;&#38388;&#20351;&#29992;&#23427;&#20204;&#12290;&#32780;&#19988;&#65292;Linux &#26377;&#19968;&#20010;&#20869;&#24314;&#21629;&#20196; history &#21487;&#20197;&#24110;&#21161;&#20320;&#35760;&#24518;&#36825;&#20123;&#21629;&#20196;&#12290;&#21478;&#22806;&#19968;&#20010;&#35760;&#20303;&#36825;&#20123;&#22914;&#27492;&#38271;&#30340;&#21629;&#20196;&#30340;&#31616;&#20415;&#26041;&#24335;&#23601;&#26159;&#20026;&#36825;&#20123;&#21629;&#20196;&#21019;&#24314;&#19968;&#20010;&#21035;&#21517;&#12290;&#20320;&#21487;&#20197;&#20026;&#20219;&#20309;&#32463;&#24120;&#37325;&#22797;&#35843;&#29992;&#30340;&#24120;&#29992;&#21629;&#20196;&#21019;&#24314;&#21035;&#21517;&#65292;&#32780;&#19981;&#20165;&#20165;&#26159;&#38271;&#21629;&#20196;&#12290;&#36890;&#36807;&#36825;&#31181;&#26041;&#27861;&#65292;&#20320;&#19981;&#24517;&#20877;&#36807;&#22810;&#22320;&#35760;&#24518;&#36825;&#20123;&#21629;&#20196;&#12290;&#36825;&#31687;&#25991;&#31456;&#20013;&#65292;&#25105;&#20204;&#23558;&#20250;&#22312; Linux &#29615;&#22659;&#19979;&#20030;&#20363;&#35828;&#26126; alias &#21644; unalias &#21629;&#20196;&#12290;alias &#21629;&#20196;alias &#20351;&#29992;&#19968;&#20010;&#29992;&#25143;&#33258;&#23450;&#20041;&#30340;&#23383;&#31526;&#20018;&#26469;&#20195;&#26367;&#19968;&#20010;&#25110;&#32773;&#19968;&#20018;&#21629;&#20196;&#65288;&#21253;&#25324;&#22810;&#20010;&#36873;&#39033;&#12289;&#21442;&#25968;&#65289;&#12290;&#36825;&#20010;&#23383;&#31526;&#20018;&#21487;&#20197;&#26159;&#19968;&#20010;&#31616;&#21333;&#30340;&#21517;&#23383;&#25110;&#32773;&#32553;&#20889;&#65292;&#19981;&#31649;&#36825;&#20010;&#21629;&#20196;&#21407;&#26469;&#22810;&#20040;&#22797;&#26434;&#12290;alias &#21629;&#20196;&#24050;&#32463;&#39044;&#35013;&#22312; shell&#65288;&#21253;&#25324; BASH&#12289;Csh&#12289;Ksh &#21644; Zsh &#31561;&#65289; &#24403;&#20013;&#12290;alias &#30340;&#36890;&#29992;&#35821;&#27861;&#26159;&#65306;<pre class="prettyprint linenums">alias [alias-name[=string]...]</pre>&#25509;&#19979;&#26469;&#30475;&#20960;&#20010;&#20363;&#23376;&#12290;&#21015;&#20986;&#21035;&#21517;&#21487;&#33021;&#22312;&#20320;&#30340;&#31995;&#32479;&#20013;&#24050;&#32463;&#35774;&#32622;&#20102;&#19968;&#20123;&#21035;&#21517;&#12290;&#26377;&#20123;&#24212;&#29992;&#22312;&#20320;&#23433;&#35013;&#23427;&#20204;&#30340;&#26102;&#20505;&#21487;&#33021;&#24050;&#32463;&#33258;&#21160;&#21019;&#24314;&#20102;&#21035;&#21517;&#12290;&#35201;&#26597;&#30475;&#24050;&#32463;&#23384;&#22312;&#30340;&#21035;&#21517;&#65292;&#36816;&#34892;&#65306;<pre class="prettyprint linenums">$ alias</pre>&#25110;&#32773;&#65292;<pre class="prettyprint…
如何在终端中浏览 Stack Overflow

你可以如你在 Google 搜索中那样直接用英语查询,然后它会使用 Google 和 Stackoverflow API 来搜索给定的查询。Media

via https://linux.cn/article-10284-1.html
&#22914;&#20309;&#22312;&#32456;&#31471;&#20013;&#27983;&#35272; Stack Overflow

<a href="https://dn-linuxcn.qbox.me/data/attachment/album/201811/27/234754jwxn6uz09e515frm.png">Media</a>&#21069;&#27573;&#26102;&#38388;&#65292;&#25105;&#20204;&#20889;&#20102;&#19968;&#31687;&#20851;&#20110; <a href="https://www.ostechnix.com/search-browse-stack-overflow-website-commandline/">SoCLI</a> &#30340;&#25991;&#31456;&#65292;&#23427;&#26159;&#19968;&#20010;&#20174;&#21629;&#20196;&#34892;&#25628;&#32034;&#21644;&#27983;&#35272; Stack Overflow &#32593;&#31449;&#30340; python &#33050;&#26412;&#12290;&#20170;&#22825;&#65292;&#25105;&#20204;&#23558;&#35752;&#35770;&#19968;&#20010;&#21517;&#20026; “how2” &#30340;&#31867;&#20284;&#24037;&#20855;&#12290;&#23427;&#26159;&#19968;&#20010;&#21629;&#20196;&#34892;&#31243;&#24207;&#65292;&#21487;&#20197;&#20174;&#32456;&#31471;&#27983;&#35272; Stack Overflow&#12290;&#20320;&#21487;&#20197;&#22914;&#20320;&#22312; <a href="https://www.ostechnix.com/google-search-navigator-enhance-keyboard-navigation-in-google-search/">Google &#25628;&#32034;</a>&#20013;&#37027;&#26679;&#30452;&#25509;&#29992;&#33521;&#35821;&#26597;&#35810;&#65292;&#28982;&#21518;&#23427;&#20250;&#20351;&#29992; Google &#21644; Stackoverflow API &#26469;&#25628;&#32034;&#32473;&#23450;&#30340;&#26597;&#35810;&#12290;&#23427;&#26159;&#20351;&#29992; NodeJS &#32534;&#20889;&#30340;&#33258;&#30001;&#24320;&#28304;&#31243;&#24207;&#12290;&#20351;&#29992; how2 &#20174;&#32456;&#31471;&#27983;&#35272; Stack Overflow&#30001;&#20110; how2 &#26159;&#19968;&#20010; NodeJS &#21253;&#65292;&#25105;&#20204;&#21487;&#20197;&#20351;&#29992; Npm &#21253;&#31649;&#29702;&#22120;&#23433;&#35013;&#23427;&#12290;&#22914;&#26524;&#20320;&#23578;&#26410;&#23433;&#35013; Npm &#21644; NodeJS&#65292;&#35831;&#21442;&#32771;&#20197;&#19979;&#25351;&#21335;&#12290;&#22312;&#23433;&#35013; Npm &#21644; NodeJS &#21518;&#65292;&#36816;&#34892;&#20197;&#19979;&#21629;&#20196;&#23433;&#35013; how2&#12290;<pre class="prettyprint linenums">$ npm install -g how2</pre>&#29616;&#22312;&#35753;&#25105;&#20204;&#30475;&#19979;&#22914;&#20309;&#20351;&#29992;&#36825;&#20010;&#31243;&#24207;&#27983;&#35272; Stack Overflow&#12290;&#20351;&#29992; how2 &#25628;&#32034; Stack Overflow &#31449;&#28857;&#30340;&#20856;&#22411;&#29992;&#27861;&#26159;&#65306;<pre class="prettyprint linenums">$ how2 <search-query></pre>&#20363;&#22914;&#65292;&#25105;&#23558;&#25628;&#32034;&#22914;&#20309;&#21019;&#24314; tgz &#23384;&#26723;&#12290;<pre class="prettyprint linenums">$ how2 create archive tgz</pre>&#21710;&#21568;&#65281;&#25105;&#25910;&#21040;&#20197;&#19979;&#38169;&#35823;&#12290;<pre class="prettyprint linenums">/home/sk/.nvm/versions/node/v9.11.1/lib/node_modules/how2/node_modules/devnull/transports/transport.js:59Transport.prototype.__proto__ = EventEmitter.prototype; ^ TypeError: Cannot read property 'prototype' of undefined at Object.<anonymous> (/home/sk/.nvm/versions/node/v9.11.1/lib/node_modules/how2/node_modules/devnull/transports/transport.js:59:46) at Module._compile (internal/modules/cjs/loader.js:654:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10) at Module.load (internal/modules/cjs/loader.js:566:32) at tryModuleLoad (internal/modules/cjs/loader.js:506:12) at Function.Module._load (internal/modules/cjs/loader.js:498:3) at Module.require (internal/modules/cjs/loader.js:598:17) at require (internal/modules/cjs/helpers.js:11:18) at Object.<anonymous> (/home/sk/.nvm/versions/node/v9.11.1/lib/node_modules/how2/node_modules/devnull/transports/stream.js:8:17) at Module._compile (internal/modules/cjs/loader.js:654:30)</pre>&#25105;&#21487;&#33021;&#36935;&#21040;&#20102;&#19968;&#20010; bug&#12290;&#25105;&#24076;&#26395;&#23427;&#22312;&#26410;&#26469;&#29256;&#26412;&#20013;&#24471;&#21040;&#20462;&#22797;&#12290;&#20294;&#26159;&#65292;&#25105;&#22312;<a href="https://github.com/santinic/how2/issues/79">&#36825;&#37324;</a>&#25214;&#21040;…