diff --git a/.gitignore b/.gitignore index fdb6fb3f02..5786eaea13 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.md~ members.md *.html +*.bak diff --git a/published/10 Database Tools For Linux Users To Use!.md b/published/201406/10 Database Tools For Linux Users To Use!.md similarity index 100% rename from published/10 Database Tools For Linux Users To Use!.md rename to published/201406/10 Database Tools For Linux Users To Use!.md diff --git a/translated/talk/10 Linux Platforms Meant For Embedded Systems.md b/published/201406/10 Linux Platforms Meant For Embedded Systems.md similarity index 68% rename from translated/talk/10 Linux Platforms Meant For Embedded Systems.md rename to published/201406/10 Linux Platforms Meant For Embedded Systems.md index 76e42fdeec..329345b9d4 100644 --- a/translated/talk/10 Linux Platforms Meant For Embedded Systems.md +++ b/published/201406/10 Linux Platforms Meant For Embedded Systems.md @@ -1,8 +1,7 @@ 10款专为嵌入式系统打造的Linux平台 - ========================================== -Linux 有着广泛的用途。该平台被许多简单的家用电器所使用,同时它也深受程序员和黑客们的青睐。此外,Linux 还广泛地应用在嵌入式系统中,有一系列专门适用于此类系统的发行版。我们将为大家推荐十个非常优秀的专为嵌入式系统发行的linux版本! +Linux 有着广泛的用途。该平台用于很多家庭的简单使用,同时它也深受程序员和黑客们的青睐。此外,Linux 还广泛地应用在嵌入式系统中,有一系列专门适用于此类系统的发行版。我们将为大家推荐十个非常优秀的专为嵌入式系统发行的linux版本! ![] (http://www.efytimes.com/admin/useradmin/photo/UJVP24130PM532014.jpeg) @@ -10,61 +9,49 @@ Linux 有着广泛的用途。该平台被许多简单的家用电器所使用 ### 1.[Ampro 嵌入式 Linux][1] ### - -这是一个自由和开放源代码的从Ubuntu派生来的轻量级操作系统。 +这是一个自由和开放源代码的从Ubuntu精简来的轻量级操作系统。 ### 2. [BlueCat Linux from Lynx][2] ### -这个基于 Linux 的发行版是Lynx套件的一部分,并为嵌入式系统打造。 +这个基于 Linux 的发行版是Lynx套件的一部分,并为嵌入式系统打造。 ### 3. [CacheGuard OS][3] ### -CacheGuard OS 是一个从零开始建立的集成了安全解决方案的基于Linux的可自定义版本 ,专门为网络管理设计的。 - +CacheGuard OS 是一个从零开始建立的集成了安全解决方案的基于Linux的版本,专门为网络管理设计的。 ### 4. [Darma NAS OS][4] ### -这个发行版有一个基于 SSL 的加密客户端服务器和基于 Java 的图形用户界面。 - +这个发行版有一个基于 SSL 的加密客户端的服务器和基于 Java 的图形用户界面。 ### 5. [DIET-PC][5] ### - -这是开源的瘦客户端软件 kitset,它允许用户建立网络设备。 - +这是开源的瘦客户端软件 kitset,它允许用户建立网络应用。 ### 6. [ELinOS][6] ### 这个发行版为在嵌入式系统上工作的用户提供大量的技术。它是一个相当受欢迎的嵌入式 Linux 平台。 - ### 7. [eLux][7] ### - 这个发行版有一个非常简单和容易使用的界面,适用于用户和管理员都不具有任何有关 Linux 的知识的特殊情况下。 - ### 8. [eLux NG][8] ### - -这一个发行版为支持 eLux 的列表中的处理器添加了新的模式。 - +这个发行版为支持 eLux 的处理器列表中添加了新的型号。 ### 9. [Embedded Coyote Linux][9] ### +这种基于 Coyote Linux的防火墙和 VPN 服务器一直为很多人选择的平台。 -这种基于 Coyote Linux的防火墙和 VPN 服务器 一直为很多人选择的平台。 - - -# # # 10。[嵌入式 Debian 项目][10] # # # - +### 10. [嵌入式 Debian 项目][10] ### 这个项目的目的是使 Debian GNU/Linux 成为嵌入式系统的第一选择。 + -------------------------------------------------------------------------------- via: http://www.efytimes.com/e1/fullnews.asp?edid=137612 -译者:[owen-carter](https://github.com/owen-carter) 校对:[校对者ID](https://github.com/校对者ID) +译者:[owen-carter](https://github.com/owen-carter) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/published/20140527 4MLinux 9.0 Beta Is a 55 MB Operating System That Has It All.md b/published/201406/20140527 4MLinux 9.0 Beta Is a 55 MB Operating System That Has It All.md similarity index 100% rename from published/20140527 4MLinux 9.0 Beta Is a 55 MB Operating System That Has It All.md rename to published/201406/20140527 4MLinux 9.0 Beta Is a 55 MB Operating System That Has It All.md diff --git a/published/20140527 A Complete Historical Timeline of Linux Evolution.md b/published/201406/20140527 A Complete Historical Timeline of Linux Evolution.md similarity index 100% rename from published/20140527 A Complete Historical Timeline of Linux Evolution.md rename to published/201406/20140527 A Complete Historical Timeline of Linux Evolution.md diff --git a/published/20140528 Setup Backup Server Using Bacula And Webmin On Ubuntu 14.04.md b/published/201406/20140528 Setup Backup Server Using Bacula And Webmin On Ubuntu 14.04.md similarity index 100% rename from published/20140528 Setup Backup Server Using Bacula And Webmin On Ubuntu 14.04.md rename to published/201406/20140528 Setup Backup Server Using Bacula And Webmin On Ubuntu 14.04.md diff --git a/published/201406/20140528 Why We Shouldn't Accept Bad Linux Ports.md b/published/201406/20140528 Why We Shouldn't Accept Bad Linux Ports.md new file mode 100644 index 0000000000..cefc707f1e --- /dev/null +++ b/published/201406/20140528 Why We Shouldn't Accept Bad Linux Ports.md @@ -0,0 +1,33 @@ +为什么我们不应该接受低劣的Linux移植游戏 +================================================================================ +由于最近The Witcher 2的惨败,我想写下些想法,为什么我们不应该接受来自开发人员的品质低劣的移植游戏。 + +最近几年在我们的Linux游戏库里面有如此多游戏,以至于你现在可以看到来自Linux玩家的评论“我们已经有很多游戏了!”可能这些声音来自很多像你一样的人。感谢Valve 和 Steam,之前我们从来没有得到过这么多的开发者的关注。 + +同样由于开发者的推进,我们看见了伴随而来的各种移植游戏,坦率地说,它们的质量十分的低劣,或者说对于大多数人们来说根本不值得去看一眼。 + +现在的问题就是,如果我们继续接受这种低水平质量的移植,Linux就会赢得一个游戏质量水平低的名声。请认真考虑一下这样的后果吧! + +再想象一下,如果那些AAA级的开发者给Linux推送了大量游戏,其中使用了The Witcher2 移植所用的“eON”技术。看起来就像我们有了大量开发者,突然之间Linux有很多大牌游戏了。然后你可以看见大量的人尝试Linux,却发现它们的游戏在同等硬件之下却有着糟糕的画面,就会给他们一个印象,Linux对游戏不友好。这对我们所有人都很糟糕。 + +我已经看见许多人说“这个工具包用于移植没关系?”。这在我的眼里看来是一个非常天真的想法。当然,这有关系, 它意味Linux的游戏里面的光线和白天的不同品质。这就直接追溯到我上面关于Linux游戏的观点上了。 + +你可以坚持说工具包没有关系,而且使用任何一个你想用的比较/类比的效果,但如果工具包是导致问题的根源,就像我们说的计算机占用了99%的处理能力的软件一样,是的,它当然有关系! + +如今,我已经看见许多来自其他主流网站发表的评论,“我们应该接受它们并且作感谢状,我们毕竟拥有了它们”。那些都是鼠目寸光的人们说的胡话! + +![](http://www.gamingonlinux.com/uploads/articles/article_images/1401025331gol2.jpg) + +想想,那些开发者和发行商看到那些低劣的Linux移植游戏也能被接受时,他们的脑里只有钱。消费者对Linux游戏的感知就会进一步恶化,就是因为这些低劣的移植品。 + +我可以接受这些来自开发者的移植,毕竟是我运营着这个网站( http://www.gamingonlinux.com/ )。但是,如果我作为一个消费者不愿意为在windows运行挺好的游戏买单,而却为在Linux慢得像蜗牛一样的游戏买单?我会么?你会么? + +最后附加的一点:你绝不应该攻击一个试图在社区里面解决问题的开发者,这样是不可以的。反馈是很好,骂人却是很幼稚的,这会使得Linux看起来更糟。 + +-------------------------------------------------------------------------------- + +via: http://www.gamingonlinux.com/articles/why-we-shouldnt-accept-bad-linux-ports.3765 + +译者:[Vic020](http://www.vicyu.net) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/published/20140529 Add Windows Like Bottom Taskbar In Ubuntu Unity 14.04.md b/published/201406/20140529 Add Windows Like Bottom Taskbar In Ubuntu Unity 14.04.md similarity index 100% rename from published/20140529 Add Windows Like Bottom Taskbar In Ubuntu Unity 14.04.md rename to published/201406/20140529 Add Windows Like Bottom Taskbar In Ubuntu Unity 14.04.md diff --git a/translated/talk/20140529 Command Line Tuesdays--The Introductory.md b/published/201406/20140529 Command Line Tuesdays--The Introductory.md similarity index 64% rename from translated/talk/20140529 Command Line Tuesdays--The Introductory.md rename to published/201406/20140529 Command Line Tuesdays--The Introductory.md index 89048f554f..03dbe0b0dc 100644 --- a/translated/talk/20140529 Command Line Tuesdays--The Introductory.md +++ b/published/201406/20140529 Command Line Tuesdays--The Introductory.md @@ -2,14 +2,13 @@ ================================================================================ **嗨,极客们!** -今天,我们介绍给大家一个新的系列节目,它叫命令行星期二。为什么叫命令行星期二?因为在该系列节目中,就像你们这样的忠实的计算机迷们,每天将会试着走出图形用户界面(GUI)文化的藩篱,GUI文化就是让事情变得简单而大众化。 +今天,我们介绍给大家一个新的系列节目,它叫命令行星期二。为什么叫命令行星期二?因为在该系列节目中,每天坐在计算机前的你们,将会试着走出图形用户界面(GUI)文化的藩篱,从今天开始“让事情变得简单而大众化”。 -当然,如果你访问过任何与GNU/Linux相关的社区论坛的话,你可能耳闻目睹了一次火热的辩论,当然这是个假设,话题是哪个实际上更易用。是让GUI掌控一切,还是只是学习并享受命令行界(CLI)面带来的乐趣。 +当然,如果你访问过任何与GNU/Linux相关的社区论坛的话,你可能已经看到了,关于GUI和命令行哪个更好的讨论非常热烈。是让GUI掌控一切,还是只是学习并享受命令行界(CLI)面带来的乐趣呢? ![Terminal](http://sholva.org/assets/images/blog/2009/review-opensuse-11.2/opensuse-terminal.png) -终端 -对于使用或抛弃GUI工具的争论有很多。正方最常提到的优点之一,就是我们是在点击的计算模式下长大的,所以它基本上就是我们和机器进行交互的一种语言或文化形式。我们日复一日重复着这样的模式,点击那个大按钮来让它干我们需要它干的事。 +对于使用或抛弃GUI工具的争论有很多。正方最常提到的优点之一,就是我们是在点击的计算模式下长大的,所以它基本上就是我们和机器进行交互的一种语言,或者你可以说是一种文化。我们日复一日重复着这样的模式,点击那个大按钮来让它干我们需要它干的事。 而对于反方,我读到的关于命令行的优点的最有趣的评论之一,就是你可以通过命令行来更快,更简单地做更多事情,比GUI工具来得快。但你需要明白的是:你需要学习命令。是的,学习它们,就像学一首诗一样。 @@ -17,27 +16,28 @@ ### 寓言 ### -我已经用了Linux超过3年了。27岁,是个文学专业学生,我对任何形式的技术都没有太大的兴趣。我直到中学才有了一台属于自己的计算机,我想大概是17岁那年吧。对于我而言,只用了10年的计算机。我只用过三个程序,BS播放器,Winamp和足球经理,偶尔也用用MS Word。大约三年多以前,我做临时工时的一位同事,在我正和另外一位同僚谈话时告诉我说,有个新版的东西,它一下子就抓住了我的心,它看起来确实与众不同。我现在想想,它就是Ubuntu的敏捷的独角鲸。在和这位同事讨论这个新版本后,他指出了一些常见的优点,这些优点也是我们经常向新手宣传的,不需要杀毒软件,启动快捷,安全性更高,附带有软件中心等等之类。最突出的一点:它背后的自由和开源(FOSS)哲学。他用他不带侵害性和没一点孩子气的方式把我带了进去。 +我已经用了Linux超过3年了。27岁,是个文学专业学生,我对任何形式的技术都没有太大的兴趣。我直到中学才有了一台属于自己的计算机,我想大概是17岁那年吧。对于我而言,只用了10年的计算机。我只用过三个程序,BS播放器,Winamp和足球经理,偶尔也用用MS Word。大约三年多以前,我做临时工时的一位同事,在我正和另外一位同僚谈话时告诉我说,有个新版的东西,它一下子就抓住了我的心,它看起来确实与众不同。我现在想想,它就是Ubuntu的“敏捷的独角鲸”。在和这位同事讨论这个新版本后,他指出了一些常见的优点,这些优点也是我们经常向新手宣传的,不需要杀毒软件,启动快捷,安全性更高,附带有软件中心等等之类。最突出的一点:它背后的自由和开源(FOSS)哲学。他用他温和而优雅的方式把我带了进去。 -我决定来一次尝试,而从那以后便一发不可收拾。而至于我是怎么又从第一次对Ubuntu的浅尝辄止转而投向openSUSE 11.4的,咋们下回再讲吧。而我发现它只是一个完美而甜蜜的小插曲,那就完完全全另外一回事了。问题在于,我最终进入了Linux领域。这很有趣,感觉很不一样,它让我的计算机跑得更好,它也更稳定,我也和它相处得很好(似乎我是在不经意间买到了相当正统的硬件)。Linux似乎也远不止是桌面,所以我只是在不得不使用终端的时候也使用终端。但是这么说吧,它是Linux中一个最为讨厌的,最为可怕,最令人不爽的工具之一。如果没有GUI来进行特别的操作,我马上会诚惶诚恐,十分不安了。因为当我从论坛复制/粘贴命令的时候,我都不知道我究竟在干些什么。 +我决定来一次尝试,而从那以后便一发不可收拾。而至于我是怎么又从第一次对Ubuntu的浅尝辄止转而投向openSUSE 11.4的,咋们下回再讲吧。而我发现它只是一个完美而甜蜜的小插曲时,那就完完全全另外一回事了。问题在于,我最终进入了Linux领域。这很有趣,感觉很不一样,它让我的计算机跑得更好,它也更稳定,我也和它相处得很好(似乎我是在不经意间买到了相当普通的硬件)。似乎Linux并不是一个完全的桌面系统,所以我有时不得不使用终端。但是这么说吧,它是Linux中一个最为讨厌的,最为可怕,最令人不爽的工具之一。如果某些操作没有GUI可以做的话,我马上会诚惶诚恐,十分不安了。因为当我从论坛复制/粘贴命令的时候,我都不知道我究竟在干些什么。 随着时间流逝,情况发生了变化。相对于其他以消费者为导向的系统,发生在我身上的事可能有点与一般人相反。在那三年中,我感觉不是我在玩系统,而是系统在玩我。我学会了怎样寻找基本问题,提交bug报告,怎样正确地在论坛上提问。对于碰到的每个问题,我学会了为那些更有能力帮我解决问题的人提供更有用的信息。 -不久以前,我女朋友发泄道,她简直不敢相信,我主要为了用计算机而用计算机,而不是用它来做一些别的事情。”你只用它来进行音乐收藏和做些Linux的乱七八糟的事情,Nenad. Gaawd“它让我想啊,使劲想。Linux,特别是openSUSE发行版它成了我的爱好之一。我不是一个专家,不管怎么说都说得通,Linux不在我的专业知识范畴内。但我有足够的知识来搞定它,搞定一些小问题,修改一些配置文件等等。但是我终于认识到,随着玩Linux日久,对系统的调整日多,我真的需要熟悉一下命令行(CLI)了。我也了解到,我在对底层的东西一无所知的情况下对系统胡作非为。我要对着ETC大喊大叫了,它究竟是个什么东西?BIN又是个什么东西?为什么会有个.sh在后面?问什么这个文件在这里?那个文件又在那里?为什么我得点击那一大堆的文件夹来找到正确的文件进行修改?然后,我读到‘你可以用一个命令来简单地列出某个地方的所有文件’时,它又变得很有趣了,我突然感到迫不及待要想试试了。 +不久以前,我女朋友发泄说,她简直不敢相信,我主要为了用计算机而用计算机,而不是用它来做一些别的事情。“你只用它来进行音乐收藏和做些Linux的乱七八糟的事情,Nenad. Gaawd”它让我想啊,使劲想。Linux,特别是openSUSE发行版它成了我的爱好之一。我不是一个专家,不管怎么看都是这样,Linux不在我的专业知识范畴内。但我有足够的知识来搞定它,搞定一些小问题,修改一些配置文件等等。但是我终于认识到,随着玩Linux日久,对系统的调整日多,我真的需要熟悉一下命令行(CLI)了。我也了解到,我在对底层的东西一无所知的情况下对系统胡作非为。我要对着etc大喊大叫了,它究竟是个什么东西?bin又是个什么东西?为什么会有个.sh在后面?问什么这个文件在这里?那个文件又在那里?为什么我得点击那一大堆的文件夹来找到正确的文件进行修改?然后,我读到“你可以用一个命令来简单地列出某个地方的所有文件”时,它又变得很有趣了,我突然感到迫不及待要想试试了。 ### 好吧,让我们干吧! ### -我们来了……。作为一位新的openSUSE的新闻发布者,我会试着以我所见最有成效的方式来发表我的看法,这样的方式我想对社区中绝大多数人会奏效。该高举旗帜,一起开始学习命令行了。如果是是什么吸引你到Linux和openSUSE中来这么个态度,就想我,引领你走了这么远,那么是时候走得更远一点了。 +我们来了……。作为一位新的openSUSE的新闻发布者,我会试着以我所见最有成效的方式来发表我的看法,这样的方式我想对社区中绝大多数人会奏效。该高举旗帜,一起开始学习命令行了。如果是哲学理念吸引你到Linux和openSUSE中来的,就像我一样,那么是时候走得更远一点了。 ![](http://beerepiphany.files.wordpress.com/2010/04/pinky_brain.jpg) -看,我就知道在那外头有一大堆像我这样的人。我知道,你也许没有抓住90后极客们的要点,黑屏-绿字-手指在键盘上乱飞-让一切都激情澎湃。但这在很多地方都很有用。我们将以一种有趣的,而又共有的方式来学习,目录是用来干什么,什么文件放在什么地方,以及一些最常用的终端命令。在我们在控制台处理一些任务时,这将让我们更轻松一些;在碰到一些问题时,获得更大的回报。它也会让bug处理者更轻松些,如果他们从我们这头收到正确的信息的话。它也让我们的爱好变得乐趣无穷。 +看,我就知道在那外头有一大堆像我这样的人。我知道,你也许没有抓住90后极客们的要点,黑屏-绿字-手指在键盘上乱飞-让一切都激情澎湃。但这在很多地方都很有用。我们将以一种有趣的,而又通用的方式来学习,目录是用来干什么,什么文件放在什么地方,以及一些最常用的终端命令。在我们在控制台处理一些任务时,这将让我们更轻松一些;在碰到一些问题时,获得更大的回报。它也会让bug处理者更轻松些,如果他们从我们这头收到正确的信息的话。它也让我们的爱好变得乐趣无穷。 我是说,我的天啊,你已经过渡到连Dilber和xkcd都感到有趣的阶段了。是时候到终端下去了。 附录: -要用到的一些参考资料:威廉 · 肖茨—— 《Linux命令行》,以及克罗地亚黑客韦利米尔 ·巴克沙,别名鲁塞拉斯,《关于最常用命令的简短教程》。对于你们的要求: +要用到的一些参考资料:威廉·肖茨—— 《Linux命令行》,以及克罗地亚黑客韦利米尔·巴克沙,别名鲁塞拉斯,《关于最常用命令的简短教程》。对于你们的要求: + - 每周1到2小时的空闲时间 - 一品脱冰冻啤酒或者其它饮料 - 有人已经指出,使用[Gedit][1],或者手工记录本(你懂的,笔和纸,呵呵)可以让学习更简单一些。 @@ -50,7 +50,7 @@ via: https://news.opensuse.org/2014/05/27/command-line-tuesdays-the-introductory/ -译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/published/20140529 How To Share Disks In VirtualBox Between Linux Guest OS.md b/published/201406/20140529 How To Share Disks In VirtualBox Between Linux Guest OS.md similarity index 100% rename from published/20140529 How To Share Disks In VirtualBox Between Linux Guest OS.md rename to published/201406/20140529 How To Share Disks In VirtualBox Between Linux Guest OS.md diff --git a/published/20140529 Install RainLoop Webmail (A Web Based Email Client) using 'Nginx and Apache' in Arch Linux.md b/published/201406/20140529 Install RainLoop Webmail (A Web Based Email Client) using 'Nginx and Apache' in Arch Linux.md similarity index 100% rename from published/20140529 Install RainLoop Webmail (A Web Based Email Client) using 'Nginx and Apache' in Arch Linux.md rename to published/201406/20140529 Install RainLoop Webmail (A Web Based Email Client) using 'Nginx and Apache' in Arch Linux.md diff --git a/published/20140529 What is a good terminal emulator on Linux.md b/published/201406/20140529 What is a good terminal emulator on Linux.md similarity index 100% rename from published/20140529 What is a good terminal emulator on Linux.md rename to published/201406/20140529 What is a good terminal emulator on Linux.md diff --git a/published/20140529 Why No Flash Support for Linux Is Good for Open Source.md b/published/201406/20140529 Why No Flash Support for Linux Is Good for Open Source.md similarity index 100% rename from published/20140529 Why No Flash Support for Linux Is Good for Open Source.md rename to published/201406/20140529 Why No Flash Support for Linux Is Good for Open Source.md diff --git a/published/20140530 Fix 'Cannot Add PPA' Error In Ubuntu 14.04 and Linux Mint.md b/published/201406/20140530 Fix 'Cannot Add PPA' Error In Ubuntu 14.04 and Linux Mint.md similarity index 100% rename from published/20140530 Fix 'Cannot Add PPA' Error In Ubuntu 14.04 and Linux Mint.md rename to published/201406/20140530 Fix 'Cannot Add PPA' Error In Ubuntu 14.04 and Linux Mint.md diff --git a/translated/tech/20140530 How To Install Linux On A MacBook Pro Retina.md b/published/201406/20140530 How To Install Linux On A MacBook Pro Retina.md similarity index 54% rename from translated/tech/20140530 How To Install Linux On A MacBook Pro Retina.md rename to published/201406/20140530 How To Install Linux On A MacBook Pro Retina.md index d7570154f3..573545184e 100644 --- a/translated/tech/20140530 How To Install Linux On A MacBook Pro Retina.md +++ b/published/201406/20140530 How To Install Linux On A MacBook Pro Retina.md @@ -2,39 +2,39 @@ ================================================================================ ![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/linux-macbook-pro-retina-840x420.jpg?ec7b17) -MacBook Pros拥有非常强大的配置,有些人想强上加强,他们想用Linux系统。 +MacBook Pros拥有非常强大的配置,但是有些人想强上加强,他们想用Linux系统。 -不管您是想要更开放和个性化的操作系统又或者您只想要需要用某些在Linux特有的软件,您都会想要把Linux装载您的MacBook上。 可惜的是MacBook Pros们可是一块块密不透风砖头,让您想装其他系统又无从下手。尤其是Linux,比在MacBooks上装Windows还难。 Boot Camp在此时对于Linux来说也是手无对策。 虽然如此,但并不代表您完全不能做到,装机走起! +不管您是想要更开放和个性化的操作系统又或者是您只想要使用某些在Linux特有的软件,您都会想要在您的MacBook上安装Linux。 可惜的是MacBook Pro们可是一块块密不透风砖头,让您想装其他系统又无从下手。尤其是Linux,比在MacBook上装Windows还难。 Boot Camp对于Linux来说也没有什么用处。 虽然如此,但并不代表您完全不能做到,装机走起! ### 为什么要在MacBook Pro Retina上装Linux? ### -买MacBook不就是为了OS X吗?为何要装Linux? 其实买MacBook的原因不必须只是因为它的系统, 其极致的性能,极其耐用的电池以及高大上的持久力都是购买它的原因。 这些这么好的硬件再加上一块能让您体验到HiDPI的清晰度Retina显示屏,其不皆是买入的理由乎? +买MacBook不就是为了OS X吗?为何要装Linux? 其实买MacBook的原因不仅仅只是因为它的操作系统, 其极致的硬件性能,超长的电池寿命,以及抗操抗造都是购买它的原因。 这些这么好的硬件再加上一块能让您体验到HiDPI的清晰度Retina显示屏,其不皆是买入的理由乎? -但是如果您对OS X无爱,又或者您真心需要使用Linux,为何不将这自由,开源,小巧,个性化的Linux塞进您的高大上硬件呢?苹果可能有话要说了,可谁在乎呢~ +但是如果您对OS X无爱,又或者您真心想要使用Linux,为何不将这自由、开源、小巧、个性化的Linux塞进您的高大上的硬件呢?苹果可能有话要说了,可谁在乎呢~ -注:在本期教程我们将会使用[最流行的Linux发行版][1] - Ubuntu来作为我们这次安装的选择。您也可以用自己想用的的Linux发行版,但相关的步骤会和本教程有出入。 如果您把自己的系统玩坏了,我们将不承担任何责任。 本教程将教您如何Linux 和 OS X 双系统启动,另外只有在OS X 才能升级固件,所以我们建议您不要将OS X 删除。 +注:在本期教程我们将会使用[最流行的Linux发行版][1] - Ubuntu来作为我们这次安装的选择。您也可以用自己想用的的Linux发行版,但相关的步骤会和本教程略有出入。 如果您把自己的系统玩坏了,我们将不承担任何责任。 本教程将教您如何 Linux 和 OS X 双系统启动,另外只有在OS X才能升级固件,所以我们建议您不要将OS X 删除。 但在我们开始之前,请您用您喜欢的方法(比如Time Machine 或 CrashPlan)将您的电脑彻底备份,以防万一。 ### 下载 Ubuntu ### -首先您需要下载一份[copy of the Ubuntu desktop ISO image][2] 。 该镜像在BIOS和EFI模式下都能启动,而Mac版的只能在BIOS启动。 可是我们需要在EFI模式启动,所以请确保您选择的是64-bit(64位),而不是Mac版的64-bit。 +首先您需要下载一份[Ubuntu桌面版安装镜像][2] 。 务必选择64位的桌面版,虽然该镜像并不是为Mac提供的。该镜像在BIOS和EFI模式下都能启动,而Mac的镜像却只能在BIOS启动。Mac是专门设计成这样的,但是我们要使之以EFI模式下启动。 -### 存入U盘(USB) ### +### 写到U盘(USB) ### -其次第二步, 找个2GB以上的USB, 我们将会用该USB作为Ubuntu的安装启动盘。 你可以按照 [the official Ubuntu steps][3] 或者 [use the dedicated GUI tool for the job][4] 的步骤来准备安装盘. +其次, 找个2GB以上的USB, 我们将会用该USB作为Ubuntu的安装启动盘。 你可以按照 [Ubuntu官方指导的步骤][3] 或者 [使用专用的图形化工具][4] 来准备安装盘. ### 调整分区大小 ### ![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_disk_utility.jpg?ec7b17) -当你这一步也完成的时候,你的大Mac就做好安装的准备了。 打开Disk Utility(磁盘工具), 点击左边选择你的硬盘, 选择Partitions(分区)标签页。 把分区调整到你喜欢的大小 - 我们将会用新创建的空间来安装Ubuntu。 +当你完成上一步后,你的Mac Book Pro就做好安装的准备了。 打开Disk Utility(磁盘工具), 点击左边选择你的硬盘, 选择Partitions(分区)标签页。 把Mac分区缩小到你喜欢的大小 - 我们将会用新创建的可用空间来安装Ubuntu。 ### 启动Ubuntu镜像 ### ![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_boot.jpg?ec7b17) -当关机之后屏幕一黑时,请按住Option键(alt)知道你看到不同的启动选项。选择EFI选项(如果有两个的话选择左边的哪一个)来从USB启动Ubuntu. +上述步骤完成后,将U盘插入并重启Mac Book Pro。当关机之后屏幕一黑时,请按住Option键(alt)直到你看到不同的启动选项。选择EFI选项(如果有两个的话选择左边的哪一个)来从USB启动Ubuntu. 当你看到“Try Ubuntu" 和 "Install Ubuntu" 两个选项的时候, 选择 "Try Ubuntu" 因为我们需要在安装完成之后重启之前弄一些其他的东西。 @@ -44,11 +44,11 @@ MacBook Pros拥有非常强大的配置,有些人想强上加强,他们想 ![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_installer_partitions.jpg?ec7b17) -一路来到分区这个步骤之后, 选择 "Do Something else" 这个选项。 然后请确保那块大约128MB左右的分区已经设置成EFI启动分区(你可以按他一下然后选择Option来确定一下; 另外,那一块盘应该是 /dev/sda1). 下一步, 你要在新建的空间里创建一个 ext4分区,用“/”路径来安装它。 如果你知道你自己在干嘛的话也可以创建几个不同的分区(切记这不是Windows啊孩纸)。 +到分区这个步骤之后, 选择 "Do Something else" 这个选项。 然后请确保那块大约128MB左右的分区已经被识别为EFI启动分区(你可以点击它然后选择Option来确定一下; 另外,那个分区应该是 /dev/sda1)。下一步, 你要在新建的空间里创建一个 ext4分区,在其上挂载“/”路径。 如果你知道你自己在干嘛的话也可以创建几个不同的分区(切记这不是Windows啊孩纸)。 在你开始下一步之前,请确保你的安装引导程序(boot loader)是选择了 /dev/sda1,GRUB也是装到该分区的。 然后按照平常一样该咋装咋装。 -### EFI Boot Fix ### +### 修改 EFI 引导 ### ![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_efibootmgr.jpg?ec7b17) @@ -60,9 +60,9 @@ MacBook Pros拥有非常强大的配置,有些人想强上加强,他们想 sudo efibootmgr -这个将会列印出当前的启动设置, 你应该看到的是 "ubuntu" 和 "Boot0000", 当前的EFI设置是把系统指向 Boot0080, 这样的话就会跳过GRUB然后直接跳入OS X,所以我们要用一下指令来修复它: +这个将会显示出当前的启动设置, 你应该看到的是 "ubuntu" 和 "Boot0000*",当前的EFI设置是把系统指向 Boot0080*,这样的话就会跳过GRUB然后直接跳入OS X,所以我们要用以下指令来修复它: - sudo efibootmgr -o 0,80` + sudo efibootmgr -o 0,80 现在就可以重启了! @@ -70,21 +70,21 @@ MacBook Pros拥有非常强大的配置,有些人想强上加强,他们想 ### 坑爹地调整设置 ### -首先你需要改一下GRUB的设置,这样你的SSD盘才不会偶尔死机, 输入: +首先你需要改一下GRUB的设置,这样你的SSD盘才不会偶尔死机, 在Terminal输入: sudo nano /etc/default/grub -在Terminal找到 **GRUB_CMDLINE_LINUX** , 把他改成 **GRUB_CMDLINE_LINUX="libata.force=noncq"** 。 按下CTRL + X保存,然后按Y来确定保存。 接下来你要输入: +找到 **GRUB\_CMDLINE\_LINUX**那一行 , 把它改成 **GRUB\_CMDLINE\_LINUX="libata.force=noncq"** 。 按下CTRL + X保存,然后按Y来确定保存。 接下来你要在Terminal输入: sudo nano /etc/grub.d/40_custom -在Terminal会打开一个新的文件,请使用真丶精准手指准确地一字一字输入: +打开一个新的文件,请使用真丶精准手指准确地一字一字输入: menuentry "Mac OS X" { exit } -这将会让你boot到你的Mac OS X安装程序(GRUB的32-bit和64bit项不能用)。然后CTRL+X 和 Y 保存退出,然后输入: +这将会让你boot到你安装好的Mac OS X(GRUB的32-bit和64-bit项不能用)。然后CTRL+X 和 Y 保存退出,然后输入: sudo update-grub @@ -94,11 +94,11 @@ MacBook Pros拥有非常强大的配置,有些人想强上加强,他们想 在极其高清的Retina显示屏上神马都这么小,坑爹啊啊? 去Setting -> Display 里把 Scaling Factor弄大一点吧,不然妈妈又要担心你的近视眼了。 -你也可能觉得在边边改变窗口大小是一件极其困难的事情,坑爹啊啊? 去Terminal输入: +你也可能觉得在边边上改变窗口大小是一件极其困难的事情,坑爹啊啊? 去Terminal输入: sudo nano /usr/share/themes/Ambiance/metacity-1/metacity-theme-1.xml -然后在里面修改下面的参数: +然后在里面修改成下面的参数: @@ -110,15 +110,14 @@ MacBook Pros拥有非常强大的配置,有些人想强上加强,他们想 /Library/ColorSync/Profiles/Displays/Color LCD-xxxxxx.icc -xxxxxx只是一串随机的字符,不过这路径应该只有一个文件。把他搬到你Ubuntu的Home folder, 然后到 System Settings –> Color 选择 Add New Profile 并选择你那刚弄过来的icc文件 +xxxxxx只是一串随机的字符,不过这路径应该只有一个文件。把他搬到你Ubuntu的Home folder, 然后到 System Settings –> Color 选择 Add New Profile 并选择你那刚弄过来的icc文件。 ### 总结 ### ![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_final.jpg?ec7b17) -恭喜你啦, 现在终于有一台属于你的Linux MacBook Pro Retina啦!如果你想把你的Ubuntu弄得更手熟,请按 [make Ubuntu feel more like home][5] 尽情地修改配置吧! 该教程也弄用于其他的Mac系统,当然每个release都不由不同的好处和坏处。 如果你用的是其他的电脑,请翻一翻[这篇为Ubuntu写的文档][6] +恭喜你啦, 现在终于有一台属于你的Linux MacBook Pro Retina啦!如果你想把你的Ubuntu弄得更手熟,请按 [让你的Ubuntu 像家一样舒服][5] 尽情地修改配置吧! 该教程也可用于其他的Mac系统,当然每种Mac都有不同的好处和坏处。 如果你用的是其他的Mac,请翻一翻[这篇为Ubuntu写的文档][6] -Additionally, feel free to check out [other great Linux distros][7] that you can install to your Mac! 另外,你还可以看一下其他可以在Mac安装的[Linux 发行包][7]哦! Image Credits: [K?rlis Dambr?ns][8] Via Flickr @@ -127,7 +126,7 @@ Image Credits: [K?rlis Dambr?ns][8] Via Flickr via: http://www.makeuseof.com/tag/install-linux-macbook-pro/ -译者:[213edu](https://github.com/213edu) 校对:[校对者ID](https://github.com/校对者ID) +译者:[213edu](https://github.com/213edu) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/published/20140530 Linux script command--A recorder inside your Terminal.md b/published/201406/20140530 Linux script command--A recorder inside your Terminal.md similarity index 100% rename from published/20140530 Linux script command--A recorder inside your Terminal.md rename to published/201406/20140530 Linux script command--A recorder inside your Terminal.md diff --git a/translated/tech/20140603 App Grid Is A Superior Ubuntu Software Center Alternative.md b/published/201406/20140603 App Grid Is A Superior Ubuntu Software Center Alternative.md similarity index 75% rename from translated/tech/20140603 App Grid Is A Superior Ubuntu Software Center Alternative.md rename to published/201406/20140603 App Grid Is A Superior Ubuntu Software Center Alternative.md index fca82a41ca..02bee2befb 100644 --- a/translated/tech/20140603 App Grid Is A Superior Ubuntu Software Center Alternative.md +++ b/published/201406/20140603 App Grid Is A Superior Ubuntu Software Center Alternative.md @@ -8,15 +8,15 @@ APP Grid:一个优秀的Ubuntu软件中心替代品 ### App Grid:Ubuntu软件中心替代品 ### -自从2011年的彻底改造后,Ubuntu的旗舰应用商店的界面就没怎么变过。这并不是说它在此期间被完全忽略了,12.04的开发周期中可以看到[在启动时间上的工作][1]已经做了一些。 +自从2011年的彻底改造后,Ubuntu的旗舰应用商店的界面就没怎么变过。这并不是说它在此期间被完全忽略了,在12.04的开发周期中可以看到已经做了一些[减少打开耗时的工作][1]。 -撇开那个不算,ol’ USC还是一如既往:一篮子的潜力还没被开发。 +撇开那个不算,Ubuntu软件中心还是一如既往,还有许多潜在功能还没被开发。 -App Grid的目标时解决这些问题。从零开始,它要求更快的启动时间,更快的反应时间,而且“不感觉混乱,不让人失望”。 +App Grid的目标是解决这些问题。从零开始,它要求更快的启动时间,更快的反应时间,而且“不感觉混乱,不让人失望”。 在大部分这些方面,App Grid取得了成功。它几乎可以立即打开,而在界面上点击也确实反应迅速。“不感觉混乱”这一承诺,或许有一点小小的争议。该应用有时候要你横向滚动,而另外的时候,又要你纵向滚动。也有人禁不住会想,如果这个应用能把它的网格背景样式扔了,可能看起来会显得更专业一些。 -作为在Ubuntu上从筛选应用程序的一个方式,App Grid做出了极大的努力。它支持Ubuntu One上的订购、评级和评论,作为Ubuntu默认应用商店的替代品,它更好用。 +作为在Ubuntu上筛选应用程序的一个方式,App Grid做出了极大的努力。它支持Ubuntu One上的订购、评级和评论,作为Ubuntu默认应用商店的替代品,它更好用。 如果非要说点什么缺点的话,那就是它不是一个开源的应用程序,第一次运行时会显示以下免责声明: @@ -27,18 +27,19 @@ App Grid的目标时解决这些问题。从零开始,它要求更快的启动 App Grid可运行在Ubuntu 12.04 LTS,13.10以及14.04 LTS版本下。可以通过添加以下PPA软件源来安装: sudo add-apt-repository -y ppa:appgrid/stable - sudo apt-get update && sudo apt-get install app grid + sudo apt-get update && sudo apt-get install appgrid 或者,也可以[从项目网站][2]抓取一个.deb安装包来安装。 - [下载用于Ubuntu 14.04的App Grid安装包][3] -试试吧,试过后请到我们开的空间里来发表一下你的看法吧…… +试试吧,试过后请发表一下你的看法吧…… + -------------------------------------------------------------------------------- via: http://www.omgubuntu.co.uk/2014/05/appgrid-ubuntu-software-centre-alternative -译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/published/20140603 Linux Foundation to donate portion of membership fees to Code.org.md b/published/201406/20140603 Linux Foundation to donate portion of membership fees to Code.org.md similarity index 100% rename from published/20140603 Linux Foundation to donate portion of membership fees to Code.org.md rename to published/201406/20140603 Linux Foundation to donate portion of membership fees to Code.org.md diff --git a/published/201406/20140603 Write your first Linux Kernel module.md b/published/201406/20140603 Write your first Linux Kernel module.md new file mode 100644 index 0000000000..3e88177799 --- /dev/null +++ b/published/201406/20140603 Write your first Linux Kernel module.md @@ -0,0 +1,370 @@ +黑客内核:编写属于你的第一个Linux内核模块 +================================================================================ +> 曾经多少次想要在内核游荡?曾经多少次茫然不知方向?你不要再对着它迷惘,让我们指引你走向前方…… + +内核编程常常看起来像是黑魔法,而在亚瑟 C 克拉克的眼中,它八成就是了。Linux内核和它的用户空间是大不相同的:抛开漫不经心,你必须小心翼翼,因为你编程中的一个bug就会影响到整个系统。浮点运算做起来可不容易,堆栈固定而狭小,而你写的代码总是异步的,因此你需要想想并发会导致什么。而除了所有这一切之外,Linux内核只是一个很大的、很复杂的C程序,它对每个人开放,任何人都去读它、学习它并改进它,而你也可以是其中之一。 + +学习内核编程的最简单的方式也许就是写个内核模块:一段可以动态加载进内核的代码。模块所能做的事是有限的——例如,他们不能在类似进程描述符这样的公共数据结构中增减字段(LCTT译注:可能会破坏整个内核及系统的功能)。但是,在其它方面,他们是成熟的内核级的代码,可以在需要时随时编译进内核(这样就可以摒弃所有的限制了)。完全可以在Linux源代码树以外来开发并编译一个模块(这并不奇怪,它称为树外开发),如果你只是想稍微玩玩,而并不想提交修改以包含到主线内核中去,这样的方式是很方便的。 + +在本教程中,我们将开发一个简单的内核模块用以创建一个**/dev/reverse**设备。写入该设备的字符串将以相反字序的方式读回(“Hello World”读成“World Hello”)。这是一个很受欢迎的程序员面试难题,当你利用自己的能力在内核级别实现这个功能时,可以使你得到一些加分。在开始前,有一句忠告:你的模块中的一个bug就会导致系统崩溃(虽然可能性不大,但还是有可能的)和数据丢失。在开始前,请确保你已经将重要数据备份,或者,采用一种更好的方式,在虚拟机中进行试验。 + +### 尽可能不要用root身份 ### + +> 默认情况下,**/dev/reverse**只有root可以使用,因此你只能使用**sudo**来运行你的测试程序。要解决该限制,可以创建一个包含以下内容的**/lib/udev/rules.d/99-reverse.rules**文件: +> +> SUBSYSTEM=="misc", KERNEL=="reverse", MODE="0666" +> +> 别忘了重新插入模块。让非root用户访问设备节点往往不是一个好主意,但是在开发其间却是十分有用的。这并不是说以root身份运行二进制测试文件也不是个好主意。 + +#### 模块的构造 #### + +由于大多数的Linux内核模块是用C写的(除了底层的特定于体系结构的部分),所以推荐你将你的模块以单一文件形式保存(例如,reverse.c)。我们已经把完整的源代码放在GitHub上——这里我们将看其中的一些片段。开始时,我们先要包含一些常见的文件头,并用预定义的宏来描述模块: + + #include + #include + #include + + MODULE_LICENSE("GPL"); + MODULE_AUTHOR("Valentine Sinitsyn "); + MODULE_DESCRIPTION("In-kernel phrase reverser"); + +这里一切都直接明了,除了**MODULE\_LICENSE()**:它不仅仅是一个标记。内核坚定地支持GPL兼容代码,因此如果你把许可证设置为其它非GPL兼容的(如,“Proprietary”[专利]),某些特定的内核功能将在你的模块中不可用。 + +### 什么时候不该写内核模块 ### + +> 内核编程很有趣,但是在现实项目中写(尤其是调试)内核代码要求特定的技巧。通常来讲,在没有其它方式可以解决你的问题时,你才应该在内核级别解决它。以下情形中,可能你在用户空间中解决它更好: + +> - 你要开发一个USB驱动 —— 请查看[libusb][1]。 +> - 你要开发一个文件系统 —— 试试[FUSE][2]。 +> - 你在扩展Netfilter —— 那么[libnetfilter\_queue][3]对你有所帮助。 + +> 通常,内核里面代码的性能会更好,但是对于许多项目而言,这点性能丢失并不严重。 + +由于内核编程总是异步的,没有一个**main()**函数来让Linux顺序执行你的模块。取而代之的是,你要为各种事件提供回调函数,像这个: + + static int __init reverse_init(void) + { + printk(KERN_INFO "reverse device has been registered\n"); + return 0; + } + + static void __exit reverse_exit(void) + { + printk(KERN_INFO "reverse device has been unregistered\n"); + } + + module_init(reverse_init); + module_exit(reverse_exit); + +这里,我们定义的函数被称为模块的插入和删除。只有第一个的插入函数是必要的。目前,它们只是打印消息到内核环缓冲区(可以在用户空间通过**dmesg**命令访问);**KERN\_INFO**是日志级别(注意,没有逗号)。**\_\_init**和**\_\_exit**是属性 —— 联结到函数(或者变量)的元数据片。属性在用户空间的C代码中是很罕见的,但是内核中却很普遍。所有标记为**\_\_init**的,会在初始化后释放内存以供重用(还记得那条过去内核的那条“Freeing unused kernel memory…[释放未使用的内核内存……]”信息吗?)。**\_\_exit**表明,当代码被静态构建进内核时,该函数可以安全地优化了,不需要清理收尾。最后,**module\_init()**和**module\_exit()**这两个宏将**reverse\_init()**和**reverse_exit()**函数设置成为我们模块的生命周期回调函数。实际的函数名称并不重要,你可以称它们为**init()**和**exit()**,或者**start()**和**stop()**,你想叫什么就叫什么吧。他们都是静态声明,你在外部模块是看不到的。事实上,内核中的任何函数都是不可见的,除非明确地被导出。然而,在内核程序员中,给你的函数加上模块名前缀是约定俗成的。 + +这些都是些基本概念 - 让我们来做更多有趣的事情吧。模块可以接收参数,就像这样: + + # modprobe foo bar=1 + +**modinfo**命令显示了模块接受的所有参数,而这些也可以在**/sys/module//parameters**下作为文件使用。我们的模块需要一个缓冲区来存储参数 —— 让我们把这大小设置为用户可配置。在**MODULE_DESCRIPTION()**下添加如下三行: + + static unsigned long buffer_size = 8192; + module_param(buffer_size, ulong, (S_IRUSR | S_IRGRP | S_IROTH)); + MODULE_PARM_DESC(buffer_size, "Internal buffer size"); + +这儿,我们定义了一个变量来存储该值,封装成一个参数,并通过sysfs来让所有人可读。这个参数的描述(最后一行)出现在modinfo的输出中。 + +由于用户可以直接设置**buffer\_size**,我们需要在**reverse\_init()**来清除无效取值。你总该检查来自内核之外的数据 —— 如果你不这么做,你就是将自己置身于内核异常或安全漏洞之中。 + + static int __init reverse_init() + { + if (!buffer_size) + return -1; + printk(KERN_INFO + "reverse device has been registered, buffer size is %lu bytes\n", + buffer_size); + return 0; + } + +来自模块初始化函数的非0返回值意味着模块执行失败。 + +### 导航 ### + +> 但你开发模块时,Linux内核就是你所需一切的源头。然而,它相当大,你可能在查找你所要的内容时会有困难。幸运的是,在庞大的代码库面前,有许多工具使这个过程变得简单。首先,是Cscope —— 在终端中运行的一个比较经典的工具。你所要做的,就是在内核源代码的顶级目录中运行**make cscope && cscope**。Cscope和Vim以及Emacs整合得很好,因此你可以在你最喜爱的编辑器中使用它。 + +> 如果基于终端的工具不是你的最爱,那么就访问[http://lxr.free-electrons.com][4]吧。它是一个基于web的内核导航工具,即使它的功能没有Cscope来得多(例如,你不能方便地找到函数的用法),但它仍然提供了足够多的快速查询功能。 + +现在是时候来编译模块了。你需要你正在运行的内核版本头文件(**linux-headers**,或者等同的软件包)和**build-essential**(或者类似的包)。接下来,该创建一个标准的Makefile模板: + + obj-m += reverse.o + all: + make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules + clean: + make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean + +现在,调用**make**来构建你的第一个模块。如果你输入的都正确,在当前目录内会找到reverse.ko文件。使用**sudo insmod reverse.ko**插入内核模块,然后运行如下命令: + + $ dmesg | tail -1 + [ 5905.042081] reverse device has been registered, buffer size is 8192 bytes + +恭喜了!然而,目前这一行还只是假象而已 —— 还没有设备节点呢。让我们来搞定它。 + +#### 混杂设备 #### + +在Linux中,有一种特殊的字符设备类型,叫做“混杂设备”(或者简称为“misc”)。它是专为单一接入点的小型设备驱动而设计的,而这正是我们所需要的。所有混杂设备共享同一个主设备号(10),因此一个驱动(**drivers/char/misc.c**)就可以查看它们所有设备了,而这些设备用次设备号来区分。从其他意义来说,它们只是普通字符设备。 + +要为该设备注册一个次设备号(以及一个接入点),你需要声明**struct misc\_device**,填上所有字段(注意语法),然后使用指向该结构的指针作为参数来调用**misc\_register()**。为此,你也需要包含**linux/miscdevice.h**头文件: + + static struct miscdevice reverse_misc_device = { + .minor = MISC_DYNAMIC_MINOR, + .name = "reverse", + .fops = &reverse_fops + }; + static int __init reverse_init() + { + ... + misc_register(&reverse_misc_device); + printk(KERN_INFO ... + } + +这儿,我们为名为“reverse”的设备请求一个第一个可用的(动态的)次设备号;省略号表明我们之前已经见过的省略的代码。别忘了在模块卸下后注销掉该设备。 + + static void __exit reverse_exit(void) + { + misc_deregister(&reverse_misc_device); + ... + } + +‘fops’字段存储了一个指针,指向一个**file\_operations**结构(在Linux/fs.h中声明),而这正是我们模块的接入点。**reverse\_fops**定义如下: + + static struct file_operations reverse_fops = { + .owner = THIS_MODULE, + .open = reverse_open, + ... + .llseek = noop_llseek + }; + +另外,**reverse\_fops**包含了一系列回调函数(也称之为方法),当用户空间代码打开一个设备,读写或者关闭文件描述符时,就会执行。如果你要忽略这些回调,可以指定一个明确的回调函数来替代。这就是为什么我们将**llseek**设置为**noop\_llseek()**,(顾名思义)它什么都不干。这个默认实现改变了一个文件指针,而且我们现在并不需要我们的设备可以寻址(这是今天留给你们的家庭作业)。 + +#### 关闭和打开 #### + +让我们来实现该方法。我们将给每个打开的文件描述符分配一个新的缓冲区,并在它关闭时释放。这实际上并不安全:如果一个用户空间应用程序泄漏了描述符(也许是故意的),它就会霸占RAM,并导致系统不可用。在现实世界中,你总得考虑到这些可能性。但在本教程中,这种方法不要紧。 + +我们需要一个结构函数来描述缓冲区。内核提供了许多常规的数据结构:链接列表(双联的),哈希表,树等等之类。不过,缓冲区常常从头设计。我们将调用我们的“struct buffer”: + + struct buffer { + char *data, *end, *read_ptr; + unsigned long size; + }; + +**data**是该缓冲区存储的一个指向字符串的指针,而**end**指向字符串结尾后的第一个字节。**read_ptr**是**read()**开始读取数据的地方。缓冲区的size是为了保证完整性而存储的 —— 目前,我们还没有使用该区域。你不能假设使用你结构体的用户会正确地初始化所有这些东西,所以最好在函数中封装缓冲区的分配和收回。它们通常命名为**buffer\_alloc()**和**buffer\_free()**。 + + static struct buffer *buffer_alloc(unsigned long size) + { + struct buffer *buf; + buf = kzalloc(sizeof(*buf), GFP_KERNEL); + if (unlikely(!buf)) + goto out; + ... + out: + return buf; + } + +内核内存使用**kmalloc()**来分配,并使用**kfree()**来释放;**kzalloc()**的风格是将内存设置为全零。不同于标准的**malloc()**,它的内核对应部分收到的标志指定了第二个参数中请求的内存类型。这里,**GFP_KERNEL**是说我们需要一个普通的内核内存(不是在DMA或高内存区中)以及如果需要的话函数可以睡眠(重新调度进程)。**sizeof(*buf)**是一种常见的方式,它用来获取可通过指针访问的结构体的大小。 + +你应该随时检查**kmalloc()**的返回值:访问NULL指针将导致内核异常。同时也需要注意**unlikely()**宏的使用。它(及其相对宏**likely()**)被广泛用于内核中,用于表明条件几乎总是真的(或假的)。它不会影响到控制流程,但是能帮助现代处理器通过分支预测技术来提升性能。 + +最后,注意**goto**语句。它们常常为认为是邪恶的,但是,Linux内核(以及一些其它系统软件)采用它们来实施集中式的函数退出。这样的结果是减少嵌套深度,使代码更具可读性,而且非常像更高级语言中的**try-catch**区块。 + +有了**buffer\_alloc()**和**buffer\_free()**,**open**和**close**方法就变得很简单了。 + + static int reverse_open(struct inode *inode, struct file *file) + { + int err = 0; + file->private_data = buffer_alloc(buffer_size); + ... + return err; + } + +**struct file**是一个标准的内核数据结构,用以存储打开的文件的信息,如当前文件位置(**file->f\_pos**)、标志(**file->f\_flags**),或者打开模式(**file->f\_mode**)等。另外一个字段**file->privatedata**用于关联文件到一些专有数据,它的类型是void *,而且它在文件拥有者以外,对内核不透明。我们将一个缓冲区存储在那里。 + +如果缓冲区分配失败,我们通过返回否定值(**-ENOMEM**)来为调用的用户空间代码标明。一个C库中调用的**open(2)**系统调用(如 **glibc**)将会检测这个并适当地设置**errno** 。 + +#### 学习如何读和写 #### + +“read”和“write”方法是真正完成工作的地方。当数据写入到缓冲区时,我们放弃之前的内容和反向地存储该字段,不需要任何临时存储。**read**方法仅仅是从内核缓冲区复制数据到用户空间。但是如果缓冲区还没有数据,**revers\_eread()**会做什么呢?在用户空间中,**read()**调用会在有可用数据前阻塞它。在内核中,你就必须等待。幸运的是,有一项机制用于处理这种情况,就是‘wait queues’。 + +想法很简单。如果当前进程需要等待某个事件,它的描述符(**struct task_struct**存储‘current’信息)被放进非可运行(睡眠中)状态,并添加到一个队列中。然后**schedule()**就被调用来选择另一个进程运行。生成事件的代码通过使用队列将等待进程放回**TASK\_RUNNING**状态来唤醒它们。调度程序将在以后在某个地方选择它们之一。Linux有多种非可运行状态,最值得注意的是**TASK\_INTERRUPTIBLE**(一个可以通过信号中断的睡眠)和**TASK\_KILLABLE**(一个可被杀死的睡眠中的进程)。所有这些都应该正确处理,并等待队列为你做这些事。 + +一个用以存储读取等待队列头的天然场所就是结构缓冲区,所以从为它添加**wait\_queue\_head_t read\_queue**字段开始。你也应该包含**linux/sched.h**头文件。可以使用DECLARE\_WAITQUEUE()宏来静态声明一个等待队列。在我们的情况下,需要动态初始化,因此添加下面这行到**buffer\_alloc()**: + + init_waitqueue_head(&buf->read_queue); + +我们等待可用数据;或者等待**read\_ptr != end**条件成立。我们也想要让等待操作可以被中断(如,通过Ctrl+C)。因此,“read”方法应该像这样开始: + + static ssize_t reverse_read(struct file *file, char __user * out, + size_t size, loff_t * off) + { + struct buffer *buf = file->private_data; + ssize_t result; + while (buf->read_ptr == buf->end) { + if (file->f_flags & O_NONBLOCK) { + result = -EAGAIN; + goto out; + } + if (wait_event_interruptible + (buf->read_queue, buf->read_ptr != buf->end)) { + result = -ERESTARTSYS; + goto out; + } + } + ... + +我们让它循环,直到有可用数据,如果没有则使用**wait\_event\_interruptible()**(它是一个宏,不是函数,这就是为什么要通过值的方式给队列传递)来等待。好吧,如果**wait\_event\_interruptible()**被中断,它返回一个非0值,这个值代表**-ERESTARTSYS**。这段代码意味着系统调用应该重新启动。**file->f\_flags**检查以非阻塞模式打开的文件数:如果没有数据,返回**-EAGAIN**。 + +我们不能使用**if()**来替代**while()**,因为可能有许多进程正等待数据。当**write**方法唤醒它们时,调度程序以不可预知的方式选择一个来运行,因此,在这段代码有机会执行的时候,缓冲区可能再次空出。现在,我们需要将数据从**buf->data** 复制到用户空间。**copy\_to\_user()**内核函数就干了此事: + + size = min(size, (size_t) (buf->end - buf->read_ptr)); + if (copy_to_user(out, buf->read_ptr, size)) { + result = -EFAULT; + goto out; + } + +如果用户空间指针错误,那么调用可能会失败;如果发生了此事,我们就返回**-EFAULT**。记住,不要相信任何来自内核外的事物! + + buf->read_ptr += size; + result = size; + out: + return result; + } + +为了使数据在任意块可读,需要进行简单运算。该方法返回读入的字节数,或者一个错误代码。 + +写方法更简短。首先,我们检查缓冲区是否有足够的空间,然后我们使用**copy\_from\_userspace()**函数来获取数据。再然后**read\_ptr**和结束指针会被重置,并且反转存储缓冲区内容: + + buf->end = buf->data + size; + buf->read_ptr = buf->data; + if (buf->end > buf->data) + reverse_phrase(buf->data, buf->end - 1); + +这里, **reverse\_phrase()**干了所有吃力的工作。它依赖于**reverse\_word()**函数,该函数相当简短并且标记为内联。这是另外一个常见的优化;但是,你不能过度使用。因为过多的内联会导致内核映像徒然增大。 + +最后,我们需要唤醒**read\_queue**中等待数据的进程,就跟先前讲过的那样。**wake\_up\_interruptible()**就是用来干此事的: + + wake_up_interruptible(&buf->read_queue); + +耶!你现在已经有了一个内核模块,它至少已经编译成功了。现在,是时候来测试了。 + +### 调试内核代码 ### + +> 或许,内核中最常见的调试方法就是打印。如果你愿意,你可以使用普通的**printk()** (假定使用**KERN\_DEBUG**日志等级)。然而,那儿还有更好的办法。如果你正在写一个设备驱动,这个设备驱动有它自己的“struct device”,可以使用**pr\_debug()**或者**dev\_dbg()**:它们支持动态调试(**dyndbg**)特性,并可以根据需要启用或者禁用(请查阅**Documentation/dynamic-debug-howto.txt**)。对于单纯的开发消息,使用**pr\_devel()**,除非设置了DEBUG,否则什么都不会做。要为我们的模块启用DEBUG,请添加以下行到Makefile中: + +> CFLAGS_reverse.o := -DDEBUG +> +> 完了之后,使用**dmesg**来查看**pr_debug()**或**pr_devel()**生成的调试信息。 +> 或者,你可以直接发送调试信息到控制台。要想这么干,你可以设置**console_loglevel**内核变量为8或者更大的值(**echo 8 /proc/sys/kernel/printk**),或者在高日志等级,如**KERN_ERR**,来临时打印要查询的调试信息。很自然,在发布代码前,你应该移除这样的调试声明。 + +> 注意内核消息出现在控制台,不要在Xterm这样的终端模拟器窗口中去查看;这也是在内核开发时,建议你不在X环境下进行的原因。 + +### 惊喜,惊喜! ### + +编译模块,然后加载进内核: + + $ make + $ sudo insmod reverse.ko buffer_size=2048 + $ lsmod + reverse 2419 0 + $ ls -l /dev/reverse + crw-rw-rw- 1 root root 10, 58 Feb 22 15:53 /dev/reverse + +一切似乎就位。现在,要测试模块是否正常工作,我们将写一段小程序来翻转它的第一个命令行参数。**main()**(再三检查错误)可能看上去像这样: + + int fd = open("/dev/reverse", O_RDWR); + write(fd, argv[1], strlen(argv[1])); + read(fd, argv[1], strlen(argv[1])); + printf("Read: %s\n", argv[1]); + +像这样运行: + + $ ./test 'A quick brown fox jumped over the lazy dog' + Read: dog lazy the over jumped fox brown quick A + +它工作正常!玩得更逗一点:试试传递单个单词或者单个字母的短语,空的字符串或者是非英语字符串(如果你有这样的键盘布局设置),以及其它任何东西。 + +现在,让我们让事情变得更好玩一点。我们将创建两个进程,它们共享一个文件描述符(及其内核缓冲区)。其中一个会持续写入字符串到设备,而另一个将读取这些字符串。在下例中,我们使用了**fork(2)**系统调用,而pthreads也很好用。我也省略打开和关闭设备的代码,并在此检查代码错误(又来了): + + char *phrase = "A quick brown fox jumped over the lazy dog"; + if (fork()) + /* Parent is the writer */ + while (1) + write(fd, phrase, len); + else + /* child is the reader */ + while (1) { + read(fd, buf, len); + printf("Read: %s\n", buf); + } + +你希望这个程序会输出什么呢?下面就是在我的笔记本上得到的东西: + + Read: dog lazy the over jumped fox brown quick A + Read: A kcicq brown fox jumped over the lazy dog + Read: A kciuq nworb xor jumped fox brown quick A + Read: A kciuq nworb xor jumped fox brown quick A + ... + +这里发生了什么呢?就像举行了一场比赛。我们认为**read**和**write**是原子操作,或者从头到尾一次执行一个指令。然而,内核确实无序并发的,随便就重新调度了**reverse\_phrase()**函数内部某个地方运行着的写入操作的内核部分。如果在写入操作结束前就调度了**read()**操作呢?就会产生数据不完整的状态。这样的bug非常难以找到。但是,怎样来处理这个问题呢? + +基本上,我们需要确保在写方法返回前没有**read**方法能被执行。如果你曾经编写过一个多线程的应用程序,你可能见过同步原语(锁),如互斥锁或者信号。Linux也有这些,但有些细微的差别。内核代码可以运行进程上下文(用户空间代码的“代表”工作,就像我们使用的方法)和终端上下文(例如,一个IRQ处理线程)。如果你已经在进程上下文中和并且你已经得到了所需的锁,你只需要简单地睡眠和重试直到成功为止。在中断上下文时你不能处于休眠状态,因此代码会在一个循环中运行直到锁可用。关联原语被称为自旋锁,但在我们的环境中,一个简单的互斥锁 —— 在特定时间内只有唯一一个进程能“占有”的对象 —— 就足够了。处于性能方面的考虑,现实的代码可能也会使用读-写信号。 + +锁总是保护某些数据(在我们的环境中,是一个“struct buffer”实例),而且也常常会把它们嵌入到它们所保护的结构体中。因此,我们添加一个互斥锁(‘struct mutex lock’)到“struct buffer”中。我们也必须用**mutex\_init()**来初始化互斥锁;**buffer\_alloc**是用来处理这件事的好地方。使用互斥锁的代码也必须包含**linux/mutex.h**。 + +互斥锁很像交通信号灯 —— 要是司机不看它和不听它的,它就没什么用。因此,在对缓冲区做操作并在操作完成时释放它之前,我们需要更新**reverse\_read()**和**reverse\_write()**来获取互斥锁。让我们来看看**read**方法 —— **write**的工作原理相同: + + static ssize_t reverse_read(struct file *file, char __user * out, + size_t size, loff_t * off) + { + struct buffer *buf = file->private_data; + ssize_t result; + if (mutex_lock_interruptible(&buf->lock)) { + result = -ERESTARTSYS; + goto out; + } + +我们在函数一开始就获取锁。**mutex\_lock\_interruptible()**要么得到互斥锁然后返回,要么让进程睡眠,直到有可用的互斥锁。就像前面一样,**\_interruptible**后缀意味着睡眠可以由信号来中断。 + + while (buf->read_ptr == buf->end) { + mutex_unlock(&buf->lock); + /* ... wait_event_interruptible() here ... */ + if (mutex_lock_interruptible(&buf->lock)) { + result = -ERESTARTSYS; + goto out; + } + } + +下面是我们的“等待数据”循环。当获取互斥锁时,或者发生称之为“死锁”的情境时,不应该让进程睡眠。因此,如果没有数据,我们释放互斥锁并调用**wait\_event\_interruptible()**。当它返回时,我们重新获取互斥锁并像往常一样继续: + + if (copy_to_user(out, buf->read_ptr, size)) { + result = -EFAULT; + goto out_unlock; + } + ... + out_unlock: + mutex_unlock(&buf->lock); + out: + return result; + +最后,当函数结束,或者在互斥锁被获取过程中发生错误时,互斥锁被解锁。重新编译模块(别忘了重新加载),然后再次进行测试。现在你应该没发现毁坏的数据了。 + +### 接下来是什么? ### + +现在你已经尝试了一次内核黑客。我们刚刚为你揭开了这个话题的外衣,里面还有更多东西供你探索。我们的第一个模块有意识地写得简单一点,在从中学到的概念在更复杂的环境中也一样。并发、方法表、注册回调函数、使进程睡眠以及唤醒进程,这些都是内核黑客们耳熟能详的东西,而现在你已经看过了它们的运作。或许某天,你的内核代码也将被加入到主线Linux源代码树中 —— 如果真这样,请联系我们! + +-------------------------------------------------------------------------------- + +via: http://www.linuxvoice.com/be-a-kernel-hacker/ + +译者:[GOLinux](https://github.com/GOLinux) [disylee](https://github.com/disylee) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.libusb.org/ +[2]:http://fuse.sf.net/ +[3]:http://www.linuxvoice.com/be-a-kernel-hacker/www.netfilter.org/projects/libnetfilter_queue +[4]:http://lxr.free-electrons.com/ \ No newline at end of file diff --git a/published/20140604 Command line secrets.md b/published/201406/20140604 Command line secrets.md similarity index 100% rename from published/20140604 Command line secrets.md rename to published/201406/20140604 Command line secrets.md diff --git a/published/20140604 Setup Virtual Hosts In Apache On Ubuntu 14.04 LTS.md b/published/201406/20140604 Setup Virtual Hosts In Apache On Ubuntu 14.04 LTS.md similarity index 100% rename from published/20140604 Setup Virtual Hosts In Apache On Ubuntu 14.04 LTS.md rename to published/201406/20140604 Setup Virtual Hosts In Apache On Ubuntu 14.04 LTS.md diff --git a/translated/tech/20140607 Cup 2014 Brazil--Watch FIFA World Cup 2014 Competition in Your Linux Desktop.md b/published/201406/20140607 Cup 2014 Brazil--Watch FIFA World Cup 2014 Competition in Your Linux Desktop.md similarity index 76% rename from translated/tech/20140607 Cup 2014 Brazil--Watch FIFA World Cup 2014 Competition in Your Linux Desktop.md rename to published/201406/20140607 Cup 2014 Brazil--Watch FIFA World Cup 2014 Competition in Your Linux Desktop.md index 4272c2a49a..d7922c31ee 100644 --- a/translated/tech/20140607 Cup 2014 Brazil--Watch FIFA World Cup 2014 Competition in Your Linux Desktop.md +++ b/published/201406/20140607 Cup 2014 Brazil--Watch FIFA World Cup 2014 Competition in Your Linux Desktop.md @@ -2,12 +2,13 @@ ================================================================================ 足球是世界上受众最广和观众最多的运动,现代足球起源于英国。足球运动员平均每场比赛要跑6个多英里。上届南非世界杯有近10亿的电视观众,而今年的的观赛数量预计还要增加。 -2014年第20界世界杯将会在巴西举行,时间安排为从6月12号开始持续到7月13号,共有32个国家参加这项赛事。 +2014年第20界世界杯在巴西举行,时间安排为从6月12号开始持续到7月13号,共有32个国家参加这项赛事。 爱足球的小伙子们,我们将要介绍一款可以提供最新的赛况以及你喜欢的球队的进球数信息的应用程序,它叫做“icup 2014 Brazil”。下面让我们介绍它的特点,用法和安装等。 ![iCup 2014 Brazil](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014.jpeg) -iCup 2014 Brazil + +*iCup 2014 Brazil* ### 什么是“icup 2014 Brazil” ### @@ -15,8 +16,8 @@ iCup 2014 Brazil ### “icup 2014 Brazil”的特点### -- 自适应灵活的用户接口 -- 查看状态迅速 +- 自适应的用户界面,比如自动缩放 +- 迅速查看战绩 - 支持Facebook、twitter和Google+社交分享功能 - 支持Retina显示输出 - 实时跟踪比赛结果 @@ -27,20 +28,16 @@ iCup 2014 Brazil ### 平台和框架支持 ### -这款软件可以运行在Mac、windows和linux上,特别提醒它只能支持X86的CPU。 -当然它也可以在X64的平台上安装,我们需要做一下设置。 - +这款软件可以运行在Mac、windows和linux上,特别提醒,在Linux上,它是为x86的CPU设计的,虽然它也可以在x64的平台上安装,不过我们需要做一下设置。 #### 在不同平台的技术规范 #### -- 实时结果,日历,数据分组,第二阶段整合,社交网络连接和多语言支持,全平台支持 -- Retina显示支持,不支持windows和linux,仅支持Mac OS -- 详细的统计-支持linux windows和Mac -- 声音小工具-支持MAC和linux,windows未知 - - -**Important**: 面的特点都是可见的,一些具体的特性除了linux外都不是免费提供的,为了服务器和带宽费用。对于linux用户来说,任何细节不需要关心,高兴的用去吧。 +- 实时结果,日历,数据分组,第二阶段整合,社交网络连接和多语言支持,这些支持全平台 +- Retina显示支持,这个不支持windows和linux,仅支持Mac OS +- 详细的统计-支持linux。在windows和Mac需要捐赠才行 +- 声音小工具-支持MAC和linux,windows不确定 +**重要**: 上面的特点都支持,一些具体的特性除了linux外都不是免费提供的,这是为了支付服务器和带宽费用。对于linux用户来说,任何细节不需要关心,高兴的用去吧。 ### Linux下安装“icup 2014 Brazil” ### @@ -53,9 +50,9 @@ iCup 2014 Brazil # cd iCup\ 2014\ FREE\ -\ Brazil\ 1.1/ # chmod 755 iCup\ 2014\ FREE\ -\ Brazil -如上文所说,这个应用程序只为X86架构设计,为了在64位架构下安装32位的软件,我们需要安装一些软件包**GTK+2**和**libstdc++.so.6**给我们的系统。 +如上文所说,这个应用程序只为X86架构设计,为了在64位架构下安装32位的软件,我们需要在系统上安装一些软件包:**GTK+2**和**libstdc++.so.6**。 -不只是这款软件,一大堆Linux下的软件不支持64位架构,例如**Skype**,我们改建我们的系统来安装这些软件。 +不只是这款软件,一大堆Linux下的软件不支持64位架构,例如**Skype**,我们也需要这样调整我们的系统来安装这些软件。 #### 在64位系统下 #### @@ -78,42 +75,49 @@ iCup 2014 Brazil # cd iCup\ 2014\ FREE\ -\ Brazil\ 1.1/ # chmod 755 iCup\ 2014\ FREE\ -\ Brazil -然后,进入软件所在目录,双击可执行文件启动软件。下面的截屏图中看不到所有的信息,因为2014年世界杯现在还没开始呢,开始后我们就能看到结果了。 +然后,进入软件所在目录,双击可执行文件启动软件。下面的截屏图中看不到所有的信息,**因为本文写作时2014年世界杯现在还没开始呢,开始后我们就能看到结果了**。 ![iCup Brazil 2014](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-01-620x437.jpeg) + iCup Brazil 2014 无具体信息,世界杯尚未开始。 ![Match Detailed Information](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-02-620x439.jpeg) + Match Detailed Information 分组和队伍 ![Groups and Teams](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-03-620x439.jpeg) + Groups and Teams 第二阶段详细信息 ![2nd stage Detailed Information](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-04-620x438.jpeg) + 2nd stage Detailed Information 比赛细节,尚未完整 ![Match Summary](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-05-620x440.jpeg) + Match Summary 集成语言切换和社交分享按钮 ![Language Change](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-06-620x440.jpeg) + Language Change -Linux开启捐赠,可以贡献你的心意。 +Linux上捐赠是可选的,你可以贡献你的心意。 ![Donation](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-07-620x435.jpeg) + Donation -### 结果 ### +### 总结 ### 上面的这个软件有望成为足球粉丝的一大福利,赶快在线试用吧。 @@ -124,7 +128,7 @@ Donation via: http://www.tecmint.com/view-fifa-world-cup-matche-results/ -译者:[jiajia9linuxer](https://github.com/jiajia9linuxer) 校对:[校对者ID](https://github.com/校对者ID) +译者:[jiajia9linuxer](https://github.com/jiajia9linuxer) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20140607 How To Extract Images From Videos Using ffmpeg.md b/published/201406/20140607 How To Extract Images From Videos Using ffmpeg.md similarity index 67% rename from translated/tech/20140607 How To Extract Images From Videos Using ffmpeg.md rename to published/201406/20140607 How To Extract Images From Videos Using ffmpeg.md index 2de1fbfa63..d86b18b2b3 100644 --- a/translated/tech/20140607 How To Extract Images From Videos Using ffmpeg.md +++ b/published/201406/20140607 How To Extract Images From Videos Using ffmpeg.md @@ -1,26 +1,25 @@ -如何使用ffmpeg从视频中提取图片(有些专业词汇不太懂可能翻译错了,各位校译幸苦了) +如何使用ffmpeg从视频中提取图片 ================================================================================ -嗨,unixmen的读者们, -你曾想过从一个视频文件中提取图片吗?在Linux中做这件事是有可能的,教程中我将使用ffmpeg来从视频中获取图片。 +你曾想过从一个视频文件中提取图片吗?在Linux下就可以,在这个教程中我将使用ffmpeg来从视频中获取图片。 ### 什么是ffmpeg?What is ffmpeg? ### -ffmpeg是一个非常有用的命令行程序,它可以用来转码媒体文件。它是FFmpeg领先的多媒体框架的一部分,其有很多功能,比如解码、编码、转码、混流、分离、转化为流、过滤以及播放几乎所有的的由人和机器创建的媒体文件。 +ffmpeg是一个非常有用的命令行程序,它可以用来转码媒体文件。它是领先的多媒体框架FFmpeg的一部分,其有很多功能,比如解码、编码、转码、混流、分离、转化为流、过滤以及播放几乎所有的由人和机器创建的媒体文件。 -框架中包含有很多不同的工具,其中每一个都有特定的功能。例如,ffserver能够将多媒体文件转化为用于实时广播的流,ffprobe用于分析多媒体流,ffplay可以当作一个简易的媒体播放器,**ffmpeg**能够转换多媒体文件格式。 +在这个框架中包含有各种工具,每一个用于完成特定的功能。例如,ffserver能够将多媒体文件转化为用于实时广播的流,ffprobe用于分析多媒体流,ffplay可以当作一个简易的媒体播放器,**ffmpeg**则能够转换多媒体文件格式。 -如果你感兴趣,以下是包括在FFmpeg框架中的开发者库: +如果你感兴趣,以下列出的是FFmpeg框架中包含的开发者库: - libavutil是一个包含简化编程功能的库,其中包括随机数生成器,数据结构,数学代码,核心多媒体工具等更多东西。 - libavcodec是一个包含音频/视频解码器和编码器的库。 -- libavformat是一个包含了多媒体格式的解析器和产生器的库。 -- libavdevice是一个包含输入输出设备的库,用于捕捉和渲染很多公共多媒体输入/输出软件框架,包括Video4Linux,Video4Linux2,VfW和ALSA。 +- libavformat是一个包含了多媒体格式的分离器和混流器的库。 +- libavdevice是一个包含输入输出设备的库,用于捕捉和渲染很多来自常用的多媒体输入/输出软件框架的数据,包括Video4Linux,Video4Linux2,VfW和ALSA。 - libavfilter是一个包含媒体过滤器的库。 - libswscale是一个用于执行高度优化的图像缩放和颜色空间/像素格式转换操作的库。 -- libswresample是一个用于执行高度优化的音频重采样,重新矩阵和样本格式转换操作的库。 +- libswresample是一个用于执行高度优化的音频重采样,重新矩阵和取样格式转换操作的库。 -**注意**:ffmpeg和FFmpeg并不一样。FFmpeg是一个框架而ffmpeg是一个FFmpeg中的一个功能。 +**注意**:ffmpeg和FFmpeg不是同一个东西。FFmpeg是框架,而ffmpeg是一个其中的一个功能。 ### 开始行动 ### @@ -57,9 +56,9 @@ Fedora用户可以从源中直接安装ffmpeg。 之后我使用以下命令从视频中提取图片。 - ffmpeg -i "Тимати - Рентген ( Альбом '13')-C9Plztvv8ac.mp4" -r 1 -q:v 2 -f image2 image-3%d.jpeg + ffmpeg -i "你是我的小呀小苹果儿.mp4" -r 1 -q:v 2 -f image2 image-3%d.jpeg -**-i**选项用来获取输入文件,在这里是视频文件名**Тимати – Рентген ( Альбом ’13′)-C9Plztvv8ac.mp4**,-r选项设置每秒提取图片的帧数。我想要每秒提取一帧。 +**-i**选项用来获取输入文件,在这里是视频文件名**你是我的小呀小苹果儿.mp4**,-r选项设置每秒提取图片的帧数。我想要每秒提取一帧。 之后有一个重要的选项是-q:v,应该留意这个选项并且我很喜欢用它,它用来设置提取到的图片质量。我总是设置值为2来从视频中获取高质量图片。 @@ -67,6 +66,6 @@ Fedora用户可以从源中直接安装ffmpeg。 via: http://www.unixmen.com/extract-images-videos-using-ffmpeg/ -译者:[linuhap](https://github.com/linuhap) 校对:[校对者ID](https://github.com/校对者ID) +译者:[linuhap](https://github.com/linuhap) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/published/201406/20140607 How To Install iCup 2014 In Linux.md b/published/201406/20140607 How To Install iCup 2014 In Linux.md new file mode 100644 index 0000000000..dd38b3238c --- /dev/null +++ b/published/201406/20140607 How To Install iCup 2014 In Linux.md @@ -0,0 +1,33 @@ +在Linux上用iCup追世界杯 +================================================================================ +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/icup2014-790x389.png) + +嗨,Linux 极客们, + +在本文简短的叙述中,我将教您如何在Linux中安装一个非常棒的2014FIFA世界杯APP。这个应用叫iCup,支持Windows,Mac以及伟大的Linux。 + +我看足球比赛已经有很长的时间了,所以我得在我的电脑上装个这样的应用来保持更新2014世界杯的最新情况。我可不想在我朋友们面前看起来像一无所知的笨货。iCup应用正好提供了每一场赛程、比分、球队教练组等信息。更有提供实时比赛更新,给您提供 正在进行的比赛的最新数据。 + +### 支持以下功能: ### + +- 30种语言支持,完全本地化(使用语言菜单选择) +- 独家的灵活界面可随意调整窗口大小 +- 可按日期或阶段检索比赛日历 +- 可视化分组 +- 支持自动转变比赛时间来适应本地时间和格式 +- 一键化社交网络发表比赛评论(支持Facebook,Google+和Twitter) +- 支持代理(支持基本认证和摘要认证方法) + +我已经在Ubuntu12.04LTS上用过而且真的很好用!目前为止,这款软件还没有出错或者崩溃过。通过[官方网站][1]您可以下载到压缩包并且十分轻松地安装这个很棒的应用,然后您可以解压到任何您喜欢的地方。解压完成后,双击iCup 2014 FREE- Brazil运行。 + +iCup真心好用,我希望您也能用其享受世界杯! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/install-icup-2014-linux/ + +译者:[Vic020](http://www.vicyu.net) 校对:[213edu](http://ryanhu.me/) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.e-link.it/icup/brazil2014/icup-brazil-2014-desktop-app.php diff --git a/translated/tech/20140607 Linux--Bash Delete All Files In Directory Except Few.md b/published/201406/20140607 Linux--Bash Delete All Files In Directory Except Few.md similarity index 64% rename from translated/tech/20140607 Linux--Bash Delete All Files In Directory Except Few.md rename to published/201406/20140607 Linux--Bash Delete All Files In Directory Except Few.md index da9ce214c9..d75e0c9ce5 100644 --- a/translated/tech/20140607 Linux--Bash Delete All Files In Directory Except Few.md +++ b/published/201406/20140607 Linux--Bash Delete All Files In Directory Except Few.md @@ -2,11 +2,12 @@ Linux:使用bash删除目录中的特定文件 ================================================================================ ![](http://s0.cyberciti.org/images/category/old/terminal.png) -我是一个Linux新手用户。现在我需要清理一个下载目录中的文件,其实我就是想删除~/Download/文件夹下面除了以下格式的文件外所以其它文件: -*.iso - 所有的iso格式的文件。 -*.zip - 所有zip格式的文件。 +我是一名Linux新用户。现在我需要清理一个下载目录中的文件,其实我就是想从~/Download/文件夹删去除了以下格式的文件外所以其它文件: -我如何在一个基于Linux,OS X 或者Unix-like系统上的bash shell中删除特定的文件呢? +- *.iso - 所有的iso格式的文件。 +- *.zip - 所有zip格式的文件。 + +我如何在一个基于Linux,OS X 或者 Unix-like 系统上的bash shell中删除特定的文件呢? Bash shell 支持丰富的文件模式匹配符例如: @@ -18,13 +19,15 @@ Bash shell 支持丰富的文件模式匹配符例如: 这里你需要用系统内置的shopt命令来开启shell中的extglob选项,然后你就可以使用扩展的模式符了,这些模式匹配符如下: -1. ?(pattern-list) - 匹配零次或一次给定的模式。 -1. *(pattern-list) -至少匹配零次给定的模式。 -1. +(pattern-list) - 至少匹配一次给定的模式。 -1. @(pattern-list) - 匹配一次给定的模式。 -1. !(pattern-list) - 匹配所有除给定模式以外的模式。 +1. ?(模式列表) - 匹配零次或一次给定的模式。 +1. *(模式列表) - 匹配零次或多次给定的模式。 +1. +(模式列表) - 至少匹配一次给定的模式。 +1. @(模式列表) - 匹配一次给定的模式。 +1. !(模式列表) - 不匹配给定模式。 -一个模式列表就是一个或多个用 | 分开的模式(文件名)。首先打开extgolb选项: +一个模式列表就是一个或多个用 | 分开的模式(文件名)。 + +首先要打开extgolb选项: shopt -s extglob @@ -47,20 +50,21 @@ rm 命令的语法格式为: ## 你也可以使用完整的目录 ## rm /Users/vivek/!(*.zip|*.iso|*.mp3) - ## 传递参数 ## - rm [options] !(*.zip|*.iso) + ## 也可以传递参数 ## + rm [选项] !(*.zip|*.iso) rm -v !(*.zip|*.iso) rm -f !(*.zip|*.iso) rm -v -i !(*.php) -最后,关闭 extglob 选项: +最后,关闭 extglob 选项方法如下: shopt -u extglob ### 策略 #2: 使用bash的 GLOBIGNORE 变量删除指定文件以外的所有文件 ### 摘自 [bash(1)][1] 手册页: -> 一个用冒号分开的模式列表定义了被路径扩展忽略的文件的集合。如果一个文件同时与路径扩展模式和GLOBIGNORE中的模式匹配,那么它就从匹配列表中移除了。 + +> 这是一个用冒号分开的模式列表,通过路径展开方式定义了要忽略的文件集合。如果一个匹配到路径展开模式的文件也匹配GLOBIGNORE中的模式,那么它会从匹配列表中移除。 要删除所有文件只保留 zip 和 iso 文件,应如下设置 GLOBIGNORE: @@ -75,16 +79,16 @@ rm 命令的语法格式为: 如果你正在使用 tcsh/csh/sh/ksh 或者其它shell,你可以在Unix-like系统上试着用下面find命令的语法格式来删除文件: - find /dir/ -type f -not -name 'PATTERN' -delete + find /dir/ -type f -not -name '匹配模式' -delete 或者 ## 对于怪异的文件名可以使用 xargs ## - find /dir/ -type f -not -name 'PATTERN' -print0 | xargs -0 -I {} rm {} - find /dir/ -type f -not -name 'PATTERN' -print0 | xargs -0 -I {} rm [options] {} + find /dir/ -type f -not -name '匹配模式' -print0 | xargs -0 -I {} rm {} + find /dir/ -type f -not -name '匹配模式' -print0 | xargs -0 -I {} rm [选项] {} -为了删除 ~/source 目录下除 php 以外的文件,键入: +想要删除 ~/source 目录下除 php 以外的文件,键入: find ~/sources/ -type f -not -name '*.php' -delete @@ -103,9 +107,9 @@ rm 命令的语法格式为: via: http://www.cyberciti.biz/faq/linux-bash-delete-all-files-in-directory-except-few/ -译者:[Linchenguang](https://github.com/Linchenguang) 校对:[校对者ID](https://github.com/校对者ID) +译者:[Linchenguang](https://github.com/Linchenguang) 校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [1]:http://www.manpager.com/linux/man1/bash.1.html -[2]:http://www.manpager.com/linux/man1/find.1.html +[2]:http://www.manpager.com/linux/man1/find.1.html diff --git a/published/20140607 New OpenSSL breach is no Heartbleed-but needs to be taken seriously.md b/published/201406/20140607 New OpenSSL breach is no Heartbleed-but needs to be taken seriously.md similarity index 100% rename from published/20140607 New OpenSSL breach is no Heartbleed-but needs to be taken seriously.md rename to published/201406/20140607 New OpenSSL breach is no Heartbleed-but needs to be taken seriously.md diff --git a/translated/tech/20140607 Nuvola Player 2.4.0 Released -- A Online Cloud Music Player for Linux.md b/published/201406/20140607 Nuvola Player 2.4.0 Released -- A Online Cloud Music Player for Linux.md similarity index 88% rename from translated/tech/20140607 Nuvola Player 2.4.0 Released -- A Online Cloud Music Player for Linux.md rename to published/201406/20140607 Nuvola Player 2.4.0 Released -- A Online Cloud Music Player for Linux.md index eaeb6e26ae..fe32c4c48d 100644 --- a/translated/tech/20140607 Nuvola Player 2.4.0 Released -- A Online Cloud Music Player for Linux.md +++ b/published/201406/20140607 Nuvola Player 2.4.0 Released -- A Online Cloud Music Player for Linux.md @@ -1,28 +1,30 @@ Linux下的在线云音乐播放器 —— Nuvola Player 2.4.0发布 ================================================================================ -**Nuvola Player**是一个开源的播放器,在它自身的web界面中运行像Amazon云播放器,Bandcamp,Deezer,8tracks,Google Play音乐,Grooveshark,Hyper Machine以及Pandora等等云音乐服务,同时它也能整合到Linux桌面中。 +**Nuvola Player**是一个开源的播放器,可以在其web界面中运行像Amazon云播放器,Bandcamp,Deezer,8tracks,Google Play音乐,Grooveshark,Hyper Machine以及Pandora等等云音乐服务,同时它也能整合到Linux桌面中。 该应用程序以插件的形式提供了大量的功能特性,像桌面通知、系统托盘、多媒体键、媒体播放器小程序、停靠栏菜单、歌词、last.fm等等。 -**2014年5月31日**,**Nuvola Player 2.4.0**的一个新版本发布了 —— 它带来了一些新的特性,包括两个新的服务罗技媒体服务器和这是我的果酱,以及众多的bug修复。 +**2014年5月31日**,**Nuvola Player 2.4.0**的一个新版本发布了 —— 它带来了一些新的特性,包括两个新的服务“Logitech Media Server”和“This is My Jam ”,以及众多的bug修复。 ### 这个发布中有什么新东西 ### -- 删除了破损的隐藏Google+按钮选项,因为Google修改代码过于频繁。 +- 删除了破损的隐藏Google+按钮选项,因为Google修改代码过于频繁了。 - 加快了服务设置的启用速度,不需要再重新加载。 - 修复了暂停和播放/暂停动作开关。 - 为Chrome添加了兼容问题警告桌面通知。 - 提供了页面内导航按钮(现在用户可以在Google Play标识旁边的顶部栏中找到它)。 -- 添加了罗技媒体服务器和这是我的果酱服务。 +- 添加了“Logitech Media Server”和“This is My Jam ”服务。 - 包含了对鼠标后退/前进按钮的支持。 - 修复了对GNOME锁屏通知的支持。 要查看完整的特性列表,请访问官方发行[声明页面][1] -### 在Debian, Ubuntu和Linux Mint中安装Nuvola Player ### +## 在Debian, Ubuntu和Linux Mint中安装Nuvola Player ## + 官方的Nuvola Player仓库中包含了**Ubuntu 14.04, 13.10, 12.10, 12.04**以及**Linux Mint 17, 16, 15, 14.**可用的二进制包,你可以通过添加Nuvola Player仓库到你的系统中来安装二进制包‘nuvolaplayer’。 -#### 在Ubuntu和Linux Mint上 #### +### 在Ubuntu和Linux Mint上 ### + 打开终端并运行以下一系列命令: $ sudo add-apt-repository ppa:nuvola-player-builders/stable @@ -36,7 +38,8 @@ Linux下的在线云音乐播放器 —— Nuvola Player 2.4.0发布 $ sudo apt-get --no-install-recommends install nuvolaplayer -#### 在Debian上 #### +### 在Debian上 ### + 对于**Debian Wheezy**和**Debian Sid**,可以从官方仓库中获取稳定的Nuvola Player二进制包。你可以使用下面这一堆命令来安装最新的稳定版。 首先,打开终端并导入公钥,然后添加仓库到‘**sources.list**‘文件,接着像下面这样进行一次系统更新来安装nuvolaplayer。 @@ -97,7 +100,7 @@ Rdio音乐服务 via: http://www.tecmint.com/install-nuvola-player-in-linux/ -译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20140607 Practical Interview Questions and Answers on Linux Shell Scripting.md b/published/201406/20140607 Practical Interview Questions and Answers on Linux Shell Scripting.md similarity index 79% rename from translated/tech/20140607 Practical Interview Questions and Answers on Linux Shell Scripting.md rename to published/201406/20140607 Practical Interview Questions and Answers on Linux Shell Scripting.md index 9157a8dbfe..460f0d01ec 100644 --- a/translated/tech/20140607 Practical Interview Questions and Answers on Linux Shell Scripting.md +++ b/published/201406/20140607 Practical Interview Questions and Answers on Linux Shell Scripting.md @@ -12,7 +12,7 @@ ### 1. 写一个shell脚本来得到当前的日期,时间,用户名和当前工作目录。 ### -> **Answer** : 将输出用户名,当前日期和时间,以及当前工作目录的命令就是logname,date,who i am和pwd。 +> **答案** : 输出用户名,当前日期和时间,以及当前工作目录的命令就是logname,date,who i am和pwd。 现在,创建一个名为**`userstats.sh`**文件,将下面的代码添加到它。 @@ -22,7 +22,7 @@ echo "User is `who i am`" echo "Current directory `pwd`" -给他添加执行权限,并且执行他。 +给它添加执行权限,并且执行他。 # chmod 755 userstats.sh # ./userstats.sh @@ -34,10 +34,9 @@ User is avi pts/0 2014-06-07 11:59 (:0) Current directory /home/avi/Desktop -### 2.写一个shell脚本,进行两个数字的相加,如果没有输入参数就输出错误信息和使用说明的### +### 2.写一个shell脚本,进行两个数字的相加,如果没有输入参数就输出错误信息和一行使用说明### -> **Answer** : -下面是简单的shell脚本以及描述,如果没有命令行参数,它会抛出错误与如何使用脚本的说明。 +> **答案** : 下面是简单的shell脚本以及描述,如果没有命令行参数,它会抛出错误与如何使用脚本的说明。 再创建一个名为**`twonumbers.sh`**文件和下面的内容添加到文件里。 @@ -70,24 +69,24 @@ # chmod 755 two-numbers.sh -**Condition 1**: 未输入两个数字作为命令行参数运行脚本,你将得到下面的输出。 +**情形一**: 未输入两个数字作为命令行参数运行脚本,你将得到下面的输出。 -#### Sample Output #### +#### 样例输出 #### # ./two-numbers.sh Usage - ./two-numbers.sh x y Where x and y are two nos for which I will print sum -**Condition 2**: 当数字存在时,你会得到如图所示的结果。 +**情形二**: 当数字存在时,你会得到如图所示的结果。 $ ./two-numbers.sh 4 5 Sum of 4 and 5 is 9 -因此,上述shell脚本满足条件作为问题提出了建议。 +因此,上述shell脚本满足了问题的要求。 -### 3.你需要打印一个给定的数字的反序,如输入10572,输出27501,如果没有输入数据,应该抛出错误和使用脚本说明。在此之前,告诉我,你需要在这里使用的算法。 ### +### 3.你需要打印一个给定的数字的反序,如输入10572,输出27501,如果没有输入数据,应该抛出错误和使用脚本说明。在此之前,告诉我你需要在这里使用的算法。 ### #### 算法 #### @@ -95,7 +94,7 @@ 2. 赋值 rev=0, sd=0 (反向和单个数字设置为0) 3. n % 10, 将得到最左边的数字 4. 反向数字可以用这个方法生成 rev * 10 + sd -5. 对输入数字进行-1操作 +5. 对输入数字进行右位移操作(除以10) 6. 如果n > 0, 进入第三步,否则进行第七步 7. 输出rev @@ -126,9 +125,9 @@ # chmod 755 numbers.h -**Condition 1**: 当输入不包含命令行参数,你将得到下面的输出。 +**情形一**: 当输入不包含命令行参数,你将得到下面的输出。 -#### Sample Output #### +#### 样例输出 #### ./numbers.sh @@ -136,7 +135,7 @@ I will find reverse of given number For eg. ./2.sh 123, I will print 321 -**Condition 2**: 正常输入 +**情形二**: 正常输入 $ ./numbers.sh 10572 @@ -146,9 +145,7 @@ ### 4. 你应该直接用终端,而不是依靠任何shell脚本来进行实数计算。你会怎么做(比如实数7.56+2.453)? ### -> **Answer** : - -我们需要用如下所述的特殊方式使用bc命令。将7.56+2.453作为输入通过管道进入bc中。 +> **答案** : 我们需要用如下所述的特殊方式使用bc命令。将7.56+2.453作为输入通过管道进入bc中。 $ echo 7.56 + 2.453 | bc @@ -156,13 +153,13 @@ ### 5. 你需要给出圆周率的值,精度为小数点后100位,什么是最简单的方法。 ### -> **Answer** : 找圆周率的值最简单的方法,我们只是需要发出以下命令。 +> **答案** : 找圆周率的值最简单的方法,我们只是需要发出以下命令。 # pi 100 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067 -很明显!安装我们必须有包**`pi`**。只是一个**apt**或**yum**命令,就能获得所需的软件包,同时用最简单方法来实现这个需求。 +很明显!安装我们必须有包**`pi`**。只用一个**apt**或**yum**命令,就能获得所需的软件包,同时用最简单方法来实现这个需求。 就是这样。我会很快在Tecmint.com发表另一个有趣的文章。至此敬请关注。别忘了向我们提供您在的评论和反馈。 @@ -170,7 +167,7 @@ via: http://www.tecmint.com/practical-interview-questions-on-linux-shell-scripting/ -译者:[MikeCoder](https://github.com/MikeCoder) 校对:[校对者ID](https://github.com/校对者ID) +译者:[MikeCoder](https://github.com/MikeCoder) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/published/20140607 Steam Hits The Big 500 For Linux Games.md b/published/201406/20140607 Steam Hits The Big 500 For Linux Games.md similarity index 100% rename from published/20140607 Steam Hits The Big 500 For Linux Games.md rename to published/201406/20140607 Steam Hits The Big 500 For Linux Games.md diff --git a/published/20140607 Ubuntu One Formally Shuts Down.md b/published/201406/20140607 Ubuntu One Formally Shuts Down.md similarity index 100% rename from published/20140607 Ubuntu One Formally Shuts Down.md rename to published/201406/20140607 Ubuntu One Formally Shuts Down.md diff --git a/translated/tech/20140609 How To Know If Your System Has USB 3.0 Port In Linux [Quick Tip].md b/published/201406/20140609 How To Know If Your System Has USB 3.0 Port In Linux [Quick Tip].md similarity index 75% rename from translated/tech/20140609 How To Know If Your System Has USB 3.0 Port In Linux [Quick Tip].md rename to published/201406/20140609 How To Know If Your System Has USB 3.0 Port In Linux [Quick Tip].md index 3cdf02123d..4b4e7a03e2 100644 --- a/translated/tech/20140609 How To Know If Your System Has USB 3.0 Port In Linux [Quick Tip].md +++ b/published/201406/20140609 How To Know If Your System Has USB 3.0 Port In Linux [Quick Tip].md @@ -1,6 +1,7 @@ -如何在Linux中知道你的系统是否有USB 3.0 端口[快速技巧] +[小白技巧]如何在Linux中知道你的系统是否有USB 3.0 端口 ================================================================================ -Most of the new computers come with USB 3.0 ports these days. But **how can you know if your computer has USB 3.0 port** or not? In this quick tip, we shall see how to find if your system has USB 3 or USB 2 in Linux. + +近来的大多数的新计算机都有了USB 3.0接口了。但是**你怎么知道你的计算机有没有USB 3.0接口**?这篇短文中,我们会告诉如何在Linux下知道你的系统上有USB 3还是USB3接口。 ### 在Linux终端中检测是否有USB 3.0 端口 ### @@ -16,7 +17,7 @@ Most of the new computers come with USB 3.0 ports these days. But **how can you ### 辨别哪个口是USB 3.0 ### -通常USB 3.0 口被标记为SS(“Super Speed”的缩写)。如果你的系统制造商没有标记SS或者USB 3,那么你可以检查端口的内部通常是颜色的。 +通常USB 3.0 口被标记为SS(“Super Speed”的缩写)。如果你的系统制造商没有标记SS或者USB 3,那么你可以检查端口的内部通常是蓝色的。 ![find usb 3.0 port](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/06/usb3.0port.jpg) @@ -26,6 +27,6 @@ Most of the new computers come with USB 3.0 ports these days. But **how can you via: http://itsfoss.com/find-usb-3-port-linux/ -译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20140609 Open Source LDAP Solutions.md b/published/201406/20140609 Open Source LDAP Solutions.md similarity index 95% rename from translated/tech/20140609 Open Source LDAP Solutions.md rename to published/201406/20140609 Open Source LDAP Solutions.md index 72a1b79614..29d7b636d9 100644 --- a/translated/tech/20140609 Open Source LDAP Solutions.md +++ b/published/201406/20140609 Open Source LDAP Solutions.md @@ -22,7 +22,7 @@ LDAP(轻量级目录访问协议)是一个用于访问目录服务的应用 via: http://www.linuxlinks.com/article/20140607022012848/LDAPSolutions.html -译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/published/20140609 OpenELEC 4.0.4 现已发布, 基于 XBMC 13.1 “Gotham”.md b/published/201406/20140609 OpenELEC 4.0.4 现已发布, 基于 XBMC 13.1 “Gotham”.md similarity index 100% rename from published/20140609 OpenELEC 4.0.4 现已发布, 基于 XBMC 13.1 “Gotham”.md rename to published/201406/20140609 OpenELEC 4.0.4 现已发布, 基于 XBMC 13.1 “Gotham”.md diff --git a/published/201406/20140610 How to set up Internet connection sharing with iptables on Linux.md b/published/201406/20140610 How to set up Internet connection sharing with iptables on Linux.md new file mode 100644 index 0000000000..34066c0167 --- /dev/null +++ b/published/201406/20140610 How to set up Internet connection sharing with iptables on Linux.md @@ -0,0 +1,118 @@ +怎样使用linux的iptables工具进行网络共享 +================================================================================ + +在本教程中,我将解释多个设备怎样在linux下共享一个网络连接。目前无线路由器已经成为主流的消费品,从而解决了本文这一问题。这里假设你家中并没有一台无线路由器,不过,你却有一台已经有"猫"和有线网卡的的linux主机。"猫"是以动态公有IP地址的模式连接到互联网,主机的网卡连接到你的交换机或者集线器。其他设备(如linux或者windows的PC或者笔记本)以网桥的形式连接,并且没有连接到互联网。为了共享linux主机的互联网,你必须把主机转换成网关,以便它能实现从其他设备中传送和接受信息。 + +### 术语字汇 ### + + +- **私有IP地址**(路由不可达地址)是一个被用于本地局域网的IP地址(在互联网中不可见)。 +- **公用IP地址**(路由可达地址)是一个在互联网中可见的IP地址。 +- **IP伪装**是一项允许一系列机器通过MASQ网关连接互联网的功能。这些MASQ网关之外的机器在互联网中是不可见的。MASQ之后的机器中任何流入或流出的数据必须经过MASQ网关。 +- **网络地址转换**(NAT)是一项通过IP伪装技术可以使私有IP地址访问互联网的功能。 + +### Hardware Requirements ### + +硬件要求 + +- 一台有两个接口(一个公有IP地址和其他的私有IP地址)的linux主机,这个主机将被用作网关。 +- 一台或者多台拥有私有IP地址的linux/windows系统的PC或者笔记本。 +- 交换机/集线器(可选)。 + +### 教程步骤 ### + +接下来的过程需要在linux主机(用于共享的网关)上完成。 + +#### 1、激活IP转发 #### + +为了设置网络共享,你需要在linux主机上更改一个内核参数来使能IP转发功能。内核启动参数设定在/etc/sysctl.conf文件中。 + +打开这个文件,定位到含有"# net.ipv4.ip_forward = 0"的这一行,移除#号(即取消注释),然后将其值设置为1,改好之后应该和下面的一致。 + + net.ipv4.ip_forward = 1 + +你还要使激活IP转发功能生效,通过执行下面的命令: + + $ sudo sysctl -w net.ipv4.ip_forward=1 + $ sudo sysctl -p + +#### 2、NAT配置 #### + +另一个网络共享的重要部分是NAT配置,这可以通过使用iptables的命令,iptables包含四个防火墙的规则表: + +- FILTER (默认表格) +- NAT +- MANGLE +- RAW + +这个教程中我们将仅使用两个表格:FILTER和NAT表格。 + +首先,刷新所有活跃的防火墙的规则。 + + $ sudo iptables -X + $ sudo iptables -F + $ sudo iptables -t nat -X + $ sudo iptables -t nat -F + + +在输入表格中,你需要设置转发链(FORWARD)成可接受的(ACCEPT)目的地,因此所有通过主机的数据包将会被正确的处理。 + + $ sudo iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT + $ sudo iptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT + + +在NAT表中,你必须为你的WAN口启用IP伪装功能,我们假设WAN口协议是ppp0。为了在ppp0接口上使能IP伪造技术,我们使用以下的命令: + + $ sudo iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE + +#### 3、配置私有IP地址 #### + +在linux主机上的所有配置完成后,你需要配置其他设备(linux/windows的PC或笔记本)的DNS服务器以及默认网关,让它们的数据流可以指向linux主机。注意你不需要在linux主机上设置一个DNS服务器,从其他设备发出的每一个DNS请求都会通过上游的ISP自动转发到linux主机上。 + +如果你的其他设备上用的系统是linux,你可以通过以下命令来更改他们的默认网关和DNS服务器。假设你的网段是192.168.1.0/24的私有IP地址网段,linux主机上绑定的IP地址是192.168.1.1。 + + $ sudo ip route del default + $ sudo ip route add default via 192.168.1.1 + $ sudo sh -c "echo 'nameserver 192.168.1.1' > /etc/resolv.conf" + +如果还有其他的linux设备,那么你可以重复以上命令。 + +如果你有windows设备,你可以通过控制面板的网络连接属性来更改默认网关和DNS服务器。 + +#### 4、完整的脚本 #### + +这是一个在linux主机上设置网络连接共享的一个完整的脚本。WAN口(ppp0协议)需要根据你具体的网络接口协议来替换。 + + $ sudo vi /usr/local/bin/ishare + +---------- + + #!/bin/bash + + ## Internet connection shating script + + sysctl -w net.ipv4.ip_forward=1 + sysctl -p + iptables -X + iptables -F + iptables -t nat -X + iptables -t nat -F + iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT + iptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT + iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE + +保存以上的脚本到/usr/local/bin/ishare,然后添加可执行权限通过执行下面的命令。 + + $ sudo chmox +x /usr/local/bin/ishare + +如果你需要这个脚本开机启动,你需要在/etc/rc.local文件中执行这个脚本,并在该文件中的"exit 0"之前添加下面一行。 + + /usr/local/bin/ishare + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/2014/06/internet-connection-sharing-iptables-linux.html + +译者:[yujianxuechuan](https://github.com/yujianxuechuan) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/published/20140610 IPFire 2.13 Core 78 Linux Firewall OS Receives OpenSSL Fixes.md b/published/201406/20140610 IPFire 2.13 Core 78 Linux Firewall OS Receives OpenSSL Fixes.md similarity index 100% rename from published/20140610 IPFire 2.13 Core 78 Linux Firewall OS Receives OpenSSL Fixes.md rename to published/201406/20140610 IPFire 2.13 Core 78 Linux Firewall OS Receives OpenSSL Fixes.md diff --git a/published/20140610 Open Source SDN Project OpenDaylight Adds New Members.md b/published/201406/20140610 Open Source SDN Project OpenDaylight Adds New Members.md similarity index 100% rename from published/20140610 Open Source SDN Project OpenDaylight Adds New Members.md rename to published/201406/20140610 Open Source SDN Project OpenDaylight Adds New Members.md diff --git a/translated/talk/20140610 Top 7 Desktop Environment For Linux.md b/published/201406/20140610 Top 7 Desktop Environment For Linux.md similarity index 65% rename from translated/talk/20140610 Top 7 Desktop Environment For Linux.md rename to published/201406/20140610 Top 7 Desktop Environment For Linux.md index a5fa5b7d59..0047b56864 100644 --- a/translated/talk/20140610 Top 7 Desktop Environment For Linux.md +++ b/published/201406/20140610 Top 7 Desktop Environment For Linux.md @@ -1,14 +1,14 @@ -Linux 平台七大桌面环境 +Linux 平台七大桌面环境通览 ================================================================================ -通常的 Linux 发行版都使用 KDE 或者 GNOME 作为默认的桌面环境。它们都给用户提供了一个原始的并且有吸引力的桌面,并且内置了各式各样的多媒体软件、系统程序、游戏、实用程序、网页开发工具、编程工具等等。这两个桌面致力于提供给用户一个拥有类似于 Windows 操作系统体验的尖端计算环境,而忽略了最小化它们所占用的系统资源。 +通常的 Linux 发行版都使用 KDE 或者 GNOME 作为默认的桌面环境。它们都给用户提供了一个原始的并且有吸引力的桌面,并且内置了各式各样的多媒体软件、系统程序、游戏、实用程序、网页开发工具、编程工具等等。这两个桌面致力于提供给用户一个拥有类似于 Windows 操作系统体验的尖端计算环境,而不是如何更少的占用系统资源。 -如果你正在使用 Ubuntu (或者其他Linux发行版) 并且厌倦始终使用 Unity 桌面,那么你应该看看这些可以替代 Unity 的选择。我收集了 7 种桌面环境。它们都很棒。在你读完这篇文章之后,请试着使用它们吧。 +如果你正在使用 Ubuntu (或者其他Linux发行版) 并且厌倦了始终使用 Unity 桌面,那么你应该看看这些可以替代 Unity 的选择。我收集了 7 种桌面环境。它们都很棒。在你读完这篇文章之后,请试着使用它们吧。 ### [Mate][1] ### ![](http://i0.wp.com/pulpybucket.com/wp-content/uploads/2014/06/mate.png) -MATE 是 GNOME2 的一个分支。它提供了一个自然且吸引人的桌面环境。它是 Linux 和其它类 Unix 工作环境中的传统工作框架的代表。MATE 正在改善以使用新的技术来保留传统的桌面体验。 +MATE 是 GNOME2 的一个分支。它提供了一个自然且吸引人的桌面环境。它是 Linux 和其它类 Unix 工作环境中的传统工作框架的代表。MATE 在保留传统的桌面体验的同时正在不断进步使用新的技术。 在 Ubuntu 14.04 中,可以直接从 Ubuntu 软件中心获取 MATE 桌面。 @@ -16,25 +16,25 @@ MATE 是 GNOME2 的一个分支。它提供了一个自然且吸引人的桌面 ![](http://i2.wp.com/pulpybucket.com/wp-content/uploads/2014/06/Kubuntu-9.04-DesktopEffects.png) -KDE 是另一个类似于 GNOME 一样的重量级桌面环境。它在本文章所提及的7种桌面环境中被认为是最华丽最重量级的一个。它同样是一个类似于 Windows 的桌面,在这一点上没有什么特殊的变化。不过 KDE 非常有特点,但是随之而来的是大量的设置来提升你的桌面体验。同样的,有很多关于 KDE 的话题。所以真的可以从 KDE 的特点中获益,并且保持你所想的外观。 +KDE 是另一个类似于 GNOME 一样的重量级桌面环境。它在本文章所提及的7种桌面环境中被认为是最华丽最重量级的一个。它同样是一个类似于 Windows 的桌面,在这一点上没有什么特殊的变化。不过 KDE 非常有特点,但是随之而来的是可以通过大量的设置来提升你的桌面体验。同样的,有很多关于 KDE 的话题,所以你可以很舒服的使用 KDE,并让它以你希望的方式工作。 ### [Cinnamon][3] ### ![](http://i1.wp.com/pulpybucket.com/wp-content/uploads/2014/06/WD9O-C08B-ESP5.jpg) -Cinnamon 是一个基于 Gtk+ 的环境。它最初作为 GNOME Shell 的一个用户界面分支,由 Linux Mint 创造。 Cinnamon 本质上是为了推行使用终端和定点装置。无论是使用鼠标,还是使用触摸屏都可以获得同样便捷的操作。不像 KDE Plasma 工作空间,只有一种 GUI。 当前版本—— Cinnamon 2.0 于2013年10月10日发布。 +Cinnamon 是一个基于 Gtk+ 的环境。它最初作为 GNOME Shell 的一个用户界面分支,由 Linux Mint 为其创建的。 Cinnamon 的核心设计目标是让桌面终端和触屏设备都能完美操作。无论是使用鼠标,还是使用触摸屏都可以获得同样便捷的操作。不像 KDE Plasma 工作空间,只有一种图形用户体验。当前版本—— Cinnamon 2.0 于2013年10月10日发布。 ### [Unity][4] ### ![](http://i1.wp.com/pulpybucket.com/wp-content/uploads/2014/06/Ubuntu_13.10_Desktop.png) -Unity 是 GNOME 桌面环境的一个界面,由 Canonical 公司创建,使用于 Ubuntu 系统中。Unity 最初现身于 Ubuntu 10.10 的上网本版本中。它起初打算充分利用上网本的屏幕空间,例如一个被称为启动器的垂直应用切换器(a vertical app switcher called launcher)和一个节省垂直空间的多功能顶部菜单栏。Unity 不像 GNOME、KDE、 Xfce 或者 LXDE 是许多软件的合集,它是作为使用实用功能而开发的。 +Unity 是 GNOME 桌面环境的一个界面,由 Canonical 公司创建,用于 Ubuntu 系统中。Unity 最初现身于 Ubuntu 10.10 的上网本版本中。它起初打算充分利用上网本的屏幕空间,例如一个竖直的应用启动器和一个节省空间的多功能顶部菜单栏。Unity 不像 GNOME、KDE、 Xfce 或者 LXDE 是许多软件的合集,它是为了可用性而开发的。 ### [GNOME Shell][5] ### ![](http://i0.wp.com/pulpybucket.com/wp-content/uploads/2014/06/GNOME_Shell_3.6.png) -GNOME 提供了桌面核心接口例如交换窗口,启动应用程序以及显示提示。它利用先进图形硬件来实现吸引人的,创新的界面思想,提供了愉悦简单的用户体验。GNOME Shell 定义了 GNOME 3 的客户体验。 +GNOME 提供了桌面核心接口例如交换窗口,启动应用程序以及显示提示。它利用先进的图形硬件来实现吸引人的、创新的界面思想,提供了愉悦简单的用户体验。GNOME Shell 定义了 GNOME 3 的客户体验。 作为 GNOME 的一个重要组成部分, GNOME Shell 的稳定版本首次发布于2011年3月3日。 @@ -48,7 +48,7 @@ Xfce 是一个轻量级的桌面环境,围绕 GTK 框架实现。它看起来 ![](http://i2.wp.com/pulpybucket.com/wp-content/uploads/2014/06/LXDE_desktop_full.png) -LXDE 显然是桌面环境中最轻量级的选择,至少在传统的桌面标准中是这样。这个基于 GTK 的桌面环境使用了很多轻量级的选择替代了默认的应用(例如 Abiword, Gnumeric, 而不是 LibreOffice)。它没有提供 flash 视觉冲击 ,总体感觉也不是特别的棒,没有高级的设置。但是,LXDE 仍然提供了漂亮的桌面和完整的功能。当你需要快速简洁时,它就是你的选择。 +LXDE 显然是桌面环境中最轻量级的选择,至少在传统的桌面标准中是这样。这个基于 GTK 的桌面环境使用了很多轻量级的选择替代了默认的应用(例如 Abiword, Gnumeric, 而不是 LibreOffice)。它没有提供炫目的视觉震撼 ,总体感觉也不是特别的棒,没有高级的设置。但是,LXDE 仍然提供了漂亮的桌面和完整的功能。当你需要快速简洁时,它就是你的选择。 -------------------------------------------------------------------------------- diff --git a/published/20140611 HTG Explains--What' s the Difference Between Linux and BSD.md b/published/201406/20140611 HTG Explains--What' s the Difference Between Linux and BSD.md similarity index 100% rename from published/20140611 HTG Explains--What' s the Difference Between Linux and BSD.md rename to published/201406/20140611 HTG Explains--What' s the Difference Between Linux and BSD.md diff --git a/translated/tech/20140611 How to Prevent Other Users From Accessing Your Home Directory in Ubuntu 14.04.md b/published/201406/20140611 How to Prevent Other Users From Accessing Your Home Directory in Ubuntu 14.04.md similarity index 68% rename from translated/tech/20140611 How to Prevent Other Users From Accessing Your Home Directory in Ubuntu 14.04.md rename to published/201406/20140611 How to Prevent Other Users From Accessing Your Home Directory in Ubuntu 14.04.md index 085ef6bbd0..1fc3f32824 100644 --- a/translated/tech/20140611 How to Prevent Other Users From Accessing Your Home Directory in Ubuntu 14.04.md +++ b/published/201406/20140611 How to Prevent Other Users From Accessing Your Home Directory in Ubuntu 14.04.md @@ -1,24 +1,24 @@ -如何在Ubuntu 14.04中阻止其它用户访问你的家目录 +[小白技巧]如何在Linux中阻止其它用户访问你的家目录 ================================================================================ ![](http://cdn.howtogeek.com/wp-content/uploads/2014/05/00_lead_image_home_directory.png) -如果你和其他人共享Ubuntu机器,那么你可能要设置多个用户,并考虑让其他用户登录到他们自己的帐号,而只能访问他们自己的家目录。但是,默认情况下,任何一个用户都可以访问任何一个家目录。 +如果你和其他人共享Ubuntu机器,那么你可能要设置多个用户,希望其他用户登录到他们自己的帐号,并只能访问他们自己的家目录。但是,默认情况下,任何一个用户都可以访问任何一个家目录。 -当你在Ubuntu中添加一个新用户时,adduser工具为新的帐号添加了一个新的家目录。默认情况下,该目录位于根下面的/home/目录下,并以该帐号的用户名命名。例如,/home/lori。Ubuntu中创建的用户家目录具有全局读/写权限,这就给系统中所有其他用户可以读因外一些用户的家目录中的内容的权利。具体请阅读我们的[文件权限在Linux中是如何工作的][1]一文。 +当你在Ubuntu中添加一个新用户时,adduser工具为新的帐号添加了一个新的家目录。默认情况下,该目录位于根下面的/home/目录下,并以该帐号的用户名命名。例如,/home/lori。Ubuntu中创建的用户家目录具有其它人可读/执行权限,这就给系统中所有其他用户可以读另外外一些用户的家目录中的内容的权利。具体请阅读我们的[文件权限在Linux中是如何工作的][1]一文。 -**注**:当我们在文中提到输入什么时,输入的文字内容是在引号中的,不要输入引,除非我们另外指定。 +**注**:当我们在文中提到输入什么时,输入的文字内容是在引号中的,不要输入引号,除非我们另外指定。 -你可以很容易地修改你的家目录的权限来保护你的私人文件。要检查你家目录的权限,输入Ctrl + Alt + T打开终端窗口,并在提示符后输入以下行,然后按回车。使用你自己的用户名来替换“”。 +你可以很容易地修改你的家目录的权限来保护你的私人文件。要检查你家目录的权限,输入Ctrl + Alt + T打开终端窗口,并在提示符后输入以下命令,然后按回车。使用你自己的用户名来替换下面的“用户名”。 - ls –ld /home/lori + ls -ld /home/lori -**注**:该命令使用的是小写的L,而不是数字1. +**注**:该命令仅包含小写的L,而不是数字1。(LCTT译注:这是给完全小白的提示,绝大部分人可以无视这个备注了) 在该行的开头,列出了该文件的权限。就像我们在[文章][1]中关于Linux权限部分讲的那样。 -> ”r表示“读”,w表示“写”,而x表示“执行”。目录权限以“d”开头,而不是“-”。你也会注意到权限值占了10个位置。你可以忽略第一个,后面是3个一组,分为3组。第一组是属主权限,第二组是属组权限,最后一组是大众权限“。 +> r表示“读”,w表示“写”,而x表示“执行”。目录权限以“d”开头,而不是“-”。你也会注意到权限值占了10个位置。你可以忽略第一个,后面是3个一组,分为3组。第一组是属主(owner)权限,第二组是属组(group)权限,最后一组是其它人(other或world)权限。 -因此,下面列出的家目录的属主具有读、写和执行权限,而属组和大众具有读和执行权限。 +因此,下面列出的家目录的属主具有读、写和执行权限,而属组和其它人具有读和执行权限。 ![](http://cdn.howtogeek.com/wp-content/uploads/2014/05/01_permissions_for_home_folder.png) @@ -32,7 +32,7 @@ ![](http://cdn.howtogeek.com/wp-content/uploads/2014/05/02_changing_permissions_for_home_folder.png) -按上箭头两次,再次调用“ls -ld /home/“命令来检查权限。注意,全局权限现在都是破折号(-),这就意味着大众将无法读、写或执行你家目录中的任何东西了。 +按上箭头两次,再次调用“ls -ld /home/用户名”命令来检查权限。注意,其它人权限现在都是破折号(-),这就意味着其它人将无法读、写或执行你家目录中的任何东西了。 然而,和你同组的用户可以读和执行你家目录中的文件和文件夹。如果你不想除你之外的任何人访问你的家目录,可以在chmod命令中输入“0700”。 @@ -46,7 +46,7 @@ ![](http://cdn.howtogeek.com/wp-content/uploads/2014/05/04_location_could_not_be_displayed.png) -你也可以在创建新用户时,甚至Ubuntu使用指定的权限。要完成此项任务,你需要编辑adduser配置文件。要编辑该文件,在提示符下输入以下命令并回车。 +甚至你也可以在创建新用户时让Ubuntu使用指定的权限。要完成此项任务,你需要编辑adduser配置文件。要编辑该文件,在提示符下输入以下命令并回车。 gksudo gedit /etc/adduser.conf @@ -60,7 +60,7 @@ ![](http://cdn.howtogeek.com/wp-content/uploads/2014/05/06_entering_password.png) -在adduser.conf文件中向下滚动到DIR_MODE命令处,这里的默认值是“0755”。修改该值来反映你想要授权给各种用户类型(用户,组,大众)的不同权限(r,w,x),如我们先前讨论过的“0750”或“0700“。点击保存(Save)。 +在adduser.conf文件中向下滚动到DIR_MODE命令处,这里的默认值是“0755”。修改该值来反映你想要授权给各种用户类型(属主,属组,其它人)的不同权限(r,w,x),如我们先前讨论过的“0750”或“0700”。点击保存(Save)。 ![](http://cdn.howtogeek.com/wp-content/uploads/2014/05/07_changing_dir_mode.png) @@ -72,13 +72,13 @@ ![](http://cdn.howtogeek.com/wp-content/uploads/2014/05/09_closing_terminal_window_with_x.png) -现在,你家目录中文件会保持私有。切记,如果有其他用户和你处于同一组中,你也需要为你的家目录权限剔除组和大众权限。 +现在,你家目录中文件会保持私有。切记,如果有其他用户和你处于同一组中,你也许要为你的家目录权限剔除组和大众权限。 -------------------------------------------------------------------------------- via: http://www.howtogeek.com/190084/how-to-prevent-other-users-from-accessing-your-home-directory-in-ubuntu-14.04/ -译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20140612 Command Line Tuesdays--Part One.md b/published/201406/20140612 Command Line Tuesdays--Part One.md similarity index 72% rename from translated/tech/20140612 Command Line Tuesdays--Part One.md rename to published/201406/20140612 Command Line Tuesdays--Part One.md index ea20bb5f1e..29b9dafdc2 100644 --- a/translated/tech/20140612 Command Line Tuesdays--Part One.md +++ b/published/201406/20140612 Command Line Tuesdays--Part One.md @@ -1,26 +1,26 @@ -命令行星期二 — 第一篇 +命令行星期二 —— 第一篇 ================================================================================ 极客们,我们又回来了!真抱歉让你们久等了,但我保证,我们又回归正轨了。我们满怀热情与大家相约,让我们激情燃烧,寻找刺激吧:) -现在,整个的想法已经在两周前的开场白中告诉你们了,所以现在让我们来干点正事吧。就像Shotts先生书里讲得那样,我们需要来了解一下shell是个什么东西,终端模拟器又是个什么东西,因为我们要在这里头干活。 +现在,整个的想法已经在之前的开场白中告诉你们了,所以现在让我们来干点正事吧。就像肖茨先生书里讲得那样,我们需要来了解一下shell是个什么东西,终端模拟器又是个什么东西,因为我们要在这里头干活。 -Shotts在他的书中写道,shell实际上是当我们谈论命令行时所谈论的东西。shell基本上一个程序,它将你敲击键盘的动作传递给计算机;它也是某种形式的翻译器,将你所讲的东西翻译给计算机听。在这世界上活着的shell真是五花八门,但是活得最好的要数**bash**了,它在GNU/Linux中随处可见。我们也叫它Bourne Again Shell,这是一个精巧的双关语,因为自从Bourne先生创造了它的祖先**sh**后,Brian Fox又把它重写成为一个自由的sh替代品。啊哈!GUN人和他们的幽默,真的很精明。:) +肖茨在他的书中写道,shell实际上是当我们谈论命令行时所谈论的东西。shell基本上一个程序,它将你敲击键盘的动作传递给计算机;它也是某种形式的翻译器,将你所讲的东西翻译给计算机听。在这世界上活着的shell真是五花八门,但是活得最好的要数**bash**了,它在GNU/Linux中随处可见。我们也叫它Bourne Again Shell,这是一个精巧的双关语,因为自从Bourne先生创造了它的祖先**sh**后,Brian Fox又把它重写成为一个自由的sh替代品。啊哈!GUN人和他们的幽默,真的很精明。:) ![](http://paste.opensuse.org/images/54535272.jpg) -接下来我所需要,是一个让我们能和shell交互的东西,它就是终端模拟器。每个Linux发行版都自带了一个,至于长什么样就得看你使用的桌面环境了,可能是KDE的**Konsole**,也可能是Gnome的**Gnome terminal**等等。Shotts先生说了,你可以开发出你所偏爱的一个,但是大部分时间我还是用用桌面环境给我提供的那个吧。 +接下来我所需要,是一个让我们能和shell交互的东西,它就是终端模拟器。每个Linux发行版都自带了一个,至于长什么样就得看你使用的桌面环境了,可能是KDE的**Konsole**,也可能是Gnome的**Gnome terminal**等等。肖茨先生说了,你可以挖掘出你所偏爱的一个,但是大部分时间我还是用桌面环境给我提供的那个吧。 现在来发动你的终端。打开后,你会见到一行字,这行字告诉你用户名和机器的主机名,它叫作shell提示符。它告诉你它准备好了,你可以输入命令了。让我们来随便玩玩,随便输入点什么东西进去,然后敲回车看看。 呵呵,还记开篇我们讲过,我们需要像学诗歌一样来学习命令吗?记得就好,随意乱来可干不了啥事。 -现在,按那个上箭头,你会发现命令又回来了。这是啥魔法?你键盘上的上箭头用来取出历史命令。终端会保存总计500个你输入过的命令,所以别一次又一次地重复敲它们了,你可以用上/下箭头来查找它们。左右箭头用来在指定行中移动光标,这样你就可以在文本中编辑或者插入了。另外一个东西 — **ctrl+v**是用来粘贴不工作的文本的。你可以在某个地方将它设置成快捷键,但是它常常不是那么回事。检查你的模拟器的快捷键!(在Konsole中,它位于设置 > 配置快捷键) +现在,按那个上箭头,你会发现命令又回来了。这是啥魔法?你键盘上的上箭头用来取出历史命令。终端会保存总计500个你输入过的命令,所以别一次又一次地重复敲它们了,你可以用上/下箭头来查找它们。左右箭头用来在指定行中移动光标,这样你就可以在文本中编辑或者插入了。另外注意,想用**ctrl+v**来粘贴文本是不行的。你可以在某个地方将它设置成快捷键,但是它常常不是那么回事。检查你的模拟器的快捷键!(在Konsole中,它位于设置 > 配置快捷键) -现在,为了我们不在挨‘命令找不到’这一巴掌,让我们试试一些简单的。敲个**date**来试试。(是的,我不知道有这么个命令,这真着实让我兴奋了一把):) +现在,为了我们不再被‘命令找不到’抽一巴掌,让我们试试一些简单的。敲个**date**来试试。(是的,我不知道有这么个命令,这真着实让我兴奋了一把):) ![](http://paste.opensuse.org/images/7123365.png) -你又来了。当你能打开终端并输入date命令来查看日期时,为什么在时钟中看看内建日历会让你不胜其烦 :) 只是开个玩笑。就像Shotts书里写的那样,它确实是个简单的命令,更有用/困难的命令会在以后介绍。跟date相关的命令是cal - 它会显示当前月的日历。 +你又来了。当你能打开终端并输入date命令来查看日期时,为什么在时钟中看看内建日历会让你不胜其烦 :) 只是开个玩笑。就像肖茨书里写的那样,它确实是个简单的命令,更有用也更复杂的命令会在以后介绍。跟date相关的命令是cal - 它会显示当前月的日历。 你也可以试试**df**,它会列出你驱动器上的空闲空间。 @@ -38,7 +38,7 @@ Shotts在他的书中写道,shell实际上是当我们谈论命令行时所谈 - 我们需要用什么来和shell交流(终端模拟器) - 使用光标按钮来驾驭终端命令以及退出终端 -是个简单的命令: +四个简单的命令: - **date** – 显示当前日期 - **cal** – 显示当前月份的日历 @@ -47,7 +47,6 @@ Shotts在他的书中写道,shell实际上是当我们谈论命令行时所谈 ### 下周二我们将会做什么呢? ### -We learn navigation through the file system (what are all those bin etc etc. folders, what are they used for, how to navigate through them via the terminal). Until then… 我们会学习在文件系统中导航(bin、etc等等这所有的文件夹都是些什么东西?它们用来干什么?怎样通过终端来浏览它们)。到那时…… ### 你就有得乐了! ### @@ -58,6 +57,6 @@ We learn navigation through the file system (what are all those bin etc etc. fol via: https://news.opensuse.org/2014/06/10/command-line-tuesdays-part-one/ -译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/published/20140612 Dpkg Vulnerabilities Closed in Ubuntu 14.04.md b/published/201406/20140612 Dpkg Vulnerabilities Closed in Ubuntu 14.04.md similarity index 100% rename from published/20140612 Dpkg Vulnerabilities Closed in Ubuntu 14.04.md rename to published/201406/20140612 Dpkg Vulnerabilities Closed in Ubuntu 14.04.md diff --git a/translated/tech/20140616 How To Install Numix Icon Theme In Fedora 20.md b/published/201406/20140616 How To Install Numix Icon Theme In Fedora 20.md similarity index 94% rename from translated/tech/20140616 How To Install Numix Icon Theme In Fedora 20.md rename to published/201406/20140616 How To Install Numix Icon Theme In Fedora 20.md index 3b2aa15f6b..e21aff39d7 100644 --- a/translated/tech/20140616 How To Install Numix Icon Theme In Fedora 20.md +++ b/published/201406/20140616 How To Install Numix Icon Theme In Fedora 20.md @@ -36,7 +36,7 @@ Numix图标主题张冠李戴,Fedora 20劲爆酷爽 via: http://www.unixmen.com/install-numix-icon-theme-fedora-20/ -译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/published/20140616 Ubuntu Desktop Next 14.10 Images Available to Download.md b/published/201406/20140616 Ubuntu Desktop Next 14.10 Images Available to Download.md similarity index 100% rename from published/20140616 Ubuntu Desktop Next 14.10 Images Available to Download.md rename to published/201406/20140616 Ubuntu Desktop Next 14.10 Images Available to Download.md diff --git a/published/20140616 Ubuntu for Phones Activated on 10,000 Devices.md b/published/201406/20140616 Ubuntu for Phones Activated on 10,000 Devices.md similarity index 100% rename from published/20140616 Ubuntu for Phones Activated on 10,000 Devices.md rename to published/201406/20140616 Ubuntu for Phones Activated on 10,000 Devices.md diff --git a/published/201406/20140617 14 Apps To Boost Ubuntu.md b/published/201406/20140617 14 Apps To Boost Ubuntu.md new file mode 100644 index 0000000000..943eddf5d5 --- /dev/null +++ b/published/201406/20140617 14 Apps To Boost Ubuntu.md @@ -0,0 +1,82 @@ +14个可以提升Linux桌面体验的应用程序 +============================== + +转战到Ubuntu,或者是别的流行的Linux发行版,不仅仅是操作系统的操作方式的改变,更多的是你还需要一些能支持你完成工作的好的应用。 + +在这篇文章中,我将分享一些我精选出来不可或缺的应用程序,并谈谈在我的日常工作中如何有效地使用它们。 + +### 日常使用的应用程序 ### + +一般当说到Linux桌面上的应用,我总是将这些应用划分为两大类,频繁使用的和一些别的应用。下边我为大家介绍的是一些自己日常使用的应用。 + +1) **Firefox** — 有时我也会使用用其他的浏览器,但最近[火狐浏览器][1]已经成为我可以长期信赖的朋友。可靠的、 安全的、 跨平台的,火狐浏览器完全满足了我的日常冲浪需求。 + +除了访问书签和网页,我还依靠火狐浏览器来处理我的各种部署在局域网服务器上的工作,如 [Plex][2], [Zoneminder][3], 路由器/WEB应用防火墙, 及我的文件服务器。所有这些均可以使用火狐浏览器进行访问。 + +2) **Parcelite**— 如果没有一个像样的剪贴板管理器我简直没法开始工作,至少对我来说,你无法找到在GNOME 下的[Parcelite][4]有什么不足。使用简单,易于访问而且它提供了很多的有用的选项。Parcelite选项应有尽有,包括了从热键设置到空格处理方式。尽管已经有很多的剪贴板管理器,但它们却很难击败 Parcelite。 + +3) **Bittorrent Sync** — 我已经使用过了各种开源替代方案进行文件同步,但是他们在正式发布之前还需要进行进一步开发。应该说[Bittorrent Synchas][5]从来没有让我失望过。它运行和安装都很简单和方便,这多亏了新的GUI的实现,而且 Bittorrent Sync 允许我快速地从一台机器到另外一台机器传输巨大的视频文件,而无需浪费时间去将大量的文件同步到“云端”。 + +我还发现它是与别人分享大型文件的最佳方法,在分享的同时能一直保持 IP 地址和目录的隐蔽。尽管有许多的替代品,我仍然坚定地成为了Bittorrent Sync的骨灰粉丝。 + +4) **System Monitor** — 因为TOP实在是滚动地太快了,所以我个人更喜欢一个具有选项卡式的 GUI,因为它能够让我的眼睛更轻松些。使用 GNOME 的系统监视器,我可以很快地发现一个失控的进程,并且轻松地kill掉它而不需吹灰之力。与[TOP][7]这样的终端程序不同的是,我可以实时的以图形化的方式去查看我的 CPU、 内存和磁盘的使用情况。作为一个拥有正常视觉的人,很难找到一个比用条形图来展示我还拥有多少的空间的更好方式。当然这也同样适用于其它的实时资源使用情况的监视。 + +5) **PulseAudioControl** — 每一天,我总是需要在多个声音设备之间来回穿梭。有时我需要将其中一个设为默认设备,然后却可能会从火狐浏览器音频完全切换到到另一个设备。因为我想控制我的尽可能多的音频,然后我就发现 [PulseAudioControl][8]是一个无价的工具。 + +### 一些别的软件 ### + +在本节中,我将分享我使用,但可能并不一定是每天都使用的应用程序。许多这些应用程序都是开放源代码的,有一些不是,但是它们对我个人都非常具有价值。 + + +6) **Skype** — 无论是拨入[Jupiter Broadcasting][9] 收听每周共同主持的播客,或者只是简单联系一个业务,[Skype][10] 见证了互联网视频会议的发展史。测试完成无数的替代品后,我总是会发现自己还是终回到了Skype。即使有真的很棒的开源选择像[Ekiga][11] 和 [Jitsi][12],而在最后Skype总是与大家同在 —— 切换到Skype是一件很幸运的事。 + +7)**Kdenlive** — 我使用两个不同的视频编辑器,当我要处理一个需要大量编辑的视频剪辑项目的时候,[Kdenlive][13]是我用于图片合成和编辑大型的复杂的视频的工具。我已经成功地在 Kdenlive 里边做过6个素材轨道的编辑,但同样的负载量早已经让别的视频剪辑软件崩溃了。 + +8)**OpenShot** — 大多数情况下,我会将[OpenShot][14]作为视频剪辑任务的首选神兵利器。快速的编辑和两个素材轨道工作区让你可以流畅而操作简单。我还发现它提供了很棒的无与伦比的特效。调制标题效果和超赞的的视频转场效果使OpenShot在我自己的视频项目上成为一款超棒的视频制作软件。 + +9)**SpiderOak** — 在使用了无数云备份服务这么多年后, [SpiderOak][15] 已经成为了我的至爱。易于安装和使用,我超喜欢它所提供的增量选项而且使用起来是如此的简单。只需一次设置,不再操心,之后SpiderOak将会挑起你的文件搬运大任。 + +10) **Dropbox** — 许多年来,我已经与[Dropbox][16] 爱恨交织。尽管它的跨平台特性这意味着我可以从任何位置访问文件,我慢慢地发现我自己越来越少依赖这个基于云计算的备份解决方案。尽管如此,它允许我从任何 web 浏览器中访问文件,即使是从我不经常使用的计算机,这使得抛弃 Dropbox 更是难上加难。 + +11) **Writer** — 自从我第一次在Windows的OpenOffice里面使用过它之后,我一直都在使用[Writer][17]。今天,我使用LibreOffice 所带的Writer来满足我的需求,它可以做一切一个文字处理器可以做的事情。现在,公正地说,一些专有的办公套件可能会提供附加功能在Writer中是没有的,但是99%的人需要的功能在Writer这里都有。就我个人而言,我会永远是一个LibreOffice Writer粉。 + +12)**SimpleScreenRecorder** — 多年来,我发现自己使用 [SimpleScreenRecorder][18]远超过其他同类软件,它能很好支持多监视器模式,再加上它甚至可以捕获基于 OpenGL 的应用程序的视频。易于使用和可靠的 SimpleScreenRecorder 让我的工作更加得心应手。我把它推荐给那些只是偶尔需要,懒得使用其它屏幕捕捉软件的同学们。 + +13)**SimpleScan** — 当我需要扫描文档的时候,我一点都不想将大把大把的时间花费在配置的臃肿的程序上。 [Simple Scan][19] 可以在这方面做得很好。智能的SANE扫描数据库,Simple Scan将与市面上的任何扫描仪或多功能一体打印机/扫描仪很好的进行协作。此外还有一点好处就是它会设置成的最佳分辨率,当然你还可以很方便手动调整任何你需要的设置。 + +14)**Baobab**(磁盘使用分析器) — 我不断听到关于如何硬盘价格已回落。这或许没错,但现实却是我却囊中羞涩。这意味着我需要充分利用我能利用的所有硬盘空间,为了实现这个目的,我使用 [Baobab][20] 来观察我在我的硬盘上的可用空间,而且还可以直观地看到到底是哪一个目录正在蚕食我宝贵的硬盘空间。 + +### 真正的具有生产力的软件 ### + +谈到我所依赖的这些软件,我们真正关心的是他们能为我们完成什么样的任务,而不是它们所拥有的光辉头衔和自身的许可证。linux不需要软件的传奇时代早已过去。多数的计算机上的工作,除了有限的几个例外,大都可以在linux桌面上轻松地如我所说的那样完成。 + +很明显有一些对于你来说是必不可少的软件,但是也许不是我必须用的。你所倚重的软件是什么?您可在下方进行评论并与我们的读者进行分享那些优秀的软件。 + +------ + +via: http://www.datamation.com/applications/14-apps-to-boost-ubuntu-1.html + +译者:[owen-carter](https://github.com/owen-carter) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.mozilla.org/en-US/firefox/new/ +[2]:https://plex.tv/ +[3]:http://www.zoneminder.com/ +[4]:http://parcellite.sourceforge.net/ +[5]:http://www.bittorrent.com/sync +[6]:https://help.gnome.org/users/gnome-system-monitor/3.12/ +[7]:http://linux.about.com/od/commands/l/blcmdl1_top.htm +[8]:http://freedesktop.org/software/pulseaudio/pavucontrol/ +[9]:http://en.wikipedia.org/wiki/Jupiter_Broadcasting +[10]:http://www.skype.com/en/download-skype/skype-for-linux/ +[11]:http://ekiga.org/ +[12]:https://jitsi.org/ +[13]:http://www.kdenlive.org/ +[14]:http://www.openshot.org/ +[15]:https://spideroak.com/ +[16]:https://www.dropbox.com/ +[17]:http://www.libreoffice.org/discover/writer/ +[18]:http://www.maartenbaert.be/simplescreenrecorder/ +[19]:https://launchpad.net/simple-scan +[20]:http://www.marzocca.net/linux/baobab/baobab-getting-started.html \ No newline at end of file diff --git a/published/20140619 Improve Battery Life with Laptop Mode Tools 1.65.md b/published/201406/20140619 Improve Battery Life with Laptop Mode Tools 1.65.md similarity index 100% rename from published/20140619 Improve Battery Life with Laptop Mode Tools 1.65.md rename to published/201406/20140619 Improve Battery Life with Laptop Mode Tools 1.65.md diff --git a/published/20140619 Red Hat to Acquire eNovance, Focus Together on OpenStack.md b/published/201406/20140619 Red Hat to Acquire eNovance, Focus Together on OpenStack.md similarity index 100% rename from published/20140619 Red Hat to Acquire eNovance, Focus Together on OpenStack.md rename to published/201406/20140619 Red Hat to Acquire eNovance, Focus Together on OpenStack.md diff --git a/published/20140620 Celebrating 30 Years of X.md b/published/201406/20140620 Celebrating 30 Years of X.md similarity index 100% rename from published/20140620 Celebrating 30 Years of X.md rename to published/201406/20140620 Celebrating 30 Years of X.md diff --git a/translated/tech/20140620 ENCRYPT DNS TRAFFIC IN LINUX WITH DNSCRYPT (VIA OPENDNS).md b/published/201406/20140620 ENCRYPT DNS TRAFFIC IN LINUX WITH DNSCRYPT (VIA OPENDNS).md similarity index 79% rename from translated/tech/20140620 ENCRYPT DNS TRAFFIC IN LINUX WITH DNSCRYPT (VIA OPENDNS).md rename to published/201406/20140620 ENCRYPT DNS TRAFFIC IN LINUX WITH DNSCRYPT (VIA OPENDNS).md index 72826fb70b..f46c2ad7de 100644 --- a/translated/tech/20140620 ENCRYPT DNS TRAFFIC IN LINUX WITH DNSCRYPT (VIA OPENDNS).md +++ b/published/201406/20140620 ENCRYPT DNS TRAFFIC IN LINUX WITH DNSCRYPT (VIA OPENDNS).md @@ -2,7 +2,7 @@ ================================================================================ **正如SSL能将HTTP通信变为加密过的HTTPS通信,DNSCrypt, 物如其名, 是一款能加密您电脑与OpenDNS之间的通信的小神器。** -DNSCrypt刚问世的时候,官方公布为是一款只有Mac才能用的工具,但根据最近一片由OpenDNS发的[文章][1]表明,虽然还没有用户界面,但其实当Mac版DNSCrypt推出的时候源码已经放到了Github上了, Linux的用户也可以安装以及使用哦! +DNSCrypt刚问世的时候,官方公布它只是一款Mac才能用的工具,但根据最近一篇由OpenDNS发的[文章][1]表明,虽然还没有用户界面,但其实当Mac版DNSCrypt推出的时候源码已经放到了Github上了, Linux的用户也可以安装以及使用哦! ### 为神马要使用 DNSCrypt? ### @@ -22,7 +22,7 @@ DNSCrypt刚问世的时候,官方公布为是一款只有Mac才能用的工具 ![](http://4.bp.blogspot.com/-WLefdXHIzwg/Tz45kGKAZdI/AAAAAAAAH0k/KLBnWJom6-g/s1600/edit-network.png) -然后把您的DNS服务器调成"127.0.0.1" - 在GNOME界面下的话,只要到Network Connections(网络连接)选项然后选择"Edit"并在"DNS servers"输入"127.0.0.1"就好了。如果您用的是DHCP的话,请选择Automatic (DHCP) addresses only", 这样的话才会进入DNS服务器。然后只要重连便可。 +然后把您的DNS服务器调成"127.0.0.1" - 在GNOME界面下的话,只要到Network Connections(网络连接)选项然后选择"Edit"并在"DNS servers"输入"127.0.0.1"就好了。如果您用的是DHCP的话,请选择Automatic (DHCP) addresses only", 这样的话才能输入DNS服务器。然后只要重连网络便可。 您可以访问这条[链接][5]来测试您连接到了OpenDNS了没。 @@ -34,7 +34,7 @@ DNSCrypt刚问世的时候,官方公布为是一款只有Mac才能用的工具 如果您想在Ubuntu设置开机启动,您可以使用这个[Upstart脚本][7]。 -注: 在Ubuntu 12.04版在127.0.0.1有个本地的DNS cache (dnsmasq)在跑,所以已经把改脚本改成让DNSCrypt使用127.0.0.2了, 所以按照上面的教程,应该把127.0.0.1换成127.0.0.2了。 +注: 在Ubuntu 12.04版在127.0.0.1有个本地的DNS cache 服务器(dnsmasq)在跑,所以已经把改脚本改成让DNSCrypt使用127.0.0.2了, 所以按照上面的教程,应该把127.0.0.1换成127.0.0.2了。 要安装此脚本请使用以下的指令(要首先解压下下来的压缩文件): @@ -49,13 +49,13 @@ DNSCrypt刚问世的时候,官方公布为是一款只有Mac才能用的工具 sudo stop dnscrypt -[下载DNSCrypt][8] (.deb, .rpm以及源码都可供下载哦!) +[下载DNSCrypt][8] (.deb、 .rpm以及源码都可供下载哦!) -------------------------------------------------------------------------------- via: http://www.webupd8.org/2012/02/encrypt-dns-traffic-in-linux-with.html -译者:[213edu](https://github.com/213edu) 校对:[校对者ID](https://github.com/校对者ID) +译者:[213edu](https://github.com/213edu) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/published/201406/20140620 How to enable testing and unstable repository on Debian.md b/published/201406/20140620 How to enable testing and unstable repository on Debian.md new file mode 100644 index 0000000000..e506e95088 --- /dev/null +++ b/published/201406/20140620 How to enable testing and unstable repository on Debian.md @@ -0,0 +1,159 @@ +如何在Debian中启用测试版/不稳定版的软件库 +================================================================================ +为何要启用测试版/不稳定版? + +测试版/不稳定版的Debian给开发者提供了一个比当前稳定版更新的环境以及软件。你们注意到了么?其实这些稳定版啊不稳定版啊神马的都是别名,比方说稳定版其实就是Debian的稳定发行版,而测试版将会是下一个Debian的稳定发行版(当然那是测试后的事了)。截至发稿为止,当前Debian的稳定发行版是Wheezy 7.x,将会成为下一个稳定版的测试版则是Jessie。 + +当你需要一款应用的最新版本的时候,启用测试版/不稳定版将会是不二的选择。当初我因为工作需要,要安装个Apache的 2.4.x到我的Debian Wheezy。测试版需要的是2.4.x的,可是我的软件库里面只有2.2.x的。所以最好的解决方案当时是将测试版下下来啦。 + +通常来说当我们想尝试最新版本的应用时,都应该只在测试版软件库中搜索。 + +在这篇文章里我将教大家如何在不弄坏你系统的前提下设置好测试、不稳定版的Debain系统并在上面安装软件。 + +> Stable < Testing < Unstable (稳定 < 测试版 < 不稳定版) +> Wheezy < Jessie < Sid + +### 1. 设置测试版/不稳定版的apt源 ### + +第一步是把测试版/不稳定版的源加到你的sources.list文件里。在Debian Wheezy系统上,/etc/apt/sources.list理应长得像这样: + + $ cat /etc/apt/sources.list + +---------- + + ... + deb http://security.debian.org/ wheezy/updates main + deb http://http.us.debian.org/debian/ wheezy main + deb-src http://security.debian.org/ wheezy/updates main + ... + +把你repo服务器的链接记下来,比如:http://http.us.debian.org/debian/ + +这个repo服务器将会是离你最近的一个服务器; 在不同的地理位置会有不同的url,这个将会用于下一步。 + +如果想加测试/不稳定源,则需要在sources.list文件加上这些东西: + + # Testing repository - main, contrib and non-free branches + deb http://http.us.debian.org/debian testing main non-free contrib + deb-src http://http.us.debian.org/debian testing main non-free contrib + + + # Testing security updates repository + deb http://security.debian.org/ testing/updates main contrib non-free + deb-src http://security.debian.org/ testing/updates main contrib non-free + + + # Unstable repo main, contrib and non-free branches, no security updates here + deb http://http.us.debian.org/debian unstable main non-free contrib + deb-src http://http.us.debian.org/debian unstable main non-free contrib + +格式将会是 + + deb + (deb <上一步弄的服务器或镜像url> ) + +当然啦,除了用testing或者unstable这么烂的词,也能使用他们的发行版代号,比如Jessie或者Sid + + deb http://http.us.debian.org/debian jessie main non-free contrib + deb http://security.debian.org/ jessie/updates main contrib non-free + deb http://http.us.debian.org/debian sid main non-free contrib + +### 2. 钉住 apt!这非常重要 ### + +> 在加了测试/不稳定的repo之后,当你更新系统的时候所有安装过并且可用的软件就会立马更新,而后你的系统就被你玩火自焚了。 + +所以需要设置一些规则,以便选定的软件包在正常的更新时不会被更新到一个不稳定的测试版本。 + +我们需要使用“钉住APT”的方式来告诉apt系统,除了我们希望使用测试版或不稳定版的特定软件包之外,其它的总是使用稳定版的软件包来更新。 + +可以通过如下两个文件之一来设置如何设置APT的优先级来“钉住”。 + + /etc/apt/preferences + 或 + /etc/apt/preferences.d/my_preferences + +打开这两个文件之一(如果没有的话就创建一个),然后输入如下内容: + + Package: * + Pin: release a=stable + Pin-Priority: 700 + + Package: * + Pin: release a=testing + Pin-Priority: 650 + + Package: * + Pin: release a=unstable + Pin-Priority: 600 + +前面我们提到过,稳定版指的是你当前的debian版本,测试版是下一个,而不稳定版则是更远的将来发行版。上面的设置中最主要的是优先级(Pin-Priority)。当前的稳定版应该有最高的优先级,这就是说,正常的apt-get操作只会从当前的稳定版的软件库(现在是wheezy)里面安装软件。 + +#### 更新包缓存 #### + +在增加了新的软件库和指定了优先规则后,需要更新一下包缓存。 + + $ sudo apt-get update + +#### 确认APT规则 #### + +我们必须确认“钉住”的设置正确,优先级也没问题。使用 apt-cache 的 policy 参数来检查: + + $ apt-cache policy apache2 + apache2: + Installed: (none) + Candidate: 2.2.22-13 + Version table: + 2.4.7-1 0 + 600 http://http.us.debian.org/debian/ unstable/main amd64 Packages + 2.4.6-3 0 + 650 http://http.us.debian.org/debian/ testing/main amd64 Packages + 2.2.22-13 0 + 700 http://http.us.debian.org/debian/ wheezy/main amd64 Packages + +如上的输出,确认在wheezy 稳定版中, 2.2.22 版本的Apache是选定的版本,它有最高的优先级。 + +### 3. 从测试版/不稳定版软件库中安装软件 ### + +现在可以从测试版或不稳定版中选择一个特定的软件来安装它了。假如说我们要从测试版软件源中安装 apache2。 + +有两个不同的方法,并且其结果也有所不同。 + +#### 方式一 #### + + # apt-get install apache2/testing + +上述命令会从测试版软件库中安装 apache2,并从稳定版软件库中安装其依赖包(稳定版通过apt规则确定)。这个命令在某些情况下会失败,比如安装的软件包(apache2)所需的依赖包在稳定版软件库中没有更新到可以支持该软件时。 + +#### 方式二 #### + + # apt-get -t testing install apache2 + +上述命令会从测试版软件库中安装apache2,并从测试版软件库中安装其依赖包。这要比上面的命令工作的更好。 + +所以,要安装较新的软件包,直接从测试版/不稳定版的软件库中安装就行了。注意,优先级号码不只是一个数字而已,还有其特定意义。可以查看 apt_preferences的man页面了解更多: + + $ man 5 apt_preferences + +### 总结 ### + +使用“钉住”方式的测试版/不稳定版的软件库是一个获取较新版本软件包的一个好办法,不过其实并不推荐使用它们。如果弄错了,可能会从也许不兼容的分支上下载软件包,这会把你的系统搞乱。 + +一个更好的方式是,使用向后移植的软件库来安装更新的包。它从测试版和不稳定版的软件库中获取较新版本的软件包,但是为当前的稳定版软件库而编译。所以,对于 debian wheezy来说,你可以使用wheezy-backports 软件库。访问http://backports.debian.org/ 了解更多。 + +### 资源 ### + +- [https://wiki.debian.org/AptPreferences][1] +- [https://wiki.debian.org/DebianTesting][2] +- [https://www.debian.org/security/][3] + +-------------------------------------------------------------------------------- + +via: http://www.binarytides.com/enable-testing-repo-debian/ + +译者:[213edu](https://github.com/213edu) [wxy](https://github.com/wxy) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://wiki.debian.org/AptPreferences +[2]:http://wiki.debian.org/DebianTesting +[3]:http://www.debian.org/security/ diff --git a/published/201406/20140625 Canonical Debuts 'Orange Box' for Ubuntu OpenStack Cloud Demos.md b/published/201406/20140625 Canonical Debuts 'Orange Box' for Ubuntu OpenStack Cloud Demos.md new file mode 100644 index 0000000000..5a16cec25b --- /dev/null +++ b/published/201406/20140625 Canonical Debuts 'Orange Box' for Ubuntu OpenStack Cloud Demos.md @@ -0,0 +1,42 @@ +Ubuntu的Orange Box首次亮相 +================================================================================ + +> Orange Box现已推出,它是一个便携的服务器集群,Canonical用它来演示和培训基于Ubuntu的OpenStack云。 + +![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2014/06/grayscale_7.jpg) + +Canonical刚刚发布的Orange Box是一个便携式服务器集群,该公司用来展示[OpenStack][1],[MAAS][2],[Juju][3]和其它的基于Ubuntu Linux的云服务。 + +下面是它的介绍。 + +对于刚刚接触到它的人来说,重要的是要了解Orange Box不是什么:它不是一台Canonical用来盈利的硬件产品。到目前为止,该公司并无表示计划大规模销售这些设备。如果你真的想[买一款][4]的话,大概价格为$12,900,这个价格来自其合同制造商[TranquilPC Limited][5]。 + +从大的方面来说,Orange Box是一个说服企业在基于Ubuntu的云计算投入资金的工具。Canonical的创始人马克·沙特尔沃思[上个月宣布了][6]Ubuntu OpenStack的战略,这是该战略的一个关键组成部分,更是该公司提供的称作[Jumpstart][7]的OpenStack的培训计划的一部分。 + +作为Jumpstart的一部分,Canonical会将Orange Box借给合作伙伴,以便他们的员工可以在Ubuntu集群上练习配置OpenStack和相关软件。Canonical的工作人员也将在培训期间提供咨询。 + +不过除开培训的目的不谈,Orange Box[看起来真的很酷][8]。它装有10个[英特尔NUC][9],总计集成了160GB的RAM,1200GB的存储空间和10个酷睿i5处理器,这种设备在一个袖珍空间内提供了相当强大的计算能力。 + +![](http://www.intel.com/content/dam/www/public/us/en/images/product/wilson-canyon-nuc-front-angle-with-board.jpg) + +更好的是,Orange Box通过预装软件为启动基于Ubuntu的云技术打下了良好基础。 + +不过,对于Canonical来说,真正的考验是确保企业能够从Orange Box中获益。借出它们不只是为了让合作伙伴们体验一下不错的硬件设备,而是为了通过一个真正令人信服的方式体验Ubuntu的云,以吸引IT决策者选择Ubuntu所建立的下一代云基础设施。 + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/ubuntu/062314/canonical-debuts-orange-box-ubuntu-openstack-cloud-demos + +译者:[乌龙茶](https://github.com/yechunxiao19) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://openstack.org/ +[2]:https://maas.ubuntu.com/ +[3]:http://juju.ubuntu.com/ +[4]:http://www.tranquilpcshop.co.uk/ubuntu-orange-box/ +[5]:http://www.tranquilpcshop.co.uk/ +[6]:http://thevarguy.com/ubuntu/051614/shuttleworth-highlights-ubuntu-openstack-cloud-innovations +[7]:http://www.ubuntu.com/cloud/tools/jumpstart +[8]:http://arstechnica.com/information-technology/2014/06/hands-on-with-canonicals-orange-box-and-a-peek-into-cloud-nirvana/ +[9]:http://www.intel.com/content/www/us/en/nuc/overview.html diff --git a/published/8 examples of findmnt command to check mounted file systems on Linux.md b/published/201406/8 examples of findmnt command to check mounted file systems on Linux.md similarity index 100% rename from published/8 examples of findmnt command to check mounted file systems on Linux.md rename to published/201406/8 examples of findmnt command to check mounted file systems on Linux.md diff --git a/published/Bash Getopts--Scripts with Command Line Options.md b/published/201406/Bash Getopts--Scripts with Command Line Options.md similarity index 100% rename from published/Bash Getopts--Scripts with Command Line Options.md rename to published/201406/Bash Getopts--Scripts with Command Line Options.md diff --git a/published/Collectl--An Advanced All-in-One Performance Monitoring Tool for Linux.md b/published/201406/Collectl--An Advanced All-in-One Performance Monitoring Tool for Linux.md similarity index 100% rename from published/Collectl--An Advanced All-in-One Performance Monitoring Tool for Linux.md rename to published/201406/Collectl--An Advanced All-in-One Performance Monitoring Tool for Linux.md diff --git a/published/Fix Adobe Flash Player Issue In Chromium In Ubuntu 14.04.md b/published/201406/Fix Adobe Flash Player Issue In Chromium In Ubuntu 14.04.md similarity index 100% rename from published/Fix Adobe Flash Player Issue In Chromium In Ubuntu 14.04.md rename to published/201406/Fix Adobe Flash Player Issue In Chromium In Ubuntu 14.04.md diff --git a/published/Guide To Install Ubuntu 14.04 In Dual Boot Mode With Windows 8 Or 8.1 UEFI.md b/published/201406/Guide To Install Ubuntu 14.04 In Dual Boot Mode With Windows 8 Or 8.1 UEFI.md similarity index 100% rename from published/Guide To Install Ubuntu 14.04 In Dual Boot Mode With Windows 8 Or 8.1 UEFI.md rename to published/201406/Guide To Install Ubuntu 14.04 In Dual Boot Mode With Windows 8 Or 8.1 UEFI.md diff --git a/published/How To Install 'California' Calendar App in Ubuntu 14.04.md b/published/201406/How To Install 'California' Calendar App in Ubuntu 14.04.md similarity index 100% rename from published/How To Install 'California' Calendar App in Ubuntu 14.04.md rename to published/201406/How To Install 'California' Calendar App in Ubuntu 14.04.md diff --git a/published/How To Remove Drive Icons From Unity Launcher In Ubuntu 14.04 [Beginner Tips].md b/published/201406/How To Remove Drive Icons From Unity Launcher In Ubuntu 14.04 [Beginner Tips].md similarity index 100% rename from published/How To Remove Drive Icons From Unity Launcher In Ubuntu 14.04 [Beginner Tips].md rename to published/201406/How To Remove Drive Icons From Unity Launcher In Ubuntu 14.04 [Beginner Tips].md diff --git a/published/How to Install Windows 8.1 and Ubuntu 14.04 LTS on the Same Computer.md b/published/201406/How to Install Windows 8.1 and Ubuntu 14.04 LTS on the Same Computer.md similarity index 100% rename from published/How to Install Windows 8.1 and Ubuntu 14.04 LTS on the Same Computer.md rename to published/201406/How to Install Windows 8.1 and Ubuntu 14.04 LTS on the Same Computer.md diff --git a/published/How to download webcomics from the command line on Linux.md b/published/201406/How to download webcomics from the command line on Linux.md similarity index 100% rename from published/How to download webcomics from the command line on Linux.md rename to published/201406/How to download webcomics from the command line on Linux.md diff --git a/published/How to launch applications differently with Gnome-Pie on Linux desktop.md b/published/201406/How to launch applications differently with Gnome-Pie on Linux desktop.md similarity index 100% rename from published/How to launch applications differently with Gnome-Pie on Linux desktop.md rename to published/201406/How to launch applications differently with Gnome-Pie on Linux desktop.md diff --git a/published/How to manage Linux containers with Docker on Ubuntu.md b/published/201406/How to manage Linux containers with Docker on Ubuntu.md similarity index 100% rename from published/How to manage Linux containers with Docker on Ubuntu.md rename to published/201406/How to manage Linux containers with Docker on Ubuntu.md diff --git a/published/How to manage ip addresses and subnets with phpIPAM.md b/published/201406/How to manage ip addresses and subnets with phpIPAM.md similarity index 100% rename from published/How to manage ip addresses and subnets with phpIPAM.md rename to published/201406/How to manage ip addresses and subnets with phpIPAM.md diff --git a/published/How to manage passwords from the command line on Linux.md b/published/201406/How to manage passwords from the command line on Linux.md similarity index 100% rename from published/How to manage passwords from the command line on Linux.md rename to published/201406/How to manage passwords from the command line on Linux.md diff --git a/published/How to monitor Nginx web server from the command line in real time.md b/published/201406/How to monitor Nginx web server from the command line in real time.md similarity index 100% rename from published/How to monitor Nginx web server from the command line in real time.md rename to published/201406/How to monitor Nginx web server from the command line in real time.md diff --git a/published/How to set up a web-based lightweight system monitor on Linux.md b/published/201406/How to set up a web-based lightweight system monitor on Linux.md similarity index 100% rename from published/How to set up a web-based lightweight system monitor on Linux.md rename to published/201406/How to set up a web-based lightweight system monitor on Linux.md diff --git a/published/How to take a screenshot from the command line on Linux.md b/published/201406/How to take a screenshot from the command line on Linux.md similarity index 100% rename from published/How to take a screenshot from the command line on Linux.md rename to published/201406/How to take a screenshot from the command line on Linux.md diff --git a/published/How to take full length screenshots of websites via terminal.md b/published/201406/How to take full length screenshots of websites via terminal.md similarity index 100% rename from published/How to take full length screenshots of websites via terminal.md rename to published/201406/How to take full length screenshots of websites via terminal.md diff --git a/published/How to use LVM in Linux.md b/published/201406/How to use LVM in Linux.md similarity index 100% rename from published/How to use LVM in Linux.md rename to published/201406/How to use LVM in Linux.md diff --git a/published/How to verify DDOS attack with netstat command on Linux Terminal.md b/published/201406/How to verify DDOS attack with netstat command on Linux Terminal.md similarity index 100% rename from published/How to verify DDOS attack with netstat command on Linux Terminal.md rename to published/201406/How to verify DDOS attack with netstat command on Linux Terminal.md diff --git a/published/Install SoundCloud In Ubuntu 14.04.md b/published/201406/Install SoundCloud In Ubuntu 14.04.md similarity index 100% rename from published/Install SoundCloud In Ubuntu 14.04.md rename to published/201406/Install SoundCloud In Ubuntu 14.04.md diff --git a/published/Linux Pros' Top Command Line Secrets.md b/published/201406/Linux Pros' Top Command Line Secrets.md similarity index 100% rename from published/Linux Pros' Top Command Line Secrets.md rename to published/201406/Linux Pros' Top Command Line Secrets.md diff --git a/published/Linux Terminal--Dstat monitoring tools.md b/published/201406/Linux Terminal--Dstat monitoring tools.md similarity index 100% rename from published/Linux Terminal--Dstat monitoring tools.md rename to published/201406/Linux Terminal--Dstat monitoring tools.md diff --git a/published/Making Linux Feel at Home.md b/published/201406/Making Linux Feel at Home.md similarity index 100% rename from published/Making Linux Feel at Home.md rename to published/201406/Making Linux Feel at Home.md diff --git a/published/Open Source's Cult Of Personality Is Dying--Thankfully.md b/published/201406/Open Source's Cult Of Personality Is Dying--Thankfully.md similarity index 100% rename from published/Open Source's Cult Of Personality Is Dying--Thankfully.md rename to published/201406/Open Source's Cult Of Personality Is Dying--Thankfully.md diff --git a/published/Pros' Secrets and Red Hat 7 and PCLinuxOS 2014.05 Reviews.md b/published/201406/Pros' Secrets and Red Hat 7 and PCLinuxOS 2014.05 Reviews.md similarity index 100% rename from published/Pros' Secrets and Red Hat 7 and PCLinuxOS 2014.05 Reviews.md rename to published/201406/Pros' Secrets and Red Hat 7 and PCLinuxOS 2014.05 Reviews.md diff --git a/published/Start Practising Linux ip command and Avoid the Habit of Using ifconfig.md b/published/201406/Start Practising Linux ip command and Avoid the Habit of Using ifconfig.md similarity index 100% rename from published/Start Practising Linux ip command and Avoid the Habit of Using ifconfig.md rename to published/201406/Start Practising Linux ip command and Avoid the Habit of Using ifconfig.md diff --git a/published/TechView--Linus Torvalds Inventor of Linux.md b/published/201406/TechView--Linus Torvalds Inventor of Linux.md similarity index 100% rename from published/TechView--Linus Torvalds Inventor of Linux.md rename to published/201406/TechView--Linus Torvalds Inventor of Linux.md diff --git a/published/Turn Off Bluetooth By Default In Ubuntu 14.04 [Quick Tip].md b/published/201406/Turn Off Bluetooth By Default In Ubuntu 14.04 [Quick Tip].md similarity index 100% rename from published/Turn Off Bluetooth By Default In Ubuntu 14.04 [Quick Tip].md rename to published/201406/Turn Off Bluetooth By Default In Ubuntu 14.04 [Quick Tip].md diff --git a/published/Ubuntu Linux Community Manager Jono Bacon Leaves Canonical.md b/published/201406/Ubuntu Linux Community Manager Jono Bacon Leaves Canonical.md similarity index 100% rename from published/Ubuntu Linux Community Manager Jono Bacon Leaves Canonical.md rename to published/201406/Ubuntu Linux Community Manager Jono Bacon Leaves Canonical.md diff --git a/published/What Heartbleed Teaches Us--Be An Open Source Contributor, Not Just A User.md b/published/201406/What Heartbleed Teaches Us--Be An Open Source Contributor, Not Just A User.md similarity index 100% rename from published/What Heartbleed Teaches Us--Be An Open Source Contributor, Not Just A User.md rename to published/201406/What Heartbleed Teaches Us--Be An Open Source Contributor, Not Just A User.md diff --git a/published/Why htop Command Compete Linux top Command.md b/published/201406/Why htop Command Compete Linux top Command.md similarity index 100% rename from published/Why htop Command Compete Linux top Command.md rename to published/201406/Why htop Command Compete Linux top Command.md diff --git a/translated/talk/20140607 How to turn Vim into a full-fledged IDE.md b/published/20140607 How to turn Vim into a full-fledged IDE.md similarity index 59% rename from translated/talk/20140607 How to turn Vim into a full-fledged IDE.md rename to published/20140607 How to turn Vim into a full-fledged IDE.md index 64b8b47e7f..6705ceefc3 100644 --- a/translated/talk/20140607 How to turn Vim into a full-fledged IDE.md +++ b/published/20140607 How to turn Vim into a full-fledged IDE.md @@ -1,27 +1,25 @@ -CNprober 翻译完成.travelwithheart@yeah.net, 619913541 - 如何将Vim打造成一个成熟的IDE ================================================================================ -如果你稍微写一点代码,就能知道“集成开发环境”(IDE)是多么的便利。不管是Java、C还是Python,当IDE会帮你检查语法、后台编译,或者自动导入你需要的库时,写代码就变得容易许多。另外,如果你工作在Linux上,你也会知道Vim在进行文本编辑的时候是多么的方便。所以,你可能会想从Vim中也获取这些IDE特性。 +如果你稍微写过一点代码,就能知道“集成开发环境”(IDE)是多么的便利。不管是Java、C还是Python,当IDE会帮你检查语法、后台编译,或者自动导入你需要的库时,写代码就变得容易许多。另外,如果你工作在Linux上,你也会知道Vim在进行文本编辑的时候是多么的方便。所以,你可能会想从Vim中也获取这些IDE特性。 -事实上,很少有方法可以帮你做到。有些人可能会想到试着把Vim打造成C语言IDE的 [c.vim][1], 或者把Vim集成到Eclipse里的 [Eclim][2] 。但是我想要告诉你的是一个更加通用的,只用插件实现的方案。你肯定不想因为安装了太多的面板和特性而让你的编辑器变得臃肿不堪。只用插件实现的方案可以让你只选择那些你想要集成到Vim的特性。这样做的额外的一个好处是,这个IDE不是专门针对某一种语言的,可以让你写任何类型的代码。下面就来看一下我的 **把IDE特性带进Vim的前10款插件** 吧。 +事实上,很少有方法可以帮你做到。有些人可能会想到试着把Vim打造成C语言IDE的,比如[c.vim][1];也有把Vim集成到Eclipse里的 [Eclim][2] 。但是我想要告诉你的是一个更加通用的,只用插件实现的方案。你肯定不想因为安装了太多的面板和特性而让你的编辑器变得臃肿不堪。只用插件实现的方案可以让你只选择那些你想要集成到Vim的特性。这样做的额外的一个好处是,这个IDE不是专门针对某一种语言的,可以让你写任何类型的代码。下面就来看一下我的 **把IDE特性带进Vim的前10款插件** 吧。 ### 先来个福利: Pathogen ### -首先,可能不是所有人都熟悉Vim的插件,也不知道怎么安装这些插件。所以,我推荐的第一个插件就是[Pathogen][3],因为这个插件会让你更容易安装其他插件。如果你要安装另外的没有在这里列出来的插件,用Pathogen会变得非常简单。[官方页面][3]文档写的非常好,去下载安装一个吧。接下来插件的安装也会变得容易很多。 +首先,可能不是所有人都熟悉Vim的插件,并知道该怎么安装这些插件。所以,我推荐的第一个插件就是[Pathogen][3],因为这个插件会让你更容易安装其他插件。如果你要安装另外的没有在这里列出来的插件,用Pathogen会变得非常简单。它的[官方页面][3]的文档写的非常好,去下载安装一个吧。接下来插件的安装也会变得容易很多。 ### 1. SuperTab ### -[![](https://farm6.staticflickr.com/5158/14332189422_34aeb086ed_z.jpg)][4] +![](https://c2.staticflickr.com/6/5158/14332189422_34aeb086ed_z.jpg) -我们习惯于IDE的第一件事就是它的自动补全功能。所以,我习惯这个非常方便的,给了Tab键“超能力”的 [SuperTab][5] 插件。 +我们习惯于IDE的第一个原因就是它的自动补全功能。所以,我喜欢这个非常方便的,给了Tab键“超能力”的 [SuperTab][5] 插件。 ### 2. Syntastic ### ![](https://farm4.staticflickr.com/3894/14354095583_ce9b112b97_z.jpg) -如果你需要使用超过一种语言进行编码,有时候是非常容易混淆不同语言之间的语法的。幸运的是,[syntastic][6] 会帮你检查,然后告诉你是否应该加上圆括号或者方括号,或者告诉你在某个地方,你忘了一个分号。 +如果你需要使用一种以上的语言进行编程,有时候是非常容易混淆不同语言之间的语法的。幸运的是,[syntastic][6] 会帮你检查,然后告诉你是否应该加上圆括号或者方括号,或者告诉你在某个地方,你忘了一个分号。 ### 3. Auto Pairs ### @@ -29,11 +27,11 @@ CNprober 翻译完成.travelwithheart@yeah.net, 619913541 ### 4. NERD Commenter ### -如果你在找一个可以支持多种程序语言的注释代码的快捷键,你可以试试 [NERD Commenter][8]。即使你不是程序员,我也非常非常推荐这款插件,因为它会让你在注释bash 脚本或者其他任何东西的时候都会变得非常高效。 +如果你在找一个可以支持多种程序语言的注释代码的快捷键,你可以试试 [NERD Commenter][8]。即使你不是程序员,我也非常非常推荐这款插件,因为它会让你在注释bash脚本或者其他任何东西的时候都会变得非常高效。 ### 5. Snipmate ### -任何一个程序员都知道,好的coder写代码,杰出的coder重用代码。[snipmate][9] 可以容易的插入代码片段到你的文件里面,大大的减少了你敲键盘的次数。它默认的有很多各种语言的代码片段,你也可以非常容易的添加你自己。 +任何一个程序员都知道,好的码农写代码,杰出的码神重用代码。[snipmate][9]可以容易的插入代码片段到你的文件里面,大大的减少了你敲键盘的次数。它默认的包含了很多各种语言的代码片段,你也可以非常容易的添加你自己的。 ### 6. NERDTree ### @@ -46,19 +44,22 @@ CNprober 翻译完成.travelwithheart@yeah.net, 619913541 ![](https://farm4.staticflickr.com/3904/14332189492_209a3ee2dc_z.jpg) 为了打造一个文件浏览器,支持同时打开多个文件,没有什么比一个好的缓冲区管理器更重要了。[MiniBufferExplorer][11] 就可以非常漂亮和高效地完成这个工作。它甚至为你的缓冲区设置了不同的颜色和切换快捷键。 + ### 8. Tag List ### ![](https://farm4.staticflickr.com/3889/14147244138_c04731826a_z.jpg) -当你同时有多个文件打开时,很容易忘了你都在这些文件里添加了什么。为了防止你忘记,[Tag List][12] 这个代码查看器将会用一种漂亮简洁的格式展示不同的变量和函数。 +当你同时有多个文件打开时,很容易忘了你都在这些文件里添加了什么。为了防止你忘记,[Tag List][12] 这个代码查看器将会用一种漂亮简洁的格式展示其中的的变量和函数。 + ### 9. undotree ### ![](https://farm3.staticflickr.com/2913/14354095453_8bb87a3e31_z.jpg) 对于我们之中那些喜欢undo,redo然后又undo某些更改,然后依据这些来查看整个编辑完成过程的人来说, [undotree][13] 是一个不错插件,可以以一棵树的形式看到你的undo和redo历史。这个功能跟代码完全没有关系,所以这是我非常喜欢的一个插件。 + ### 10. gdbmgr ### -最后,但并非不重要的是,每个人都在某时刻需要一个调试器。如果你喜欢gdb,那么[gbdmgr][14]就是为你准备的,因为它集成了那个著名的调试器到Vim中。 +最后,但并非不重要,每个人都在某个时刻需要一个调试器。如果你喜欢gdb,那么[gbdmgr][14]就是为你准备的,因为它集成了那个著名的调试器到Vim中。 总结一下,不管你是不是一个疯狂的coder,能有一些额外的Vim功能在手总是非常方便的。像我在简介里说到的,如果你不需要,你不用安装这里所有的这些插件。或者你想要安装另外的也行,这些其实只是一个基础入门级的插件。 @@ -68,7 +69,7 @@ CNprober 翻译完成.travelwithheart@yeah.net, 619913541 via: http://xmodulo.com/2014/06/turn-vim-full-fledged-ide.html -译者:[love_daisy_love](https://github.com/CNprober) 校对:[校对者ID](https://github.com/校对者ID) +译者:[love\_daisy\_love](https://github.com/CNprober) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/talk/20140609 Has Microsoft really changed its attitude toward open source.md b/published/20140609 Has Microsoft really changed its attitude toward open source.md similarity index 76% rename from translated/talk/20140609 Has Microsoft really changed its attitude toward open source.md rename to published/20140609 Has Microsoft really changed its attitude toward open source.md index 367b6e16e8..4cc490ad1c 100644 --- a/translated/talk/20140609 Has Microsoft really changed its attitude toward open source.md +++ b/published/20140609 Has Microsoft really changed its attitude toward open source.md @@ -5,7 +5,7 @@ 微软因为以前对开源软件的态度而臭名昭著,但是公司改建后对开源软件发出了积极的信号。CNet报道了微软对开源软件认知的行为的改变。 > [CNet][1]消息: -> 微软自助开源软件有一些时间了,那些曾经反对开源软件的领导者们已经退出了或者不在位了。开软软件现在用在遍布全世界的公司当中,这些公司有些自命不凡但这只是在认识到微软帝国之外的事。 +> 虽然微软资助开源软件有一些时间了,并且那些曾经反对开源软件的领导者们已经退出了或者不在位了。开源软件现在用在遍布全世界的公司当中,但这些与微软帝国无关。 > 一些新的想法反映了企业顶层的一些变化,今年二月初Satya Nadella代替鲍尔默成为了微软CEO,Nadella已经给微软带来了一些新的东西改变了微软以前的一些束缚。 > > [更多报道][2] @@ -17,17 +17,17 @@ 我是一个持悲观态度的人,但是我认为微软和开源软件之间的信任关系是有待确定的。一个新的CEO和些许改变或许会改变微软在开源世界中的存在状态,但是对于微软这么大的企业来说改变并不容易,所以对于开源的世界来说微软是否真的改变还有待确定。 -我也从来不会忘记微软“欢迎,扩大,压死”的策略来打翻其他的竞争软件,光这一条凡是微软参合的开源项目就必须多一只谨慎的眼,或许这家公司真的改了,但如果没有呢!我们还是用几年时间来观察下吧。 +我也从来不会忘记微软用“欢迎,扩大,压死”的策略来打翻其他的竞争软件,光这一条凡是微软参合的开源项目就必须瞪大眼睛,或许这家公司真的改了,但如果没有呢!我们还是用几年时间来观察下吧。 ### 安卓对抗windows ### -ZDNet曾经报道过使用数量最多的Linux发行版本,但是现在桌面环境仍然是windows的天下,但是安卓今年很可能会是用户数量最大的用户终端操作系统。 +ZDNet曾经报道过使用数量最多的Linux发行版本,不过现在桌面环境仍然是windows的天下,但是安卓今年很可能会是用户数量最大的用户终端操作系统。 > [ZDNet][4]报道: > -> 如果桌面和平板依旧像预期增长的销量,安卓平板渐渐蚕食苹果的市场,PC市场继续萎缩,安卓在2014年末很有可能成为终端用户数量最多的操作系统而且不算安卓PC。 +> 如果桌面和平板依旧像预期增长的销量,安卓平板渐渐蚕食苹果的市场,PC市场继续萎缩,安卓在2014年末很有可能成为终端用户数量最多的操作系统,而且不算安卓PC。 > -> 总而言之,安卓几乎统治了Linux终端用户。你可能不会想到它作为桌面使用,尽管Intel和AMD努力在让它变成现实,但是安卓正在变成使用量第一的终端操作系统。 +> 总而言之,安卓几乎统治了Linux终端用户。你可能不会想把它作为桌面使用,尽管Intel和AMD努力在让它变成现实,但是安卓正在变成使用量第一的终端操作系统。 > > [更多消息][4] @@ -37,18 +37,17 @@ ZDNet曾经报道过使用数量最多的Linux发行版本,但是现在桌面 上面提到的并不算真的惊喜,移动终端的革命发展了接近10年了。桌面依然还像原来那样重要,微软也确实没有真正的在乎过移动设备。即使现在,微软在艰难的推他的手机和平板,他仍旧认为移动终端市场并不重要。 - 谷歌严重的破坏了微软在移动领域的努力,而现在他在桌面市场又对微软发起了挑战。从chrome OS到安卓,谷歌给微软一连串的打击,如果你查看下Amazon最受欢迎的[台式机][5]和[笔记本][6]的话,你会看到很多chrome OS的电脑甚至是装有安卓的PC。所以人们的购买需求在变得多样化,并不局限在windows一家了。 ### Cinnamon和Unity在Ubuntu14.04上的对抗 ### -Tech Republic发表了一篇文章介绍了如何在Ubuntu14.04上安装cinnamon,研究了一下Ubuntu14.04上用cinnamon替换unity的可行性。 +Tech Republic发表了一篇文章介绍了如何在Ubuntu14.04上安装Cinnamon,研究了一下Ubuntu14.04上用Cinnamon替换unity的可行性。 > [Tech Republic][7]报道: > -> 如果你寻求性能为主不需要其他有特色的可自定义的桌面,cinnamon适合你。Cinnamon是一个直观简洁的桌面,任何人都可以使用,不论你是IT工作者还是你的老妈妈。它非常的简单易用。Cinnamon很平淡,不会和你开什么玩笑,也不会让你感到有惊奇的感觉,但这就是它所注重的。它只会给桌面带来在标准层面上带来实用性,它不求突破,不耍花招,不加条条框框。 +> 如果你寻求性能为主不需要其他有特色的可自定义的桌面,Cinnamon适合你。Cinnamon是一个直观简洁的桌面,任何人都可以使用,不论你是IT工作者还是你的老妈妈。它非常的简单易用。Cinnamon很平淡,不会和你开什么玩笑,也不会让你感到有惊奇的感觉,但这就是它所注重的。它只会给桌面带来在标准层面上带来实用性,它不求突破,不耍花招,不加条条框框。 > -> Cinnamon是一个很平凡的桌面它只集成了最好的功能并且把它们集成到一起,完美整合到一块。如果你可以用一个看起来和用起来都点老掉牙但是性能很好的桌面的话,cinnamon完全适合你。如果你喜欢各种花哨的界面和看起来很现代的感觉,cinnamon可能就不适合你了。 +> Cinnamon是一个很平凡的桌面,它只集成了最好的功能并且把它们集成到一起,完美整合到一块。如果你可以用一个看起来和用起来都点老掉牙,但是性能很好的桌面的话,Cinnamon完全适合你。如果你喜欢各种花哨的界面和看起来很现代的感觉,Cinnamon可能就不适合你了。 > [ 更多消息][7] > @@ -56,9 +55,9 @@ Tech Republic发表了一篇文章介绍了如何在Ubuntu14.04上安装cinnamon > > Image credit: [Tech Republic][7] -我是站在cinnamon这边的,unity有自己的长处,但是我从来没用习惯过。Cinnamon更接近传统桌面,我用起来不错! +我是站在Cinnamon这边的,Unity有自己的长处,但是我从来没用习惯过。Cinnamon更接近传统桌面,我用起来不错! -但是在别人眼里,漂亮的桌面总是很受欢迎。Linux最大的特色就是提供很多很多不同的选择,如果你真不知道unity和cinnamon该选择谁,你就用自己最喜欢的就行了。 +但是在别人眼里,漂亮的桌面总是很受欢迎。Linux最大的特色就是提供很多很多不同的选择,如果你真不知道Unity和Cinnamon该选择谁,你就用自己最喜欢的就行了。 你赞成那些呢?请在下方留下你的评论吧 @@ -69,7 +68,7 @@ Tech Republic发表了一篇文章介绍了如何在Ubuntu14.04上安装cinnamon via: http://www.itworld.com/open-source/421894/has-microsoft-really-changed-its-attitude-toward-open-source -译者:[jiajia9linuxer](https://github.com/jiajia9linuxer) 校对:[校对者ID](https://github.com/校对者ID) +译者:[jiajia9linuxer](https://github.com/jiajia9linuxer) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/published/20140610 The Best Linux Distribution for New Users.md b/published/20140610 The Best Linux Distribution for New Users.md new file mode 100644 index 0000000000..2c8d5f7819 --- /dev/null +++ b/published/20140610 The Best Linux Distribution for New Users.md @@ -0,0 +1,159 @@ +适合新用户的最佳的Linux发行版 +================================================================================ +这个争论无疑给许多Linux用户带来了麻烦。争论的焦点一般不是哪个发行版是真正最适合新用户的,而是哪个发行版受这些争论者的喜爱。如果我们撇开个人喜爱,我们会看到更清楚的一面。但即使这样,明确的结论也会受到被新用户的需求和期望的影响。考虑到这点,我决定采取一个不同的方法来找出“对新用户来说最好的发行版”。我评判最好发行版的标准不仅是易用,而且还要具有由日益增长的移动界面风格所带来的现代设计理念。 + +对于这次评测,我们对发行版有如下要求: + +- 非常友好 +- 包括,开箱即用,所有常用的应用程序 +- 包括某个形式的应用程序商店 +- 提供一个时尚的用户界面 + +让我解释一下各个标准 + +### 用户友好 ### + +这是一个备受争议的话题。但事实的真相是——新用户必须能够选择某种风格的Linux并开始使用,只需要很少或不需要解释。如果必须很出太多解释,那么这个发行版便不是用户友好的。我不喜欢那些操作系统,但是几乎任何用户都可以在近乎零指导的情况下坐在Windows 7或OS X桌面前并开始使用它。这是每一个Linux桌面都应当争取去做的。 + +### 常用应用程序 ### + +安装好系统后用户不应该再去安装必需的程序。那么什么是必需的呢?每年列表都会变短。目前,必备的程序列表如下: + +- 网页浏览器:Chrome或者Firefox(对不起,根本不需要其他的浏览器) +- 电子邮件客户端:Thunderbird是显而易见的选择。 +- Office办公套件:LibreOffice。就这样。 +- 音乐播放器:播放本地文件以及连接到流媒体服务(比如Spotify)。 + +这是几乎所有用户需要的应用程序的简表。 + +### 应用程序商店 ### + +由于移动设备需求的日益增长,用户已经习惯了应用商店。Linux有应用商店很长时间了(Synaptic是最古老的一个)。没有一个经深思熟虑做的应用商店,用户将会挣扎于在Linux环境中添加软件。毫无疑问,这一点至关重要。 + +### 时尚的界面 ### + +我已经多次提到移动设备的美化。由于iOS和Android,用户越来越喜欢时尚的界面。Linux的桌面需要进行效仿并且用独特的、时尚的和易用的界面来吸引用户注意力。旧的风格在支持多触控的移动世界里不再有影响力。 + +## 排名前三的发行版 ## + +以文中的标准,哪个发行版本满足了(或超过)我们的需求?首先,让我们来审查一下前三名的候选者。以下哪个满足了(或超过)标准。 + +### Ubuntu ### + +[Ubuntu Linux][1]一直是用户友好型Linux的王者。开箱即用,寻找一个比它更迷人和易用的桌面(Unity)有点困难,甚至是对于那些对平台不熟悉的人也是这样的。它的桌面布局虽然与众不同,但却是合乎逻辑和很直观的。对于在桌面环境中添加一个最强大的搜索工具,在Linux中Ubuntu Unity应当获得最高成就。 + +### Linux Mint ### + +如果认为有一个篡夺王位的发行版,那它就是[Linux Mint][2]。Linux Mint做了更多桌面的标准方法,但是图层华丽且多变使其从老旧的桌面隐喻中脱颖而出。Linux Mint基于Ubuntu,所以它得益于“老大哥”Ubuntu的稳定性和可靠性。 + +### Linux Deepin ### + +用户友好型列表中的新成员是[Linux Deepin][3]。这个相对较新的受欢迎的发行版来自中国,而且应该正视它所带来的成就。为什么这样说?因为它使得Linux桌面转变为艺术美;同时也保持了高水平的用户友好性。我期待它的新版本发布将是个大事件。Linux Deepin使用的是GNOME 3桌面并将它重组得完全不同的,完全不可思议。 + +## 各发行版的比分 ## + +在最佳的竞争者名单中,我们来比较一下每一个标准和等级。每个发行版的比分如下:对于每个标准,发行版排名从高到底(第一名得一分,最后一名得三分)。最后,总分决定谁是冠军——最低得分获胜。 + +### 用户友好性 ### + +这可能是最严密的分类和最艰难的判别。每个发行版以不同的方法在用户友好性上都各有优势。最后,我的排名是: + +1. Linux Mint + +2. Ubuntu Linux + +3. Linux Deepin + +为什么是这样呢?Mint仅有微小的优势,因为它的开始按钮,任务栏和桌面图标仍然使用旧的桌面风格。胜者的优势很微小,Ubuntu和Linux Deepin要求的学习曲线近乎为零——甚至是对于小白们。 + +### 常用的应用程序 ### + +这一类别难以判断的唯一原因是因为每个发行版都包括所有必要的应用程序。虽然Linux Deepin目前提供的是金山Office(一个最好的移动办公套件解决方案之一),它计划在2014发行版本中默认使用LibreOffice。 + +关于常用程序的我的一个问题是音乐播放器。虽然我在线听过很多音乐(使用Spotify客户端),但当我播放本地音乐时,总是使用Clementine。他们的默认播放器是: + +- Ubuntu: Rhythmbox +- Linux Mint: Banshee +- Linux Deepen: DMusic. + +三者中,Banshee(图1)提供了最多的功能,DMusic(图2)提供了最好的界面,(令人惊讶的)Rhythmbox(图3)目前最不稳定。 + +![](http://www.linux.com/images/stories/41373/banshee.png) + +banshee + +![](http://www.linux.com/images/stories/41373/dmusic.png) + +dmusic + +![](http://www.linux.com/images/stories/41373/rhythmbox.png) + +rhythmbox + +所以,他们得分多少?如下: + +1. Linux Mint + +2. Ubuntu Linux + +3. Linux Deepin + +### 应用程序商店 ### + +如果不分析这部分将难进行。为什么呢?因为对于新用户应用商店可以轻易成就或是毁掉一个Linux发行版。总会有应用需求而且没有用户想经过命令行的重重考验。每个发行版都有自己的应用商店。 + +- Ubuntu: Ubuntu软件中心 +- Mint: 软件管理器 +- Linux Deepin: Deepin软件中心 + +应该说,这些工具中的每一个都是基于Ubuntu软件中心的。奇怪的是Ubuntu软件中心却正好排在最底。主要原因是Ubuntu软件中心太慢了——甚至在一个非常强大的机器上。 + +我将应用商店排名设为如下: + +1. Linux Deepin + +2. Linux Mint + +3. Ubuntu Linux + +每个应用商店有非常相似的功能。Linux Deepin获得第一的原因有两个:界面易于控制而且程序开启速度远远快于Ubuntu软件中心和Mint软件管理器。 + +### 时尚的界面 ### + +在这部分Linux Mint远远落后。尽管它提供了一个华美的界面和有很浅的学习曲线,但相比之下它仍然是一个非常过时的桌面。甚至在强大的硬件(有强大的显卡)上,Linux Mint仍然很容易被看成是来自90年代末的桌面。为了评判结果,我们必须看看是Ubuntu Linux还是Linux Deepin能带我们走进未来。胜者是: + +1. Linux Deepin + +2. Ubuntu Linux + +3. Linux Mint + +Linux Deepin使用GNOME 3来制作一个使用起来很漂亮的GNOME和OSX的混合体,你会认为你在处理一件互动的艺术品。 + +## 总冠军 ## + +虽然这是很初步的,对新用户来说最好的Linux发行版顺序应该是: + +1. Linux Mint的总得分是7 + +2. Linux Deepin的总得分是8 + +3. Ubuntu Linux的总得分是9 + +如果你想知道关于这篇文章的作者观点,要知道:我已经使用Ubuntu Linux很多年了(而且仍在用)。我最近一直在说“如果有一个Linux发行版能动摇我使用Ubuntu的想法,它便是Linux Deepin。”虽然我很欣赏Linux Mint,但我只是用它来进行测试。当说到对新用户最好的Linux发行版,Linux Mint是显而易见的赢家。 + +这件事真正的真相是——你在使用这些桌面中任何一个都不会错。他们都各有所长。如果你追求真正的美丽,使用Linux Deepin吧。如果你想要漂亮外观与易用结合,那就使用Ubuntu Linux。如果你只想要简单而且并不在乎漂亮的外观,那就用Linux Mint。不管你选哪一个,这都是三赢的局面。 + +你怎么认为?你会如何排这三个桌面的名次?或者,你是否会写一个不同的Linux发行版,该发行版在外表上来说对新用户最好的?(还有原因是什么?) + +-------------------------------------------------------------------------------- + +via: http://www.linux.com/news/software/applications/775873-the-best-linux-distribution-for-new-users/ + +译者:[linuhap](https://github.com/linuhap) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.ubuntu.com/ +[2]:http://www.linuxmint.com/ +[3]:http://www.linuxdeepin.com/index.en.html \ No newline at end of file diff --git a/translated/talk/20140612 What is a good text editor on Linux.md b/published/20140612 What is a good text editor on Linux.md similarity index 55% rename from translated/talk/20140612 What is a good text editor on Linux.md rename to published/20140612 What is a good text editor on Linux.md index e9e065634b..4a987268e3 100644 --- a/translated/talk/20140612 What is a good text editor on Linux.md +++ b/published/20140612 What is a good text editor on Linux.md @@ -7,7 +7,7 @@ ![](https://farm3.staticflickr.com/2936/14371977196_1a4522359b_z.jpg) -让我们直接从这两个“大咖”开始。当有人在一个聊天室里问关于Linux下的编辑器时,会有一个人立马回答[Vim][2],然后会有另外一个说[Emacs][3]. 之所以会这样,理由很充分。这两个都是非常强大的编辑器,有很多的特性,很多插件,很强大的社区支持。如果你一点都不熟悉它们的话,要描述清楚它们强大的功能是有点困难。但是简单来讲,它们允许你在文本中快速移动,简单地做出大量的修改,记录宏以及你能想到基本上任何疯狂的编辑方式。这两个编辑器共同的缺点是,不可避免地花时间去学习。讲完这点之后,我不会陷入到哪一个更好的争论中去,但是我真的想建议每一个人至少学习这两者之一。 +让我们直接从这两个“大咖”开始。当有人在一个聊天室里问关于Linux下的编辑器时,会有一个人立马回答[Vim][2],然后会有另外一个说[Emacs][3]。(LCTT译注:这就是V党和E党啊~)之所以会这样,理由很充分。这两个都是非常强大的编辑器,有很多的特性,很多插件,很强大的社区支持。如果你一点都不熟悉它们的话,要描述清楚它们强大的功能是有点困难。但是简单来讲,它们允许你在文本中快速移动,简单地做出大量的修改,记录宏以及你能想到基本上任何疯狂的编辑方式。这两个编辑器共同的缺点是,不可避免地花时间去学习。讲完这点之后,我不会陷入到哪一个更好的争论中去,但是我真的想建议每一个人至少学习这两者之一。 ![](https://farm4.staticflickr.com/3916/14393718612_a880b86a52_z.jpg) @@ -15,21 +15,21 @@ ![](https://farm3.staticflickr.com/2917/14391734181_0f0ec76e4f_z.jpg) -一款叫做[Sublime Text][4]的文本编辑器在过去几年逐渐兴起.一些人可能会将它视为Vim或者Emacs的友好版,专为编程而设计的。事实上,它保持了一些与Vim和Emacs的相似特性。比如,批量编辑和函数跳转都会让人或多或少想起Emacs或者[一个充满活力的Vim][5].然而,它保留了更多的可视性并且更加容易使用。同样,大量的插件吸引大家进行个性化定制。 +一款叫做[Sublime Text][4]的文本编辑器在过去几年逐渐兴起。一些人可能会将它视为Vim或者Emacs的友好版,专为编程而设计的。事实上,它保持了一些与Vim和Emacs的相似特性。比如,批量编辑和函数跳转都会让人或多或少想起Emacs或者[一个充满活力的Vim][5]。然而,它保留了更多的可视性并且更加容易使用。同样,大量的插件吸引大家进行个性化定制。(LCTT译注:实际上,译者认为Sublime Text与其说是像Vim或Emacs,不如说更像是Mac上的编辑器神器textmate。另外,Sublime Text的发展最近已经陷入停滞了。) -Sublime Text唯一的“污点”是它的许可证:如果你只使用开源软件的话,你可以放弃它了。为此,最近出现了一个雄心勃勃的克隆版 [Lime][6] 。这个软件正处在繁重的开发当中,但是它的理念是:跟Sublime Text相似的用户体验,但是带着开源的韵味。对于Lime,除了满满的期待没有更多要说的了。 +Sublime Text唯一的“污点”是它的许可证:如果你只使用开源软件的话,你可以放弃它了。(LCTT译注:但是Sublime Text可以全功能一直试用下去,没有一点区别,只是如果你觉得应该支持的话,付费比较好,虽然挺贵。)为此,最近出现了一个雄心勃勃的克隆版 [Lime][6] 。这个软件正处在重度开发当中,但是它的理念是:跟Sublime Text相似的用户体验,但是带着开源的韵味。对于Lime,除了满满的期待没有更多要说的了。 -距现在更近的,GitHub以开源形式发布了[Atom][7],展开了与Sublime Text正式的竞争。Atom打包了所有你想要的文件跳转,代码片段使用等特性,提供一个完整特性的编辑器而不是简单的编辑框。使用HTML,CSS和集成Node.js环境,可以轻易地定制文本处理过程,这正是它的魅力所在。这其实已经要涉及到IDE的定义了,我们的列表最多会覆盖到这里。 +距现在更近的,GitHub以开源形式发布了[Atom][7],展开了与Sublime Text正式的竞争。Atom打包了所有你想要的文件跳转,代码片段使用等特性,提供一个完整特性的编辑器而不是简单的编辑框。使用HTML,CSS和集成Node.js环境,可以轻易地定制文本处理过程,这正是它的魅力所在。这其实已经要涉及到IDE的定义了,我们的列表最多会覆盖到这里。(LCTT译注:好吧,我觉得从Sublime Text转移出来的最佳出口就是Atom。) -![](https://www.flickr.com/photos/xmodulo/14395083745/) +![](https://farm4.staticflickr.com/3907/14395083745_469b7e49c9_z.jpg) ### 3. Gedit & Kate & Mousepad & Leafpad ### ![](https://farm3.staticflickr.com/2927/14371977076_c95a557233_z.jpg) -如果不谈这些超级厉害的编辑器,我们可以转向我认为的“桌面环境经典版”编辑器。这些编辑器感觉上更加的传统,有些也可以用插件进行强化,但是它们的重点是输入简单。如果你头脑里有一些想法想要在忘记之前赶快记下来(我必须怪罪那些视频游戏让我的注意力变得短暂)。你不需要学习Vim或者Sublime Text的快捷键。你只需要一些空白的地方进行输入。这类编辑器的好处是它们或多或少的和你的桌面环境集成在一起。在这一类编辑器中,Gnome 下的 [Gedit][8] 和 KDE下的 [Kate][9] 都很好的集成在桌面系统中,可以通过插件进行个性化定制。比如,更容易的进行LaTeX排版。[Mousepad][10] 和 [Leafpad][11] 更适合于轻量级的桌面,比如Xfce和LXDE。它们在某种程度上很像Windows的记事本。所以,如果你需要的是灵活和便捷,请选择它们。 +如果不谈这些超级厉害的神器,我们可以转向我认为的“桌面环境经典版”编辑器。这些编辑器感觉上更加的传统,有些也可以用插件进行强化,但是它们的重点是输入简单。如果你头脑里有一些想法想要在忘记之前赶快记下来(我必须怪罪那些视频游戏让我的注意力变得短暂)。你不需要学习Vim或者Sublime Text的快捷键。你只需要一些空白的地方进行输入。这类编辑器的好处是它们或多或少的和你的桌面环境集成在一起。在这一类编辑器中,Gnome 下的 [Gedit][8] 和 KDE下的 [Kate][9] 都很好的集成在桌面系统中,可以通过插件进行个性化定制。比如,更容易的进行LaTeX排版。[Mousepad][10] 和 [Leafpad][11] 更适合于轻量级的桌面,比如Xfce和LXDE。它们在某种程度上很像Windows的记事本。所以,如果你需要的是灵活和便捷,请选择它们。 -[![](https://farm6.staticflickr.com/5522/14415259703_d3885b3952_z.jpg)][12] +![](https://c2.staticflickr.com/6/5522/14415259703_d3885b3952_z.jpg) ### 4. Nano & Qute ### @@ -37,9 +37,9 @@ Sublime Text唯一的“污点”是它的许可证:如果你只使用开源 另外一个流行的文本编辑器“大家族”是“无打扰编辑器”。如果你喜欢在后台持续地开着Facebook或者Twitter,或者每5分钟就收一次邮件,你就会知道把注意力集中在那篇明天要交的散文,或者这些还没编译通过的代码是多么困难的事。如果是这样,你需要一个编辑器,它可以占满整个屏幕空间,并且屏蔽掉所有的其它事情。 -也许这类编辑器里面最不受欢迎的是Nano。如果你想屏蔽所有分心的事,关掉X server([译注:关掉桌面,只用文字终端界面,Nano就是工作在这种模式下])。这是最简单和直接的方式。事实上,《权力游戏(Game of Thrones)》的作者Geogge R. R. Martin最近就在[一次采访][13]中说他使用一个类似DOS Word的文本处理程序写他的小说。 +也许这类编辑器里面最不受欢迎的是Nano。如果你想屏蔽所有分心的事,关掉X server(LCTT译注:关掉桌面,只用文字终端界面,Nano就是工作在这种模式下。实际上这时nano就是接管了X Server的工作。)。这是最简单和直接的方式。事实上,《权力游戏(Game of Thrones)》的作者Geogge R. R. Martin最近就在[一次采访][13]中说他使用一个类似DOS Word的文本处理程序写他的小说。 -如果你想要一款更顺眼一点的编辑器,你可以试试我的最爱:[Qute][14]. 没有酷炫的特性,也许有一点LaTeX排版使它开起来更美观,但是重点其实是在它的界面的。它提供了一个舒适的导航和编辑体验。如果你对终端感觉不太舒服,Qute是个不错的选择。 +如果你想要一款更顺眼一点的编辑器,你可以试试我的最爱:[Qute][14]。没有酷炫的特性,也许有一点LaTeX排版使它开起来更美观,但是重点其实是在它的界面的。它提供了一个舒适的导航和编辑体验。如果你对终端感觉不太舒服,Qute是个不错的选择。 ![](https://farm3.staticflickr.com/2927/14395083485_7f8f0d6d59_z.jpg) @@ -48,7 +48,7 @@ Sublime Text唯一的“污点”是它的许可证:如果你只使用开源 ![](https://farm4.staticflickr.com/3845/14395083565_b07b33abf0_z.jpg) -最后,办公套件也是文本编辑器。我不确定你能否轻松使用办公套件编程,但是它确实更适合纯文本编辑,也比LaTeX更容易学习。在这类编辑器中,[LibreOffice][15] 和 [Calligra][16] 必能避而不谈。这两个编辑器因为它们丰富的特性和响亮的名声成为这类编辑器中的巨兽。这两者我都喜欢,但是很多人明确的偏向于前者。如果你怀念微软的Word处理软件,你会有自己的选择。稍处下风的[Abiword][17]相对前面的两个是一个轻量级的选择。如果你的目的只是编辑一个文本文档,不关心电子表格或者数据库,Abiword的特性可以达到理想的效果。 +最后,办公套件也是文本编辑器。我不确定你能否轻松使用办公套件编程,但是它确实更适合纯文本编辑,也比LaTeX更容易学习。在这类编辑器中,[LibreOffice][15] 和 [Calligra][16] 不能避而不谈。这两个编辑器因为它们丰富的特性和响亮的名声成为这类编辑器中的巨兽。这两者我都喜欢,但是很多人明确的偏向于前者。如果你怀念微软的Word处理软件,你会有自己的选择。稍处下风的[Abiword][17]相对前面的两个是一个轻量级的选择。如果你的目的只是编辑一个文本文档,不关心电子表格或者数据库,Abiword的特性可以达到理想的效果。 ![](https://farm3.staticflickr.com/2915/14371976966_4d252928ec_z.jpg) @@ -60,7 +60,7 @@ Sublime Text唯一的“污点”是它的许可证:如果你只使用开源 via: http://xmodulo.com/2014/06/good-text-editor-linux.html -译者:[love_daisy_love](https://github.com/CNprober) 校对:[Caroline](https://github.com/carolinewuyan) +译者:[love\_daisy\_love](https://github.com/CNprober) 校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/published/20140617 9 Good Ways To Protect Your Linux System.md b/published/20140617 9 Good Ways To Protect Your Linux System.md new file mode 100644 index 0000000000..7d7b3c477a --- /dev/null +++ b/published/20140617 9 Good Ways To Protect Your Linux System.md @@ -0,0 +1,58 @@ +保护你的Linux系统的九个老生常谈 +================================================================================ +在现在这个世道中,保障基于Linux的系统的安全是十分重要的。但是,你得知道怎么干。一个简单反恶意程序软件是远远不够的,你需要采取其它措施来协同工作。那么试试下面这些手段吧。 + +![](http://www.efytimes.com/admin/useradmin/photo/2Rak10143PM6172014.jpeg) + +### 1. 使用SELinux ### + +[SELinux][1]是用来对Linux进行安全加固的,有了它,用户和管理员们就可以对访问控制进行更多控制。SELinux为访问控制添加了更细的颗粒度控制。与仅可以指定谁可以读、写或执行一个文件的权限不同的是,SELinux可以让你指定谁可以删除链接、只能追加、移动一个文件之类的更多控制。(LCTT译注:虽然NSA也给SELinux贡献过很多代码,但是目前尚无证据证明SELinux有潜在后门) + +### 2. 订阅漏洞警报服务 ### + +安全缺陷不一定是在你的操作系统上。事实上,漏洞多见于安装的应用程序之中。为了避免这个问题的发生,你必须保持你的应用程序更新到最新版本。此外,订阅漏洞警报服务,如[SecurityFocus][2]。 + +### 3. 禁用不用的服务和应用 ### + +通常来讲,用户大多数时候都用不到他们系统上的服务和应用的一半。然而,这些服务和应用还是会运行,这会招来攻击者。因而,最好是把这些不用的服务停掉。(LCTT译注:或者干脆不安装那些用不到的服务,这样根本就不用关注它们是否有安全漏洞和该升级了。) + +### 4. 检查系统日志 ### + +你的系统日志告诉你在系统上发生了什么活动,包括攻击者是否成功进入或试着访问系统。时刻保持警惕,这是你第一条防线,而经常性地监控系统日志就是为了守好这道防线。 + +### 5. 考虑使用端口试探 ### + +设置[端口试探(Port knocking)][4]是建立服务器安全连接的好方法。一般做法是发生特定的包给服务器,以触发服务器的回应/连接(打开防火墙)。端口敲门对于那些有开放端口的系统是一个很好的防护措施。 + +下面是来自 http://www.portknocking.org/ 的示意图: + +![](http://www.portknocking.org/images/portknocking-explained-01.png)![](http://www.portknocking.org/images/portknocking-explained-02.png)![](http://www.portknocking.org/images/portknocking-explained-03.png)![](http://www.portknocking.org/images/portknocking-explained-04.png) + +### 6. 使用Iptables ### + +Iptables是什么?这是一个应用框架,它允许用户自己为系统建立一个强大的防火墙。因此,要提升安全防护能力,就要学习怎样一个好的防火墙以及怎样使用Iptables框架。 + +### 7. 默认拒绝所有 ### + +防火墙有两种思路:一个是允许每一点通信,另一个是拒绝所有访问,提示你是否许可。第二种更好一些。你应该只允许那些重要的通信进入。(LCTT译注:即默认许可策略和默认禁止策略,前者你需要指定哪些应该禁止,除此之外统统放行;后者你需要指定哪些可以放行,除此之外全部禁止。) + +### 8. 使用入侵检测系统 ### + +入侵检测系统,或者叫IDS,允许你更好地管理系统上的通信和受到的攻击。[Snort][3]是目前公认的Linux上的最好的IDS。 + +### 9. 使用全盘加密 ### + +加密的数据更难窃取,有时候根本不可能被窃取,这就是你应该对整个驱动器加密的原因。采用这种方式后,如果有某个人进入到你的系统,那么他看到这些加密的数据后,就有得头痛了。根据一些报告,大多数数据丢失源于机器被盗。 + +-------------------------------------------------------------------------------- + +via: http://www.efytimes.com/e1/fullnews.asp?edid=141368 + +译者:[GOLinux](https://github.com/GOLinux) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://selinuxproject.org/page/Main_Page +[2]:http://www.securityfocus.com/rss/vulnerabilities.xml +[3]:http://www.snort.org/ +[4]:http://en.wikipedia.org/wiki/Port_knocking diff --git a/sources/tech/20140617 9 commands to check hard disk partitions and disk space on Linux.md b/published/20140617 9 commands to check hard disk partitions and disk space on Linux.md similarity index 67% rename from sources/tech/20140617 9 commands to check hard disk partitions and disk space on Linux.md rename to published/20140617 9 commands to check hard disk partitions and disk space on Linux.md index 8ae56072a2..77f5c5d637 100644 --- a/sources/tech/20140617 9 commands to check hard disk partitions and disk space on Linux.md +++ b/published/20140617 9 commands to check hard disk partitions and disk space on Linux.md @@ -1,13 +1,13 @@ --------------translating by tenght~ -9 commands to check hard disk partitions and disk space on Linux +Linux下掌控磁盘分区的九大神器 ================================================================================ -In this post we are taking a look at some commands that can be used to check up the partitions on your system. The commands would check what partitions there are on each disk and other details like the total size, used up space and file system etc. -Commands like fdisk, sfdisk and cfdisk are general partitioning tools that can not only display the partition information, but also modify them. +在这篇文章中,我们来了解一些用来检查你的系统分区的一些命令,这些命令将检查每个磁盘的分区情况和其它细节,例如总空间容量,已用完的空间和文件系统等。 + +像fdisk,sfdisk和cfdisk命令这样的常规分区工具,不仅可以显示分区信息,还可以修改。 ### 1. fdisk ### -Fdisk is the most commonly used command to check the partitions on a disk. The fdisk command can display the partitions and details like file system type. However it does not report the size of each partitions. +Fdisk是检查磁盘上分区的最常用命令,fdisk命令可以显示分区和细节,如文件系统类型,但是它并不报告每个分区的字节大小。 $ sudo fdisk -l @@ -36,11 +36,11 @@ Fdisk is the most commonly used command to check the partitions on a disk. The f Device Boot Start End Blocks Id System /dev/sdb1 * 2048 7907327 3952640 b W95 FAT32 -Each device is reported separately with details about size, seconds, id and individual partitions. +每个设备都单独显示其详细信息:容量大小,扇区数,设备ID及其包含的每个分区。 ### 2. sfdisk ### -Sfdisk is another utility with a purpose similar to fdisk, but with more features. It can display the size of each partition in MB. +Sfdisk是另一种跟fdisk用途相似的实用工具,但具有更多的功能。它能够以MB为单位显示每个分区的大小。 $ sudo sfdisk -l -uM @@ -75,20 +75,21 @@ Sfdisk is another utility with a purpose similar to fdisk, but with more feature ### 3. cfdisk ### -Cfdisk is a linux partition editor with an interactive user interface based on ncurses. It can be used to list out the existing partitions as well as create or modify them. +Cfdisk是一个基于ncurses(提供字符终端处理库,包括面板和菜单)的带有交互式用户界面的Linux分区编辑器,它可以用来列出现有分区以及创建或修改这些分区。 -Here is an example of how to use cfdisk to list the partitions. +下面是一个如何使用Cfdisk来列出分区的例子。 ![linux cfdisk disk partitions](http://www.binarytides.com/blog/wp-content/uploads/2014/06/linux-cfdisk.png) -Cfdisk works with one partition at a time. So if you need to see the details of a particular disk, then pass the device name to cfdisk. +Cfdisk一次只能列出一个分区,所以如果你需要看某一磁盘的细节,可以把该磁盘的设备名作为Cfdisk的参数。 $ sudo cfdisk /dev/sdb ### 4. parted ### -Parted is yet another command line utility to list out partitions and modify them if needed. -Here is an example that lists out the partition details. +Parted是另一个命令行实用程序,可以列出分区;如果需要的话,也可进行修改。 + +下面是一个例子,列出了详细的分区信息。 $ sudo parted -l Model: ATA ST3500418AS (scsi) @@ -115,9 +116,9 @@ Here is an example that lists out the partition details. ### 5. df ### -Df is not a partitioning utility, but prints out details about only mounted file systems. The list generated by df even includes file systems that are not real disk partitions. +Df是不是一个分区工具,但它打印出挂装文件系统的细节,Df可以列出甚至不是真实的磁盘分区的文件系统。 -Here is a simple example +这里是个简单的例子: $ df -h Filesystem Size Used Avail Use% Mounted on @@ -131,16 +132,16 @@ Here is a simple example /dev/sda8 196G 154G 33G 83% /media/13f35f59-f023-4d98-b06f-9dfaebefd6c1 /dev/sda5 98G 37G 62G 38% /media/4668484A68483B47 -Only the file systems that start with a /dev are actual devices or partitions. +只有以 /dev 开始的文件系统才是实际的设备或分区。 -Use grep to filter out real hard disk partitions/file systems. +可以使用grep命令来筛选出实际的硬盘分区或文件系统。 $ df -h | grep ^/dev /dev/sda6 97G 43G 49G 48% / /dev/sda8 196G 154G 33G 83% /media/13f35f59-f023-4d98-b06f-9dfaebefd6c1 /dev/sda5 98G 37G 62G 38% /media/4668484A68483B47 -To display only real disk partitions along with partition type, use df like this +要只显示真正的磁盘分区与分区类型,可以这样使用Df: $ df -h --output=source,fstype,size,used,avail,pcent,target -x tmpfs -x devtmpfs Filesystem Type Size Used Avail Use% Mounted on @@ -148,11 +149,11 @@ To display only real disk partitions along with partition type, use df like this /dev/sda8 ext4 196G 154G 33G 83% /media/13f35f59-f023-4d98-b06f-9dfaebefd6c1 /dev/sda5 fuseblk 98G 37G 62G 38% /media/4668484A68483B47 -Note that df shows only the mounted file systems or partitions and not all. +请注意,Df只显示已挂载的文件系统或分区,并不是所有。 ### 6. pydf ### -Improved version of df, written in python. Prints out all the hard disk partitions in a easy to read manner. +它是用Python写的Df的改进版本,以易读的方式打印出所有磁盘分区。 $ pydf Filesystem Size Used Avail Use% Mounted on @@ -160,12 +161,13 @@ Improved version of df, written in python. Prints out all the hard disk partitio /dev/sda8 195G 153G 32G 78.4 [#######..] /media/13f35f59-f023-4d98-b06f-9dfaebefd6c1 /dev/sda5 98G 36G 61G 37.1 [###......] /media/4668484A68483B47 -Again, pydf is limited to showing only the mounted file systems. +另外,pydf被限制为仅显示已挂载的文件系统。 ### 7. lsblk ### -Lists out all the storage blocks, which includes disk partitions and optical drives. Details include the total size of the partition/block and the mount point if any. -Does not report the used/free disk space on the partitions. +列出了所有的块存储设备,包括磁盘分区和光盘驱动器。细节包括所有分区/块总大小和挂载点。 + +它不会报告分区上的已使用和空闲磁盘空间。 $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT @@ -180,13 +182,14 @@ Does not report the used/free disk space on the partitions. └─sdb1 8:17 1 3.8G 0 part sr0 11:0 1 1024M 0 rom -If there is no MOUNTPOINT, then it means that the file system is not yet mounted. For cd/dvd this means that there is no disk. -Lsblk is capbale of displaying more information about each device like the label and model. Check out the man page for more information +如果没有挂载点,这就意味着文件系统未安装,而对于cd/dvd这意味着没有插入光盘。 + +lsblk能够显示每个设备的更多信息,如标签和型号,更多请查看信息手册。 ### 8. blkid ### -Prints the block device (partitions and storage media) attributes like uuid and file system type. Does not report the space on the partitions. +显示块设备(分区和存储介质)属性,例如UUID和文件系统类型,不报告分区空间。 $ sudo blkid /dev/sda1: UUID="5E38BE8B38BE6227" TYPE="ntfs" @@ -198,7 +201,7 @@ Prints the block device (partitions and storage media) attributes like uuid and ### 9. hwinfo ### -The hwinfo is a general purpose hardware information tool and can be used to print out the disk and partition list. The output however does not print details about each partition like the above commands. +hwinfo是一个通用的硬件信息的工具,可以用来打印出磁盘和分区表,但是输出不再像上面的命令那样打印每个分区的详细信息。 $ hwinfo --block --short disk: @@ -215,18 +218,18 @@ The hwinfo is a general purpose hardware information tool and can be used to pri cdrom: /dev/sr0 SONY DVD RW DRU-190A -### Summary ### +### 总结 ### -The output of parted is concise and complete to get an overview of different partitions, file system on them and the total space. Pydf and df are limited to showing only mounted file systems and the same on them. +parted的输出可以得到简洁而完整的不同分区的概述、其上的文件系统以及总空间。pydf和df它们一样,只是被限制为只显示已挂载文件系统。 -Fdisk and Sfdisk show a whole lot of information that can take sometime to interpret whereas, Cfdisk is an interactive partitioning tool that display a single device at a time. +fdisk和sfdisk显示完整大量的信息,需要花些时间来解释。cfdisk是一个交互式分区工具,每次显示一个单一的设备。 -So try them out, and do not forget to comment below. +来尝试下这些命令吧,别忘了在下面评论哟! -------------------------------------------------------------------------------- via: http://www.binarytides.com/linux-command-check-disk-partitions/ - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +译者:[tenght](https://github.com/tenght) 校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20140617 How to Share Files Between Windows, Mac, and Linux PCs on a Network.md b/published/20140617 How to Share Files Between Windows, Mac, and Linux PCs on a Network.md similarity index 58% rename from translated/tech/20140617 How to Share Files Between Windows, Mac, and Linux PCs on a Network.md rename to published/20140617 How to Share Files Between Windows, Mac, and Linux PCs on a Network.md index 540b9bc718..72ff9e4851 100644 --- a/translated/tech/20140617 How to Share Files Between Windows, Mac, and Linux PCs on a Network.md +++ b/published/20140617 How to Share Files Between Windows, Mac, and Linux PCs on a Network.md @@ -1,39 +1,38 @@ -如何在网络上在Windows,MAC和Linux之间共享文件 +如何通过网络在Windows、MAC和Linux之间共享文件 ================================================================================ ![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/windows-mac-and-linux-network.jpg) -家庭[文件共享][1]曾经是一个噩梦,即使在不同的Windows版本之间- 没有考虑Mac和Linux! 这些操作系统现在可以相互通信并且无需特殊软件就可共享文件。 +家庭[文件共享][1]曾经是一个噩梦,即使在不同的Windows版本之间—— 甚至不考虑Mac和Linux!但现在这些操作系统可以相互通信并且无需特殊软件就可共享文件。 -我们之前使用SMB协议来做到这点。Windows使用SMB来做文件共享,同时Mac和Linux发行版都内置支持SMB。Microsoft甚至给开源Samba项目[提交补丁][2]来改进它! +我们之前使用SMB协议来做到这点。Windows使用SMB来做文件共享,同时Mac和Linux发行版都内置支持SMB。Microsoft甚至给开源Samba项目[提交过补丁][2]来改进它! -### 在Windows上共享一个文件夹 ### +### 在Windows上共享文件夹 ### -既然其他操作系统不能访问家庭组,您需要[启用Windows老式的文件共享][3]。要做到这点,打开控制面板进入网络和共享> 更改高级共享设置。启用“网络发现”和“文件与打印共享”。 +既然其他操作系统不能访问家庭组,您需要[启用Windows老式的文件共享][3]。要做到这点,打开控制面板进入网络和共享> 更改高级共享设置。启用“网络发现”和“文件与打印共享”。 - -如果你想要无需密码访问共享文件夹你还需要微调一下选项。 +如果你想要无需密码访问共享文件夹你还需要微调一下其它选项。 ![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/enable-file-and-printer-sharing-for-mac-and-linux-on-windows.png) -在Windows Explorer或者File Explorer中定位你想共享的文件夹,右键点击,选择属性。点击共享标签,并使用这里的选项来共享和配置文件夹的权限。 +在Windows Explorer或者File Explorer中找到你想共享的文件夹,右键点击,选择属性。点击共享标签,并使用这里的选项来共享和配置文件夹的权限。 ![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/share-windows-folders-with-mac-and-linux-on-local-network.png) ### 在Windows上访问共享文件夹 ### -在Windows Explorer或者File Explorer中访问窗格来浏览其他计算机共享给你的文件。你会看到正确配置后的Mac和Linux计算机在Windows PC机附近出现了。双击一台计算机来查看它的共享文件。 +在Windows Explorer或者File Explorer中访问网络面板来浏览其他计算机共享给你的文件。你会看到正确配置后的Mac和Linux计算机在Windows PC机附近出现了。双击一台计算机来查看它的共享文件。 ![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/access-ubuntu-linux-shared-folder-on-windows.png) -如果你知道计算机名或者IP地址,你同样可以直接连接到这台计算机上,只需要在Windows Explorer或者File Explorer中输入//计算名后按下回车就可以了 如果你希望直接通过IP地址连接,只需要将计算机名换成IP地址就可以了 +如果你知道计算机名或者IP地址,你同样可以直接连接到这台计算机上,只需要在Windows Explorer或者File Explorer中输入\\计算名后按下回车就可以了。如果你希望直接通过IP地址连接,只需要将计算机名换成IP地址就可以了 ![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/directly-access-network-share-on-windows.png) ### 在Mac OS X 上共享文件夹 ### -你需要在你的Mac上启用网络文件共享来共享文件。双击苹果logo,并选择系统偏好。点击共享图标并启用文件共享。点击选项按钮,并确认“使用SMB共享文件和文件夹”已经启用。 +你需要在你的Mac上启用网络文件共享来共享文件。点击桌面左上角的苹果logo,并选择系统偏好。点击共享图标并启用文件共享。点击选项按钮,并确认“使用SMB共享文件和文件夹”已经启用。 -在共享文件夹那列中选择额外要共享的文件夹。使用用户列来选择哪些用户和组可以访问和写入它们 +在共享文件夹那列中选择添加要共享的文件夹。使用用户列来选择哪些用户和组可以访问和写入它们 ![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/share-folder-with-windows-from-mac-os-x.png) @@ -43,19 +42,19 @@ ![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/directly-connect-to-windows-file-share-on-a-mac.png) -你会被提示你用相应的凭证来验证或者以访客方式登录。连接完成后,在Finder的侧边栏的共享列中就会出现这台计算机, +你会被提醒你应该用相应的凭证来验证或者以访客方式登录。连接完成后,在Finder的侧边栏的共享列中就会出现这台计算机, -要在你每次登录后自动链接到共享文件夹,打开系统偏好窗口并进入用户与组> 登录项。从finder中的共享列中的网络共享拖拽到登录项列表中 +要在你每次登录后自动链接到共享文件夹,打开系统偏好窗口并进入用户与组 > 登录项。从finder中的共享列中的网络共享拖拽到登录项列表中 ![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/windows-shared-folder-on-mac.png) -### 在 Linux 中共享一个文件夹 ### +### 在 Linux 中共享文件夹 ### -在Linux上使用你桌面文件管理器来共享一个文件。这里我们在Ubuntu 14.04上使用Nautilus,但是在其他文件管理器上的过程应该是相似的。 +在Linux上使用你桌面文件管理器来共享文件夹。这里,我们使用Ubuntu 14.04上的Nautilus,不过其他文件管理器上的过程应该是相似的。 -打开文件管理器,在想要共享的文件上右键,选择属性。剪辑本地网络共享标签并对这个文件启用共享。如果这是你第一次启用共享,你会被提示要求安装Samba软件- 这在你提供密码的时候会自动显示。 +打开文件管理器,在想要共享的文件上右键,选择属性。点击本地网络共享标签并对这个文件启用共享。如果这是你第一次启用共享,你会被提示要求安装Samba软件——这在你提供密码的时候会自动显示。 -在安装玩Samba软件后配置共享设置- 确认点击创建共享按钮来开始共享文件夹。 +在安装完Samba软件后配置共享设置- 确认点击创建共享按钮来开始共享文件夹。 ![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/share-folder-from-ubuntu-linux-with-windows-pc-over-local-network.png) @@ -63,21 +62,21 @@ 你的Linux桌面文件管理器可能包含了一个网络浏览器,它可以用来定位并访问在本地网络的共享文件夹。 -在文件管理器的侧边栏点击浏览网络选项。接着双击Windows网络选项,双击你的工作组(默认是WORKFROUP),双击临近的计算机来浏览它的共享文件。 +在文件管理器的侧边栏点击浏览网络选项。接着双击Windows网络选项,双击你的工作组(默认是WORKFROUP),双击邻近的计算机来浏览它的共享文件。 ![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/browse-windows-network-shares-on-ubuntu.png) -为了直接连接到一台计算机,选中Nautilus中的连接到服务器选项,并输入像这样的远程计算机:smb://COMPUTERNAME +要直接连接到一台计算机,选中Nautilus中的“连接到服务器”选项,并输入像这样的远程计算机地址:smb://COMPUTERNAME ![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/directly-connect-to-windows-shared-folder-on-ubuntu.png) -然而在你连接时,你可能需要使用具有访问远程计算机权限的用户名和密码来验证。这依赖于你是否启用了访客访问以及你如何设置你的文件夹共享权限。 +不过在你连接时,你可能需要使用具有访问远程计算机权限的用户名和密码来验证。这依赖于你是否启用了访客访问以及你如何设置你的文件夹共享权限。 -------------------------------------------------------------------------------- via: http://www.howtogeek.com/191116/how-to-share-files-between-windows-mac-and-linux-pcs-on-a-network/ -译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20140617 How to use Linux lsblk Command to List Block Device Information.md b/published/20140617 How to use Linux lsblk Command to List Block Device Information.md similarity index 74% rename from translated/tech/20140617 How to use Linux lsblk Command to List Block Device Information.md rename to published/20140617 How to use Linux lsblk Command to List Block Device Information.md index ace45377b4..76c62e647b 100644 --- a/translated/tech/20140617 How to use Linux lsblk Command to List Block Device Information.md +++ b/published/20140617 How to use Linux lsblk Command to List Block Device Information.md @@ -1,6 +1,6 @@ 使用Linux的lsblk命令列出块设备信息 ================================================================================ -**lsblk**(列出块设备)命令勇于列出所有可用块设备的信息,但是,它**不列出RAM盘的信息**。块设备有硬盘,闪存盘,CD-ROM等等。 +**lsblk**(列出块设备)命令用于列出所有可用块设备的信息,但是,它**不会列出RAM盘的信息**。块设备有硬盘,闪存盘,CD-ROM等等。 ### 如何安装lsblk ### @@ -36,7 +36,7 @@ lsblk命令默认情况下将以树状列出所有块设备。打开终端,并 **RO** : 该项表明设备是否为只读。在本案例中,所有设备的RO值为0,表明他们不是只读的。 -**TYPE** :本栏显示块设备是否是磁盘或磁盘上的一个分区。在本例中,sda和sdb是磁盘,而sr0是只读存储(rom)。 +**TYPE** :本栏显示块设备是否是磁盘或磁盘上的一个分区。在本例中,sda和sdb是磁盘,而sr0是只读存储(rom)。(LCTT译注,此处sr0的RO项没有标记为1,可能存在一些错误?) **MOUNTPOINT** : 本栏指出设备挂载的挂载点。 @@ -46,7 +46,7 @@ lsblk命令默认情况下将以树状列出所有块设备。打开终端,并 $ lsblk -a -该选项将列出所有设备,包括控设备在内。 +该选项将列出所有设备,包括空设备在内。 ![lsblk bytes sda](http://linoxide.com/wp-content/uploads/2014/03/lsblk-bytes-sda.png) @@ -64,17 +64,17 @@ lsblk命令也可以用于列出一个特定设备的拥有关系,同时也可 $ lsblk -b /dev/sda -或者,如果你偏好: +或者,以下命令等同: $ lsblk --bytes /dev/sda ### 以列表形式列出不带头的设备 ### -你也可以组合几个选项来获取指定的输出。例如,你也许想要以列表格式列出设备,而不是默认的树状格式。你可能也对移除不同栏目名称的头感兴趣。可以将两个不同的选项组合,以获得期望的输出,命令如下: +你也可以组合几个选项来获取指定的输出。例如,你也许想要以列表格式列出设备,而不是默认的树状格式。你可能也对移除不同栏目名称的标题感兴趣。可以将两个不同的选项组合,以获得期望的输出,命令如下: $ lsblk -nl -或者,你可以使用下面的选项,它们也能给出相同的输出。 +或者,你可以使用下面的长选项,它们也能给出相同的输出。 $ lsblk --noheadings --list @@ -85,22 +85,26 @@ lsblk命令也可以用于列出一个特定设备的拥有关系,同时也可 要获取SCSI设备的列表,你只能使用-S选项。该选项是大写字母S,不能和-s选项混淆,该选项是用来以颠倒的顺序打印依赖的。 $ lsblk -S + +![](http://linoxide.com/wp-content/uploads/2014/03/lsblk-SCSI-devices.png) -lsblk列出SCSI设备,相反,逆序选项将给出如下输出。输入命令: +lsblk列出SCSI设备,而-s是逆序选项(LCTT译注:将设备和分区的组织关系逆转过来显示),其将给出如下输出。输入命令: $ lsblk -s 或者 $ lsblk --inverse + +![](http://linoxide.com/wp-content/uploads/2014/03/lsblk-inverse.png) -lsblk逆序。你可以使用lsblk来获取关于你的块设备的更多信息,自己把它试着显示出来吧! +你可以使用lsblk来获取关于你的块设备的更多信息,自己把它试着显示出来吧! -------------------------------------------------------------------------------- via: http://linoxide.com/linux-command/linux-lsblk-command/ -译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20140618 20 things to do after installing Linux Mint 17 Qiana Cinnamon.md b/published/20140618 20 things to do after installing Linux Mint 17 Qiana Cinnamon.md similarity index 83% rename from translated/tech/20140618 20 things to do after installing Linux Mint 17 Qiana Cinnamon.md rename to published/20140618 20 things to do after installing Linux Mint 17 Qiana Cinnamon.md index 694e4b4757..56f5f7b82a 100644 --- a/translated/tech/20140618 20 things to do after installing Linux Mint 17 Qiana Cinnamon.md +++ b/published/20140618 20 things to do after installing Linux Mint 17 Qiana Cinnamon.md @@ -1,12 +1,12 @@ -安装Linux Mint 17 Qiana Cinnamon后要做的20件事 +安装Linux Mint 17后要做的20件事 ================================================================================ ### Linux Mint 17 Qiana Cinnamon ### Linux Mint 17已经[发布][1],定名为Qiana。Mint是Linux最佳发行版之一,它定位于桌面用户,关注可用性和简洁。它携带了风格迥异的桌面环境,如Mate以及Cinnamon,并基于不同的发行版,如Ubuntu或Debian。 -在本文中,我们使用的是Linux Mint 17的cinnamon版本。要获取更多关于Cinnamon版本的信息(包括下载链接),可以访问 - [http://blog.linuxmint.com/?p=2626][2] +在本文中,我们使用的是Linux Mint 17的cinnamon版本。要获取更多关于Cinnamon版本的信息(包括下载链接),可以访问 - http://linux.cn/article-3260-1.html -下载适合你系统的正确的iso,烧录成dvd,或者也可以制作成usb启动盘来启动。安装完毕了,是时候来使用一些优化工具和基本应用程序来优化系统性能和体验,让你系统激情澎湃吧! +下载适合你系统的正确的iso,烧录成dvd,或者也可以制作成usb启动盘来启动。安装完毕,是时候来使用一些优化工具和基本应用程序来优化系统性能和体验,让你系统激情澎湃吧! ### 1. 更新系统 ### @@ -34,6 +34,7 @@ Chronium浏览器可以在仓库中获取。 $ sudo apt-get install chromium-browser 至于Google Chrome,请访问google.com/chrome下载deb包,并使用gdebi来安装。 + # 64 位 $ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb $ sudo gdebi google-chrome-stable_current_amd64.deb @@ -46,7 +47,7 @@ Chronium浏览器可以在仓库中获取。 Mint上默认安装adobe flash插件包(adobe-flashplugin),因此,你可以在Firefox中畅玩flash游戏,也可以尽情享受网页版视频了。 -Google Chrome现在使用了基于flash player的Pepper API,而且该插件也内建于Chrome中,因此,你也不需要为它做任何事情了。 +Google Chrome现在使用了基于flash player的Pepper API,而且该插件也内建于Chrome中,因此,你也不需要为它额外做任何事情了。 然而对于Chronium,基于flash player的Pepper没有被囊括进来(因为它不是个自由组件),所以你需要手动安装了。 @@ -71,11 +72,11 @@ Google Chrome现在使用了基于flash player的Pepper API,而且该插件也 ### 6. 安装专有驱动 ### -如果你有一张英伟达或者ati的图形卡,或者broadcom的无线网卡,那么请安装厂商提供的专有驱动,这些驱动会为你带来最佳的硬件性能。 +如果你有一张Nvidia或者ati的图形卡,或者broadcom的无线网卡,那么请安装厂商提供的专有驱动,这些驱动会为你带来最佳的硬件性能。 -要安装英伟达驱动,你可以参照先前的这篇文章 +要安装Nvidia驱动,你可以参照先前的这篇文章 -如何在Linux Mint上安装最新的Nvidia驱动 +[如何在Linux Mint上安装最新的Nvidia驱动][3] ### 7. 安装Dropbox ### @@ -83,7 +84,7 @@ Linux mint仓库已经提供了dropbox的客户端软件包,所以你不必满 $ sudo apt-get install dropbox python-gpgme -如果你还是比较喜欢从官方网站下载,那么出门可直达[https://www.dropbox.com/install?os=lnx][4],请遵照说明下载用于Ubuntu的deb安装包。 +如果你还是比较喜欢从官方网站下载,那么翻墙可直达[https://www.dropbox.com/install?os=lnx][4],请遵照说明下载用于Ubuntu的deb安装包。(LCTT译注:墙内用户还是忽视此条吧。) Copy是另外一个云存储解决方案,它也有本地Linux客户端。详情可查阅[copy.com][5],它也有[ppa仓库][6]。 @@ -95,7 +96,7 @@ Skype可以在Ubuntu canonical合作仓库中找到。 ### 9. 安装rar和其它归档工具 ### -要想在Nemo这样的文件管理器中通过上下文菜单创建rar归档,请安装rar工具。安装rar的同时,请安装其它几个包以增加对其它归档格式的支持。 +要想在Nemo这样的文件管理器中通过上下文菜单创建rar归档,请安装rar工具。安装rar的同时,也可安装其它几个包以增加对其它归档格式的支持。 $ sudo apt-get install unace p7zip-rar sharutils rar arj lunzip lzip @@ -109,15 +110,13 @@ Diodon在cinnamon桌面上似乎存在一些问题,在历史列表增长时会 # 或者 $ sudo apt-get install clipit -然后,你可以从应用程序菜单中启动它们,它们应该会在你每次登陆时启动。 +然后,你可以从应用程序菜单中启动它们,它们应该会在你每次登录时启动。 ### 11. 优化桌面 ### #### 1. 修复系统托盘上的日期格式 #### -在底部面板右边的时间小程序只显示了时间,它也可以设置显示日期。右击底部面板右边的日期-时间小程序,然后点击配置 -Check the box labelled "Use a custom date format" and fill in -选中标有“使用自定义日期格式”的选框,然后填入 +在底部面板右边的时间小程序只显示了时间,它也可以设置显示日期。右击底部面板右边的日期-时间小程序,然后点击配置,选中标有“使用自定义日期格式”的选框,然后填入 %B %e, %I:%M %p @@ -133,12 +132,11 @@ Check the box labelled "Use a custom date format" and fill in 你也许注意到,Firefox默认选择了Yahoo搜索引擎,而搜索引擎列表中并没有Google。点击“管理搜索引擎” > 获取更多搜索引擎,它会带你去[http://www.linuxmint.com/searchengines.php][7]。 -向下拉动滚动条到商业搜索引擎部分,找到并点击Google图标。进入下一页后,再次点击搜索引擎列表,而这次你会看到“添加Google”选项,点击它就可以用上Google搜索了。 +向下拉动滚动条到商业搜索引擎部分,找到并点击Google图标。进入下一页后,再次点击搜索引擎列表,而这次你会看到“添加Google”选项,点击它就可以用上Google搜索了。(LCTT译注:墙内用户也请忽略此条。怒!) ### 12. 优化字体渲染 ### -Linux mint默认使用Dejavu Sans字体,它看起来真普通啊。你可以使用Droid和Noto字体获得好看得多视觉享受。请参照我们先前的教程,它会一步一步带你渐入佳境。 -[如何在Linux Mint上获得华丽好看的字体][8] +Linux mint默认使用Dejavu Sans字体,它看起来真普通啊。你可以使用Droid和Noto字体获得好看得多视觉享受。请参照我们先前的教程,它会一步一步带你渐入佳境。[如何在Linux Mint上获得华丽好看的字体][8] ### 13. Guake下拉终端 ### @@ -172,7 +170,7 @@ Linux Mint自带了Transmission,这是个简洁而高效的torrent客户端。 ### 16. Hardinfo - 系统信息工具 ### -Hardinfo是一个十分便利的gui工具,它可以用来报告大量完整的系统硬件信息。你可以通过它来集中查看处理器、内存、存储设备、网络配置、打印机、usb设备、声音/视频适配器等等信息。它具有测试和评估系统性能的功能。 +Hardinfo是一个十分便利的GUI工具,它可以用来报告大量完整的系统硬件信息。你可以通过它来集中查看处理器、内存、存储设备、网络配置、打印机、usb设备、声音/视频适配器等等信息。它具有测试和评估系统性能的功能。 $ sudo apt-get install hardinfo @@ -236,31 +234,33 @@ Linux确实有一些酷爽的游戏,很具娱乐性,而且是免费的。注 #### 为Google Chrome/Chronium提供Java小程序支持 #### 默认情况下已经安装了"icedtea-plugin",用以为firefox提供java小程序支持。 + 然而,Chrome和Chronium却不再支持基于NPAPI的插件。因此java小程序,在没有获得基于Pepper api的java插件前,java小程序是不能在这些浏览器中工作的。要查看更多信息,请往[这里][9]。 #### 更多应用程序 #### 如果你正在为你的Mint盒子寻找更多的应用程序,那么这里列出了一部分更好的应用程序,所有这些都可以在软件管理器中安装。 -Opera - 网页浏览器 -Gnome Encfs Manager - 管理使用Encfs加密的文件和文件夹 -Smplayer - 多媒体播放器 -Rhythmbox, Clementine - 音乐播放器 -Openshot, Kdenlive - 视频编辑器 -Audacity - 音频编辑器 -Inkscape - 图形和图像编辑 -Gparted - 分区编辑器 -Gufw - 防火墙配置工具 -qBittorrent, Vuze - Torrent客户端 -Gwenview - 图像浏览 -Team viewer - 远程桌面 -Tv-maxe - 查看电视频道 -Grub Customizer - 修改GRUB启动菜单设置 -Linrunner TLP - 电源管理工具,对笔记本节电很有用 -Virtualbox - 虚拟化 -Kazam, recordMyDesktop - 桌面录像/演示 -Bleachbit - 通过删除旧的/临时文件释放磁盘空间 -Cheese - 使用网络摄像头拍照 -Shutter - 带有众多功能的屏幕截图工具 + +* Opera - 网页浏览器 +* Gnome Encfs Manager - 管理使用Encfs加密的文件和文件夹 +* Smplayer - 多媒体播放器 +* Rhythmbox, Clementine - 音乐播放器 +* Openshot, Kdenlive - 视频编辑器 +* Audacity - 音频编辑器 +* Inkscape - 图形和图像编辑 +* Gparted - 分区编辑器 +* Gufw - 防火墙配置工具 +* qBittorrent, Vuze - Torrent客户端 +* Gwenview - 图像浏览 +* Team viewer - 远程桌面 +* Tv-maxe - 查看电视频道 +* Grub Customizer - 修改GRUB启动菜单设置 +* Linrunner TLP - 电源管理工具,对笔记本节电很有用 +* Virtualbox - 虚拟化 +* Kazam, recordMyDesktop - 桌面录像/演示 +* Bleachbit - 通过删除旧的/临时文件释放磁盘空间 +* Cheese - 使用网络摄像头拍照 +* Shutter - 带有众多功能的屏幕截图工具 那么,请选择你喜欢的那些,并尽情享受Linux Mint吧!! @@ -279,7 +279,7 @@ Linux Mint论坛 via: http://www.binarytides.com/better-linux-mint-17-cinnamon/ -译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20140619 How To Flush Linux or UNIX DNS Cache.md b/published/20140619 How To Flush Linux or UNIX DNS Cache.md similarity index 52% rename from translated/tech/20140619 How To Flush Linux or UNIX DNS Cache.md rename to published/20140619 How To Flush Linux or UNIX DNS Cache.md index 620b8012ad..cace021b2a 100644 --- a/translated/tech/20140619 How To Flush Linux or UNIX DNS Cache.md +++ b/published/20140619 How To Flush Linux or UNIX DNS Cache.md @@ -1,16 +1,15 @@ -如何清除 Linux/Unix DNS缓存 +如何在 Linux/Unix/Mac 下清除 DNS 查询缓存 ================================================================================ ![](http://figs.cyberciti.biz/3rdparty/configure.png) 我在Linux下使用拨号连接上网,频繁的拨号断线造成DNS的问题。我如何在Linux/Unix发行版下使用shell命令清除DNS缓存? -在MS-Windows下,你可以使用[ipconfig命令来清除dns缓存][1]。然而,Linux和Unix提供了不同的方法来清除缓存。Linux可以运行nscd或者BIND或者dnsmasq作为名称服务缓存守护进程。大型或者工作组服务器可能使用BIND或者dnsmasq作为专用缓存服务器来加速查询。 +在MS-Windows下,你可以使用[ipconfig命令来清除dns缓存][1]。然而,Linux和Unix提供了不同的方法来清除缓存。Linux可以运行 nscd 或者 BIND 或者 dnsmasq 作为名称服务缓存守护进程。大型或者工作组服务器可能使用BIND或者dnsmasq作为专用缓存服务器来加速查询。 ### 如何: 清除 nscd dns 缓存 ### -Nscd caches libc-issued requests to the Name Service. If retrieving NSS data is fairly expensive, nscd is able to speed up consecutive access to the same data dramatically and increase overall system performance. Just restart nscd: -Nscd缓存libc发给名称服务的请求。如果检索NSS数据是很昂贵的,那么nscd能够显著加快连续访问同一数据并提高整个系统的性能。只需重启nscd: +Nscd 会缓存libc发起的名称服务的请求。如果把检索NSS数据看做很慢,那么nscd能够显著加快连续访问同一数据的速度,并能提高整个系统的性能。只需重启nscd即可刷新缓存: $ sudo /etc/init.d/nscd restart @@ -22,11 +21,11 @@ Nscd缓存libc发给名称服务的请求。如果检索NSS数据是很昂贵的 # service nscd reload -这个守护进程给最常用的名称服务请求提供了高速缓存。默认的配置文件/etc/nscd.conf,决定了高速缓存守护进程的行为。 +这个守护进程给最常用的名称服务请求提供了高速缓存。默认的配置文件/etc/nscd.conf,其决定了高速缓存守护进程的行为。 ### 清除 dnsmasq dns 缓存 ### -[dnsmasq的是一个轻量级的DNS][2],TFTP和DHCP服务器。它的目的是给局域网提供耦合的DNS和DHCP服务。 dnsmasq的接受DNS查询,并从本地高速缓存应答它们或将其转发到一个真正的递归DNS服务器。该软件也安装了很多便宜的路由器来缓存DNS查询。只需启动dnsmasq的服务来清除DNS缓存: +[dnsmasq的是一个轻量级的DNS][2]、TFTP和DHCP服务器。它的目的是给局域网提供配对的DNS和DHCP服务。 dnsmasq接受DNS查询,并从一个小的本地高速缓存应答它们或将其转发到一个真正的递归DNS服务器。该软件也被安装在很多便宜的路由器上来缓存DNS查询。只需重新启动dnsmasq的服务来清除DNS缓存: $ sudo /etc/init.d/dnsmasq restart @@ -36,8 +35,7 @@ Nscd缓存libc发给名称服务的请求。如果检索NSS数据是很昂贵的 ### 清除BIND缓存服务器的dns缓存 ### -A caching BIND server obtains information from another server (a Zone Master) in response to a host query and then saves (caches) the data locally. All you have to do is restart bind to clear its cache: -一台BIND缓存服务器从另一台服务器(区域主)响应主机的查询而获得信息,然后保存(缓存)数据到本地。您所要做的就是重新绑定以清除其缓存: +一台BIND缓存服务器从另一台服务器(区域主)响应主机的查询而获得信息,然后保存(缓存)数据到本地。您所要做的就是重启BIND以清除其缓存: # /etc/init.d/named restart @@ -49,18 +47,18 @@ A caching BIND server obtains information from another server (a Zone Master) in # rndc exec -flushname命令刷新所有的连接到一个特定的域名的记录。本例中刷新cyberciti.biz相关域的所有记录: +BIND v9.3.0 及其以上版本支持一个清除一个特定域名的所有记录缓存的命令:rndc flushname。本例中刷新cyberciti.biz相关域的所有记录: # rndc flushname cyberciti.biz -它同样也可以用来清除BIND View.比如,LAN和WAN的View可以用下面的命令清除: +同样也可以清除BIND View。比如,LAN和WAN的View可以用下面的命令清除: # rndc flush lan # rndc flush wan -### Mac OS X Unix 用户提示 ### +### 给 Mac OS X Unix 用户的提示 ### -使用root用户输入下面的命令: +Mac下用root用户输入下面的命令: # dscacheutil -flushcache @@ -68,13 +66,13 @@ flushname命令刷新所有的连接到一个特定的域名的记录。本例 $ sudo dscacheutil -flushcache -如果你正在使用OSX 10.5 或者更早的版本,尝试使用下面的命令: +如果你正在使用OSX 10.5 或者更早的版本,尝试使用下面的命令: lookupd -flushcache -### /etc/hosts 文件的一个提示 ### +### 关于 /etc/hosts 文件的一个提示 ### -/etc/hosts作为一个静态查询主机的表格。你需要在类Unix操作系统下依据你的要求移除并且/或者更新它: +/etc/hosts用作静态查询主机的表格。你需要在类Unix操作系统下依据你的要求移除并且/或者更新它: # vi /etc/hosts @@ -98,15 +96,15 @@ flushname命令刷新所有的连接到一个特定的域名的记录。本例 172.168.232.51 nfs2.nixcraft.net.in nfs2 192.168.1.101 vm01 -### 再看这里: ### +### 参考 ### -相关: 在Windows Vista / XP中用ipconfig 命令[ 清除 DNS 缓存][3] +相关: 在Windows Vista / XP中用ipconfig 命令[清除 DNS 缓存][3] -------------------------------------------------------------------------------- via: http://www.cyberciti.biz/faq/rhel-debian-ubuntu-flush-clear-dns-cache/ -译者:[geekpi](https://github.com/译者ID) 校对:[geekpi](https://github.com/校对者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/published/20140620 How Many Languages Do Developers Need To Know.md b/published/20140620 How Many Languages Do Developers Need To Know.md new file mode 100644 index 0000000000..d241b85e4f --- /dev/null +++ b/published/20140620 How Many Languages Do Developers Need To Know.md @@ -0,0 +1,86 @@ +到底开发者需要掌握多少门语言? +================================================================================ +![](http://a2.files.readwrite.com/image/upload/c_fill,h_900,q_70,w_1600/MTIyNzYyNjIwNDU2Njk4NDcw.jpg) + +> 诸如Apple、Facebook及Google这样的大公司正在开发他们自己的编程语言,开发者们被迫只有适应。 + +前不久的世界开发者大会上,Apple公布了它的新开发语言[Swift][1]。这是最近大型技术公司们开发的一大波新语言中的最新成员,这些新语言某种程度上都是专门应用于他们自己的平台。 + +对iOS开发者,Apple有Swift;而[Facebook 有 Hack][2] —— 一门用于后端开发的语言。与此同时,Google已经拥有了它自己的Javascript替代者 Dart,以及一门新的通用编程语言Go。 + +这一波又一波的新语言,给开发者们带来了许多问题。也许其中最严重的问题正如我一位同事[Adriana Lee][3]在Apple发布Swift后所说: + +> (开发者们到底还得学习多少门语言?) +> ——Adriana Lee (@adra_la) [June 2, 2014][4] + +### 计算机语言的通天塔 ### + +目前已经存在的[编程语言有数百种][5],同时还有更多的语言正在涌现。其中许多都是被设计用在相对较窄的应用程序范围内,大多数甚至从未走出过项目小组的范围。 + +与此类似,大技术公司开发的新语言其实也是伴随着公司一起成长的。[通用语言的鼻祖,C语言][6],就源于上世纪70年代初的AT&T贝尔实验室。Java,目前作为Android app开发的主要语言,诞生于上世纪90年代[Sun公司的Microsystems系统][7]。 + +发展到现在,不同之处在于,公司们拥抱新语言、从而想要延伸的特定商业目标的范围不一样了 —— 这一过程同时建立了一个忠心耿耿的开发者基础,他们被牢牢锁定在了某个公司的特定平台上。这类一石二鸟的战略,最早可以追溯到Sun对Java的采用,当时公司就将其作为了挑战微软PC桌面统治地位的一种手段。(事情虽然没有像Sun计划的那样发展下去,但在Google转向Android之前,Java大体上也算是在企业中间件系统中找到了自己的一席之地。) + +这么看来,Apple的Swift其目标也就很明确了。Swift应该不会辜负公司前期的大肆宣传,通过磨平Objective-C那粗糙的毛边,看起来它能够成功简化iOS app开发者的开发过程。但是同样还是这些开发者,他们却需要学习一门新语言的输入和输出,而这些功能很可能在其他地方都不会用到。 + +### 大公司们为什么要重复造轮子 ### + +“不要重复造轮子”这一哲学在绝大多数开发者心中根深蒂固,大公司们对此却并不买账。那他们为何不只是修改下现有语言用于新的用途呢? + +答案很简单,公司们发明他们自己的语言,是因为他们有这个能力。设计一门新语言可能很复杂,但对资源要求却并不很高。困难之处也就在对其提供支持,包括提供软件资源(共享代码库、API、编译器、文档等)以及赢得开发者的心意。大公司们在这两方面尤其擅长。 + +还有一个事实,现有语言通常很难硬塞进如今的复杂代码框架中。举个栗子,[Facebook决定发明的Hack][8],就是一个普遍适用于Web开发的[脚本语言PHP][9]的超集合(superset)。 + +Facebook的Hack最近已经比较普遍,其主要目标就是改进代码的稳定性,针对这一目的,它强制在程序运行之前对数据类型进行检测。这样的检测确保了一个程序,比方说,不会将一个整数解析为一个字符串,这样的错误如果捕获不到很可能会导致不可预知的后果。在Hack中,这些检测会预先执行,以便程序员能够在程序上线前早早发现这样的错误。 + +据Facebook的Hack项目组核心成员Julien Verlaguet透露,公司之前尝试过用一门现有语言实现更高效的编程。但是Facebook的大部分代码都是由PHP编写的,公司实际上已经建立了一个支持PHP及其分支的软件架构。即使能够让PHP同其他语言编写的代码协同工作,实现的难易程度和运行速度都无法满足要求。 + +“比如说我们尝试用Scala重写PHP代码库,”Verlaguet说。“Scala是一门设计优秀的漂亮语言,但是它与PHP完全不兼容。每次我需要从Scala的代码库部分调用PHP的时候,都会损失性能。我们很愿意使用一门现有语言,但是对于我们来说,这条路行不通。” + +于是,Facebook发明了Hack,它与PHP一样能够共用公司现有的架构。Verlaguet介绍说,Facebook的代码库主体已经从PHP迁移到了Hack,同时公司将Hack开源,希望独立开发者们能够帮公司找到Facebook以外的用途。 + +“你仍然可以使用PHP,”他说,“但是我们希望你有使用Hack的欲望。” + +### 谁说了算 ### + +公司和开发者之间有一种微妙的平衡。公司可以按照自己的喜好发明语言。但是如果开发者都不愿使用这门语言,那就没人用了,公司以外的人也就没人愿意将自己的职业生涯托付给这家公司。 + +公司在开发过程中同时使用不同的语言,这并不少见。例如,你可能用Objective-C开发iOS app,但却用Java开发Android app。对开发者来说,这从来都不是症结所在,因为Objective-C和Java都是通用面向对象语言。它们用途广泛适用于很多场合。 + +然而,Hack、Dart、Go和Swift,到目前为止,仍然只适用于严格特定公司的编程解决方案,往往和公司选择的编程环境相对应。诚然,现在下结论可能还太早。比方说Hack,就可以用在一些后端的实现中;它只是太新了,以至于Facebook还没有任何数据供人们如此使用。 + +不是开发者不能学习多门语言。事实上,大多数人已经掌握了多门语言。这好比罗曼斯语(由拉丁语演变而成的语言),如果你会说西班牙语,再去学法语就比那些不会西班牙语的人简单许多。与此类似,如果你已经会Java,再学Ruby或Perl就简单得多。如果你会PHP,基本上就已经学会了Hack。 + +与此相反,学习多门语言更多的是一个习惯问题。如果Java已经解决了你的问题,你就不再有动机去学Ruby。如果你用Objective-C编写iOS app感觉很爽,你就不会有强烈的意愿去学Swift。 + +另外,对于一些开发者来说,封闭生态系统的语言只会使每个人的生活变得更糟。例如,自由设计师Jack Watson-Hamblin就告诉我说,像Apple这样强势推出Swift,其实是在冒险增加程序员的负担,同时将开发者社区割裂开来: + +> 程序员掌握多门语言固然重要,但是不断强迫他们紧跟新语言,却是行不通的。如果我正在开发一个简单的跨平台app,我可不想被迫掌握四门语言再来完成它。如果真的需要,我也只想使用一门语言。 + +Watson-Hamblin就主张说,当每家公司都为了自家需要发明自己的语言时,程序员的注意力被分散,开发的视野也局限于一种,这只会拖慢整个开发进程。他说,“如果拿公司负责一门语言与负责一个开源社区相比较,这两者的区别就好比一家大企业与一个初创小公司的区别”。社区生来就更加灵活,适应能力更强。 + +当然,Apple有[许多非常好的理由推出Swift从零开始][10],就像当初Facebook发明Hack的时候一样。我并不是说,大公司不会强迫开发者接受这种改变,在这方面,有些公司一直都很让人讨厌。 + +“新语言的发明,伴随着霸权的支配,”Verlaguet说,“被迫不停追赶,确实令人沮丧,但另一方面,你又多了一种解决问题的新语言。反过来想想,要是全世界的程序员都用同样一门语言做所有事情,即使啥都凑合着能干,这门语言也一定干得不怎么样”。 + +题图来自于[Flickr user Ruiwen Chua][11],CC 2.0 + +-------------------------------------------------------------------------------- + +via: http://readwrite.com/2014/06/17/apple-swift-facebook-hack-google-dart + +译者:[Mr小眼儿](http://blog.csdn.net/tinyeyeser) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://developer.apple.com/swift/ +[2]:http://readwrite.com/2014/03/20/facebook-new-programming-language-hack +[3]:http://readwrite.com/author/adriana-lee#awesm=~oGfPbJlSrFBamJ +[4]:https://twitter.com/adra_la/statuses/473537386266112000 +[5]:http://en.wikipedia.org/wiki/List_of_programming_languages +[6]:http://en.wikipedia.org/wiki/C_(programming_language) +[7]:http://en.wikipedia.org/wiki/Java_(programming_language) +[8]:http://readwrite.com/2014/03/20/facebook-new-programming-language-hack +[9]:http://en.wikipedia.org/wiki/PHP +[10]:http://blog.erratasec.com/2014/06/why-it-had-to-be-swift.html#.U58BJI1dXtA +[11]:https://www.flickr.com/photos/ruiwen/3260095534 \ No newline at end of file diff --git a/published/20140623 How to disable Ipv6 on Ubuntu or Linux Mint or Debian.md b/published/20140623 How to disable Ipv6 on Ubuntu or Linux Mint or Debian.md new file mode 100644 index 0000000000..4b63c6df0f --- /dev/null +++ b/published/20140623 How to disable Ipv6 on Ubuntu or Linux Mint or Debian.md @@ -0,0 +1,137 @@ +如何在Ubuntu,Linux Mint,Debian上禁用IPv6 +================================================================================ +### IPv6 ### + +IPv6是寻址方案IPv4的下一个版本,被用来给域名分配数字地址。 + +IPv6比IPv4支持更多的地址。然而,它还没有被广泛支持,还在被接受的过程中。 + +### 你的系统支持IPv6么? ### + +为了支持IPv6,需要很多事情。首先你需要系统/操作系统支持IPv6。Ubuntu,Linux Mint,和大多是现代发行版都支持它。如果你看一下ifconfig指令的输出,你就会看见你的网络接口被分配了IPv6地址。 + + $ ifconfig + eth0 Link encap:Ethernet HWaddr 00:1c:c0:f8:79:ee + inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 + inet6 addr: fe80::21c:c0ff:fef8:79ee/64 Scope:Link + UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 + RX packets:110880 errors:0 dropped:0 overruns:0 frame:0 + TX packets:111960 errors:0 dropped:0 overruns:0 carrier:0 + collisions:0 txqueuelen:1000 + RX bytes:62289395 (62.2 MB) TX bytes:25169458 (25.1 MB) + Interrupt:20 Memory:e3200000-e3220000 + + lo Link encap:Local Loopback + inet addr:127.0.0.1 Mask:255.0.0.0 + inet6 addr: ::1/128 Scope:Host + UP LOOPBACK RUNNING MTU:65536 Metric:1 + RX packets:45258 errors:0 dropped:0 overruns:0 frame:0 + TX packets:45258 errors:0 dropped:0 overruns:0 carrier:0 + collisions:0 txqueuelen:0 + RX bytes:4900560 (4.9 MB) TX bytes:4900560 (4.9 MB) + +看一下行“inet6 addr”。 + +接下来你需要一个支持ipv6的路由器/调制解调器。此外,你的ISP也必须支持IPv6。 + +除了检查网络设备的每一部分,最好查出你是否可以通过IPv6访问网站。 + +有很多网站可以检测你的网络连接是否支持IPv6. 这里就是个例子:[http://testmyipv6.com/][1] + +下面是在内核中启用IPv6的参数: + + $ sysctl net.ipv6.conf.all.disable_ipv6 + net.ipv6.conf.all.disable_ipv6 = 0 + + $ sysctl net.ipv6.conf.default.disable_ipv6 + net.ipv6.conf.default.disable_ipv6 = 0 + + $ sysctl net.ipv6.conf.lo.disable_ipv6 + net.ipv6.conf.lo.disable_ipv6 = 0 + +同样可以在proc文件中检查 + + $ cat /proc/sys/net/ipv6/conf/all/disable_ipv6 + 0 + +注意这里的变量是控制IPv6的“禁用”。所以设置1就会禁用IPv6。 + +### 如果它不支持就禁用IPv6 ### + +如果你的网络设备中不支持IPv6,那最好就全部禁用它们。为什么?因为这会引起域名查询延迟,在网络连接中不必要地尝试连接到IPv6地址导致延迟等等问题。 + +我也遇到过像这样的问题,apt-get命令偶尔会尝试连接到IPv6地址失败接着检索IPv4地址。看一下下面的输出。 + + $ sudo apt-get update + Ign http://archive.canonical.com trusty InRelease + Ign http://archive.canonical.com raring InRelease + Err http://archive.canonical.com trusty Release.gpg + Cannot initiate the connection to archive.canonical.com:80 (2001:67c:1360:8c01::1b). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::1b 80] + Err http://archive.canonical.com raring Release.gpg + Cannot initiate the connection to archive.canonical.com:80 (2001:67c:1360:8c01::1b). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::1b 80] + + ..... + +像这样的错误在最近的Ubuntu中更频繁了,或许它比以前更频繁地尝试使用IPv6地址。 + +我在其他的应用上也注意到了相似的问题,如Hexchat,同样Google Chrome也会有时会在查询域名的时候花费更长的时间。 + +所以最好的方案是完全禁用IPv6来摆脱这些事情。这只需要一点点配置但可以帮助你解决很多你系统上的很多问题。用户甚至反应这可以加速网络。 + +#### 禁用 IPv6 - 方案1 #### + +编辑文件 - /etc/sysctl.conf + + $ sudo gedit /etc/sysctl.conf + +在文件的最后加入下面的行。 + + # IPv6 disabled + net.ipv6.conf.all.disable_ipv6 = 1 + net.ipv6.conf.default.disable_ipv6 = 1 + net.ipv6.conf.lo.disable_ipv6 = 1 + +保存并关闭 + +重启sysctl + + $ sudo sysctl -p + +再次检查ifconfig的输出,这里应该没有IPv6地址了。 + + $ ifconfig + eth0 Link encap:Ethernet HWaddr 08:00:27:5f:28:8b + inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0 + UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 + RX packets:1346 errors:0 dropped:0 overruns:0 frame:0 + TX packets:965 errors:0 dropped:0 overruns:0 carrier:0 + collisions:0 txqueuelen:1000 + RX bytes:1501691 (1.5 MB) TX bytes:104883 (104.8 KB) + +如果不行,尝试重启系统并再次检查ifconfig + +#### 禁用 IPv6 - GRUB 方案 #### + +IPv6同样可以通过编辑grub配置文件禁用。 + + $ sudo gedit /etc/default/grub + +查找包含"GRUB_CMDLINE_LINUX"的行,并如下编辑: + + GRUB_CMDLINE_LINUX="ipv6.disable=1" + +同样可以加入名为"GRUB_CMDLINE_LINUX_DEFAULT"的变量,这同样有用。保存并关闭文件,重新生成grub配置。 + + $ sudo update-grub2 + +重启,现在IPv6应该就已经禁用了。 + +-------------------------------------------------------------------------------- + +via: http://www.binarytides.com/disable-ipv6-ubuntu/ + +译者:[geekpi](https://github.com/geekpi) ,校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://testmyipv6.com/ diff --git a/published/20140623 How to speed up directory navigation in a Linux terminal.md b/published/20140623 How to speed up directory navigation in a Linux terminal.md new file mode 100644 index 0000000000..4653fdca7e --- /dev/null +++ b/published/20140623 How to speed up directory navigation in a Linux terminal.md @@ -0,0 +1,90 @@ +自动补完不算什么,一键直达目录才是终极神器! +================================================================================ + +在命令行中切换目录是最常用的操作,不过很少有比一遍又一遍重复“cd ls cd ls cd ls ……”更令人沮丧的事情了。如果你不是百分百确定你想要进入的下一个目录的名字,那么你不得不使用ls来确认,然后使用cd来进入你想要进的那一个。所幸的是,现在大量的终端和shell语言提供了强大的自动补全功能来处理该问题。但是,你仍然需要一直疯狂地敲击TAB键来干这事。如果你和我一样懒惰,你一定会对autojump感到惊喜。 + +autojump是一个命令行工具,它允许你可以直接跳转到你喜爱的目录,而不用管你现在身在何处。 + +### 在Linux上安装autojump ### + +在Ubuntu或Debian上安装autojump: + + $ sudo apt-get install autojump + +要在CentOS或Fedora上安装autojump,请使用yum命令。在CentOS上,你需要先[启用EPEL仓库][1]才行。 + + $ sudo yum install autojump + +在Archlinux上安装autojump: + + $ sudo pacman -S autojump + +如果你找不到适合你的版本的包,你可以从[GitHub][2]上下载源码包来编译。 + +### autojump的基本用法 ### + +autojump的工作方式很简单:它会在你每次启动命令时记录你当前位置,并把它添加进它自身的数据库中。这样,某些目录比其它一些目录添加的次数多,这些目录一般就代表你最重要的目录,而它们的“权重”也会增大。 + +现在不管你在哪个目录,你都可以使用下面的语法来直接跳转到这些目录: + + autojump [目录的名字或名字的一部分] + +注意,你不需要输入完整的名称,因为autojump会检索它的数据库,并返回最可能的结果。 + +例如,假定我们正在下面的目录结构中工作。 + +![](https://farm4.staticflickr.com/3921/14276240117_9f56b42fec_z.jpg) + +那么下面的命令将直接让你跳到/root/home/doc下,不管你当前位置在哪里。 + + $ autojump do + +如果你也很讨厌打字,那么我推荐你为autojump起个别名,或者使用默认的别名。 + + $ j [目录的名字或名字的一部分] + +另外一个引人注目的功能是,autojump支持zsh和自动补完。如果你不确认哪里是不是你要跳转的地方,敲击TAB键就会列出完整路径。 + +还是同样的例子,输入: + + $ autojump d + +然后敲击tab键,将会返回/root/home/doc或者/root/home/ddl。 + +最后,对于高级用户,你可以访问目录数据库,并修改它的内容。可以使用下面的命令来手动添加一个目录: + + $ autojump -a [目录] + +如果你突然想要把当前目录变成你的最爱和使用最频繁的文件夹,你可以在该目录通过命令的参数 i 来手工增加它的权重 + + $ autojump -i [权重] + +这将使得该目录更可能被选择跳转。相反的例子是在该目录使用参数 d 来减少权重: + + $ autojump -d [权重] + +要跟踪所有这些改变,输入: + + $ autojump -s + +这会显示数据库中的统计数据。而以下: + + $ autojump --purge + +命令将会把不再存在的目录从数据库中移除。 + +简言之,autojump将会受到所有命令行高级用户的欢迎。不管你是在ssh进一台服务器,还是仅仅想要追随复古潮流,敲更少的键来减少导航时间总是件好事。如果你真的热衷于此类工具,你也肯定也想看看[Fasd][3],它应该会给你一个惊喜,我们下次再介绍它。 + +你觉得autojump怎么样?你会经常用它么?发表一下你的评论吧。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/2014/06/speed-up-directory-navigation-linux-terminal.html + +译者:[GOLinux](https://github.com/GOLinux) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://xmodulo.com/2013/03/how-to-set-up-epel-repository-on-centos.html +[2]:https://github.com/joelthelion/autojump +[3]:https://github.com/clvv/fasd diff --git a/published/20140624 How to sync Microsoft OneDrive on Linux.md b/published/20140624 How to sync Microsoft OneDrive on Linux.md new file mode 100644 index 0000000000..f2b8423e07 --- /dev/null +++ b/published/20140624 How to sync Microsoft OneDrive on Linux.md @@ -0,0 +1,86 @@ +逝去的纪念:如何在Linux中同步微软 OneDrive +================================================================================ +【编者注】:本文译文完成之后不久,OneDrive 就成了中国人的昨日黄花了。编者想了想,还是发出来罢,仅以此文纪念我们逝去的这个、那个、以及这些和那些。也许若干年后我们回忆起来,我们曾经有过那么多那些,而当时却挑三拣四,没有珍惜,如果再给我一次机会…… + +--- + +[OneDrive][1](以前称为SkyDrive)是微软的一个广受欢迎的云存储产品。目前OneDrive为每一个新注册用户提供7GB免费存储空间。正如你所想,OneDrive与微软其他软件产品很好地集成。微软还提供了一个独立的OneDrive客户端,它会自动备份照相机拍摄的图片和视频到OneDrive。但你猜怎么着。该客户端可用于除Linux的各大PC/移动平台。 + +“OneDrive在任何设备,任何时间”?哦,不,这还不行。 + +不过不要失望。开源社区已经已经拿出了解决方案。 Boilermaker写的[onedrive-d][2]可以完成这项工作。作为监测守护进程运行,onedrive-D可自动将本地文件夹同步到OneDrive云存储。 + +I在本教程中,我将介绍**如何在Linux上使用onedrive-d同步微软OneDrive**。 + +### 在linux上安装onedrive-d ### + +虽然onedrive-d最初是为Ubuntu/ Debian开发的,但它仍然支持CentOS/ Fedora/ RHEL。 + +安装就像输入下面的命令一样容易。 + + $ git clone https://github.com/xybu92/onedrive-d.git + $ cd onedrive-d + $ ./inst install + +### 第一次配置 ### + +安装之后,你需要进行一次性配置来授予onedrive-d对您OneDrive账户的读/写权限。 + +首先,创建将用于对远程OneDrive账户同步的本地文件夹。 + + $ mkdir ~/onedrive + +接着运行下面的命令开启一次性配置。 + + $ onedrive-d + +它接着会弹出如下onedrive-d的设置窗口。在“Location”选项中,选择你之前创建的本地文件夹。在“Authentication”选项中,你会看见“You have not authenticated OneDrive-d yet”(“你还没有授权OneDrive-d”)的信息。现在点击"Connect to OneDrive.com"按钮。 + +![](https://farm4.staticflickr.com/3885/14470579955_1fb92e7cfe.jpg) + +它会弹出一个新窗口来要求你登录OneDrivecom。 + +![](https://farm4.staticflickr.com/3903/14467221981_3d74140f61_z.jpg) + +登录OneDrive.com之后,你会被要求授权onedrive-d访问。选择“Yes”。 + +![](https://farm3.staticflickr.com/2925/14283963819_86cf52e1fd_z.jpg) + +回到先前的设置窗口,你会看到之前的状态已经变成了You have connected to OneDrive.com"(“你已经连接到了OneDrive.com”)。点击“OK”完成。 + +![](https://farm4.staticflickr.com/3896/14284004048_3e718d1e30.jpg) + +### 与OneDrive同步一个本地文件夹 ### + +这里有两种方法来使用onedrice-d将本地文件夹与OneDrive存储同步。 + +一种是“手动使用命令行来同步OneDrive”。就是当你需要与你的OneDrive账户同步时运行如下命令: + + $ onedrive-d + +`onedrive-d`接着将扫描本地文件夹与OneDrive帐户的内容并使两者同步。这意味着要么上传一个在本地文件夹新添加的文件,或者从远程OneDrive帐户下载最新发现的文件。如果你从本地文件夹删除任何文件,相应的文件将自动在与OneDrive帐户同步后被删除。反之亦然。 + +一旦同步完成,你可以使用Ctrl-C中断onedirve-d的前台进程。 + +![](https://farm6.staticflickr.com/5509/14283967750_b9ebf1b05d_z.jpg) + +另一种方法是将onedrive-d作为一个始终运行的守护进程在开机时自动启动。在这种情况下,后台守护进程会同时监视本地文件夹和OneDrive账户,以使它们保持同步。要做到这一点,只需将onedrive-D加入到你桌面的[自动启动程序列表][3]中就行了。 + +当onedrive-D作为守护进程在后台运行时,你会在桌面状态栏中看到OneDrive图标,如下图所示。每当同步更新被触发,你就会看到一个桌面通知。 + +![](https://farm4.staticflickr.com/3924/14290119448_3b1144db77.jpg) + +要注意的是:根据作者所言,onedrive-d仍在积极开发中。这并不能用于任何形式的生产环境。如果您遇到任何bug,请随时提交一份[bug报告][4]。你的贡献,笔者将不胜感激。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/2014/06/sync-microsoft-onedrive-linux.html + +译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://xmodulo.com/go/onedrive +[2]:http://xybu.me/projects/onedrive-d/ +[3]:http://xmodulo.com/2013/12/start-program-automatically-linux-desktop.html +[4]:https://github.com/xybu92/onedrive-d/issues?state=open diff --git a/published/20140624 Open Source Multimedia Converter Curlew 0.1.22.3 Is Out.md b/published/20140624 Open Source Multimedia Converter Curlew 0.1.22.3 Is Out.md new file mode 100644 index 0000000000..8fe7018a07 --- /dev/null +++ b/published/20140624 Open Source Multimedia Converter Curlew 0.1.22.3 Is Out.md @@ -0,0 +1,39 @@ +开源多媒体转换器Curlew 0.1.22.3发布了 +================================================================================ +![Curlew interface](http://i1-news.softpedia-static.com/images/news2/Open-Source-Multimedia-Converter-Curlew-0-1-22-3-Is-Out-448028-2.jpg) + +**Curlew是linux下的一款容易使用,开源多媒体转换器,现在的版本是0.1.22.3。** + + +Curlew可以转换超过100种不同的格式、显示文件的详细信息、转换预览、插入字幕等等。 + +此次更新包括:该软件打开时会记住上次的窗口大小和位置、增加了丢失了的对话框图标、在系统挂起前会主动同步文件系统。 + +这个程序需要的依赖环境包括:Python 2.7及其以上 (但是不兼容3.x)、python-gobject 3.0、gir1.2-gtk 3.0、 ffmpeg 0.8、libav-tools 0.8、 mencoder、libavcodec-extra、xdg-utils和mediainfo等。 + +来自noobslab.com的兄弟们提供一种通过PPA来简单地安装这个应用的方法。你要做的是在命令行下输入少量的命令(你需要有root权限才行) + + sudo add-apt-repository ppa:noobslab/apps + sudo apt-get update + sudo apt-get install curlew + +查看官方[更新日志][1]来获取完整的特性与更新列表。 + +你可以下载Curlew 0.1.22.3 的软件包: + +- [Ubuntu 14.04 DEB ALL][2][ubuntu_deb] [172 KB] +- [tar.gz][3][sources] [152 KB] + +记住这是一个开发版因此不应该安装在生产机器上。它只用于测试。 + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Open-Source-Multimedia-Converter-Curlew-0-1-22-3-Is-Out-448028.shtml + +译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://gtk-apps.org/content/show.php/Curlew?content=155664 +[2]:http://sourceforge.net/projects/curlew/files/curlew-0.1.22.3/curlew_0.1.22.3ubuntu14.04_all.deb/download +[3]:http://sourceforge.net/projects/curlew/files/curlew-0.1.22.3/curlew-0.1.22.3.tar.gz/download diff --git a/published/20140624 Top500 Supercomputer Remains Stuck at 33.86 Petaflops Each s - 翻译.md b/published/20140624 Top500 Supercomputer Remains Stuck at 33.86 Petaflops Each s - 翻译.md new file mode 100644 index 0000000000..6a6808f4d9 --- /dev/null +++ b/published/20140624 Top500 Supercomputer Remains Stuck at 33.86 Petaflops Each s - 翻译.md @@ -0,0 +1,41 @@ +超算TOP 500的计算性能仍然保持在 33.86 千万亿次/秒 +-------------------------------------------------------------------------------- + +天河2号一年以前第一次跳上世界超算舞台,拥有了当时世界上最强计算机的皇冠。当时,天河2号被评测为 33.86 petaflops (千万亿次/秒)。 + +整整一年后天河-2 性能指数仍旧保持不变,它仍然坐在世界上最强超级计算机的头把交椅上。 + +![](http://www.serverwatch.com/imagesvr_ce/7184/icon-titan-r.jpg) + +在 2013 年 6 月时,世界上第二快的超级计算机是安置于美国能源部橡树岭国家实验室的 Cray Titan。一年前,Titan可飙至 17.59 petaflops。Titan的优秀表现,正如同天河-2一样, 到了2014 年 6 月仍然保持住了他的地位。 + +事实上,在最近的一年中,世界上顶尖的前 10 超级计算机的性能排名几乎没有任何改变,至少根据世界超算 500 强名单来看是这样的。 + +如果看看名单底部,在超算排行榜的第500名,是德国Deutcher Wetterdienst 的Cray XC30 ,其性能已经逼近 133.7 teraflops (万亿次/秒)。 + +TOP500 网站[指出][1],"最新名单上的最后的一个系统其实以前处在20年前世界 500 强排行榜中384位"。"这说明这二十年中列表变化不大。 + + +再次,列表有 85.4%的超级计算机都是英特尔芯片占主导地位的,而 IBM Power 处理器拥有 8%的市场份额。AMD 的占有率目前仅为 6%。 + + +就芯片架构来说,53.6%的超算都使用 8 个或更多核心的CPU, 13.4%的超算则是 10 个或更多的核心的CPU。 + +再来看看网络互联,Infiniband和以太网拆分了整个市场。在 2014 年 6 月名单上,Infiniband占据了系统的 44.4%。 + +相比之下,据报道千兆以太网有 25.4%的市场份额, 万兆以太网拥有 15%,合计占以太网整体份额的 40.4%。 + +惠普和 IBM 再次占领了超级计算供应商的列表。惠普现在占有 36.4%的份额,而 IBM 占有 35.2%。Cray 排名降低,位列第三,占有10.2%的市场份额。 + +虽然在世界前 500 的超级计算机榜单排名里面硬件供应商们,芯片体系架构,核心数量和互联方式竞争激烈,但是在选择操作系统的时候,毫无疑问的是,97%的超算都安装了linux操作系统,即top500超算榜单上的485个超算都安装了linux系统。 + + +-------------------------------------------------------------------------------- + +via: http://www.serverwatch.com/server-news/top500-supercomputer-remains-stuck-at-33.86-petaflops.html + +译者:[owen-carter](https://github.com/owen-carter) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://top500.org/blog/lists/2014/06/press-release/ \ No newline at end of file diff --git a/published/20140625 Create A '.deb Pacakge Repository' at Sourceforge.net Using 'Reprepro' Tool in Ubuntu.md b/published/20140625 Create A '.deb Pacakge Repository' at Sourceforge.net Using 'Reprepro' Tool in Ubuntu.md new file mode 100644 index 0000000000..7c3686fd36 --- /dev/null +++ b/published/20140625 Create A '.deb Pacakge Repository' at Sourceforge.net Using 'Reprepro' Tool in Ubuntu.md @@ -0,0 +1,203 @@ +在Ubuntu下如何创建远程".deb"包仓库 +================================================================================ +**Reprepro**是一款小巧的命令行工具来方便地创建并管理**.deb**仓库。今天我们会展示给你如何使用reprepro简单地创建一个Debian包仓库,并使用**rsync**上传到Sourceforge.net。 + +![Create Deb Package Repository](http://www.tecmint.com/wp-content/uploads/2014/06/Create-Debian-Package-Repository1.png) + +### 步骤 1: 安装Reprepro并生成key ### + +首先,安装所有需要的包,使用下面的apt-get命令。 + + $ sudo apt-get install reprepro gnupg + +现在你需要使用gnupg生成一个gpg key,这里使用下面的命令。 + + $ gpg --gen-key + +它会询问你一些问题,比如你想要哪种key、key的有效期、如果你不知道如何回答,只需点击**回车** 来选择默认选项(建议) + +当然,它会询问你用户名和密码,在脑海中记住这些,因为我们会在之后需要它。 + + gpg (GnuPG) 1.4.14; Copyright (C) 2013 Free Software Foundation, Inc. + This is free software: you are free to change and redistribute it. + There is NO WARRANTY, to the extent permitted by law. + + Please select what kind of key you want: + (1) RSA and RSA (default) + (2) DSA and Elgamal + (3) DSA (sign only) + (4) RSA (sign only) + Your selection? + RSA keys may be between 1024 and 4096 bits long. + What keysize do you want? (2048) + Requested keysize is 2048 bits + Please specify how long the key should be valid. + 0 = key does not expire + = key expires in n days + w = key expires in n weeks + m = key expires in n months + y = key expires in n years + Key is valid for? (0) + Key does not expire at all + Is this correct? (y/N) Y + + You need a user ID to identify your key; the software constructs the user ID + from the Real Name, Comment and Email Address in this form: + "Heinrich Heine (Der Dichter) " + + Real name: ravisaive + Email address: tecmint.com@gmail.com + Comment: tecmint + You selected this USER-ID: + "Ravi Saive (tecmint) " + + Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O + You need a Passphrase to protect your secret key. + + We need to generate a lot of random bytes. It is a good idea to perform + some other action (type on the keyboard, move the mouse, utilize the + disks) during the prime generation; this gives the random number + generator a better chance to gain enough entropy. + + +++++ + gpg: key 2EB446DD marked as ultimately trusted + public and secret key created and signed. + + gpg: checking the trustdb + gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model + gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u + pub 2048R/2EB446DD 2014-06-24 + Key fingerprint = D222 B1C9 342E 5911 02B1 9147 3BD6 7918 2EB4 46DD + uid Ravi Saive (tecmint) + sub 2048R/7EF2F750 2014-06-24 + +现在你的key已经生成了,要检查一下,用root权限运行这条命令。 + + $ sudo gpg --list-keys + +#### 示例输出 #### + + /home/ravisaive/.gnupg/pubring.gpg + ---------------------------------- + pub 2048R/2EB446DD 2014-06-24 + uid ravisaive (tecmint) + sub 2048R/7EF2F750 2014-06-24 + +### 步骤 2: 创建一个包仓库并导出key ### + +我们现在要开始创建仓库,首先你需要创建一些文件夹,我们的仓库会放在**/var/www/apt**目录,让我们先创建这些目录。 + + $ sudo su + # cd /var/www + # mkdir apt + # mkdir -p ./apt/incoming + # mkdir -p ./apt/conf + # mkdir -p ./apt/key + +你现在需要将key导出到仓库文件夹,运行: + + # gpg --armor --export username yourmail@mail.com >> /var/www/apt/key/deb.gpg.key + +注意:用你之前步骤中输入的用户名代替username,用你的email代替上面的yourmail@mail.com。 + +我们需要在**/var/www/apt/conf**创建一个文件“**distributions**”。 + + # touch /var/www/apt/conf/distributions + +加入下面这几行到distributions这个文件中并保存。 + + Origin: (你的名字) + Label: (库的名字) + Suite: (stable 或 unstable) + Codename: (发布的代码名,比如 trusty) + Version: (发布的版本,比如 14.04) + Architectures: (软件包所支持的架构, 比如 i386 或 amd64) + Components: (包含的部件,比如 main restricted universe multiverse) + Description: (描述) + SignWith: yes + +接下来我们会创建仓库树,运行这些命令: + + # reprepro --ask-passphrase -Vb /var/www/apt export + +#### 示例输出 #### + + Created directory "/var/www/apt/db" + Exporting Trusty... + Created directory "/var/www/apt/dists" + Created directory "/var/www/apt/dists/Trusty" + Created directory "/var/www/apt/dists/Trusty/universe" + Created directory "/var/www/apt/dists/Trusty/universe/binary-i386" + FF5097B479C8220C ravisaive (tecmint) needs a passphrase + Please enter passphrase: + Successfully created '/var/www/apt/dists/Trusty/Release.gpg.new' + FF5097B479C8220C ravisaive (tecmint) needs a passphrase + Please enter passphrase: + Successfully created '/var/www/apt/dists/Trusty/InRelease.new' + +### 步骤 3: 在新创建的仓库中加入包 ### + +现在准备你的**.deb**包来加入到仓库中。进入 **/var/www/apt**目录,你每次要加包的时候都必须这么做。 + + # cd /var/www/apt + # reprepro --ask-passphrase -Vb . includedeb Trusty /home/ravisaive/packages.deb + +**注意**:用你在distributions文件中输入的仓库代号来代替**trusty** ,并且用包的路径替换**/home/username/package.deb**,你会被要求输入密码。 + +#### 示例输出#### + + /home/ravisaive/packages.deb : component guessed as 'universe' + Created directory "./pool" + Created directory "./pool/universe" + Created directory "./pool/universe/o" + Created directory "./pool/universe/o/ojuba-personal-lock" + Exporting indices... + FF5097B479C8220C ravisaive (tecmint) needs a passphrase + Please enter passphrase: + Successfully created './dists/Trusty/Release.gpg.new' + FF5097B479C8220C ravisaive (tecmint) needs a passphrase + Please enter passphrase: + Successfully created './dists/Trusty/InRelease.new' + +你的包已经加入了仓库,如果要移除它的话采用如下命令: + + # reprepro --ask-passphrase -Vb /var/www/apt remove trusty package.deb + +当然你需要用你的包名与仓库代号来修改命令。 + +### 步骤 4: 上传仓库到Sourceforge.net ### + +要上传仓库到**Sourceforge.net**,你当然需要一个可用的账号与一个可用的项目,让我假设你想要上传仓库到**http://sourceforge.net/projects/myfoo/testrepository**,这里的myfoo是项目名(UNIX上的名称,不是URL,不是标题),testrepository是你想要上传文件到这上面的目录,这里我们会使用[rsync 命令][1]。(LCTT译注:当然你也可以上传到其它的支持Http/Rsync的服务器上,以提供远程软件库的服务。) + + # rsync -avP -e ssh /var/www/apt/ username@frs.sourceforge.net:/home/frs/project/myfoo/testrepository/ + +**注意**:用你在sourceforge.net上的用户名代替username,用你的项目的UNIX名称代替myfoo,用你想要存储的文件夹代替testrepository。 + +现在你的仓库(包括设置和key等等)上传到了**http://sourceforge.net/projects/myfoo/testrepository**。 + +要把它加入到一个已装好的系统,首先你需要导入仓库key,它实际上就是**/var/www/apt/key/deb.gpg.key**,但是这是一个本地路径,使用你的仓库的其它用户不能添加到他们的系统中,这就是为什么我们要导入来自sourceforge.net的key的原因。 + + $ sudo su + # wget -O - http://sourceforge.net/projects/myfoo/testrepository/apt/key/deb.gpg.key | apt-key add - + +你现在可以非常轻松地把仓库加入到系统中了,打开**/etc/apt/sources.list**,并加入下面这行: + + deb http://sourceforge.net/projects/myfoo/testrepository/apt/key/deb.gpg.key trusty main + +**Note**:用你的项目的UNIX类型名称代替myfoo,用你的仓库代码代替trusty,用你上传存储的文件夹代替testrepository,用你在distributionsj加入的仓库组件代替main。 + +接下来,运行下面的命令来更新仓库列表。 + + $ sudo apt-get update + +**祝贺你**! 你的软件仓库已经激活了!你现在可以非常简单地在你需要的时候安装包了。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-deb-pacakge-repository-in-ubuntu/ + +译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.tecmint.com/rsync-local-remote-file-synchronization-commands/ diff --git a/published/20140625 Keep an eye on these 5 new features in RHEL 7.md b/published/20140625 Keep an eye on these 5 new features in RHEL 7.md new file mode 100644 index 0000000000..debd55dcb5 --- /dev/null +++ b/published/20140625 Keep an eye on these 5 new features in RHEL 7.md @@ -0,0 +1,57 @@ +RHEL 7值得注意的5个新特性 +================================================================================ +> RHEL 7 支持Docker容器,systemd,兼容微软的身份管理和支持高达500TB的XFS文件系统。 + +![](http://www.infoworld.com/sites/infoworld.com/files/media/image/140.jpg) + +在前一个主版本发布3年之后,经过至少6个月的[公开测试][1],RHEL(Red Hat Enterprise Linux)版本7终于发布了。这次更新表明了红帽子公司对于在RHEL中添加最新的以企业和数据为中心的特性的兴趣。这里列举了其中5个最吸引人眼球的新特性。 + +### 1. Docker ### + +RHEL 7中最大的新特性就是[紧密集成][2]了广受欢迎的应用程序虚拟化技术[Docker][3]。随着[Docker 1.0发布][4],把它集成到RHEL 7里正是恰逢其时。 + +用Docker包装的应用程序可以独立于操作系统,所以它们可以在操作系统之间移植并且正常运行。RHEL 7打算尽可能高效地使用Docker,以防止应用程序竞争资源或者为使用哪种运行时环境而困惑。 + +从RHEL的Docker路线图上的长期计划表来看,这可能会超越操作系统本身,发展成一系列的Docker容器,它可以支持用最小的开销部署一个系统。这个被称为"[Atomic项目][5]"的计划还处于早期阶段,红帽公司准备首先将它部署在他的Fedora Linux发行版,仅仅当做对前沿技术的测试。 + +### 2. Systemd ### + +引入systemd进程管理器可能引起系统管理员和Linux专家之间激烈的争论。systemd就被开发用于替代自专用Unix出现以来就在使用的init系统,它使得启动过程中装载服务更加高效。 + +因为systemd可能会带来一些不适,红帽公司没有马上在RHEL上使用systemd。早在2010发布的Fedora版本15就已经包含了systemd作为默认项目,这给了红帽公司一次很好的了解systemd在真实世界的运行的经验。同样,systemd也没有孤立地加入RHEL 7,而是作为这个OS大计划的一部分。例如,红帽公司希望通过使用systemd加强对RHEL 7中Docker容器的支持。 + +### 3. 默认使用 XFS ### + +第3个主要的改变是使XFS成为RHEL默认的文件系统,尽管这可能不那么引人瞩目。 + +最初由Silicon Graphics International(硅谷图形公司)创建的XFS在Linux系统上用做生产环境已经很长时间了。在RHEL 7上它将支持高达500TB的文件系统。RHEL 6默认使用ext4,尽管它有XFS选项。红帽子的竞争对手Suse Linux [也支持XFS][6],尽管它安装时[默认使用ext3][7]。 + +非常不幸的是,没有真正的方法可以将RHEL目前使用的其他文件系统,比如ext4或者btrfs移植到XFS。只能备份然后重建(来进行移植)。 + +### 4. 兼容微软的身份管理 ### + +就算是那些不是微软系统粉丝的管理员也对微软目录服务保持一定的尊重。RHEL 7添加了两个关键的特性以优化处理微软目录服务(AD)的方式。跨域认证现在可以在RHEL 7和微软目录服务之间建立,所以目录服务用户可以直接访问Linux侧的资源,不需要再进行一次登录。RHEL 7另一个目录服务相关的附加特性,是基于DNS信息自动发现和加入目录服务(或者其他红帽子认证服务)。 + +### 5. 性能监控(PCP:Performance Co-Pilot) ### + +进行性能调整的时候看不到实时数据就像是开着一辆挡风玻璃被刷上了油漆的车,所以RHEL 7添加了一个新的性能监控系统PCP([Performance Co-Pilot][8]),PCP最初由Silicon Graphics International(硅谷图形)[创建][9],但是现在它是RHEL 7的一部分。除了监控和记录系统状态,PCP还为其他子系统提供获取数据的API和工具集,比如正如你猜到的,刚刚介绍的systemd。 + +遵循这个思路,另一个次要的附加特性:新的性能配置文件。RHEL 6已经有符合特殊应用场景的调整RHEL的配置文件。RHEL 7不仅默认有一个新的性能最大化的配置文件,而且包含另一个新的平衡性能表现和能源消耗的配置文件。 + +------------------------------------------------------------------------------- + +via:http://www.infoworld.com/t/linux/keep-eye-these-5-new-features-in-rhel-7-244023 + +译者:[love\_daisy\_love](https://github.com/CNprober) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.infoworld.com/t/linux/red-hat-enterprise-linux-7-beta-now-available-232520 +[2]:http://www.infoworld.com/t/application-virtualization/red-hat-fast-tracks-docker-apps-enterprise-linux-238122 +[3]:http://www.infoworld.com/t/application-virtualization/docker-unleashed-app-portability-gets-boost-231716 +[4]:http://www.infoworld.com/d/application-development/review-docker-10-ready-prime-time-243935 +[5]:http://www.projectatomic.io/ +[6]:https://www.suse.com/products/server/technical-information/ +[7]:https://www.suse.com/products/server/technical-information/ +[8]:http://developerblog.redhat.com/2013/11/19/exploratory-performance-pcp/ +[9]:http://oss.sgi.com/projects/pcp/index.html \ No newline at end of file diff --git a/published/20140630 KDE Connect Adds Android File Sending, Touchpad Emulation.md b/published/20140630 KDE Connect Adds Android File Sending, Touchpad Emulation.md new file mode 100644 index 0000000000..0ff2f836a6 --- /dev/null +++ b/published/20140630 KDE Connect Adds Android File Sending, Touchpad Emulation.md @@ -0,0 +1,49 @@ +KDE Connect增加了安卓文件发送、触摸板模拟等功能 +================================================================================ + +![如今的KDE Connect 能在桌面和手机之间共享文件](http://www.omgubuntu.co.uk/wp-content/uploads/2014/06/kde-connect-share-feature.jpg) + +通过安卓版的KDE和Plasma Desktop可以将所连接设备的触摸屏当作电脑的触摸板使用。(注:Plasma 是KDE项目提供的所有图形环境总称。目前有三个Plasma子项目:Plasma Desktop用于传统的桌面电脑和笔记本电脑、Plasma Netbook用于上网本,以及Plasma Active用于平板电脑。) + +这个新附加的无线输入设备可以作为一般的鼠标使用,不过仍然不支持像双指划动或双指右击这样的多点触摸。(LCTT译注:双指右击指在触摸板上双指同时双击,代表鼠标右键点击) + +安卓的共享方式现在支持KED Connect,允许你从安卓发送文件到你的桌面,也可以通过Dolphin文件管理的菜单或者用命令行推送文件的方式,从桌面发送文件到安卓。 + +在[iOS 8 和 OS X Yosemite][1]、 [Android ‘L’ 和 Chrome OS][2]上的类似支持,计划在这个秋天首次亮相。 + +本次更新的版本修复了很多的漏洞,包括很多的改进和对FreeBSD系统的支持。 + +完整的特性如下: + +- 在安卓和KDE之间共享文件 +- 用平板电脑模拟触摸板 +- 在桌面接收来自安卓4.3以上版本的通知 +- 共享剪切板支持手机和PC之间的拷贝、粘贴 +- 可以遥控桌面上选定的媒体播放器 +- 电池状态 +- WI-FI连接共享 +- RSA加密 + +### KDE Connect 0.7版下载 ### + +从Google Play和F-Droid商店可以免费下载到KDE Connect Android的应用。 + +- [ 从Google Play下载KDE Connect][3] + +为了能用到这些最新特征,你需要安装Plasma的最新版本KDE Connect(0.7版)。撰写本文时,还没有提供deb安装包和PPA源。不过可以在Kubuntu 14.04 LTS上通过安装源码来安装,或用以下介绍方式[戳这里][4]。 + +- [下载KDE Connect 0.7源代码][5] + +-------------------------------------------------------------------------------- + +点击: http://www.omgubuntu.co.uk/2014/06/kde-connect-android-notifications-linux-desktop + +译者:[bookjoy](https://github.com/bookjoy) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.omgubuntu.co.uk/2014/06/os-x-10-10-feature-ubuntu-already +[2]:http://www.omgchrome.com/android-apps-notifications-call-alerts-chromebook/ +[3]:https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp +[4]:https://albertvaka.wordpress.com/2014/06/28/awesome-contributions-to-kde-connect/#comment-1175 +[5]:http://download.kde.org/unstable/kdeconnect/0.7/src/kdeconnect-kde-0.7.tar.xz.mirrorlist diff --git a/published/20140630 New Linux Podcast App 'Vocal' Hits Beta, Ready for Testing.md b/published/20140630 New Linux Podcast App 'Vocal' Hits Beta, Ready for Testing.md new file mode 100644 index 0000000000..68ae48fdb2 --- /dev/null +++ b/published/20140630 New Linux Podcast App 'Vocal' Hits Beta, Ready for Testing.md @@ -0,0 +1,34 @@ +Linux 播客软件‘Vocal’进入Beta阶段,准备测试 +================================================================================ +**在四月份我们就被一款叫做['Vocal'][1]的Ubuntu下的播客软件吸引了,但它从一个漂亮的草图到能真正可用,还有一段路要走,而你则可以帮助我们测试一下Vocal。** + +该软件的开发者,Nathan Dyer已经完成了一个beta版本,仍然不够稳定,其中还有很多功能也未完成,但它已经可以通过专用的PPA在Ubuntu 14.04 LTS以及14.10版本下进行测试了。 + +新闻的发布者宣称,这个beta版本只能**安装在下一代Elementary OS桌面的系统中**。并且自从Elementary OS不再为用户提供官方的Beta预览版后,让测试这事更加的麻烦了。 + +对于Unity、GNOME或者KDE来说试试也许并不太难,我想大概。如果你是Ubuntu的用户,想要试用Vocal,首先得安装不稳定版的Elementary OS的PPA,通常我们都不是很建议这样做。 + +Dyer建议感兴趣的用户等待下一代的Elementary OS桌面的beta版本开发完毕吧。 + +现在,我们只能望梅止渴了。 + +![Vocal Beta 在 Elementary OS中 (图: Dyer)](http://www.omgubuntu.co.uk/wp-content/uploads/2014/06/vocal-beta.png) + +Vocal Beta 在 Elementary OS中(图: Dyer) + +因为Vocal是开源的,那将没有任何东西能阻挡它被完美的移植到类似Unity的主流Linux桌面系统中。 + +了解更多请访问[开发者的Blog][1]、[查看最新版本][2]或者在Launchpad.net上[查看Vocal的最新信息][3] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/06/linux-podcast-app-vocal-hits-preview-kicker + +译者:[nd0104](https://github.com/nd0104) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.omgubuntu.co.uk/2014/04/vocal-podcast-manager-linux +[2]:http://nathandyer.me/2014/06/28/vocal-beta-released-daily-ppa-available/ +[3]:https://launchpad.net/~nathandyer/+archive/vocal-daily +[4]:https://launchpad.net/vocal diff --git a/published/20140701 Command Line Tuesdays--Part Two.md b/published/20140701 Command Line Tuesdays--Part Two.md new file mode 100644 index 0000000000..6f1113c7cd --- /dev/null +++ b/published/20140701 Command Line Tuesdays--Part Two.md @@ -0,0 +1,68 @@ +命令行星期二 —— 第二篇 +================================================================================ +Hi,极客们! + +让我们来更新一下我们的记忆。[上周][1],我们学习了一些基础命令,了解了shell是什么,同时介绍了我们CLI的星期二系列。 + +今天的菜单将提供点别的东西:通过文件系统导航。 + +现在,我设法找到最好的图片是从一个叫[devopsbootcamp][2]的网站。你可以在上面找到他们其余的教程。但无论如何,这是一个关于Linux根文件系统的看起来非常不错的图。 + +![Filesys](http://devopsbootcamp.readthedocs.org/en/latest/_images/hierarchy.jpg) + +例如,在上面的图片说明中,你的用户目录(你通常用来存储你的电影,音乐,文档等)是位于/home文件夹下。 /home文件夹位于/。然后,/下有个 /etc 文件夹,其中文件大部分为配置文件。无论如何,你可以在这里找到详细的描述,因为我们将进入这些文件夹来了解他们的功能,直到我们开始使用和配置它们。今天是仅用于导航。而关于这一点,让我们来开始今天的第一个命令... + +### pwd ### + +pwd,或者 ‘Print Working Directory’,当你觉得在文件丛林之中迷失了方向时是一个非常有用的命令。在任何给定时刻,键入pwd命令,瞧!这是你到达这个文件夹的完整路径。在电影《异次元杀阵(The Cube)》里的那些家伙总在用它,这些笨蛋! + +![Cube](http://bloody-disgusting.com/images/news/cube2review1.gif) + + +想象一下,自己在一个巨大的公寓里面从一个房间走到另一个房间房间,迷路了。 pwd就像面包屑指引着你到你的出发点,这样你就不会在文件夹迷宫里面失去你的方向! + +![pwd](http://redhat.activeventure.com/73/gettingstartedguide/figs/basics/pwd.png) + +### cd ### + +现在你学习了如果想知道自己在哪个目录的pwd命令的用法。现在,你要做的下一步骤就是移动到另一个目录。比方说,你在你的home文件夹下有一个文件夹(目录),你要将你的绝密的东东放到里面。要这样做,你需要使用用'cd'命令。 cd,或‘Change Directory’,将改变所处目录的位置。你怎么使用它呢?简单,键入cd和你的文件夹路径。比方说,例如,你想从你的主文件夹进入你的Hello Kitty图片集。你输入‘cd /home/username/Hello\ Kitty’。 + +正如你看到的,我们并没有只使用文件夹名称的空格键。这是因为终端将无法识别它。每当你要导航到它的名称中有空格的文件夹,你**用反斜杠字符,后跟空格**代替它。您也可以不使用反斜杠+空格选项,只是把**整个文件夹名称加引号**,例如,cd /home/username/ "Hello Kitty"。 + +![cd](http://blogote.com/wp-content/uploads/2010/06/terminal-cd-desktop.png) + +自己尝试一下。使用cd导航到不同的目录,同时,键入pwd命令,看看一切工作是否如期望的那样。 + +### 肖茨先生的快捷键 ### + +肖茨先生提醒我们也有一些可用的快捷键。 + +如果你仅键入cd,不带路径,你的终端将从你的工作目录(无论是不是)切换到你的/home文件夹。 + +同样地,如果你键入 cd `~user_name` 它会带你到你指定的特定用户的主文件夹。 + +### 下周 ### + +下周,我们将进入到下一章 - 我们将学习如何列出文件和目录,查看文本文件和文件的内容,因此会比之前我们已经学习的有更多的工作,但我希望你将会有足够的时间。一条命令又一条命令,如果你没有时间自己学习的话,那让我们在几个月内一起学习基础知识吧! + +同时,记得... + +### …玩得开心! ### + +P.S.:感谢bwl的评论,我们修正了一个在目录名称中包含空格的文本的一个错误。 + +P.P.S:GreatEmerald还增加了有关文件层次结构的一些新信息。您可以在[意见][3]中阅读。 + +感谢你们的贡献和更正 + +-------------------------------------------------------------------------------- + +via: https://news.opensuse.org/2014/06/24/command-line-tuesdays-part-two/ + +译者:[乌龙茶](https://github.com/yechunxiao19) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://linux.cn/article-3300-1.html +[2]:http://devopsbootcamp.readthedocs.org/ +[3]:https://news.opensuse.org/2014/06/24/command-line-tuesdays-part-two/comment-page-1/#comment-99186 diff --git a/published/20140701 Here Are 5 Amazing Ascii Art Generators.md b/published/20140701 Here Are 5 Amazing Ascii Art Generators.md new file mode 100644 index 0000000000..010b688802 --- /dev/null +++ b/published/20140701 Here Are 5 Amazing Ascii Art Generators.md @@ -0,0 +1,39 @@ +五个超赞的字符艺术生成器! +================================================================================ +![](http://www.efytimes.com/admin/useradmin/photo/nin511907PM712014.jpg) + +ASCII是一个非常吸引人的字符编码系统,在计算机,通讯设备,以及其他设备中,通过它来用代码表示字符。新生代的人可能会觉得它已经过时了,但是那些熟悉它的人会懂得ASCII是多么的独特。我们在这里为你准备了五个超赞的ASCII字符艺术生成器。 + +### 1.[GlassGiant ASCII Art][1] ### + +这个小程序可以把图片转换成ASCII文字艺术-一堆胡乱堆在一起的文字,数字和符号,看上去没有任何意义,直到你往后站一步去看完整的画面。它也没有什么实际的用途,只是看上去非常简洁灵巧。 + +### 2.[ASCII Art Generator][2] ### + +ASCII字符艺术是一种在电脑上把可打印字符作为图片元素来拼接展现一幅图像的艺术活动。你所需要做的只是上传你的图片,然后它会帮你转成ASCII字符艺术。 + +### 3.[Ascii.mastervb][3] ### + +ASCII字符艺术来源于7比特ASCII字符标准。ASCII字符艺术曾经在70-80年代很流行。在那个时候,计算机系统都还是基于字符的。这个程序可以非常快地把图片转换成ASCII字符。 + +### 4.[IMG2TXT][4] ### + +这个脚本可以将GIF,JPG或PNG的链接转换成ASCII字符或是带颜色的HTML。 + +### 5.[picascii][5] ### + +它可以把图片转换成ASCII文本或是HTML。要做转换,你只需要输入链接地址或是选择一张你电脑上的图片(gif/jpeg/png)。 + +-------------------------------------------------------------------------------- + +via: http://www.efytimes.com/e1/fullnews.asp?edid=142480 + +译者:[zpl1025](https://github.com/zpl1025) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://glassgiant.com/ascii/ +[2]:http://www.ascii-art-generator.org/ +[3]:http://ascii.mastervb.net/ +[4]:http://www.degraeve.com/img2txt.php +[5]:http://picascii.com/ diff --git a/published/20140702 Automotive Grade Linux Released for Open Source Cars.md b/published/20140702 Automotive Grade Linux Released for Open Source Cars.md new file mode 100644 index 0000000000..cdd5a9a454 --- /dev/null +++ b/published/20140702 Automotive Grade Linux Released for Open Source Cars.md @@ -0,0 +1,112 @@ +安装体验开源车载系统Automotive Grade Linux +================================================================================ +> Linux基金会和他的合作伙伴本周发布了Automotive Grade Linux的第一个版本,这是一个在连网汽车内部使用的开源平台。 + +![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2014/07/automotivelinux.jpg) + +随着本周 [Automotive Grade Linux][1](AGL)的第一个版本的发布,这个在物联网时代专为汽车定制的Linux发行版将转变为一个新的生态系统。 + +AGL是由Linux基金会发起的合作项目,Linux基金会汇集了来自汽车行业,通信,计算硬件,学术界和其他领域的合作伙伴。AGL的第一个版本于6月30号发布在网上并且在可[免费下载][5],这个开源操作系统基于[Tizen IVI][4]。Tizen IVI是一个基于Linux的平台,它被用于为广泛的设备提供操作系统解决方案,从智能手机,到电视,汽车,笔记本电脑。 + +![](http://automotive.linuxfoundation.org/sites/automotive.linuxfoundation.org/files/features/agl-jlr_0.png) + +在第一个版本中,AGL提供了一系列的功能和为汽车(或其他车辆)部署定制的应用程序,包括: + +- 主屏幕 +- 仪表盘 +- 谷歌地图 +- 暖通空调 +- 媒体回放 +- 新闻阅读器 +- 音响控制 +- 蓝牙手机 +- 智能设备连接集成 + +Linux基金会和他的参与AGL项目的合作伙伴希望这个解决方案将帮助确保未来“连网汽车”使用开源软件以提供下一代娱乐,导航和其他车内使用的工具。“公开和合作是促进一个公共的,标准的汽车平台发展的关键,以便这个产业可以更快速地实现供连网汽车使用的愿望。”Linux基金会的汽车总经理Dan Cauchy这样说。 + +Cauchy补充道,Linux基金会期望AGL是一个良好的开端,其合作者希望在以后的版本中能加入“一些额外的功能和特点。” + +## 下载和安装测试 ### + +### 下载 ### + +可以从此下载镜像:http://content.linuxfoundation.org/auto/downloads/images/ + +支持在PC上测试,也提供了Vmware镜像。 + +### 安装在X86上 ### + +**创建一个USB启动盘** + +1. 下载GPartd Live 镜像的压缩文件:http://gparted.sourceforge.net/download.php 。 +2. 使用FAT32文件系统格式化一个最少8GB的U盘。 +3. 解压 GPartd Live镜像的压缩包,并复制全部内容到U盘。保持完整的目录格式,比如你可以确认GPL这个文件是不是在U盘的根目录。 +4. 把U盘变成可启动的,根据你使用的系统不同而不同: + a) Linux: 执行U盘里 utils/linux 目录下的 makeboot.sh 。 + b) Windows: 执行U盘里 utils\win32 目录下的 makeboot.bat 。 +5. 按 脚本提示执行。 +6. 复制 [AGL 演示镜像][6]到U盘。 + +**安装到机器上** + +注意:这会破坏你的机器上的所有数据!所以请确保机器上的硬盘上的数据是无用的。 + +1. 使用刚刚制作好的 GPartd U盘启动系统。 +2. 默认运行 GPartd (所有选项直接回车确认即可) +3. 打开一个终端,并复制镜像内容到机器的硬盘: + gunzip -c agl-demo_1-0.img.gz | dd of=/dev/sda bs=16M +4. 关闭终端。 +5. 在 GPartd 窗口,刷新设备。 +6. 将 /dev/sda3 的大小扩展到整个硬盘的可用空间。 +7. 关机。 +8. 拔下U盘。 +9. 重启! + + +### 创建VMware虚拟机 ### + +在 64位Windows 7和32位Windows XP上的 VMware Player 5 测试通过。 + +1. 下载 VMWare Player: http://www.vmware.com/products/player +2. 解压缩 [AGL VMWare image][7] +3. 在 VMware 中增加新的虚拟机: + + 1. 选择“我将稍后安装操作系统” + 2. 使用 'Linux' -> 'Fedora' + 3. 给个名字,比如: tizen-ivi-2.0 + 4. 创建一个新的磁盘,不过这个磁盘我们稍后会删除并重建一个新的 + (将\ 作为 IDE(0:0) 设备添加) + 5. 创建好虚拟机之后,然后“编辑虚拟机设置” + 6. (可选)取消CD/DVD的“启动后连接”的选项(除非你的宿主机上有这个设备) + 7. (可选)取消打印机的“启动后连接”的选项 + 8. 删除虚拟机当前的硬盘 + 9. 添加一个新的硬盘 + 10. 选择“使用已有的虚拟磁盘”,使用那个解压缩得到文件 + 11. 当第一次启动虚拟机时,如果询问你是否要升级当前格式时,选择“保持现在的格式” +4. 运行: + 1. 启动虚拟机 + 2. 系统启动后显示一个黑屏,在桌面上任何地方右键点击并打开一个终端 + 3. 运行如下命令 + ./start_demo.sh + 这会调整屏幕分辨率,打开声音,启动node.js引擎,并最终显示界面。 + +### 更多的演示截图 ### + +请参看我们之前的一篇文章:http://linux.cn/article-3324-1.html + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/070114/automotive-grade-linux-released-open-source-cars + +译者:[linuhap](https://github.com/linuhap) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://automotive.linuxfoundation.org/ +[2]:http://linuxfoundation.org/ +[3]:http://automotive.linuxfoundation.org/ +[4]:https://www.tizen.org/ +[5]:http://automotive.linuxfoundation.org/node/add/downloads +[6]:http://content.linuxfoundation.org/auto/downloads/images/agl-demo-x86-1.0.img.gz +[7]:http://content.linuxfoundation.org/auto/downloads/images/agl-demo-vmware-1.0.vmdk.bz2 + diff --git a/published/20140702 Command Line Tuesdays--Part Three.md b/published/20140702 Command Line Tuesdays--Part Three.md new file mode 100644 index 0000000000..5f7478e869 --- /dev/null +++ b/published/20140702 Command Line Tuesdays--Part Three.md @@ -0,0 +1,83 @@ +命令行星期二 —— 第三篇 +================================================================================ +今天,肖茨先生将带领我们游历文件系统的第一部分。我们将学到如何访问、列出目录内的文件,以及首次介绍一些选项的运用。OK,让我们开始学习这周的第一个命令。 + +### ls ### + +ls 是一个用来列出目录内文件的命令。通过添加**选项**来实现多种不同的用途。简单起见,你可以只需键入 ls 。但是,你也可以在命令后面添加一个选项,它会帮助你修饰你的命令。如果你想要随意摆弄一些信息时,这会帮到你的。举例来说,当你要从一个命令的大量输出中找寻指定信息,你可以用选项缩小范围来实现。 + +这就是选项的基础概念。我们可以用下面书写格式表示: + + command(命令) -option(选项) argument(参数) + +命令,恩...,我们可以输入 pwd、 ls, 或者我们到目前为止所有学过的命令。 + +以上我们已经阐述了选项的目的。但是我们需要注意一下书写格式:在前头添加一个破折号。所以,如果选项为 l, 你需要在命令后键入**-l**。 + +**参数**是一个命令的操作对象(在这个例子中,它是一个目录,我们将会学到如何浏览它们)。 + +接着,让我们尝试在主目录里尝试用 ls 命令列出 /etc 目录内容。这次我们先不添加选项。 + +![](https://news.opensuse.org/wp-content/uploads/2014/06/Screenshot-30.-06.-2014-184127.png) + +就这样,列出了一大堆的文件。它们还根据颜色进行了分类。蓝色的是目录,白色的为普通文件,绿色的似乎是某种 shell 脚本文件。除此之外,还有其他不同的颜色来代表不同的文件类型。 + +接下来,你可以在刚才的命令里添加 -l 选项。添加选项 -l 后也会列出同样的文件和目录,但是以长格式方式输出。如果你需要查看更多信息的话,这个选项将是不错的选择。 + +![](https://news.opensuse.org/wp-content/uploads/2014/06/Screenshot-30.-06.-2014-184542.png) + +### 长格式 ### + +这样,用了长格式后,你可以看到更详细的信息,以及在每行开头类似-rw-r--r-- 令人抓狂的标示。实际上,这只是一种组合,代表了各种意义的信息。 + +![](https://news.opensuse.org/wp-content/uploads/2014/06/Screenshot-30.-06.-2014-184829.png) + +(File Name)就是文件的名称。(Modification time)是文件最后修改的时间。(Size) 用 byte 计量的文件大小。(Group) 是组的名称,和拥有者一起构成文件权限。(Owner) 是文件拥有者的名称。最最重要的… + +###…文件权限 ### + +文件权限在长格式每一行的开端都显得非常的杂乱。第一个字符代表文件类型。如果是 'd' , 意味着它是一个目录。如果是 '-' , 意味着它是一个一般文件。接下来的三个字符分别代表拥有者的可读, 可写 ,可执行的权限。再接着三个字符表示组成员的享有的文件权限,而最后三个字符表示其他人(既不是拥有者也不是同组)对文件的享有权限。 + +例如,如果有个文件在长格式下显示为:-rw-r--r--, 这说明这是个普通文件(首字符 '-'),拥有者享有可读可写权限,但是没有可执行权限,导致拥有者无法执行该文件(首字符'-'后'rw-'),用户组和其他用户只享有可读权限(你不难发现'r--'字段在后面出现了两次 。如果用户组是 'rwx' 而不是 'r-',则意味着它们可读,可写,可执行)。 + +ls 的下个选项是 ls -la .. ,-a 它会列出所有的文件,包括隐藏文件。在通常情况下,隐藏文件是不可见的。用长格式列出当前工作目录下的父目录的所有文件。 + +### less ### + +less 是一个可以显示你的文本文件的命令。举例来说,你要在 /etc 下找寻名为 os-release 的文本文件。你可以使用 ls /etc 成功实现,而现在你想要阅读它的内容。 + +你只需要使用 less /etc/os-release。 + +![](https://news.opensuse.org/wp-content/uploads/2014/06/Screenshot-30.-06.-2014-190252.png) + +..就这样了。 + +你要如何控制 less 呢? + +简单的, 你只需要动动键盘就行了! + +less 一次只会显示一个页面的文本。往前翻页你需要按 **Page Up**, 或者 **'b'**。往后翻页你可以按**Page Down**, 或者 **空格**。大写的**G**会跳转到文本的末尾,**1G**会跳转到文本的开端。**/字符**会在文本内搜索指定字符(例如,如果你输入 /suse ,它会找寻所有文本含有的 suse 并标记出来)。n 会重复执行你的搜索,**h**会显示所有的选项(h,即帮助的意思)。 + +![](https://news.opensuse.org/wp-content/uploads/2014/06/halp.jpg) + +按q退出 less 命令。 + +### file ### + +file 会显示文件的类型,是否是你要找的 ASCII 文本,还是 jpg 图片,bash 脚本等。让我们用 /etc/os-release 执行练习。 + +![](https://news.opensuse.org/wp-content/uploads/2014/06/Screenshot-30.-06.-2014-191402.png) + +这样,如你所见,os-release 是一个 ASCII 文本文件。 请尝试其他文件,并观察结果。 + +下回见了,记住… + +…一定要玩的开心啊! + +-------------------------------------------------------------------------------- + +via: https://news.opensuse.org/2014/07/01/command-line-tuesdays-part-three/ + +译者:[Luoxcat](https://github.com/Luoxcat) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/Encrypting Your Cat Photos.md b/published/Encrypting Your Cat Photos.md similarity index 55% rename from translated/tech/Encrypting Your Cat Photos.md rename to published/Encrypting Your Cat Photos.md index 4589cafd80..9e80a36d30 100755 --- a/translated/tech/Encrypting Your Cat Photos.md +++ b/published/Encrypting Your Cat Photos.md @@ -1,24 +1,26 @@ 给猫咪照片加密 ================================================================================ -事实上,我的硬盘上不存在那种不愿意被别人看到的东西,只存有一些猫咪的照片、一些记录着想写的书想法的文本文件或者是一些短篇故事的文本,也有一些写了一半的 NaNoWriMo 小说文件。简单的说,我的硬盘就没有加密的必要,因为没有什么可隐藏的。可问题是,我们错误的把“隐私的渴望”跟“要隐藏某东西”两概念混淆在一起。比如说我生活的美国,我们视隐私权利是理所当然的事,但不包括那些传统所认为的“某人隐藏色情或炸弹”。隐私考虑的是一些平常的事情。 +事实上,我的硬盘上不存在那种不愿意被别人看到的东西,只存有一些猫咪的照片、一些记录着想写的书的想法的文本文件,或者是一些短篇故事的文本,也有一些写了一半的 NaNoWriMo 小说文件。简单的说,我的硬盘就没有加密的必要,因为没有什么可隐藏的。可问题是,我们错误的把“隐私的渴望”跟“要隐藏某东西”两概念混淆在一起。比如说我生活的美国,我们视隐私权利是理所当然的事,但不包括那些传统所认为的“某人的隐藏色情或炸弹”。隐私考虑的是一些平常的事情。 -我居住在密歇根州。这儿的冬天很冷,我趋向于把温度设置在 75 度左右。对您们来说这个温度可能高了,但在我的家里刚好合适。多亏我的家是属于私有的,我的邻居不可能知道我们保持了这么高的温度,否则一但他们看到冬天如此“浪费”能源的家庭,这些邻居心里会很不平衡的。事实上,本地条规中有一条明确指出任何超过 60 度的就算是生态浪费。我并不想与这种僵老的条例较真,所以我仅仅想保守我们舒适的房子的秘密。我们并不想隐藏任何事情,但也并不是任何事情都要让外人知道。 +我居住在密歇根州。这儿的冬天很冷,我趋向于把温度设置在华氏 75 度左右。对您们来说这个温度可能高了,但在我的家里刚好合适。多亏我的家是属于私有的,我的邻居不可能知道我们保持了这么高的温度,否则一但他们看到冬天如此“浪费”能源的家庭,这些邻居心里会很不平衡的。事实上,本地条规中有一条明确指出任何超过华氏 60 度的就算是生态浪费。我并不想与这种僵老的条例较真,所以我仅仅想保守我们舒适的房子的秘密。我们并不想隐藏任何事情,但也并不是任何事情都要让外人知道。 很明显,我举的例子有点弱智,但我希望的是这能引起大家的思考。现代的 Linux 系统很容易的就可以对我们的数据进行加密,并且很可靠,所以为什么不好好利用利用呢? ### 加密原理? ### -我不会涉及太多关于加密原理的细节,但要明白最基本的原理,即使是最简单的实现,这是必须的。要加密和解密一个文件,需要两把“钥匙”。一把是私钥,正如名字所示,属于私有的。我宁愿把私钥看作是真实的钥匙-你想要多少就可造出多少,但这样做是不明智的。同样的私钥你造的越多,某些不怀好意的人得到其中一把的机率就越大,他们就会闯入你的公寓(额,我的意思的文件)。 +我不会涉及太多关于加密原理的细节,但要明白最基本的原理,即使是最简单的实现,这是必须的。要加密和解密一个文件,需要两把“钥匙”。一把是私钥,正如名字所示,属于私有的。我宁愿把私钥看作是真实的钥匙——你想要多少就可造出多少,但这样做是不明智的。同样的,私钥你造的越多,某些不怀好意的人得到其中一把的机率就越大,他们就会闯入你的公寓(额,我的意思是指那些文件)。 -公钥更像是锁的样子,只有你能打开(用你的私钥)此锁。这公钥任何人都可以得到,你可以将它张贴在网站上、把它放在你的 E-mail 中、甚至纹在你的背上。其它人想创建一个只有你能访问的文件,就可以使用此公钥来加密。 +公钥更像是锁的样子,只有你能(用你的私钥)打开此锁。这公钥任何人都可以得到,你可以将它张贴在网站上、把它放在你的 E-mail 中、甚至纹在你的背上。其它人想创建一个只有你能访问的文件,就可以使用此公钥来加密。 -这种一对多的情况也有个很酷的副作用。如果你用你的私钥来加密一些东西,任何人都可以用你提供的公钥来解密它们。这听起来很傻,但这种情景很有用。虽然加密的文件不能免于被窥视,但是它能保证此文件确实来自于你而没有被恶意改动过。用你的公钥能解密的文件仅仅只能是用你私钥加密过的。用这种方式,用私钥加密的文件即是数字“签名”文件。 +这种一对多(LCTT译注:指别人可以加密多个文件,而只有你的一个私钥才能解密)的情况也有个很酷的副作用。如果你用你的私钥来加密一些东西,任何人都可以用你提供的公钥来解密它们。这听起来很傻,但这种情景很有用。虽然加密的文件不能免于被窥视,但是它能保证此文件确实来自于你而没有被恶意改动过。用你的公钥能解密的文件仅仅只能是用你私钥加密过的。用这种方式,用私钥加密的文件即是数字“签名”文件。(LCTT译注:既然是任何人都可以用公钥解密,其实加密没有意义,相反,仅仅用你的私钥做一个签名指纹,别人只需要用你的公钥来验证该签名是否一致即可判断是否来自你。) + +(LCTT译注:其实本文此处所述的加密解密、签名校验等原理不完全正确,和实际的非对称加密情形有所差异,不过比较容易理解和类比。) #### 通用加密步骤: #### 1. 你有一个文件想要发送给苏茜 ,所以你得使用苏茜的公钥来加密,这样就只有 苏茜才能打开这个文件,但苏茜没有办法知道是谁给她发送的文件。因为任何一个人都可以用她的公钥来加密文件。 -2. 因此,你得把你的文件用苏茜的公钥和你的私钥都加密。苏茜将不得不解密两次,但她知道它是来自于你的文件。 -3. 苏茜接收到此文件后会用能证明来自于你的公钥来解密第一层。 +2. 因此,你得把你的文件用苏茜的公钥和你的私钥都加密。苏茜将不得不解密两次,但她知道它是来自于你的文件。(LCTT译注:实际上应该是用你的私钥要做签名,生成一小段签名指纹,而不是对已经加密的文件再次加密。) +3. 苏茜接收到此文件后会用能证明来自于你的公钥来解密第一层。(LCTT译注:校验签名,确认来自你的私钥的签名正确。) 4. 然后用她的私钥来解密第二层的密码,这是唯一的能够将原始文件进行解密的钥匙了(因为你是用她的公钥来加密的)。 当然,这情景就是用来安全传输文件的加密手段。这也是加密你的文件(或者分区)相当常用及简单的方法。就让我们开始来对文件进行加密吧,因为大多数人都想加密他们的系统。 @@ -27,45 +29,45 @@ 在深入更复杂的各种加密设置操作前,我们先做简单的对文件加密例子。能处理加密的应用程序有很多很多,事实上,对文件和系统进行加密的各种可用软件选择,很容易就会让我们变得焦头烂额。现在,我们就使用一款很基本的(但非常强大)命令行工具来对文件加密。 GPG (英文名:Gnu Privacy Guard)是一款对商业软件 PGP(英文名:Pretty Good Protection)的开源实现软件。它具有加密、签名及管理多个密钥等功能。用例子说明,让我们简单的加密一个文件吧。 -我们假设你有一个名叫 secret_manifesto.txt 的文件,它包含有关于生命、宇宙及一切事物的秘密。使用 GPG,你只需要一个密码就可以加密此文件。使用密码远比使用公钥和私钥对简单,因为它只是用你的密码加密。虽然这很容易就让你的文件遭受到破解(使用彩虹表或其他黑客工具),但像锡上的标签上所说的:这是相当不错的保护。要加密你的文件,可以这样做: +我们假设你有一个名叫 secret_manifesto.txt 的文件,它包含有关于生命、宇宙及一切事物的秘密。使用 GPG,你只需要一个密码就可以加密此文件。使用密码远比使用公钥和私钥对简单,因为它只是用你的密码加密。虽然这比较容易让你的文件遭受到破解(比如使用彩虹表或其他黑客工具暴力破解),但像它的名字中所宣称的:这是相当不错的保护。要加密你的文件,可以这样做: # gpg -c secret_manifesto.txt - # Enter passphrase: - # Repeat passphrase: + Enter passphrase: + Repeat passphrase: -一但完成,在相同的目录下就会多出个新的文件,它默认的名字是 secret_manifesto.txt.gpg 。这是一个二进制文件,这意味着它非常非常小,但是要拷贝/粘贴进电子邮件(e-mail)或 即时消息(IM) 就不可能了。要使其可拷贝等操作,可以添加 -a 标志,这将创建一个只包含 ASCII 码文本的加密文件: +一但完成,在相同的目录下就会多出个新的文件,它默认的名字是 secret_manifesto.txt.gpg 。这是一个二进制文件,这意味着它真的比较小,但是要将其内容拷贝/粘贴到电子邮件(e-mail)或 即时消息(IM) 就不可能了(LCTT译注:当然你可以使用附件方式。)。要使其便于拷贝等操作,可以添加 -a 标志,这将创建一个只包含 ASCII 码文本的加密文件: # gpg -a -c secret_manifesto.txt - # Enter passphrase: - # Repeat passphrase: + Enter passphrase: + Repeat passphrase: # ls -l -rw-rw-r-- 1 spowers spowers 6 Nov 23 1:26 secret_manifesto.txt -rw-rw-r-- 1 spowers spowers 174 Nov 23 1:27 secret_manifesto.txt.asc -rw-rw-r-- 1 spowers spowers 55 Nov 23 1:26 secret_manifesto.txt.gpg -注意到现在多了一个以 .asc 为扩展名的文件。它是个纯文本文件,从上面的代码段示例可以看到它比二进制的加密文件还大,当然比原文本文件就大的更多了。一但你把文件加密了,也确实想要对些信息保密,最明智的就是把原文本文件删除掉。 +注意到现在多了一个以 .asc 为扩展名的文件。它是个纯文本文件,从上面的代码段示例可以看到它比二进制的加密文件还大,当然比原文本文件就大的更多了。一但你把文件加密了,也确实想要对些信息保密,最明智的就是把原文本文件删除掉。(LCTT译注:千万记住密码啊,否则谁也帮不了你了——你得自己破解自己的密码啦:>) -要解密文件,你需要再一次使用 GPG 程序。不管是二进制的还是 ASCII 文件,使用相同的命令就可以解密。如下示: +要解密文件,你需要再一次使用 GPG 程序。不管是二进制的还是 ASCII 文件,使用相同的命令就可以解密。如下所示: # gpg secret_manifesto.txt.asc - # gpg: CAST5 encrypted data - # Enter passphrase: - # gpg: encrypted with 1 passphrase - # File `secret_manifesto.txt' exists. Overwrite? (y/N) + gpg: CAST5 encrypted data + Enter passphrase: + gpg: encrypted with 1 passphrase + File `secret_manifesto.txt' exists. Overwrite? (y/N) 注意到上面的例子中,我没有删除源文本文件,所以 GPG 给出了是否覆盖选项提示。一但操作完成,我的未加密的源文件又回来了。如果你仅仅只有一两个文件要保护,那基于命令行的 GPG 程序正是你所需的。但如果你想实现在系统上指定一个区域,任何保存到这区域的的文件都会自动加密的话,就有点复杂了。可这也并不是非常的困难,让我们用一个非常简单的示范例子来讲解吧。 ### 加密 USB 驱动盘 ### -如我前面提到的,要加密有很多可选的方式方法。加密磁盘分区最通用的一种方法是 LUKS(Linux Unified Key Setup) 系统。一个使用 LUKS 格式化分区的 USB 驱动盘可以被大多数系统自动被别到。实际上,如果你使用的是像 Ubuntu 桌面这样的桌面环境系统的话,加密 USB 驱动盘其实就是在格式化过程中简单的勾选上一个复选框而已。虽然这是加密 USB 盘最容易让人接受的方式,但我还是想演示如何在命令行下进行加密,因为这种方式可以让你明白在加密的后面具体发生了什么。 +如我前面提到的,要加密有很多可选的方式方法。加密磁盘分区最通用的一种方法是 LUKS(Linux Unified Key Setup) 系统。一个使用 LUKS 格式化分区的 USB 驱动盘可以被大多数系统自动识别到。实际上,如果你使用的是像 Ubuntu 桌面这样的桌面环境系统的话,加密 USB 驱动盘其实就是在格式化过程中简单的勾选上一个复选框而已。虽然这是加密 USB 盘最容易让人接受的方式,但我还是想演示如何在命令行下进行加密,因为这种方式可以让你明白在加密的后面具体发生了什么。 #### 步骤 1: 识别您的 USB 驱动盘。 #### -在您插入 USB 驱动盘后,如果输入 `dmesg` 命令,将会显示出所有的系统信息,包括刚插入的 USB 驱动盘的设备名字。 确保设备标识是正确的,因为后面要进行的操作会破坏驱动盘上的所有数据。您也不想一不小心就格式化掉正常的磁盘吧。(虽然不用提醒,但我还是要说,确保您的 USB 驱动盘已经没有你想保留的数据,因为这是一个破坏性的过程。) +在您插入 USB 驱动盘后,如果在终端输入 `dmesg` 命令,将会显示出所有的系统信息,包括刚插入的 USB 驱动盘的设备名字。 确保设备标识是正确的,因为后面要进行的操作会破坏驱动盘上的所有数据。您也不想一不小心就格式化掉正常的磁盘吧。(虽然不用提醒,但我还是要说,确保您的 USB 驱动盘已经没有你想保留的数据,因为这是一个破坏性的过程。) #### 步骤 2: 对 USB 驱动盘进行分区。 #### -假设,在您的系统上 USB 驱动盘是 /dev/sdb 这个设备,您需要在这个驱动上创建一个单分区。我们使用 fdisk 命令。下面是 fdisk 必须的交互操作。一般地,用 o 命令来创建一个新的空分区,然后用 w 命令来保存设置。然后重新运行 fdisk 命令,并用 n 命令来创建一个新的主分区,接下来保持默认的以使用整个设备空间: +假设,在您的系统上 USB 驱动盘是 /dev/sdb 这个设备,您需要在这个驱动上创建一个单分区(LCTT译注:设备是sdb,其上可以有多个分区,分别叫sdb1、sdb2等等)。我们使用 fdisk 命令。下面是 fdisk 必须的交互操作。一般地,用 o 命令来创建一个新的空分区,然后用 w 命令来保存设置。然后重新运行 fdisk 命令,并用 n 命令来创建一个新的主分区,接下来保持默认的以使用整个设备空间: # sudo fdisk /dev/sdb @@ -93,7 +95,7 @@ Command (m for help): w The partition table has been altered! -现在你的 USB 驱动盘有了一个单分区了(/dev/sdb1),但还没有文件系统,这正是我们所想要的,因为 LUKS 系统需要在创建文件系统前在您的分区上创建一个加密层。因此,在创建文件系统之前,就让我们在分区上先创建一个 LUKS 层吧,可以使用 cryptsetup 程序。如果您还没有安装 cryptsetup 的话,可以搜索您系统发布版本的仓库源,里有就有。下面就开始创建 LUKS 加密分区层: +现在你的 USB 驱动盘有了一个单分区了(/dev/sdb1),但还没有文件系统,这正是我们所想要的,因为 LUKS 系统需要在创建文件系统前在您的分区上创建一个加密层。因此,在创建文件系统之前,就让我们在分区上先创建一个 LUKS 层吧,可以使用 cryptsetup 程序。如果您还没有安装 cryptsetup 的话,可以搜索您系统发布版本的仓库源,里面就有。下面就开始创建 LUKS 加密分区层: # cryptsetup luksFormat /dev/sdb1 @@ -105,37 +107,37 @@ Enter LUKS passphrase: Verify passphrase: -按照提示的操作,一定要确保记得您的密码!注意,这儿的“密码单词”不仅仅只表示一个单词。这只是一个习惯,因而得名,设置的越长,越难被破解。 +按照提示的操作,一定要确保记得您的密码!注意,这儿的“密码单词”不仅仅只表示一个单词。这只是一个习惯,因而得名,设置的越长越复杂,越难被破解。 一但上面的操作完成,就创建好了一个加密的分区,但它还没有被挂载或格式化。要做的第一步就是挂载分区,可以再一次使用 cryptsetup 工具: # cryptsetup luksOpen /dev/sdb1 my_crypto_disk Enter passphrase for /dev/sdb1: -当输入完密码后,您输入名字的设备就会像虚拟硬盘一样被挂载上。通常,它挂载在 /dev/mapper/devicename 目录下,所以这个例子所示的分区就挂载到了 /dev/mapper/my_crypto_disk 目录。 +当输入完密码后,您输入名字的设备就会像虚拟硬盘一样被挂载上。通常,它挂载在 /dev/mapper/设备名 的目录下,所以这个例子所示的分区就挂载到了 /dev/mapper/my_crypto_disk 目录。 -现在这个设备就可当做未加密的卷来访问了。 只要它一被挂载,就跟其它未加密的卷是一样的了,这就意味着您想要使用它的话就需要先写入文件系统: +现在这个设备就可当做未加密的卷来访问了。 只要它一被挂载,就跟其它未加密的卷是一样的了,这就意味着您想要使用它的话就需要先建立文件系统: # mkfs.vfat /dev/mapper/my_crypto_disk -n my_crypto_disk mkfs.vfat 3.0.9 (31 Jan 2010) -现在驱动功能完备,可以像其它驱动盘一样正常挂载使用了。实际上,如果你使用的是现代的图形用户界面系统的话,只要你把 USB 驱动盘一插入计算机,将会提示您输入密码,然后就自动挂载上了。退出的时候跟普通盘一样,里面存储的数据会被加密,直到下次输入密码。在命令行里使用 cryptsetup 卸载以及重加密驱动盘也是很简单的: +现在磁盘的功能完备了,可以像其它磁盘一样正常挂载使用了。实际上,如果你使用的是现代的图形用户界面系统的话,只要你把 USB 驱动盘一插入计算机,将会提示您输入密码,然后就自动挂载上了。退出的时候跟普通盘一样,里面存储的数据会被加密,直到下次输入密码。在命令行里使用 cryptsetup 卸载以及重加密驱动盘也是很简单的: # cryptsetup luksClose my_crypto_disk -这仅仅只是冰山一角 +### 这仅仅只是冰山一角 ### -写这篇文章,我的目的是希望剥开加密后面的秘密。加密和解密单个文件很简单,要加密整个 USB 驱动盘也不是太困难(如果使用的是图形用户界面工具就更容易了)。对于大多数系统的发布版本来说,在安装过程中就可以对整个 home 目录进行加密。加密是对您的整个 home 目录起作用,然而有些问题就需要特别处理了。例如,您没登陆时就运行的任务在大多数情况下是不会访问您的 home 目录的,但如果您有调度任务需要访问 home 目录的话,应该进行修改,让其访问系统中其它目录的数据。我觉得安全和便利平衡的中庸之道还是加密 USB 驱动盘,然后在上面存储个人资料。 +写这篇文章,我的目的是希望剥开加密后面的秘密。加密和解密单个文件很简单,要加密整个 USB 驱动盘也不是太困难(如果使用的是图形用户界面工具就更容易了)。对于大多数系统的发布版本来说,在安装过程中就可以对整个 home 目录进行加密。加密是对您的整个 home 目录起作用,然而有些问题就需要特别处理了。例如,您没登陆时就运行的任务在大多数情况下是不会访问您的 home 目录的,但如果您有调度任务需要访问 home 目录的话,应该进行修改,让其访问系统中其它目录的数据。我觉得在安全和便利之中平衡的中庸之道还是加密 USB 驱动盘,然后在上面存储个人资料。 -我必须警告您,一但您考虑安全的问题,就会想要把任何东西都加密起来。这不是什么坏的事情,但是像要对 home 目录加密这种情况,是会碰到一些问题的。如果您使用不用系统的话,跨平台访问也是个大问题。像这种情况,我强烈建议您使用 [TrueCrypt][1]。在前期的文章片段里我提到过 TrueCrypt,它是一款开源的,跨平台的加密系统软件。可以对文件、文件夹、分区等等进行加密,同时可以在任何系统中访问加密的数据。像 Windows、Mac 及 Linux 客户端都可以使用。社区也有大力的支持。 +我必须警告您,一但您考虑到安全的问题,就会想要把任何东西都加密起来。这不是什么坏的事情,但是像要对 home 目录加密这种情况,是会碰到一些问题的。如果您使用不同系统的话,跨平台访问也是个大问题。像这种情况,我强烈建议您使用 [TrueCrypt][1]。在前期的文章片段里我提到过 TrueCrypt,它是一款开源的,跨平台的加密系统软件。可以对文件、文件夹、分区等等进行加密,同时可以在任何系统中访问加密的数据。像 Windows、Mac 及 Linux 客户端都可以使用。社区也有大力的支持。(LCTT译注:悲惨的是,棱镜门事件之后,TrueCrypt的作者已经放弃了该产品,并且强烈建议大家也不要使用,具体可以参考本站的一些相关消息。所以痛失TrueCrypt之后,我们还有哪些替代品?) -希望对文件进行加密的目的并不是为了隐藏某些东西。就像即使您有个好邻居,最好夜里也得锁门一样,对您的个人数据进行加密也是个很正常的举动。如果您想在网上与大家分享你的 Whiskerton 先生戴着可爱的小豆豆帽子的照片的话,这是您的权利。但其它的人,比如他们索检你硬盘的时候,就不需要让看到了。 +希望对文件进行加密的目的并不是为了隐藏某些东西。就像即使您有个好邻居,最好夜里也得锁门一样,对您的个人数据进行加密也是个很正常的举动。如果您想在网上与大家分享你的 Whiskerton 先生戴着可爱的小豆豆帽子的照片的话,这是您的权利。但其它的人,比如他们索检你硬盘的时候,就不需要让他们看到了。 -------------------------------------------------------------------------------- via: http://www.linuxjournal.com/content/encrypting-your-cat-photos -译者:[runningwater](https://github.com/runningwater) 校对:[校对者ID](https://github.com/校对者ID) +译者:[runningwater](https://github.com/runningwater) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/The Linux Kernel/25 The Linux Kernel--Configuring the Kernel Part 21.md b/published/The Linux Kernel/25 The Linux Kernel--Configuring the Kernel Part 21.md similarity index 88% rename from translated/The Linux Kernel/25 The Linux Kernel--Configuring the Kernel Part 21.md rename to published/The Linux Kernel/25 The Linux Kernel--Configuring the Kernel Part 21.md index 03d3ce0196..32b67ad644 100644 --- a/translated/The Linux Kernel/25 The Linux Kernel--Configuring the Kernel Part 21.md +++ b/published/The Linux Kernel/25 The Linux Kernel--Configuring the Kernel Part 21.md @@ -1,20 +1,20 @@ 戴文的Linux内核专题:25 配置内核 (21) ================================================================================ -![](http://www.linux.org/attachments/slide-jpg.689/) +![](http://www.linux.org/attachments/slide-jpg.689/.jpg) -大家好!本篇我们将会配置Linux内核的网路文件系统支持。网络文件系统是一个通过网络远程访问计算机的远程文件系统。 +大家好!本篇我们将会配置Linux内核的网络文件系统支持。网络文件系统是一个可以通过网络远程访问计算机的远程文件系统。 -首先,"NFS client support"驱动允许linux系统使用NFS网络文件系统。这里还有3个不同版本的NFS - (NFS client support for NFS version 2)、 (NFS client support for NFS version 3)、 (NFS client support for NFS version 4) 和 (NFS client support for NFSv4.1)。如果你有一个处理NFS的网络,找出你正在使用NFS的版本,或者启用所有的NFS驱动。 +首先,"NFS client support"驱动允许linux系统使用NFS网络文件系统。这里还有3个不同版本的NFS - (NFS client support for NFS version 2)、 (NFS client support for NFS version 3)、 (NFS client support for NFS version 4) 和 (NFS client support for NFSv4.1)。如果你有一个使用NFS的网络,找出你正在使用NFS的版本,或者启用所有的NFS驱动。 -交换空间并不需要在本地存储单元上。这个驱动允许Linux使用NFS作为远程交换空间(Provide swap over NFS support)。 +交换空间并不需要总在本地存储单元上。这个驱动允许Linux使用NFS作为远程交换空间(Provide swap over NFS support)。 NFS系统可以通过缓存系统加速 (Provide NFS client caching support)。这是一个本地缓存。 -启用这个驱动允许DNS对NFS服务器使用主机名(Use the legacy NFS DNS resolver)。 +启用这个驱动允许NFS服务器使用DNS解析器(Use the legacy NFS DNS resolver)。 "NFS server support"给予需要满足这个需求的服务器提供了NFS的特性。其他一些NFS驱动包括(NFS server support for NFS version 3) 和 (NFS server support for NFS version 4)。 -"NFS server manual fault injection"驱动是一个调试驱动,它允许开发者让NFS服务器认为在NFS上发生了一个错误。特别地,这是用于测试服务器如何处理NFS错误。 +"NFS server manual fault injection"驱动是一个调试驱动,它允许开发者让NFS服务器认为在NFS上发生了一个错误。特别地,这用于测试服务器如何处理NFS错误。 "Secure RPC: Kerberos V mechanism"被用于RPC安全调用。由于安全原因,没有这个特性,NFS无法被加入到内核中。 @@ -26,8 +26,7 @@ CIFS是一个用于Samba和Windows服务器的虚拟文件系统(CIFS support (a 有两个特性被用于调试或监视CIFS驱动(CIFS statistics) 和 (Extended statistics)。 - -一个特殊的需要在有LANMAN安全的服务器上需要(Support legacy servers which use weaker LANMAN security)。LANMAN或者LM哈希是一种有一些弱点的特殊的密码哈希函数。 +要在服务器上支持LANMAN安全需要一个特定的驱动(Support legacy servers which use weaker LANMAN security)。LANMAN或者LM哈希是一种较弱的特殊的密码哈希函数。 CIFS在被挂载到安全服务器上之前需要Kerberos票据(Kerberos/SPNEGO advanced session setup)。这个驱动提供了CIFS使用能够提供票据的用户空间工具的能力。 @@ -37,7 +36,7 @@ CIFS在被挂载到安全服务器上之前需要Kerberos票据(Kerberos/SPNEGO CIFS有两个其他的调试工具(Enable CIFS debugging routines) 和 (Enable additional CIFS debugging routines)。 -CIFS有"DFS feature support",它允许共享在被移除后仍可以访问。DFS代表"Distributed FileSystem"(分布式文件系统)。 +CIFS有"DFS feature support",它允许共享在被移除后仍可以访问。DFS代表"Distributed FileSystem"(分布式文件系统)。 SMB2是CIFS的一个提升替代品(SMB2 network file system support)。SMB2代表的是"Server Message Block version 2"(服务器消息块第2版)。 @@ -85,7 +84,7 @@ Linux内核有一个实验性的驱动,通过9P2000协议访问Plan 9资源(Pl 这个设定分会启用/禁用普遍不需要或者废除的符号 (Enable unused/obsolete exported symbols)。然而,一些模块可能需要这些符号。启用这个会增加内核的大小。Linux用户很少会需要这些符号。通常上,禁用这个特性,除非你了解一个重要的模块需要这个符号。 -如果启用这个shehi,内核会在用户内核头上执行健康检查(Run 'make headers_check' when building vmlinux)。 +如果启用这个设施,内核会在用户内核头上执行健康检查(Run 'make headers_check' when building vmlinux)。 在编译期,这个特性会检查无效的引用(Enable full Section mismatch analysis)。 @@ -115,6 +114,6 @@ Linux内核有一个实验性的驱动,通过9P2000协议访问Plan 9资源(Pl via: http://www.linux.org/threads/the-linux-kernel-configuring-the-kernel-part-21.4988/ -译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/translated/The Linux Kernel/26 The Linux Kernel--Configuring the Kernel Part 22.md b/published/The Linux Kernel/26 The Linux Kernel--Configuring the Kernel Part 22.md similarity index 93% rename from translated/The Linux Kernel/26 The Linux Kernel--Configuring the Kernel Part 22.md rename to published/The Linux Kernel/26 The Linux Kernel--Configuring the Kernel Part 22.md index a2e77c064f..ff43c1f0ac 100644 --- a/translated/The Linux Kernel/26 The Linux Kernel--Configuring the Kernel Part 22.md +++ b/published/The Linux Kernel/26 The Linux Kernel--Configuring the Kernel Part 22.md @@ -1,6 +1,6 @@ 戴文的Linux内核专题:26 配置内核 (22) ================================================================================ -![](http://www.linux.org/attachments/slide-jpg.703/) +![](http://www.linux.org/attachments/slide-jpg.703/.jpg) 你好!本篇我们将继续配置"kernel hacks",接着我们会配置整个安全系统。 @@ -14,7 +14,7 @@ Alpha和s390处理器需要配置下一个特性(Force weak per-cpu definitions) "Latency measuring infrastructure"驱动提供了延迟检测工具LatencyTop,以找出用户空间中由于内核执行/任务而被阻碍/干扰的对象。 -下面,我们有一个子菜单名为"Tracers",它包含了不同追踪器的列表。追踪器是一段监视不同内核函数的代码。每次某个特定的函数启动,追踪器将被调用来检测函数。 +下面,我们有一个子菜单名为"Tracers",它包含了不同追踪器的列表。追踪器是一段监视不同内核函数的代码。每次某个特定的函数启动,追踪器将被调用来检测函数。 下面的模块用来测试红黑树库的性能(Red-Black tree test)。红黑树是一个排序和搜索算法。 @@ -28,9 +28,9 @@ printk()函数可以用来打印不同的调试信息,如果这个特性启用 Atomic64自我测试检查系统是否支持原子操作(Perform an atomic64_t self-test at boot)。这是一个32位系统执行64位操作。 -这个驱动提供了对于所有可能的RAID6恢复系统的自我测试(Self test for hardware accelerated raid6 recovery)。 +这个驱动提供了对于所有可能的RAID6恢复系统的自检(Self test for hardware accelerated raid6 recovery)。 -注意:自我测试是底层测试并且在绝大多数系统硬件和软件开启和执行前侦查软件。自我测试搜索硬件,失败的设备等等。自我测试也可能被编成应用测试它本身。 +注意:自检是底层测试并且在绝大多数系统硬件和软件开启和执行前侦查软件。自检搜索硬件,失败的设备等等。自检也可能被编成应用以测试它本身。 在"Kernel Hacking"菜单中(如果你是用的是像ncurses那样的菜单接口),有一个名为"Sample kernel code"的子菜单。在以后的文章中,我们会讨论如何实现自定义/自制内核模块。只要记住这里是启用你自己的模块。 @@ -62,7 +62,7 @@ printk()打印不同的消息到dmsg的启动界面,但是在串行和控制 下面的驱动提供了对"copy_from_user()"系统调用的基本测试(Strict copy size checks)。copy_fcrom_user()从用户空间拷贝数据块到内核空间中。 -这里还有一个自我测试;它用于NNI(NMI Selftest)。 +这里还有一个自检;它用于NMI(NMI Selftest)。 现在,我们会进入"Security Options",如果你使用像ncurses的基于菜单的接口时。第一个选项允许访问内核中存储的键和验证令牌(Enable access key retention support)。这有很多原因用到,像访问加密文件系统。 @@ -114,6 +114,6 @@ Yama是另外一个LSM(Yama support)。如果启用这个特性Yama可以与另 via: http://www.linux.org/threads/the-linux-kernel-configuring-the-kernel-part-22.5017/ -译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/translated/The Linux Kernel/27 The Linux Kernel--Configuring the Kernel Part 23.md b/published/The Linux Kernel/27 The Linux Kernel--Configuring the Kernel Part 23.md similarity index 95% rename from translated/The Linux Kernel/27 The Linux Kernel--Configuring the Kernel Part 23.md rename to published/The Linux Kernel/27 The Linux Kernel--Configuring the Kernel Part 23.md index c1d766f56b..5a10971a31 100644 --- a/translated/The Linux Kernel/27 The Linux Kernel--Configuring the Kernel Part 23.md +++ b/published/The Linux Kernel/27 The Linux Kernel--Configuring the Kernel Part 23.md @@ -1,8 +1,8 @@ 戴文的Linux内核专题:27 配置内核 (23) ================================================================================ -![](http://www.linux.org/attachments/slide-jpg.735/) +![](http://www.linux.org/attachments/slide-jpg.735/.jpg) -欢迎来到内核配置的下一章!本篇中我们会配置密码API,虚拟化和运行库。密码学指的是在需要的计算机之间加密和安全通信。用户可能加密数据以保证是收件人而不是黑客收到数据。 +欢迎来到内核配置的下一章!本篇中我们会配置密码API,虚拟化和运行库。密码学指的是在需要的计算机之间加密和安全通信的科学。用户可能加密数据以保证是收件人而不是黑客收到数据。 Linux内核需要在内核中启用"Cryptographic algorithm manager"(密码算法管理器)。这个特性提供了操作内核的加密特性所需的软件。 @@ -93,7 +93,7 @@ CORDIC algorithm - 双曲线和三角函数。 JEDEC DDR data - JEDEC双倍数据速率SD-RAM规范 -你猜怎么了?我们已经完成便宜内核。在23篇之后,我敢肯定这是你的感觉 - +你猜怎么了?我们已经完成配置内核。在23篇之后,我敢肯定这是你的感觉 - 视频链接:[http://www.youtube.com/embed/barWV7RWkq0?wmode=opaque][1] @@ -107,7 +107,7 @@ JEDEC DDR data - JEDEC双倍数据速率SD-RAM规范 via: http://www.linux.org/threads/the-linux-kernel-configuring-the-kernel-part-23.5112/ -译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/The Linux Kernel/28 The Linux Kernel--Compiling and Installing.md b/published/The Linux Kernel/28 The Linux Kernel--Compiling and Installing.md similarity index 58% rename from translated/The Linux Kernel/28 The Linux Kernel--Compiling and Installing.md rename to published/The Linux Kernel/28 The Linux Kernel--Compiling and Installing.md index 40f655885b..cb5b9a500d 100644 --- a/translated/The Linux Kernel/28 The Linux Kernel--Compiling and Installing.md +++ b/published/The Linux Kernel/28 The Linux Kernel--Compiling and Installing.md @@ -1,32 +1,32 @@ 戴文的Linux内核专题:28 编译与安装 ================================================================================ -![](http://www.linux.org/attachments/slide-jpg.762/) +![](http://www.linux.org/attachments/slide-jpg.762/.jpg) -你好!在花费了大量的时间在配置你需要的内核后,你现在可以编译它了。源代码是纯文本形式的C代码。这对人来可读但是对机器不这样。编译会将代码转换成计算机可理解的一种称之为二进制码的形式(1是 [开],0 是 [关])。编译同样会将所有内核代码文件变成一个内核的文件。 +你好!在花费了大量的时间在配置你需要的内核后,你现在可以编译它了。源代码是纯文本形式的C代码。这对人来可读但是对机器可不是这样。编译会将代码转换成计算机可理解的一种称之为二进制码的形式(1是 [开],0 是 [关])。编译同样会将所有内核代码文件变成一个内核的文件。 -为了编译内核,在内核源代码相同目录下,在终端内输入"make"。这会花费一些时间。一旦完成,模块必须通过"make modules"来编译。为了从一开始就简化编译过程,输入"make; make modules"。这会先编译接着是模块,而不用用户再回来输入"make modules"。 +为了编译内核,在内核源代码相同目录下,在终端内输入"make"。这会花费一些时间。完成之后,必须通过"make modules"来编译模块。为了从一开始就简化编译过程,输入"make; make modules"。这会先编译接着是模块,而不用用户再回来输入"make modules"。 -![](http://www.linux.org/attachments/compiling_01-png.763/) +![](http://www.linux.org/attachments/compiling_01-png.763/.jpg) 警告:在你安装一个内核时,备份所有的重要数据,确保有一份/boot目录备份在FAT32的存储卡上。这可以在如果安装失败后帮助修复系统。FAT32不会存储权限,因此它更容易被用作live盘来还原数据。记住设置原始文件权限和可执行位。 一旦编译已经成功完成,我们可以安装内核到本地系统中(我会马上解释如何在其他系统上安装内核[交叉编译])。在相同的终端下,在编译完成后,输入"make install"。这会在/boot目录下存放一些文件。"vmlinuz"(或者其他相似的名字)是内核自身。"initrd"是基于内存的文件系统,它被置于内存中且在启动中使用。"System-map"包含了一张内核符号列表。这些全局变量和函数用于内核代码。"config" 是内核的配置文件。grub.cfg会自动更新。然而,有些bootloder需要手动配置。内核安装器会自动配置Grub,LILO和SysLinux bootloder。像BURG这类bootloder需要手动配置。模块的安装同样需要输入"make modules install"。 -![](http://www.linux.org/attachments/compiling_04-png.764/) +![](http://www.linux.org/attachments/compiling_04-png.764/.jpg) 注:内核和模块的安装可以写在一行-“make install && make modules_install”。 -![](http://www.linux.org/attachments/compiling_05-png.765/) +![](http://www.linux.org/attachments/compiling_05-png.765/.jpg) 一旦上面的过程完成了,用户可以通过重启系统并在开机后在终端内输入"uname -r"来确保内核已经安装。如果系统无法启动或者uname报告你预期外的版本号,这个问题可能众多问题之一引起。或者是bootloader没有正确设置,特性/配置冲突,编译失败,不正确的安装,或者其他原因。找出问题源头最好的方法是查看系统日志(如果系统已经启动到足以产生日志)。"dmsg"是一个在屏幕上打印内核日志的命令。查看错误、警告或者未预料的结果。如果系统没有启动或者没有足够启动完全来生成日志,使用live linux盘来执行诊断和修复。如果所有的都失败了,再次编译内核并确保你已经用root或者"sudo"安装了内核。 注:最好的修复系统的方式是使用live Linux发行版来移除新的/损坏的内核,接着手动修复Grub文件(或者复制一个备份)。 -一些Linux用户也喜欢安装文档,但这并不是必要。对于那些想要安装文档的用户,输入这行,这里的version是你的内核版本号 "install -d /usr/share/doc/linux-VERSION && cp -r Documentation/* /usr/share/doc/linux-VERSION"(VERSION 是内核版本号)。很明显,这需要root特权。 +一些Linux用户也喜欢安装内核文档,但这并不是必要。对于那些想要安装文档的用户,输入这行,这里的version是你的内核版本号 "install -d /usr/share/doc/linux-VERSION && cp -r Documentation/* /usr/share/doc/linux-VERSION"(VERSION 是内核版本号)。很明显,这需要root特权。 -为了编译一个如你目前内核一样特性的内核,输入这条命令"zcat /proc/config.gz > .config"。这个文件可能不存在,如果是这样,你可能需要询问你发行版/内核的开发者这个文件。"zcat"命令解压并写入数据到一个".config"文件中。记住在你希望的地方输入".config"。这个文件放置在Linux内核目录下并允许它替换当前的文件。接着,像往常一样编译安装你的内核。 +要是想编译一个如你目前内核一样特性的内核,输入这条命令"zcat /proc/config.gz > .config"。这个文件可能不存在,如果是这样,你可能需要询问你发行版/内核的开发者这个文件。"zcat"命令解压并写入数据到一个".config"文件中。记住把".config"放到合适的位置。这个文件应该放置在Linux内核目录下,并允许它替换当前的文件。接着,像往常一样编译安装你的内核即可。 -交叉编译稍微有点不同。为目标系统配置内核。确保内核配置完后,它在脑海中交叉配置过了。当交叉编译时,需要熟悉两条术语。"Host"是执行编译的系统,"Target"是接收新内核的系统。确保主机系统有合适的编译器。比如,对于ARM系统的交叉编译,用户需要在主机系统上有gcc-arm-linux-gnueabi。通常来说,开发这可以在他们的包管理器上搜寻或者Googledao合适/最好的适合他们需要的交叉编译器。特定的用于ARM系统交叉编译的命令是"make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-"。"ARCH=arm"指的是目标处理器的类型,"CROSS_COMPILE"指明了交叉编译器。注意交叉编译器前面缺少了"gcc-"并以破折号结束。这是用户在使用交叉编译器作为参数使用时必须使用的格式。模块可以通过输入"make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules".交叉编译。为了在目标系统上安装内核,复制内核文件夹到目标系统上。一旦文件已在目标系统上并在该目录下打开了终端,输入"make install && make modules_install"。当然你必须是root或者使用"sudo"。 +交叉编译稍微有点不同。为目标系统配置内核。确保内核配置完后,它是以交叉编译配置的。当交叉编译时,需要熟悉两条术语。"Host"是执行编译的系统,"Target"是接收新内核的系统。确保Host主机系统有合适的编译器。比如,对于ARM系统的交叉编译,用户需要在主机系统上有gcc-arm-linux-gnueabi。通常来说,开发者可以在他们的包管理器上搜寻或者Google到合适/最好的适合他们需要的交叉编译器。比如用于ARM系统交叉编译的命令是"make ARCH=arm CROSS\_COMPILE=arm-linux-gnueabi-"。"ARCH=arm"指的是目标处理器的类型,"CROSS\_COMPILE"指明了交叉编译器。注意交叉编译器前面缺少了"gcc-"并以连字符结束。这是用户在使用交叉编译器作为参数使用时必须使用的格式。模块可以通过输入"make ARCH=arm CROSS\_COMPILE=arm-linux-gnueabi- modules"来交叉编译。为了在目标系统上安装内核,将内核文件夹复制到目标系统上。一旦文件已在目标系统上并在该目录下打开了终端,输入"make install && make modules_install"。当然你必须是root或者使用"sudo"。 信息:Kernel.org放了一个支持的交叉编译器列表([https://www.kernel.org/pub/tools/crosstool/][1])。 @@ -36,7 +36,7 @@ make && make modules && make install && make modules_install -#### 做一个更新的版本或者重混你的内核: #### +#### 做一个更新的版本或者重整你的内核: #### zcat /proc/config.gz > .config && make && make modules && make install && make modules_install @@ -50,7 +50,7 @@ via: http://www.linux.org/threads/the-linux-kernel-compiling-and-installing.5208/ -译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/sources/news/20140620 Red Hat Revenues Power Forward in 2015.md b/sources/news/20140620 Red Hat Revenues Power Forward in 2015.md deleted file mode 100644 index 61c0ca008c..0000000000 --- a/sources/news/20140620 Red Hat Revenues Power Forward in 2015.md +++ /dev/null @@ -1,41 +0,0 @@ -Red Hat Revenues Power Forward in 2015 -================================================================================ -Red Hat reported its first quarter fiscal 2015 revenues on June 18, showing continued demand and momentum for its Linux and open-source technologies. Red Hat has been particularly busy of late, acquiring a pair of companies and launching its Red Hat Enterprise Linux 7 (RHEL) flagship platform. - -For the quarter, Red Hat reported revenue of $424 million, which is a 17 percent year-over-year gain. - -![](http://www.serverwatch.com/imagesvr_ce/7990/icon-redhatlinux-r.jpg) - -"The main driver of our total revenue growth was subscription revenue of $372 million," Red Hat CFO Charlie Peters said during his company's earnings call. "Subscription revenue was up 18 percent year-over-year and it's important to point out that this renewable revenue stream now constitutes 88 percent of total revenue." - -Looking forward, Red Hat provided second quarter guidance for approximately $432 million to $436 million in revenue. - -One of the key metrics for growth that Red Hat provides is its top 30 deals during a given quarter. Peters noted that for the first time, all of the top 30 deals were valued at over $1 million. - -"We also had a Q1 record with four deals that were in excess of $5 million and one that was greater than $10 million," Peters said. "Cross-selling was strong with 65 percent of these deals including one or more components from our group of applications development and emerging technologies offerings." - -At the core of Red Hat's product portfolio is the Red Hat Enterprise Linux platform, which hit a major milestone last week with the debut of RHEL 7. - -"RHEL 7 is significant because it was designed to meet both modern data center and next generation IT requirements for cloud, Linux containers and Big Data," Red Hat CEO Jim Whitehurst said during the earnings call. "As the worlds of physical, virtual and cloud systems converge Red Hat Enterprise Linux 7 delivers a true foundation for open hybrid cloud that will serve as the backbone for future application architectures." - -### Acquisitions and Cloud Provide Opportunities for Further Growth ### - -Red Hat has also been busy acquiring a pair of companies that further expand the company's ability to grow. In April, Red Hat acquired Inktank, the lead commercial sponsor behind the Ceph open-source storage filesystem. And on June 18, Red Hat announced the acquisition of OpenStack services vendor eNovance. - -"With eNovance as a part of the Red Hat consulting team, we can enhance our consulting resources to be able to reach more customers with world-class OpenStack technologies and implementation services," Whitehurst said. - -While cloud remains a growth opportunity for Red Hat, Whitehurst sees growth also coming from continuing to take market share away from other server operating system platforms. In particular, Whitehurst noted that there is still a continued move from mainframe and Unix to Linux. - -"I was just on the phone today with a massive European customer that is literally just ready to start on the journey right now," Whitehurst said. "We continue to believe we're taking share from Windows especially with net new workloads." - -Another driver of growth for Red Hat is the maturity and expansion of its sales force. - -"We definitely have more boots on the street because we have been hiring consistently," Whitehurst said. "But I think our sales guys are more experienced, they are better trained, their confidence level is high and their enthusiasm is high." - --------------------------------------------------------------------------------- - -via: http://www.serverwatch.com/server-news/red-hat-revenues-power-forward-in-2015.html - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/sources/news/20140702 CoreOS Linux ending the upgrade cycle.md b/sources/news/20140702 CoreOS Linux ending the upgrade cycle.md new file mode 100644 index 0000000000..ca6dea9964 --- /dev/null +++ b/sources/news/20140702 CoreOS Linux ending the upgrade cycle.md @@ -0,0 +1,50 @@ +CoreOS Linux ending the upgrade cycle +CoreOS Linux结束升级周期 +================================================================================ +> CoreOS发布了他的Linux发行版的商用支持版,并且宣称将废除手动更新。 + +国际数据集团新闻社消息——CoreOS发布了商用Linux发行版,以期能简化系统管理员的生活。这个Linux发行版可持续进行自动更新,不需要进行重大升级。 + +CoreOS提供其同名的Linux发行版做为商业服务,开始为一个月100美元。 + +“商家现在可以开始考虑将CoreOS作为他们系统团队的延伸,对于企业Linux客户,这将是他们会需要的最后一次迁移。”CoreOS的创始人和CEO在一份声明中这样说。 + +商业Linux订阅并不是什么新鲜事:[Red Hat][2]和[Suse][3]都在为他们各自的发行版提供商业订阅。 + +因为这些以Linux为基础的公司使用的应用程序和库都是开源和免费提供的,所以订阅的费用不包括软件本身,而收费来自更新,漏洞修复,集成以及发生问题时的技术支持。 + +CoreOS公司声称,CoreOS将会和这些发行版不同,它将不会有重大更新,而这些更新通常需要一次更新更新所有的包。它的更新和新特征将会在就绪后自动。。。。CoreOS will be different from these distributions, the company asserted, in that there will be no major updates, which typically require updating all the packages in the distribution at once. Instead, updates and new features will be streamed automatically to the copy of the OS and applied as soon as they are ready. + +The service offers a dashboard, called CoreUpdate, that provides controls for designating which software packages should get updated, should the administrator not want all the packages to be updated automatically. + +CoreUpdate can manage multiple machines at once, and offers a roll-back capability should an update cause issues. + +Launched last December, CoreOS was designed to [focus][4] on an emerging use of the open-source OS kernel -- that of powering lots of cloud-based virtual servers. + +The average CoreOS instance was designed to consume only less than half of what other Linux distributions typically consume. All applications that run on the distribution run in Docker virtualized containers, so they can be started almost instantaneously. + +The distribution can be updated more easily [due to its novel use of two partitions][5]. One can contain the current version of the OS while the OS is being updated in the other, smoothing the process of upgrading a package, or the entire distribution. + +The CoreOS service can be run on-premises, or through Amazon, Google and Rackspace cloud services. + +CoreOS also announced Monday that it received $8 million in backing from the Kleiner Perkins Caulfield and Byers venture capital firm. The company has previously gotten investment from Sequoia Capital and Fuel Capital. + +---------- + +Joab Jackson covers enterprise software and general technology breaking news for The IDG News Service. Follow Joab on Twitter at [@Joab_Jackson][6]. Joab's e-mail address is [Joab_Jackson@idg.com][7] + +-------------------------------------------------------------------------------- + +via: http://www.computerworld.com/s/article/9249460/CoreOS_Linux_ending_the_upgrade_cycle?taxonomyId=122 + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://coreos.com/products/managed-linux/plans/ +[2]:http://www.redhat.com/about/subscription/ +[3]:https://www.suse.com/support/programs/subscriptions/ +[4]:http://www.networkworld.com/article/2177120/cloud-computing/coreos-linux-distro-lands-on-the-google-cloud-platform.html +[5]:https://coreos.com/using-coreos/updates/ +[6]:http://twitter.com/Joab_Jackson +[7]:Joab_Jackson@idg.com diff --git a/sources/news/20140709 Dwarf Fortress Sees First New Release In 2 Years.md b/sources/news/20140709 Dwarf Fortress Sees First New Release In 2 Years.md new file mode 100644 index 0000000000..f958f829a7 --- /dev/null +++ b/sources/news/20140709 Dwarf Fortress Sees First New Release In 2 Years.md @@ -0,0 +1,25 @@ +Dwarf Fortress Sees First New Release In 2 Years +================================================================================ +![](http://www.gamingonlinux.com/uploads/articles/tagline_images/399424446id3997gol.png) + +[Dwarf Fortress][1] is a single-player fantasy game. You can control a dwarven outpost or an adventurer in a randomly generated, persistent world. The kicker is that the graphics are all text, no actual graphics. There are of course mods to make it graphical however. + +I have to say I don't get the fuss at all with this one. The interface is confusing and it's not nice to look at, but I am guessing with plenty of graphical mods it could get pretty good considering everything you can do in it. I understand it will have a massive amount of replayability due to generating a new world each time, but it just doesn't look inviting to someone who hasn't played a game like it before. + +This new release is the first in 2 years and has massive changes as you might imagine. See the [full rundown here][1]. + +What do people see in it exactly? I know plenty of you play it as the amount of people to email it in was crazy. I'm just going to sit back and let the "omg your crazy" comments come in. + + + + + +-------------------------------------------------------------------------------- + +via: http://www.gamingonlinux.com/articles/dwarf-fortress-sees-first-new-release-in-2-years.3997 + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.bay12games.com/dwarves/index.html \ No newline at end of file diff --git a/sources/news/20140714 IPFire 2.13 Core 77 Linux Firewall Distro Brings Major OpenVPN Improvements.md b/sources/news/20140714 IPFire 2.13 Core 77 Linux Firewall Distro Brings Major OpenVPN Improvements.md new file mode 100644 index 0000000000..cae86c7be8 --- /dev/null +++ b/sources/news/20140714 IPFire 2.13 Core 77 Linux Firewall Distro Brings Major OpenVPN Improvements.md @@ -0,0 +1,38 @@ +IPFire 2.13 Core 77 Linux Firewall Distro Brings Major OpenVPN Improvements +================================================================================ +![](http://i1-news.softpedia-static.com/images/news2/IPFire-2-13-Core-77-Linux-Firewall-Distro-Brings-Major-OpenVPN-Improvements-450605-2.jpg) + +**Michael Tremer, a developer for the ipfire.org team, has announced that IPFire 2.13 Core 79, a new stable build of the popular Linux-based firewall distribution, is now out with some exciting new features.** + +IPFire is a modular Linux distribution, which means that it can be deployed as a firewall, a proxy server, or a VPN gateway. The main concern of the developers is security and every step has been taken in order to ensure that users can feel really safe when using this operation system. + +The developers are saying in the official [announcement][1] that the “Core Update 79 is finally arriving with many bug fixes and enhancements. Among the big changes with this update are lots feature enhancements that massively increase the security level of OpenVPN connections, some enhancements of the web user interface and a lot more awesome stuff under the hood.” + +The IPFire devs had another huge release a few months ago and it looks like they have made another one, this time focusing on the improvement of the OpenVPN features and a few other aspects. + +“The certificate authority that can be created on the OpenVPN page now uses much better hashes to protect the integrity of itself. The CA root certificate uses a SHA512 hash and a RSA key with length of 4096 bit. All new created host certificates use a RSA key with 2048 bit length and a SHA256 hash. Additionally, a set of Diffie-Hellman parameters can be generated for better protection of the session keys. The length of the pregenerated DH parameters can be chosen in the web interface,” also noted the devs. + +According to the changelog, the cipher that is used for each net-to-net connection can now be changed, the hash function is now configurable with a few options like SHA2 (512, 384, and 256-bit), Whirpool (512 bit), and SHA1 (160 bit), and the tls-auth option can be enabled, which uses a HMAC function. + +The Linux kernel used by the distribution has also been updated in this release and the OS now packs the 3.10.44 version. This should bring support for new hardware, a number of security fixes, and more stability. + +Also, snort (the Intrusion Detection System) has been updated to version 2.9.6.1, the new firewall GUI now supports blocking access to the GREEN firewall interface, the PIE packet scheduler has been added, and the default size of the root partition has been increased. + +The developers recommend all users of IPFire to upgrade their distributions. More details can be found on the official website. + +Download IPFire 2.13 Core 79: + +- [IPFire 2.15 Core 79][1] (ISO)[iso] [126 MB] +- [IPFire 3.0 Alpha 1][2] (ISO)[iso] [76 MB] + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/IPFire-2-13-Core-77-Linux-Firewall-Distro-Brings-Major-OpenVPN-Improvements-450605.shtml + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.ipfire.org/news/ipfire-2-15-core-update-79-released +[2]:http://downloads.ipfire.org/releases/ipfire-2.x/2.15-core79/ipfire-2.15.i586-full-core79.iso +[3]:http://www.rowie.at/ipfire/iso/ipfire-3.0-alpha1.i686.iso \ No newline at end of file diff --git a/sources/news/20140714 LFTP 4.5.3 File Transfer Software Is for People Who Love the Terminal.md b/sources/news/20140714 LFTP 4.5.3 File Transfer Software Is for People Who Love the Terminal.md new file mode 100644 index 0000000000..bd30878420 --- /dev/null +++ b/sources/news/20140714 LFTP 4.5.3 File Transfer Software Is for People Who Love the Terminal.md @@ -0,0 +1,28 @@ +LFTP 4.5.3 File Transfer Software Is for People Who Love the Terminal +================================================================================ +![](http://i1-news.softpedia-static.com/images/news2/LFTP-4-5-3-File-Transfer-Software-Is-for-People-Who-Love-the-Terminal-450596-2.jpg) + +**LFTP 4.5.3, a sophisticated file transfer program with a command-line interface that supports FTP, HTTP, FISH, SFTP, HTTPS, and FTPS protocols, has been released and is ready for download.** + +Every operation made with LFTP is reliable, which means that, if any non-fatal error occurs, the operation is retried automatically. The software supports numerous protocols, but it can also handle a few other tasks, such as BitTorrent downloads, SRV DNS records, job queuing, bookmarks, aliases, and many more. + +“lftp has shell-like command syntax allowing you to launch several commands in parallel in background (&). It is also possible to group commands within () and execute them in background. All background jobs are executed in the same single process. You can bring a foreground job to background with ^Z (c-z) and back with command ‘wait’ (or ‘fg’ which is alias to ‘wait’),” reads the official website. + +According to the changelog, a new setting ftp:site has been added, the http body is not uncompressed when the Contrent-Type is compressed, the source address of DHT replies is now checked, and the disconnected torrent peers are now discarded after only a timeout. + +A complete list of changes and improvements can be found in the official [announcement][1]. + +Download LFTP 4.5.3: + +- [LFTP 4.5.3 tar.xz][2][sources] [1.40 MB] + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/LFTP-4-5-3-File-Transfer-Software-Is-for-People-Who-Love-the-Terminal-450596.shtml + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://lftp.yar.ru/news.html +[2]:http://lftp.yar.ru/ftp/lftp-4.4.15.tar.xz \ No newline at end of file diff --git a/sources/talk/20140607 Four Awesome Free Alternatives to Ubuntu One Cloud Storage.md b/sources/talk/20140607 Four Awesome Free Alternatives to Ubuntu One Cloud Storage.md index 3c58c0ac03..e699df2cae 100644 --- a/sources/talk/20140607 Four Awesome Free Alternatives to Ubuntu One Cloud Storage.md +++ b/sources/talk/20140607 Four Awesome Free Alternatives to Ubuntu One Cloud Storage.md @@ -1,4 +1,3 @@ -Translated by Ramerzhang Four Awesome Free Alternatives to Ubuntu One Cloud Storage ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/04/ass.jpg) diff --git a/sources/talk/20140607 Raspberry Pi In Schools.md b/sources/talk/20140607 Raspberry Pi In Schools.md index db9a7bb9b1..131a046d42 100644 --- a/sources/talk/20140607 Raspberry Pi In Schools.md +++ b/sources/talk/20140607 Raspberry Pi In Schools.md @@ -1,4 +1,3 @@ -zpl1025 translating Raspberry Pi In Schools ================================================================================ > Teaching the world to code is a noble goal, but how is it going to work in practice? diff --git a/sources/talk/20140609 Out in the Open--The Little-Known Open Source OS That Rules the Internet of Things.md b/sources/talk/20140609 Out in the Open--The Little-Known Open Source OS That Rules the Internet of Things.md index 22e05f9384..3f70d6cd07 100644 --- a/sources/talk/20140609 Out in the Open--The Little-Known Open Source OS That Rules the Internet of Things.md +++ b/sources/talk/20140609 Out in the Open--The Little-Known Open Source OS That Rules the Internet of Things.md @@ -1,4 +1,4 @@ -Out in the Open: The Little-Known Open Source OS That Rules the Internet of Things +Translating by toknow-gh Out in the Open: The Little-Known Open Source OS That Rules the Internet of Things ================================================================================ ![](http://www.wired.com/wp-content/uploads/2014/06/Contiki-ipv6-rpl-cooja-simulation.png) Image: Adnk/[Wikipedia][1] @@ -46,4 +46,4 @@ via: http://www.wired.com/2014/06/contiki/ [8]:http://www.wired.com/2014/01/googles-3-billion-nest-buy-finally-make-internet-things-real-us/ [9]:http://lifx.co/ [10]:http://www.tado.com/de-en/ -[11]:http://www.thingsquare.com/ \ No newline at end of file +[11]:http://www.thingsquare.com/ diff --git a/sources/talk/20140610 The Best Linux Distribution for New Users.md b/sources/talk/20140610 The Best Linux Distribution for New Users.md deleted file mode 100644 index b504580b11..0000000000 --- a/sources/talk/20140610 The Best Linux Distribution for New Users.md +++ /dev/null @@ -1,159 +0,0 @@ -linuhap翻译中 -The Best Linux Distribution for New Users -================================================================================ -This is a debate that most certainly brings out the beast in many a Linux user. The argument doesn't generally boil down to which distribution is truly best suited for new users, but which distribution is favored by those in the debate. If we set our personal preferences aside, a clearer picture can arise. But even that clarity can quickly get obscured by the needs and desires of the new users. Given that, I decided to take a different approach to finding the “best distro for new users." My criteria for best distribution must not only be easy to use, but also must appeal to a more modern design aesthetic brought about by the ever-growing thrust of the mobile interface metaphor. - -For the purposes of this examination, to be included in the short list a distribution must: - -- Be incredibly user-friendly -- Include, out of the box, all common apps -- Include some form of an app store -- Offer a modern user interface. - -Let me explain each criteria. - -### User-friendliness ### - -This is such a hotly debatable topic. But the truth of the matter is – a new user must be able to pick up a flavor of Linux and just start using it, with little to no explaining. If too much explanation must be given, then the distribution is not user friendly. I hate to be that guy, but nearly any user can sit in front of a Windows 7 or OS X desktop and start using it with almost zero coaching. That is what every Linux desktop should shoot for. - -### Common apps ### - -Users should not have to install the necessities out of the box. Period. And just what are the necessities? The list grows shorter every year. Currently, the list of must-have apps are: - -- Web browser: Either Chrome or Firefox (sorry, all other browsers need not apply) -- Email client: Thunderbird is the obvious choice -- Office Suite: LibreOffice. End of story -- Music player: Play local files and connect to streaming services (such as Spotify). - -That's the short list of apps nearly every user depends upon. - -### App store ### - -Thanks to that ever-growing dependency on mobile devices, users have grown accustomed to app stores. Linux has had these for quite some time (Synaptic being one of the oldest). Without a well thought-out app store, users will struggle with adding software in the Linux environment. This is, without a doubt, crucial. - -### Modern interface ### - -I've mentioned the mobile landscape a number of times already. Thanks to iOS and Android, users have grown fond of the modern UI. The desktop needs to follow suit and draw the attention of users with a unique, modern, yet easy-to-use interface. The old metaphor is no longer as effective in a multi-touch-friendly, mobile world. -Top three distros - -With the criteria in place, which distributions meet (or exceed) our needs? First, let's examine the top three candidates. Each of the following meets (or exceeds) the criteria. - -#### Ubuntu #### - -[Ubuntu Linux][1] has long reigned the king of user-friendly Linux. Out of the box, it's a challenge to find a desktop (Unity) that is more engaging and easy to use... even for those unfamiliar to the platform. The desktop layout, although different, is logical and intuitive. With the addition of one of the single most powerful search tools of any desktop environment, Ubuntu Unity should be considered a crowning achievement among the Linux faithful. - -#### Linux Mint #### - -If there is a distribution set to usurp the crown from the king, it is [Linux Mint][2]. Linux Mint takes a more standard approach to the desktop, but layers just enough eye candy and variation to make it stand out from the long-in-the-tooth desktop metaphor. Linux Mint is based on Ubuntu, so it does benefit from the stability and reliability found in its big brother. - -#### Linux Deepin #### - -New to the user-friendly list is [Linux Deepin][3]. This relatively new distribution hails from China and should be making some serious waves. Why? Because it takes the Linux desktop and turns it into a thing of artistic beauty; while at the same time retaining a high level of user-friendliness. When the newest iteration of this distribution is released, I expect big things. Linux Deepin takes the GNOME 3 desktop and retools it into something completely different and completely marvelous. - -### Scoring the Distros ### - -With the top contenders listed, let's compare each to our criteria and rank each. Scoring for the distributions is as such: For each criteria, the distributions are ranked first to last (first getting 1 point, last getting 3 points). In the end, all scores are totaled to determine the winner -- lowest score wins. - -#### User-friendliness #### - -This is probably the tightest of categories and hardest to judge. Each distribution is tops in user-friendliness in different ways. In the end, I'd rank the top three: - -1. Linux Mint - -2. Ubuntu Linux - -3. Linux Deepin - -Why? Mint gains a slight edge simply because it still holds to the old metaphor of start menu, task bar, and desktop icons. The margin of victory is incredibly slim though, as both Ubuntu and Linux Deepin require next to zero learning curve – even for the yet-to-be-initiated. - -#### Common apps #### - -The only reason this category is hard to judge is because each distribution includes all of the necessary applications. Although Linux Deepin currently offers Kingsoft Office (one of the finest mobile office suite solutions), the plans are to default to LibreOffice in the 2014 release. - -One of my issues with the common apps falls into that of audio players. Though I stream a lot of music (using the Spotify client), when I play music on my local drive, I always use Clementine. The default players are: - -- Ubuntu: Rhythmbox -- Linux Mint: Banshee -- Linux Deepen: DMusic. - -Of the three, Banshee (Figure 1) offers the most features, DMusic (Figure 2) offers the best interface, and (surprisingly enough) Rhythmbox (Figure 3) is, by far, the least reliable. - -![](http://www.linux.com/images/stories/41373/banshee.png) - -banshee - -![](http://www.linux.com/images/stories/41373/dmusic.png) - -dmusic - -![](http://www.linux.com/images/stories/41373/rhythmbox.png) - -rhythmbox - -So, how do they score? Like so: - -1. Linux Mint - -2. Ubuntu Linux - -3. Linux Deepin - -#### App store #### - -This category cannot go without being addressed. Why? Because the app store can easily make or break a Linux distribution for a new user. There will always be apps needed and no new user wants to jump through the hoops of learning the command line. Each distribution has their own take on the app store. - -- Ubuntu: Ubuntu Software Center -- Mint: Software Manager -- Linux Deepin: Deepin Software Center - -It should be said, that each of these tools is based on the Ubuntu Software Center. What is odd about this is that it is the Ubuntu Software Center that lands squarely on the bottom. The primary reason for this is the Ubuntu Software Center is very slow – even on an incredibly powerful machine. - -I would order the app stores as such: - -1. Linux Deepin - -2. Linux Mint - -3. Ubuntu Linux - -Each of the app stores functions in a very similar manner. The reason Linux Deepin gets the top bill is twofold: The interface is easier to navigate and the application opens far faster than either the Ubuntu Software Manager or the Mint Software Manager. - -#### Modern interface #### - -This is the category in which Linux Mint falls way, way behind. Even though it does offer a bit of eye candy and a more shallow learning curve, Linux Mint still suffers from what is, by comparison, a very outdated desktop. Even on powerful hardware (with solid graphics), Linux Mint still looks like it could very easily have been transported from the late 1990s. To that end, we must look to either Ubuntu Linux or Linux Deepin to bring us into the future. The winner is: - -1. Linux Deepin - -2. Ubuntu Linux - -3. Linux Mint - -What Linux Deepin does is use GNOME 3 to create an amalgam of GNOME and OSX that works so beautifully, you think you're dealing with a piece of interactive art. - -### The overall winner ### - -Although this is very rudimentary, the order of our best Linux distro for new users would be: - -1. Linux Mint with a collective score of 7 - -2. Linux Deepin with a collective score of 8 - -3. Ubuntu Linux with a collective score of 9 - -If you're wondering about the 'writer opinion' of this piece, know this: I have used Ubuntu Linux for years (and still do). I have recently been quoted as saying “If there's a Linux distro that will sway me from Ubuntu, it's Linux Deepin.” Although I appreciate Linux Mint for what it is, I only use it for testing purposes. With that said, Linux Mint is the clear winner, when it comes to best Linux distribution for new users. - -Here's the real truth of this matter – you can't go wrong with any of these Linux desktops. They each shine in their own right. If you're looking for a true beauty, go with Linux Deepin. If you want a combination of beauty and ease of use, go with Ubuntu Linux. If you just want simplicity and you don't care about eye candy, go with Linux Mint. No matter which way you go, it's a win-win-win scenario. - -What do you think? How would you rank the three chosen desktops? Or, would you write in a completely different Linux distribution for best in show for the new users (and why)? - --------------------------------------------------------------------------------- - -via: http://www.linux.com/news/software/applications/775873-the-best-linux-distribution-for-new-users/ - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://www.ubuntu.com/ -[2]:http://www.linuxmint.com/ -[3]:http://www.linuxdeepin.com/index.en.html diff --git a/sources/talk/20140611 HTG Explains--What is Unix and Why Does It Matter.md b/sources/talk/20140611 HTG Explains--What is Unix and Why Does It Matter.md index 5ab74993a3..e0349c280d 100644 --- a/sources/talk/20140611 HTG Explains--What is Unix and Why Does It Matter.md +++ b/sources/talk/20140611 HTG Explains--What is Unix and Why Does It Matter.md @@ -1,4 +1,4 @@ -[translating | sailing] +zpl1025 HTG Explains: What is Unix and Why Does It Matter? ================================================================================ ![](http://cdn.howtogeek.com/wp-content/uploads/2014/02/ken-thompson-and-dennis-richie-at-pdp-11.jpg) diff --git a/sources/talk/20140617 14 Apps To Boost Ubuntu.md b/sources/talk/20140617 14 Apps To Boost Ubuntu.md deleted file mode 100644 index 2b9e43d017..0000000000 --- a/sources/talk/20140617 14 Apps To Boost Ubuntu.md +++ /dev/null @@ -1,80 +0,0 @@ -14 Apps To Boost Ubuntu -================================================================================ -Making the switch to Ubuntu – or any popular Linux distribution – is more than the mere act of changing operating systems. You must also have apps that allow you to get work done. - -In this article, I'll be sharing critical applications that I rely on, and I’ll talk about how I use them in my daily activities. - -### Apps for Daily Use ### - -Generally when it comes to software on the Linux desktop, I drop app titles into one of two categories. These would be stuff I use every day, and everything else. Below are applications I find myself running each and every day. - -1) **Firefox** – Sometimes I use other browsers, but lately [Firefox][1] has been my long trusted friend. Reliable, safe and cross platform, Firefox is generally what I use for my daily browsing needs. - -In addition to accessing bookmarks and webpages, I also rely on Firefox to handle my various LAN server duties as well. Duties such as: [Plex][2], [Zoneminder][3], router/WAPs, and my file server. All of these are accessed each day using Firefox. - -2) **Parcelite** – I can't begin to function without a decent clipboard manager, and for me, you can't beat [Parcelite][4] on the GNOME desktop. Simple to use, easy to access and it's also chalked full of useful options. Parcelite options include everything from hotkeys to white space handling. There are a ton of great clipboard managers out there, but it's tough to beat what Parcelite offers. - -3) **Bittorrent Sync** – I have used various open source alternatives for file syncing that needed more development before being released. That being said [Bittorrent Synchas][5] NEVER let me down. It's easy to run and install thanks to the new GUI offering, and Bittorrent Sync allows me to transfer huge video files quickly from machine to machine without wasting time syncing stuff to the "cloud." - -I've also found it to be a fantastic way to share large files easily with others, while maintaining IP address and directory privacy along the way. Despite the numerous alternatives available, I remain firmly grounded as a Bittorrent Sync fanboy. - -4) **System Monitor** – Because TOP only goes so far, I prefer a tabbed GUI as it's much easier on my eyes. Using GNOME's [System Monitor][6], I can quickly discover a runaway process and easily kill it without ever needing to break a sweat. Unlike a terminal app like [TOP][7], I can also get a visual perspective using graphs in real-time for my CPU, memory and disk usage. Being a visual person, it's difficult to beat the bar graph showing me how much space I have. Same applies to real-time resource usage as well. - -5) **PulseAudioControl** – Each day, I tend to bounce between multiple sound devices. Sometimes I need to make one the default, but then switch from Firefox audio to another device altogether. Because I like to have as much control over my audio as possible, I've found that [PulseAudioControl][8] is an invaluable tool. - -### Everything else software ### - -In this section, I'll share apps that I use, but may not necessarily use each and every day. Many of these apps are open source, some are not, all are of great value to me personally. - -6) **Skype** – Whether it's calling into [Jupiter Broadcasting][9] to co-host a weekly podcast, or simply catching up with a business contact, [Skype][10] is how Internet video conversations happen. After testing countless alternatives, I always find myself coming back to Skype. Even though there are really awesome open source options like [Ekiga][11] or [Jitsi][12], at the end of the day Skype is where everyone is at – good luck getting people to switch. - -7) **Kdenlive** – I use two different video editors, and when it comes to banging out a heavily edited video, [Kdenlive][13] is the tool I use for picture in picture compositing and editing really large, complex videos. I've successfully managed 6 track edits in Kdenlive that have crashed in other video editors. - -8) **OpenShot** – For the most part, [OpenShot][14] is my goto video editor for most of my video editing tasks. Quick edits, and two track work goes by quickly and easily using this editor. I have also found that it offers great effects that are difficult to match elsewhere. Blender title effects and great video transitions make OpenShot a fantastic editor for my own projects. - -9) **SpiderOak** – After using countless cloud backup services over the years, I've settled on [SpiderOak][15] as my favorite. Easy to use and setup, I love the incremental options provided and how simple it is use. Just set it and forget it, then SpiderOak does all the heavy lifting. - -10) **Dropbox** – I've had a love/hate relationship with [Dropbox][16] for many years now. Despite being cross platform, which means I can access files from anywhere, I'm slowly finding my self less and less reliant on this cloud-based backup solution. Still, it does allow me to access files from any web browser even if it's not from a computer I'm normally using, which makes dropping the Dropbox habit even harder. - -11) **Writer** – I've been relying on [Writer][17] since I first used it on Windows via OpenOffice. Today, I am using Writer with LibreOffice and for my needs, it does everything I could need a word processor to do. Now it's fair to point out that some proprietary office suites might offer additional functionality not found in Writer, however 99% of what most people need is covered here with Writer. For me personally, I'll always be a LibreOffice Writer fan. - -12) **SimpleScreenRecorder** – Over the years, I've come to find myself using [SimpleScreenRecorder][18] over other alternatives as it does a nice job with multiple monitor support, plus it can even capture OpenGL applications as well. Easy to use and reliable, SimpleScreenRecorder has served me well. I recommend it to anyone who is tired of playing with other screen capturing software that only works some of the time. - -13) **SimpleScan** – When I need to scan a document, I don't want to spend a lot of time configuring a bloated program. [Simple Scan][19] is great in this capacity. Rocking the SANE scanner database, Simple Scan will work with just about any scanner or all-in-one printer/scanner you throw at it. What's also nice is that it's setup to work with the best resolution out of the box, yet you're still free to make any manual adjustments you see fit. - -14) **Baobab** (Disk Usage Analyzer) – I keep hearing how hard drive prices have come down. Be that as it may, the fact is I'm not made of money and each dollar I spend is usually part of a tight budget. This means I need to make the best use of the hard drive space I have available. To help me do this, I rely on [Baobab][20] to give me both a clear view of my available space on my hard drive, but also a clearer picture of which directories are eating away at my precious hard drive space. - -### Apps That Really Work, Regardless ### - -When it comes to applications I rely on, it's really less about their titles and licenses and more about the tasks that they allow me to accomplish. The myth that Linux doesn't really have required software is becoming a thing of the past. Most computing tasks, barring a few limited exceptions, can be done easily from the Linux desktop as I've explained above. - -Obviously there are applications that are "must haves" for you, that I might not use myself. What applications do you rely on? Hit the Comments below and share your best applications with the readers here. - --------------------------------------------------------------------------------- - -via: http://www.datamation.com/applications/14-apps-to-boost-ubuntu-1.html - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://www.mozilla.org/en-US/firefox/new/ -[2]:https://plex.tv/ -[3]:http://www.zoneminder.com/ -[4]:http://parcellite.sourceforge.net/ -[5]:http://www.bittorrent.com/sync -[6]:https://help.gnome.org/users/gnome-system-monitor/3.12/ -[7]:http://linux.about.com/od/commands/l/blcmdl1_top.htm -[8]:http://freedesktop.org/software/pulseaudio/pavucontrol/ -[9]:http://en.wikipedia.org/wiki/Jupiter_Broadcasting -[10]:http://www.skype.com/en/download-skype/skype-for-linux/ -[11]:http://ekiga.org/ -[12]:https://jitsi.org/ -[13]:http://www.kdenlive.org/ -[14]:http://www.openshot.org/ -[15]:https://spideroak.com/ -[16]:https://www.dropbox.com/ -[17]:http://www.libreoffice.org/discover/writer/ -[18]:http://www.maartenbaert.be/simplescreenrecorder/ -[19]:https://launchpad.net/simple-scan -[20]:http://www.marzocca.net/linux/baobab/baobab-getting-started.html \ No newline at end of file diff --git a/sources/talk/20140617 Does Linux Lack a Killer App.md b/sources/talk/20140617 Does Linux Lack a Killer App.md index 9f21e4c1cc..dce3b05415 100644 --- a/sources/talk/20140617 Does Linux Lack a Killer App.md +++ b/sources/talk/20140617 Does Linux Lack a Killer App.md @@ -1,3 +1,4 @@ +(翻译中 by runningwater) Does Linux Lack a Killer App? ================================================================================ ![](http://www.linuxinsider.com/images/rw302843/linux-killer-app.jpg) @@ -98,7 +99,7 @@ Linux "could be reaching critical mass, and I was only partially joking when I s via: -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) +译者:[runningwater](https://github.com/runningwater) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/sources/talk/20140618 110 Fun Open Source Games and Apps.md b/sources/talk/20140618 110 Fun Open Source Games and Apps.md index fb0a69e24f..c4a59eb1ab 100644 --- a/sources/talk/20140618 110 Fun Open Source Games and Apps.md +++ b/sources/talk/20140618 110 Fun Open Source Games and Apps.md @@ -1,3 +1,4 @@ +translating by disylee 20140701 110 Fun Open Source Games and Apps ================================================================================ Once again, we're celebrating the arrival of summer with a list of some of the best open source games available. We've updated [last year's list][1] with some new arrivals, as well as getting rid of some of the older games that are no longer under active development. You'll find arcade, board, casual, puzzle, educational, first-person shooter, music, racing, role-playing, adventure, simulator and strategy games, as a well as a few apps that aren't really games but are still a lot of fun. @@ -589,4 +590,4 @@ via: http://www.datamation.com/open-source/110-fun-open-source-games-and-apps-1. [108]:http://community.electricsheep.org/ [109]:http://lcars24.com/ [110]:http://stellarium.org/ -[111]:http://tuxpaint.org/ \ No newline at end of file +[111]:http://tuxpaint.org/ diff --git a/sources/talk/20140620 How Many Languages Do Developers Need To Know.md b/sources/talk/20140620 How Many Languages Do Developers Need To Know.md deleted file mode 100644 index a4eb9c11eb..0000000000 --- a/sources/talk/20140620 How Many Languages Do Developers Need To Know.md +++ /dev/null @@ -1,86 +0,0 @@ -How Many Languages Do Developers Need To Know? -================================================================================ -![](http://readwrite.com/files/styles/1400_0/public/fields/code%20example%20Flickr%20Ruiwen%20Chua.jpg) - -> Big companies like Apple, Facebook and Google are developing their own programming languages, forcing developers to adapt. - -At its Worldwide Developer Conference last week, Apple announced its new programming language [Swift][1]. It’s the latest in a rash of new languages developed by big tech companies, in some cases for specific use with their own platforms. - -Apple has Swift for iOS developers; [Facebook has Hack][2], a language for back-end development. Google, meanwhile, has its own entries—the would-be Javascript replacement Dart and a new general programming language called Go. - -This rash of new languages raises a number of issues for developers. Perhaps the most significant is one my colleague [Adriana Lee][3] raised after Apple's Swift announcement: - -> (How many languages are devs supposed to learn?) -> — Adriana Lee (@adra_la) [June 2, 2014][4] - -### A Computer-Language Babel ### - -There are already [hundreds of programming languages][5] in existence, and more are popping into existence all the time. Many are designed for use in a relatively narrow range of applications, and large numbers never catch on beyond small groups of coders. - -Similarly, big tech companies have been developing new languages for about as long as there have been big tech companies. The [seminal general-purpose language C][6] originated at AT&T Bell Labs in the early 1970s. Java, now the primary language for development of Android apps, was [born at Sun Microsystems][7] in the 1990s. - -What's different these days is the extent to which companies embrace new languages to further their specific business objectives—a process that also has the effect of creating a dedicated base of developers who are effectively "locked in" to a company's particular platform. That sort of dual strategy dates back at least to Sun's introduction of Java, which the company promoted as a way to challenge Microsoft's dominance on the PC desktop. (Things didn't work out the way Sun planned, although Java eventually found a home in enterprise middleware systems before Google adopted it for Android.) - -It's also clearly Apple's goal with Swift. Should it live up to the company's early hype, Swift seems likely to simplify iOS app development by filing the rough edges off Objective-C, the current lingua franca of iOS and Mac OS X developers. But it will also require those same developers to learn the ins and outs of a new language that they're unlikely to use anywhere else. - -### Why Companies Roll Their Own ### - -Which cuts against the ingrained "don’t reinvent the wheel” philosophy that animates most developers. So why don't more companies just adopt already existing languages to new uses? - -One answer is simply that companies build their own languages because they can. Designing a new language can be complex, but it's not particularly resource-intensive. What's hard is building support for it, both in terms of providing software resources (shared code libraries, APIs, compilers, documentation and so forth) and winning the hearts and minds of developers. Companies are uniquely positioned to do both. - -There's also the fact that existing languages are often difficult to shoehorn into today's complex code frameworks. Take, for instance, [Facebook's decision to create Hack][8], a superset of the [scripting language PHP][9] that's commonly used in Web development. - -Facebook's main goal with Hack—a common one these days—was to improve code reliability, in this case by enforcing data-type checking before a program is executed. Such checks ensure that a program won't, say, try to interpret an integer as a string of characters, an error that could yield unpredictable results if not caught. In Hack, those checks take place in advance so that programmers can identify such errors long before their code goes live. - -According to Julien Verlaguet, a core developer on Facebook’s Hack team, the company first looked for an an existing language that might allow for more efficient programming. But much of Facebook was already built on PHP, and the company has built up a substantial software infrastructure to support PHP and its offshoots. While it's possible to make PHP work with code written in a different language, it's not easy—nor is it fast. - -“Let’s say I try to rewrite our PHP codebase in Scala,” Verlaguet said. “It’s a well designed, beautiful language, but it’s not at all compatible with PHP. Everytime I need to call to PHP from the Scala part of the code base, I’ll lose performance speed. We would have liked to use an existing language but for us, it just wasn’t an option.” - -Instead, Facebook invented Hack, which has enough in common with PHP that it can share the company's existing infrastructure. The vast majority of the Facebook codebase has been migrated from PHP to Hack, said Verlaguet, but the company has open sourced the language in hopes that independent developers will find uses for it outside of Facebook. - -“You can still use PHP,” he said. “But we’re hoping you’ll want to use Hack.” - -### Who Holds The Power ### - -Therein lies the balance of power between companies and developers. Companies can make their languages as specific as they like. But if developers don’t want to use them, nobody is going to—outside, that is, of anyone who might harbor hopes of one day working at the company that invented the language. - -It’s not unusual for companies to make it easiest to develop in one language over another. For example, you would use Objective-C to develop iOS apps, but Java to develop Android apps. This has never been a major sticking point with developers because both Objective-C and Java are general purpose object-oriented languages. They’re useful for a number of purposes. - -Hack, Dart, Go, and Swift, however, so far have only proven useful for particular company-designated programming solutions, usually in tandem with that company’s programming environment of choice. Granted, it may be too soon to judge. Hack, for example, can be used in several back-end implementations; it’s just so new that Facebook doesn’t yet have any data that people want to use it that way. - -It’s not that developers aren’t capable of learning multiple languages. Most already do. Think of them like the Romance languages—if you know Spanish, it’ll be easier to learn French and so on than if you didn’t already know one. Likewise, if you already know Java, it’ll be easier to learn Ruby or Perl. And if you know PHP, you basically already know Hack. - -On the contrary, it’s more of a question of habit. If Java already solves your specific problems, you don’t have any incentive to learn Ruby. And if you are happy coding iOS apps in Objective-C, you’re not going to feel very tempted to pick up Swift. - -To some developers, though, ecosystem-specific languages just make life harder for everybody. Freelance designer Jack Watson-Hamblin, for instance, told me that initiatives like Apple's Swift risk overburdening programmers and fragmenting the developer community: - -> It's important for programmers to know multiple languages, but forcing them to keep up with new languages all the time doesn't make sense. If I'm making a simple cross-platform app, I don't want to have to know four languages to do it. I only want to use the single-purpose language if I really need to. - -Watson-Hamblin argues that when companies each build their own language for their own needs, it slows down overall progress both by dividing the attention of coders and by enforcing a monolithic perspective on development within that language. "When companies are in charge of a language vs. an open-source community, it's like the difference between a corporation and a start-up," he said. Communities are more flexible and adaptive by definition. - -Of course, Apple had [a lot of very good reasons to start from scratch][10] with Swift, just as Facebook did when it invented Hack. That doesn't mean it's not going to force change on developers—some of it doubtless unwelcome. - -“As new languages are invented, it gets more hegemonic,” said Verlaguet. “It can be frustrating to have to keep up. But on the other hand, you’re more likely to have a new language to fit your exact problem. Imagine the reverse—a world where programmers used the same language for everything. It’d be a language that could do everything poorly but nothing well.” - -Lead image by [Flickr user Ruiwen Chua][11], CC 2.0 - --------------------------------------------------------------------------------- - -via: http://readwrite.com/2014/06/17/apple-swift-facebook-hack-google-dart - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:https://developer.apple.com/swift/ -[2]:http://readwrite.com/2014/03/20/facebook-new-programming-language-hack -[3]:http://readwrite.com/author/adriana-lee#awesm=~oGfPbJlSrFBamJ -[4]:https://twitter.com/adra_la/statuses/473537386266112000 -[5]:http://en.wikipedia.org/wiki/List_of_programming_languages -[6]:http://en.wikipedia.org/wiki/C_(programming_language) -[7]:http://en.wikipedia.org/wiki/Java_(programming_language) -[8]:http://readwrite.com/2014/03/20/facebook-new-programming-language-hack -[9]:http://en.wikipedia.org/wiki/PHP -[10]:http://blog.erratasec.com/2014/06/why-it-had-to-be-swift.html#.U58BJI1dXtA -[11]:https://www.flickr.com/photos/ruiwen/3260095534 \ No newline at end of file diff --git a/sources/talk/20140623 9 ASCII Games You'll Want to Play Again and Again.md b/sources/talk/20140623 9 ASCII Games You'll Want to Play Again and Again.md new file mode 100644 index 0000000000..cc1cf60b2b --- /dev/null +++ b/sources/talk/20140623 9 ASCII Games You'll Want to Play Again and Again.md @@ -0,0 +1,190 @@ +9 ASCII Games You'll Want to Play Again and Again +================================================================================ +Modern Graphics Processing Units (GPUs) offer exceptional gaming capabilities, and have contributed to the trend of astonishing leaps in graphics fidelity. There is not a year that has gone by without a game being released that makes significant advances in technical graphics wizardry. Computer graphics have been advancing at a staggering pace. At the current rate of progress, in the next 10 years it may not be possible to distinguish computer graphics from reality. + +Personally, these developments do not overly interest me. I find little fascination playing games that focus so much on the visuals they neglect the essential elements. Too often the storyline and game play has been compromised for visual quality. Most of my favourite games are somewhat deficient in the graphics department. Gameplay is always king in my eyes. + +Linux has an excellent library of free games many of which are released under an open source license. The vast majority of these games are aesthetically pleasing. Popular games often have full motion video, vector graphics, 3D graphics, realistic 3D rendering, animation, texturing, a physics engine, and much more. Early computer games did not have these graphic techniques. The earliest video games were text games or text-based games that used text characters rather than vector or bitmapped graphics. + +Text-based games often receive little coverage in the Linux press. However, there are some real ASCII gems out there waiting to be explored which are immensely addictive and great fun to play. + +The idiom 'don't judge a book by its cover' can be extended to 'don't judge a computer game by its graphics'. Whilst the games featured in this article have extremely basic graphics, they have many redeeming qualities beyond evoking fond memories of the early days of computer gaming. + +There are no fancy graphics here, just great gameplay coupled with the urge of always having just one more play. + +![](http://www.linuxlinks.com/portal/content2/png/UnNetHack.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-UnNetHack.png) + +The first game in this roundup is UnNetHack, a fork of NetHack, originally based on the hugely popular roguelike game NetHack. NetHack was first released in 1987, and is considered by many gamers to be one of the best gaming experiences the computing world offers. + +UnNetHack adds a number of enhancements to NetHack, such as additional monsters, more levels, a few new objects, additional dangers, more challenging gameplay, and most importantly more entertainment than vanilla NetHack. It offers a tutorial to help new players get started. + +Be warned, UnNetHack is fiendishly addictive. + +- Website: [sourceforge.net/apps/trac/unnethack][1] +- Authors: Patric Mueller +- License: Nethack General Public License +- Version Number: 5.1.0 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/VMSEmpire.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-vms-empire.png) + +Empire is a simulation of a full-scale war between two emperors, the computer and you. Naturally, there is only room for one, so the object of the game is to destroy the other. The computer plays by the same rules that you do. + +This game is the ancestor of all the multiplayer 4X simulations out there, including Civilization and Master of Orion. The classic game from the 1980s uses text mode graphical output, drawing your units, cities and the world in color. Commands are issued using the keyboard. + +The world on which the game takes place is a square rectangle containing cities, land, and water. Cities are used to build armies, planes, and ships which can move across the world destroying enemy pieces, exploring, and capturing more cities. The objective of the game is to destroy all the enemy pieces, and capture all the cities. + +The game starts by assigning you one city and the computer one city. Cities can produce new pieces. Every city that you own produces more pieces for you according to the cost of the desired piece. The typical play of the game is to issue the Automove command until you decide to do something special. During movement in each round, the player is prompted to move each piece that does not otherwise have an assigned function. + +- Website: [www.catb.org/~esr/vms-empire][2] +- Authors: Chuck Simmons, Eric S. Raymond +- License: GNU GPL v2 +- Version Number: 1.12 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/Intricacy.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Intricacy.png) + +Intricacy is an addictive, open source, networked, video puzzle game. It is written in Haskell, using the Curses and SDL libraries. + +Intricacy runs directly from the command-line, and provides a turn-based, abstract puzzle game where the players need to pick locks, simply by coordinating a couple of tools in order to manipulate the lock’s mechanism. Constructing and solving difficult puzzles within certain strict design constraints is both challenging and good fun. + +The catch is that you will be able to pick locks that are designed by other players. It has multi-platform support, with binaries for both Linux and Windows. + +- Website: [mbays.freeshell.org/intricacy][3] +- Authors: Chuck Simmons, Eric S. Raymond +- License: GNU GPL v3 +- Version Number: 0.2.6.3 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/XorCurses.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-XorCurses.png) + +XorCurses is a puzzle game set inside a series of mazes. It is a remake of XOR by Astral Software, a game published in 1987 and released on the popular home computers of the day including the Commodore 64, ZX Spectrum, Atari ST, and Amiga. XOR is a pure puzzle game with no random or arcade elements. + +In some respects, XorCurses is a regression from the graphics of the old 8 bit computers as it uses even more simplistic graphics, with coloured ASCII characters instead of pixel based graphics. + +XorCurses attempts to faithfully recreate that game for Linux, with particular attention placed on the behaviour of the objects within the original game. + +The basic premise of Xor is to roam around a series of mazes collecting all of the blue masks and then finding the exit. You have two player-shields to aid you and you can use either one at any time and switch between them. The first few levels are easy to progress, but the rest are progressively harder to solve. A particularly challenging and difficult puzzle game that will keep you engaged for hours. + +- Website: [www.jwm-art.net/dark.php?p=XorCurses][4] +- Authors: James W. Morris +- License: GNU GPL +- Version Number: 0.2.2 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/GoblinHack.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-GoblinHack.png) + +Goblin Hack is an open source roguelike OpenGL-based smooth-scrolling ASCII graphics game. The game is inspired by the likes of NetHack, but faster with fewer keys. + +Goblin Hack has a simple interface that appears to appeal to players of all ages, and fires their imagination in today's world of over-rendered games. + +Players can choose one of several classes before being thrown into the first floor of a randomized, ongoing dungeon. + +- Website: [goblinhack.sourceforge.net][5] +- Authors: Neil McGill +- License: GNU GPL v2 +- Version Number: 1.18 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/CurseofWar.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-CurseofWar.png) + +Curse of War is a fast-paced real time strategy game released under an open source license. It is implemented using C and ncurses. There is also an SDL version available. + +The core game mechanics turns out to be quite close to WWI-WWII type of warfare, however, there is no explicit reference to any historical period. + +Unlike most real time strategy games, in Curse of War players do not control units, but instead they concentrate on high-level strategic planning: Building infrastructure, securing resources, and moving armies. + +A multiplayer mode is available. Computer opponents differ in personality, and it affects the way they fight. + +- Website: [a-nikolaev.github.io/curseofwar][6] +- Authors: Alexey Nikolaev +- License: GNU GPL v3 +- Version Number: 1.2.0 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/Brogue.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Brogue.png) + +Brogue is an open source Roguelike game for Mac OS X, Windows, Linux, iOS and Android. + +Brogue is a direct descendant of Rogue, a dungeon crawling video game first developed by Michael Toy and Glenn Wichman around 1980. Unlike other popular modern roguelikes, Brogue favors simplicity over complexity, while trying to ensure that the interactions between components are interesting and varied. + +Your goal is to travel to the 26th subterranean floor of the dungeon, retrieve the Amulet of Yendor and return with it to the surface. For the truly skillful who desire further challenge, depths below 26 contain three lumenstones each, items which confer an increased score upon victory. + +Brogue is a challenging game, but still great fun to play. Try not to be disheartened by the difficulty of the game; with some application, Brogue will become very addictive. + +- Website: [sites.google.com/site/broguegame][7] +- Authors: Brian Walker +- License: GNU Affero GPL +- Version Number: 1.7.3 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/DiabloRL.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-DiabloRL.png) + +DiabloRL is a roguelike "unmake" of the popular Blizzard game Diablo 1 classic RPG to a turn-based ASCII roguelike. + +The game was created for the 7 Day Roguelike Competition, but has since been expanded with magic items, spells, more classes and levels, as well as fast travelling to known locations, and high scores. + +DiabloRL gives you a choice of classes, the Warrior, Rogue, or Sorcerer. Each of these has different starting and maximum stats, as well as completely different play styles. + +- Website: [diablo.chaosforge.org][8] +- Authors: Kornel Kisielewicz, Chris Johnson and Mel'nikova Anastasia +- License: GNU GPL +- Version Number: 0.5.0 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/CataclysmDarkDaysAhead.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Cataclysm.png) + +Cataclysm is an open source post-apocalyptic roguelike, set in the countryside of fictional New England after a devastating plague of monsters and zombies. It is a continuation of Whale's original Cataclysm, which expands it with numerous new creatures, buildings, gameplay mechanics and many other features. + +While some have described it as a "zombie game", there's far more to Cataclysm than that. Struggle to survive in a harsh, persistent, procedurally generated world. Scavenge the remnants of a dead civilization for for food, equipment, or, if you're lucky, a vehicle with a full tank of gas to get you the hell out of Dodge. Fight to defeat or escape from a wide variety of powerful monstrosities, from zombies to giant insects to killer robots and things far stranger and deadlier, and against the others like yourself, that want what you have... + +Cataclysm is very different from most roguelikes in many ways. Rather than being set in a vertical, linear dungeon, it is set in an unbounded, 3D world. This means that exploration plays a much bigger role than in most roguelikes, and the game is much less linear. As the map is so huge, it is actually completely persistant between games. If you die, and start a new character, your new game will be set in the same game world as your last. Like in many roguelikes, you will be able to loot the dead bodies of previous characters; unlike most roguelikes, you will also be able to retrace their steps completely, and any dramatic changes made to the world will persist into your next game. + +- Website: [en.cataclysmdda.com][9] +- Authors: Kevin Granade +- License: Creative Commons Attribution-ShareAlike 3.0 Unported License +- Version Number: 0.A + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20140621060017503/9ASCIIGames.html + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://sourceforge.net/apps/trac/unnethack/ +[2]:http://www.catb.org/~esr/vms-empire/ +[3]:http://mbays.freeshell.org/intricacy/ +[4]:http://www.jwm-art.net/dark.php?p=XorCurses +[5]:http://goblinhack.sourceforge.net/ +[6]:http://a-nikolaev.github.io/curseofwar/ +[7]:https://sites.google.com/site/broguegame/ +[8]:http://diablo.chaosforge.org/ +[9]:http://en.cataclysmdda.com/ \ No newline at end of file diff --git a/sources/talk/20140624 Staying free--should GCC allow non-free plug ins.md b/sources/talk/20140624 Staying free--should GCC allow non-free plug ins.md new file mode 100644 index 0000000000..d2865199fc --- /dev/null +++ b/sources/talk/20140624 Staying free--should GCC allow non-free plug ins.md @@ -0,0 +1,37 @@ +Staying free – should GCC allow non-free plug ins? +================================================================================ +> Arguments in favour of the use of non-free plug-ins in GCC have again been raised on GCC mailing-lists, but are trumped by the arguments for GCC as a vehicle for free software development + +Once again, Gcc and its lack of modularity has been raised as an issue and contrasted with LLVm, the new compiler on the block. GCC is huge and venerable: 5 million lines, 30 years, and growing. LLVM, in contrast, is relatively youthful and modular and allows free and proprietary languages to be added as modules. + +The core of LLVM is ‘open source’. GCC is copyleft and unreservedly free software and doesn’t allow plug-ins or other means to add proprietary extensions to the GCC code. The argument, as delivered by Eric Raymond, is that “FSF can no longer prevent proprietary vendors from plugging into a free compiler to improve their tools. That horse has left the barn; the strategic goal of the anti-plug-in policy has been definitively busted.” + +LLVM has been sponsored by Apple as a replacement for GCC on OS X and Apple hardware and has grown in popularity, especially among users of the BSDs. Advocates of LLVM see it as a putative replacement for GCC in the wider market for applications developers and mobile devices. The argument against GCC is that its complexity, and the commitment of its developers to copyleft licensing, constrains the possibilities for proprietary developers, who do not want to release their language or architectural specifications under a copyleft licence. Apple, of course, has a long history of antipathy to free software, and doesn’t allow applications licensed under copyleft licences to be distributed through its App Store. + +To this extent, the argument between LLVM and GCC is a retread of the historic differences between GNU/Linux and the BSDs, between ‘open source’ and free software. Open source developers allow the code to be reused in any context, free or proprietary. Free software is restrictive in that it insists that the code, and any modifications to the code, must remain free in perpetuity. Advocates of free software would argue that the integrity of copyleft licensing has been instrumental in the spread of GCC, and has taken Linux and free software into places it would not otherwise have reached, and that free software cannot be bought or corrupted by commercial or corporate interests. Open source advocates argue that open source is more free because the user has no restrictions and can do what he or she likes, including developing closed source versions of the code. + +Since the beginning, the GNU Compiler Collection (GCC) was vital to the spread of free software. Compilers were a rare and expensive commodity and the compilers of the proprietary software companies were rife with ‘features’ that were non-compliant with ANSI programming standards. Porting software between different machines and operating systems was an unnecessarily complicated task. GCC, the first truly free cross-platform compiler, commoditised this process. + +GCC was a breakthrough product for applications developers and mobile device developers – not just those who were committed to the idea of free software. Not only was GCC free and portable, its ubiquity and commonality across different architectures made it easier to port software between machines and to expect robust and consistent results – as the likes of John Gilmore, Michael Tiemann and David Henkel- Wallace were to discover when they made GCC and its development the key selling point of Cygnus Solutions, the first company to make money by selling free software. + +The primary technical difference between LLVM and GCC emerges in the separation between the modules that form the ‘front ends’, ‘middle end’ and ‘back ends’ of both GCC and LLVM. ‘Front ends’ are used to interpret the code specific to the translation of a particular language. The ‘middle end’ optimises the translated code. The ‘back ends’ take the optimised code and apply the results to a specific target architecture. LLVM separates these modules into distinct entities, but for semantic and historical reasons, GCC obfuscates the separation between the modules. + +Perhaps untypically for a free software project, it is a difficult process to add a new language or architecture to GCC and the adding of proprietary plug-ins is not allowed. There is little clear separation between the modules, and the path of least resistance is to add any feature under a free software licence. The early ports of C++ and Objective C (via Apple) are cited as examples where the original developers might have preferred to keep the code in-house and proprietary, and instead released the code as free software. + +In contrast, LLVM has allowed, or perhaps even encouraged, the addition and development of proprietary languages and architectures – one example being Nvidia’s NVCC for GPU computing, based on Clang and LLVM. The source code of NVCC is inaccessible to free software or ‘open source’ developers. + +Richard Stallman’s [take on this][1] is characteristically resolute: “In the free software movement, we campaign for the freedom of the users of computing. The values of free software are fundamentally different from the values of open source, which make‘bettercode’theultimategoal. IfGCCwere to change from a free compiler into a platform for non-free compilers, it would no longer serve the goal of freedom very well. + +“The Clang and LLVM developers reach different conclusions from ours because they do not share our values and goals. They object to the measures we have taken to defend freedom because they see the inconvenience of them and do not recognise (or don’t care about) the need for them. I would guess they describe their work as ‘open source’ and do not talk about freedom.” + +The GCC developers are unlikely to compromise on the licensing terms. While LLVM is fashionable among certain sectors of industry, because it is young and new and has been quicker to jump on developing trands in programming languages, the prevailing wind is towards greater openness, and GCC’s resolve to be incorruptible and free from commercial interests, may be the greater asset in the long term. The Unix companies learnt something from the Unix wars of the Eighties and Nineties. Languages and operating systems are tools, and are better open and shared. GCC is free software and belongs to nobody. + +-------------------------------------------------------------------------------- + +via: http://www.linuxuser.co.uk/features/staying-free-should-gcc-allow-non-free-plug-ins + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://lwn.net/articles/582241 \ No newline at end of file diff --git a/sources/talk/20140626 Joy of Programming--Fail Fast.md b/sources/talk/20140626 Joy of Programming--Fail Fast.md new file mode 100644 index 0000000000..31fe1a14fd --- /dev/null +++ b/sources/talk/20140626 Joy of Programming--Fail Fast.md @@ -0,0 +1,58 @@ +Joy of Programming: Fail Fast! +================================================================================ +![](http://www.opensourceforu.com/wp-content/uploads/2011/12/fail-350x262.jpg) + +> When a problem occurs in the software, it should fail immediately, in an easily noticeable way. This “fail fast” behaviour is desirable, and we’ll discuss this important concept in this column. + +At first, a “fail fast” might appear to be a bad practice affecting reliability — why should a system crash (or fail), when it can continue execution? For this, we need to understand that fail fast is very relevant in the context of Heisenbugs. + +Consider Bohrbugs, which always crash for a given input, for example, with a null-pointer access. These bugs are easier to test, reproduce and fix. Now, all experienced programmers would have faced situations where the bug that caused the crash just disappears when the software is restarted. No matter how much time and effort is spent to reproduce the problem, the bug eludes us. These bugs are known as Heisenbugs. + +The effort required to find, fix and test Heisenbugs is an order of magnitude more than the effort required for Bohrbugs. One strategy to avoid Heisenbugs is to turn them into Bohrbugs. How? By anticipating the possible cases in which Heisenbugs can arise, and trying to make them Bohrbugs. Yes, it is not easy, and it is also not always possible, but let us look at a specific example where it is useful. + +Concurrent programming is one paradigm where Heisenbugs are common. Our example is a concurrency-related issue in Java. While iterating over a Java collection, we are supposed to modify the collection only through the Iterator methods, such as the remove() method. During iteration, if another thread attempts to modify that underlying collection (because of a programming mistake), the underlying collection will get corrupted (i.e., result in an incorrect state). + +Such an incorrect state can lead to an eventual failure — or if we are fortunate (actually, unfortunate!), the program continues execution without crashing, but gives the wrong results. It is difficult to reproduce and fix these bugs, because such programming mistakes are non-deterministic. In other words, it is a Heisenbug. + +Fortunately, the Java Iterators try to detect such concurrent modifications, and if found, will throw a `ConcurrentModificationException`, instead of failing late — and that too, silently. In other words, the Java Iterators follow the “fail fast” approach. + +What if a `ConcurrentModificationException` is observed in production software? As the Javadoc for this exception observes, it “…should be used only to detect bugs.” In other words, `ConcurrentModificationExceptions` are supposed to be found and fixed during software development, and should not leak to production code. + +Well, if production software does get this exception, it is certainly a bug in the software, and should be reported to the developer and fixed. At least, we know that there was an attempt for concurrent modification of the underlying data structure, and that’s why the software failed (instead of getting wrong results from the software, or failing later with some other symptoms, for which it is not feasible to trace the root cause). + +The “fail-safe” approach is meant for developing robust code. A very good example of writing fail-safe code is using assertions. Unfortunately, there is a lot of unnecessary controversy surrounding the use of asserts. The main criticism is this: the checks are enabled in the development version, and disabled in release versions. + +However, this criticism is wrong: asserts are never meant to replace the defensive checks that should be put in place in the release version of the software. For example, asserts should not be used to check if the argument passed to a function is null or not. Instead, an if condition should be used to check if the argument is passed correctly, or else an exception, or a premature return, should be performed, as appropriate to the context. However, asserts can be used to do additional checks for assumptions that are made in the code, which are supposed to hold true. For example, a condition that checks that the stack is not empty after a push operation is performed on it (i.e., checking for “invariants”). + +So, fail fast, be assertive, and you’re on the way to developing more robust code. + + + +-------------------------------------------------------------------------------- + +via:http://www.opensourceforu.com/2011/12/joy-of-programming-fail-fast/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]: +[2]: +[3]: +[4]: +[5]: +[6]: +[7]: +[8]: +[9]: +[10]: +[11]: +[12]: +[13]: +[14]: +[15]: +[16]: +[17]: +[18]: +[19]: +[20]: \ No newline at end of file diff --git a/sources/talk/20140626 Linux Administration--A Smart Career Choice.md b/sources/talk/20140626 Linux Administration--A Smart Career Choice.md new file mode 100644 index 0000000000..924056cdd1 --- /dev/null +++ b/sources/talk/20140626 Linux Administration--A Smart Career Choice.md @@ -0,0 +1,41 @@ +Linux Administration: A Smart Career Choice +================================================================================ +![](http://www.opensourceforu.com/wp-content/uploads/2014/04/linux.jpeg) + +> This is a good year for IT professionals with a number of new jobs in emerging technologies like Big Data and Analytics, and Social Mobile Analytics and Cloud (SMAC) as employers look to strengthen their technological force. + +If we were to believe the reports by [Dice.com][1] and Linux foundation released in mid Feb, 2014, this year will be a high octane year for Linux professionals and aspirants particularly. Thus it only makes sense to be future-ready and find out about the details of career opportunities such as that of a Linux administrator. + +Dice.com, the leading job site for tech professionals and Linux Foundation did a comprehensive survey to find out about the advantage Linux professionals have in the current technology landscape. The findings were heavily skewed in favor of those who are looking for a good job opportunity on Linux platform. + +While seventy seven percent of hiring managers surveyed consider hiring Linux talent as one of their top priorities (up from 70 percent in 2013), 64 percent of professionals chose to work with Linux owing to its ubiquitous nature in the present day technology infrastructure. More than nine in ten recruitment manager is planning to hire a Linux professional in the next six months. This demand is surely going to translate in form of a lot of interview calls from employers. Most hiring managers also agree to the fact that it is rather difficult to find experienced professionals, and those who have the right mix of skills, knowledge, certifications and experience are being aggressively recruited. + +### Why Linux administration? ### + +The findings of this report make it clear that Linux professionals are amongst the most sought after in the current tech market. However, a more interesting finding of the report is that amongst all the skills, the hiring managers are most actively seeking system administration, with 58 percent confirming they were on look out of professionals with good system administration skills. The reason is quite simple. There aren’t too many good system administrators out there, which is also driving the salaries of system admins northwards. +Getting started in Linux administration + +Armed with all this data, it wouldn’t come as surprise if you decide right away to pursue a career in Linux administration. So, how do you become a pro Linux system admin? Well, the right mix of certification, education and experience will obviously land you the perfect Linux job, but if you are clueless about a place to start, then a degree in computers is what you should be looking at. This could be B.Tech with Computer Science or IT as specialisation or Bachelors in Computer Application or even a Bachelor in Science with IT as specialisation will do. This would actually make you familiar with the various aspects of computer science as a subject, likes of programming, hardware, and software. This understanding would come handy in the advancement of your career, when you climb the next ladder through certifications. + +### Certifications ### + +It is widely believed that IT certifications do help one in career advancement. However, it ultimately boils down to selecting the right certification to gain the maximum RoI. There are many Linux based certifications, the most famous of which is Red Hat Certification Program, which teaches general Linux related skills along with specific system administration skills. + +In addition to the vendor sponsored certifications, there is a vendor-independent Linux Professional Institute Certification offered by Linux Professional Institute, a non-profit organisation based in Toronto, Canada. + +These exams can be taken by anyone irrespective of their nationalities. The LPI programs have three level hierarchies that include LPIC-1: Junior Level Linux Administration, LPIC-2: Advanced Level Linux Administration and LPIC 3: Senior Level Linux Administration. In order to be considered seriously for any system administrator job opportunity in one must possess at least one of the above described certifications. The LPI also has partnerships with SUSE, which is the vendor for a famous enterprise operating system going by the same name. CompTIA, which is a global IT certification agency also provided a Linux+ certification which was phased out after an agreement between LPI and CompTIA. + +### Salaries and Benefits ### + +The compensations for Linux administrators are generally on the higher side. As per PayScale, the annual median salary is around INR 3 lacs for entry level professionals (as updated on 27th March, 2014). With experience, there is an exponential increase in the salary levels as individuals with 5+ years of experience getting annual packages in seven figures. +Well, with the grass being greener for Linux professionals this year, you won’t get a better opportunity or time for pursuing career as a Linux system administrator. + +-------------------------------------------------------------------------------- + +via: http://www.opensourceforu.com/2014/04/career-overview-linux-administrator/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://dice.com/ \ No newline at end of file diff --git a/sources/talk/20140701 Easy File Comparisons With These Great Free Diff Tools.md b/sources/talk/20140701 Easy File Comparisons With These Great Free Diff Tools.md new file mode 100644 index 0000000000..92dbf74103 --- /dev/null +++ b/sources/talk/20140701 Easy File Comparisons With These Great Free Diff Tools.md @@ -0,0 +1,166 @@ +Easy File Comparisons With These Great Free Diff Tools +================================================================================ +by Frazer Kline + +File comparison compares the contents of computer files, finding their common contents and their differences. The result of the comparison is often known as a diff. + +diff is also the name of a famous console based file comparison utility that outputs the differences between two files. The diff utility was developed in the early 1970s on the Unix operating system. diff will output the parts of the files where they are different. + +Linux has many good GUI tools that enable you to clearly see the difference between two files or two versions of the same file. This roundup selects 5 of my favourite GUI diff tools, with all but one released under an open source license. + +These utilities are an essential software development tool, as they visualize the differences between files or directories, merge files with differences, resolve conflicts and save output to a new file or patch, and assist file changes reviewing and comment production (e.g. approving source code changes before they get merged into a source tree). They help developers work on a file, passing it back and forth between each other. The diff tools are not only useful for showing differences in source code files; they can be used on many text-based file types as well. The visualisations make it easier to compare files. + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/Meld.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-Meld.png) + +Meld is an open source graphical diff viewer and merge application for the Gnome desktop. It supports 2 and 3-file diffs, recursive directory diffs, diffing of directories under version control (Bazaar, Codeville, CVS, Darcs, Fossil SCM, Git, Mercurial, Monotone, Subversion), as well as the ability to manually and automatically merge file differences. + +Meld's focus is on helping developers compare and merge source files, and get a visual overview of changes in their favourite version control system. + +Features include + +- Edit files in-place, and your comparison updates on-the-fly +- Perform twoand three-way diffs and merges +- Easily navigate between differences and conflicts +- Visualise global and local differences with insertions, changes and conflicts marked +- Built-in regex text filtering to ignore uninteresting differences +- Syntax highlighting (with optional gtksourceview) +- Compare two or three directories file-by-file, showing new, missing, and altered files +- Directly open file comparisons of any conflicting or differing files +- Filter out files or directories to avoid seeing spurious differences +- Auto-merge mode and actions on change blocks help make merges easier +- Simple file management is also available +- Supports many version control systems, including Git, Mercurial, Bazaar and SVN +- Launch file comparisons to check what changes were made, before you commit +- View file versioning statuses +- Simple version control actions are also available (i.e., commit/update/add/remove/delete files) +- Automatically merge two files using a common ancestor +- Mark and display the base version of all conflicting changes in the middle pane +- Visualise and merge independent modifications of the same file +- Lock down read-only merge bases to avoid mistakes +- Command line interface for easy integration with existing tools, including git mergetool +- Internationalization support +- Visualisations make it easier to compare your files + +- Website: [meldmerge.org][1] +- Developer: Kai Willadsen +- License: GNU GPL v2 +- Version Number: 1.8.5 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/DiffMerge.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-DiffMerge.png) +注:上面这个图访问不到,图的地址是原文地址的小图的链接地址,发布的时候在验证一下,如果还访问不到,不行先采用小图或者网上搜一下看有没有大图 + +DiffMerge is an application to visually compare and merge files on Linux, Windows, and OS X. + +Features include: + +- Graphically shows the changes between two files. Includes intra-line highlighting and full support for editing +- Graphically shows the changes between 3 files. Allows automatic merging (when safe to do so) and full control over editing the resulting file +- Performs a side-by-side comparison of 2 folders, showing which files are only present in one file or the other, as well as file pairs which are identical, equivalent or different +- Rulesets and options provide for customized appearance and behavior +- Unicode-based application and can import files in a wide range of character encodings +- Cross-platform tool + +- Website: [sourcegear.com/diffmerge][2] +- Developer: SourceGear LLC +- License: Licensed for use free of charge (not open source) +- Version Number: 4.2 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/xxdiff.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-xxdiff.png) + +xxdiff is an open source graphical file and directories comparator and merge tool. + +xxdiff can be used for viewing the differences between two or three files, or two directories, and can be used to produce a merged version. The texts of the two or three files are presented side by side with their differences highlighted with colors for easy identification. + +This program is an essential software development tool that can be used to visualize the differences between files or directories, merge files with differences, resolving conflicts and saving output to a new file or patch, and assist file changes reviewing and comment production (e.g. approving source code changes before they get merged into a source tree). + +Features include: + +- Compare two files, three files, or two directories (shallow and recursive) +- Horizontal diffs highlighting +- Files can be merged interactively and resulting output visualized and saved +- Features to assist in performing merge reviews/policing +- Unmerge CVS conflicts in automatically merged file and display them as two files, to help resolve conflicts +- Uses external diff program to compute differences: works with GNU diff, SGI diff and ClearCase's cleardiff, and any other diff whose output is similar to those +- Fully customizable with a resource file +- Look-and-feel similar to Rudy Wortel's/SGI xdiff, it is desktop agnostic +- Features and output that ease integration with scripts + +- Website: [furius.ca/xxdiff][3] +- Developer: Martin Blais +- License: GNU GPL +- Version Number: 4.0 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/Diffuse.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-Diffuse.png) + +Diffuse is an open source graphical tool for merging and comparing text files. Diffuse is able to compare an arbitrary number of files side-by-side and offers the ability to manually adjust line-matching and directly edit files. Diffuse can also retrieve revisions of files from bazaar, CVS, darcs, git, mercurial, monotone, Subversion and GNU Revision Control System (RCS) repositories for comparison and merging. + +Features include: + +- Compare and merge an arbitrary number of files side-by-side (n-way merges) +- Line matching can be manually corrected by the user +- Directly edit files +- Syntax highlighting +- Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS, Subversion, and SVK support +- Unicode support +- Unlimited undo +- Easy keyboard navigation + +- Website: [diffuse.sourceforge.net][] +- Developer: Derrick Moser +- License: GNU GPL v2 +- Version Number: 0.4.7 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/Kompare.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-Kompare.png) + +Kompare is an open source GUI front-end program that enables differences between source files to be viewed and merged. Kompare can be used to compare differences on files or the contents of folders. Kompare supports a variety of diff formats and provide many options to customize the information level displayed. + +Whether you are a developer comparing source code, or you just want to see the difference between that research paper draft and the final document, Kompare is a useful tool. + +Kompare is part of the KDE desktop environment. + +Features include: + +- Compare two text files +- Recursively compare directories +- View patches generated by diff +- Merge a patch into an existing directory +- Entertain you during that boring compile + +- Website: [www.caffeinated.me.uk/kompare/][5] +- Developer: The Kompare Team +- License: GNU GPL +- Version Number: Part of KDE + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/2014062814400262/FileComparisons.html + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://meldmerge.org/ +[2]:https://sourcegear.com/diffmerge/ +[3]:http://furius.ca/xxdiff/ +[4]:http://diffuse.sourceforge.net/ +[5]:http://www.caffeinated.me.uk/kompare/ \ No newline at end of file diff --git a/sources/talk/20140702 The People Who Support Linux--Hacking on Linux Since Age 16.md b/sources/talk/20140702 The People Who Support Linux--Hacking on Linux Since Age 16.md new file mode 100644 index 0000000000..e29f2e03fe --- /dev/null +++ b/sources/talk/20140702 The People Who Support Linux--Hacking on Linux Since Age 16.md @@ -0,0 +1,47 @@ +Translating by Alisa-annie +The People Who Support Linux: Hacking on Linux Since Age 16 +================================================================================ +![](http://www.linux.com/images/stories/41373/Yitao-Li.png) + +Pretty much all of the projects in software developer [Yitao Li's GitHub repository][1] were developed on his Linux machine. None of them are necessarily Linux-specific, he says, but he uses Linux for “everything.” + +For example: “coding / scripting, web browsing, web hosting, anything cloud-related, sending / receiving PGP signed emails, tweaking IP table rules, flashing OpenWrt image into routers, running one version of Linux kernel while compiling another version, doing research, doing homework (e.g., typing math equations in Tex), and many others...” Li said via email. + +Of all the projects in his repository his favorite is a school project developed in C++ with libpthread and libfuse to understand and correctly implement PAXOS-based distributed locking, key-value service, and eventually a distributed filesystem. He tested it using a number of test scripts on both single-core and multi-core machines. + +“One can learn something about distributed consensus protocol by implementing the PAXOS protocol correctly (or at least mostly correctly) such that the implementation will pass all the tests,” he said. “And of course once that is accomplished, one can also earn some bragging rights. Besides, a distributed filesystem can be useful in many other programming projects.” + +Li first started using Linux at age 16, or about 7.47 years ago, he says, using the website [linuxfromscratch.org][2], with numerous hints from the free, downloadable Linux From Scratch book. Why? + +“1. Linux is very hacker-friendly and I do not see any reason for not using it,” he writes. “2. The prefrontal cortex of the brain becoming well-developed at age 16 (?).” + +[![](http://www.linux.com/images/stories/41373/ldc_peop_linux.png)][3] + +He now works for eBay, mostly coding in Java but working sometimes with Hadoop, Pig, Zookeeper, Cassandra, MongoDB, and other software that requires a POSIX-compliant platform. He supports the Linux community by contributing to Wikipedia pages and forums on Linux-related subjects. And by becoming an individual member of The Linux Foundation. + +He keeps up with the latest Linux developments and has recently been impressed by the new "-fstack-protector-strong" option for GCC 4.9 and later. + +“It's not directly related to any of my projects, but it was important for both security and performance reasons,” he said. “It's much more efficient than "-fstack-protector-all" with little impact on security, while providing better stack-overflow protection coverage compared to that of the "-fstack-protector" option.” + +Welcome to the Linux Foundation Yitao! + +Learn more about becoming an [individual member of The Linux Foundation][3]. The foundation will donate $25 to Code.org for every new individual member who joins during June. + +---------- + +![](http://www.linux.com/community/forums/avatar/41373/catid/200-libby-clark/thumbnail/large/cache/1331753338) + +[Libby Clark][4] + +-------------------------------------------------------------------------------- + +via: http://www.linux.com/news/featured-blogs/200-libby-clark/778559-the-people-who-support-linux-hacking-on-linux-since-age-16 + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://github.com/yl790 +[2]:http://linuxfromscratch.org/ +[3]:https://www.linuxfoundation.org/about/join/individual +[4]:http://www.linux.com/community/forums/person/41373/catid/200-libby-clark diff --git a/sources/talk/The history of Android/01 - The history of Android.md b/sources/talk/The history of Android/01 - The history of Android.md new file mode 100644 index 0000000000..bbf93d8b7c --- /dev/null +++ b/sources/talk/The history of Android/01 - The history of Android.md @@ -0,0 +1,204 @@ +alim0x translating + +The history of Android +================================================================================ +> Follow the endless iterations from Android 0.5 to Android 4.4. + +![Android's home screen over the years.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/its-been-quite-a-journey1.jpg) +Android's home screen over the years. +Photo by Ron Amadeo + +Android has been with us in one form or another for more than six years. During that time, we've seen an absolutely breathtaking rate of change unlike any other development cycle that has ever existed. When it came time for Google to dive in to the smartphone wars, the company took its rapid-iteration, Web-style update cycle and applied it to an operating system, and the result has been an onslaught of continual improvement. Lately, Android has even been running on a previously unheard of six-month development cycle, and that's slower than it used to be. For the first year of Android’s commercial existence, Google was putting out a new version every two-and-a-half months. + +注:youtube视频地址开始 + + +Google's original introduction of Android, from way back in November 2007. +注:youtube视频地址结束 + +The rest of the industry, by comparison, moves at a snail's pace. Microsoft updates its desktop OS every three to five years, and Apple is on a yearly update cycle for OS X and iOS. Not every update is created equal, either. iOS has one major design revision in seven years, and the newest version of Windows Phone 8 looks very similar to Windows Phone 7. On Android, however, users are lucky if anything looks the same this year as it did last year. The Play Store, for instance, has had five major redesigns in five years. For Android, that's normal. + +Looking back, Android's existence has been a blur. It's now a historically big operating system. Almost a billion total devices have been sold, and 1.5 million devices are activated per day—but how did Google get here? With this level of scale and success, you would think there would be tons of coverage of Android’s rise from zero to hero. However, there just isn’t. Android wasn’t very popular in the early days, and until Android 4.0, screenshots could only be taken with the developer kit. These two factors mean you aren’t going to find a lot of images or information out there about the early versions of Android. + +The problem now with the lack of early coverage is that *early versions of Android are dying*. While something like Windows 1.0 will be around forever—just grab an old computer and install it—Android could be considered the first cloud-based operating system. Many features are heavily reliant on Google’s servers to function. With fewer and fewer people using old versions of Android, those servers are being shut down. And when a cloud-reliant app has its server support shut off, it will never work again—the app crashes and displays a blank screen, or it just refuses to start. + +Thanks to this “[cloud rot][1]," an Android retrospective won’t be possible in a few years. Early versions of Android will be empty, broken husks that won't function without cloud support. While it’s easy to think of this as a ways off, it's happening right now. While writing this piece, we ran into tons of apps that no longer function because the server support has been turned off. Early clients for Google Maps and the Android Market, for instance, are no longer able to communicate with Google. They either throw an error message and crash or display blank screens. Some apps even worked one week and died the next, because Google was actively shutting down servers during our writing! + +To prevent any more of Android's past from being lost to the annals of history, we did what needed to be done. This is 20+ versions of Android, seven devices, and lots and lots of screenshots cobbled together in one space. This is The History of Android, from the very first public builds to the newest version of KitKat. + +注:下面一块为文章链接列表,发布后可以改为发布后的地址 +---------- + +### Table of Contents ### + +- [Android 0.5 Milestone 3—the first public build][10] +- [Android 0.5 Milestone 5—the land of scrapped interfaces][11] +- [Android 0.9 Beta—hey, this looks familiar!][12] +- [Android 1.0—introducing Google Apps and actual hardware][13] +- [Android 1.1—the first truly incremental update][14] +- [Android 1.5 Cupcake—a virtual keyboard opens up device design][15] +- ----[Google Maps is the first built-in app to hit the Android Market][16] +- [Android 1.6 Donut—CDMA support brings Android to any carrier][17] +- [Android 2.0 Éclair‎—blowing up the GPS industry][18] +- [The Nexus One—enter the Google Phone][19] +- [Android 2.1—the discovery (and abuse) of animations][20] +- ----[Android 2.1, update 1—the beginning of an endless war][21] +- [Android 2.2 Froyo—faster and Flash-ier][22] +- ----[Voice Actions—a supercomputer in your pocket][23] +- [Android 2.3 Gingerbread—the first major UI overhaul][24] +- [Android 3.0 Honeycomb—tablets and a design renaissance][25] +- ----[Google Music Beta—cloud storage in lieu of a content store][26] +- [Android 4.0 Ice Cream Sandwich—the modern era][27] +- ----[Google Play and the return of direct-to-consumer device sales][28] +- [Android 4.1 Jelly Bean—Google Now points toward the future][29] +- ----[Google Play Services—fragmentation and making OS versions (nearly) obsolete][30] +- [Android 4.2 Jelly Bean—new Nexus devices, new tablet interface][31] +- ----[Out-of-cycle updates—who needs a new OS?][32] +- [Android 4.3 Jelly Bean—getting wearable support out early][33] +- [Android 4.4 KitKat—more polish; less memory usage][34] +- [Today Android everywhere][35] + +---------- + +### Android 0.5, Milestone 3—the first public build ### + +Before we go diving into Android on real hardware, we're going to start with the early, early days of Android. While 1.0 was the first version to ship on hardware, there were several beta versions only released in emulator form with the SDK. The emulators were meant for development purposes only, so they don’t include any of the Google Apps, or even many core OS apps. Still, they’re our best look into the pre-release days of Android. + +![The emulator’s default qwerty-bar layout running the Milestone 3 build.](http://cdn.arstechnica.net/wp-content/uploads/2013/11/blackberrrry.png) +The emulator’s default qwerty-bar layout running the Milestone 3 build. +Photo by Ron Amadeo + +Before whimsical candy code names and [cross-promotional deals with multinational food corporations][2], the first public release of Android was labeled "m3-rc20a"—"m3" standing for "Milestone 3." While Google may not have publicized the version number—and this build didn't even have a settings app to check—the browser user agent identifies this as "Android 0.5." + +In November 2007, two years after Google acquired Android and five months after the launch of the iPhone, [Android was announced][3], and the first emulator was released. Back then, the OS was still getting its feet under it. It was easily dismissed as "just a BlackBerry clone." The emulator used a qwerty-bar skin with a 320x240 display, replicating an [actual prototype device][4]. The device was built by HTC, and it seems to be the device that was codenamed "Sooner" according to many early Android accounts. But the Sooner was never released to market. + +[According to accounts][5] of the early development days of Android, when Apple finally showed off its revolutionary smartphone in January 2007, Google had to "start over" with Android—including scrapping the Sooner. Considering the Milestone 3 emulator came out almost a year after Apple's iPhone unveiling, it's surprising to see the device interface still closely mimicked the Blackberry model instead. While work had no doubt been done on the underlying system during that year of post-iPhone development, the emulator still launched with what was perceived as an "old school" interface. It didn't make a good first impression. + +At this early stage, it seems like the Android button layout had not been finalized yet. While the first commercial Android devices would use “Home," “Back," “Menu," and “Search" as the standard set of buttons, the emulator had a blank space marked as an "X" where you would expect the search button to be. The “Sooner" hardware prototype was even stranger—it had a star symbol as the fourth button. + +![From left to right: the home screen, an open notification, and the “apps" folder.](http://cdn.arstechnica.net/wp-content/uploads/2013/11/noti3.png) +From left to right: the home screen, an open notification, and the “apps" folder. +Photo by Ron Amadeo + +There was no configurable home screen or widgets, just a simple dock of icons at the bottom that could be cycled through or tapped on. While touch screen support worked for some features, Milestone 3 was primarily controlled with a five-way d-pad—an anachronism that Android still supports to this day. Even this early version of Android could do animations. Icons would grow and shrink as they entered and exited the dock’s center window. + +There was no notification panel yet, either. Notification icons showed up in the status bar (shown above as a smiley face), and the only way to open them was to press "up" on the d-pad while on the home screen. You couldn't tap on the icon to open it, nor could you access notifications from any screen other than home. When a notification was opened, the status bar expanded slightly, and the text of the notification appeared in a speech bubble. Once you had a notification, there was no manual way to clear it—apps were responsible for clearing their own notifications. + +App drawer duties were handled by a simple "Applications" folder on the left of the dock. Despite having a significant amount of functions, the Milestone 3 emulator was not very forthcoming with app icons. "Browser," "Contacts," and "Maps" were the only real apps here. Oddly, "recent calls" was elevated to a standalone icon. Because this was just an emulator, icons for core smartphone functionality were missing, like alarm, calendar, dialer, calculator, camera, gallery, and settings. Hardware prototypes demoed to the press had [many of these][6], and there was a suite of Google Apps up and running by this point. Sadly, there’s no way for us to look at them. They’re so old they can't connect to Google’s servers now anyway. + +![Milestone 3's menu system in the browser, the wallpaper interface, and the volume control.](http://cdn.arstechnica.net/wp-content/uploads/2013/11/menu.png) +Milestone 3's menu system in the browser, the wallpaper interface, and the volume control. +Photo by Ron Amadeo + +The now-deprecated menu system was up and running in Milestone 3. Hitting the hardware menu button brought up a gray list with a blue gradient highlight, complete with hardware keyboard shortcuts. In the screenshot above, you can see the menu open in the browser. Going to a second level, like the zoom menu, turned the first level of the menu oddly transparent. + +Surprisingly, multitasking and background applications already worked in Milestone 3. Leaving an app didn't close it—apps would save state, even down to text left in a text box. This was a feature iOS wouldn’t get around to matching until the release of iOS 4 in 2010, and it really showed the difference between the two platforms. iOS was originally meant to be a closed platform with no third-party apps, so the platform robustness wasn’t a huge focus. Android was built from the ground up to be a powerful app platform, and ease of app development was one of the driving forces behind its creation. + +Before Android, Google was already making moves into mobile with [WAP sites][7] and [J2ME flip phone apps][8], which made it acutely aware of how difficult mobile development was. According to [The Atlantic][9], Larry Page once said of the company’s mobile efforts “We had a closet full of over 100 phones, and we were building our software pretty much one device at a time.” Developers often complain about Android fragmentation now, but the problem was much, much worse before the OS came along. + +Google’s platform strategy eventually won out, and iOS ended up slowly adding many of these app-centric features—multitasking, cross-app sharing, and an app switcher—later on. + +![The dialer screen that pops up when you press numbers on the home screen, an incoming call, and the call conferencing interface.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/call10000.png) +The dialer screen that pops up when you press numbers on the home screen, an incoming call, and the call conferencing interface. +Photo by Ron Amadeo + +Despite not having a dialer icon, Milestone 3 emulator was equipped with a way to make phone calls. Pressing anything on the keyboard would bring up the screen on the left, which was a hybrid dialer/contact search. Entering only numbers and hitting the green phone hardware button would start a phone call, and letters would search contacts. Contacts were not searchable by number, however. Even a direct hit on a phone number would not bring up a contact. + +Incoming calls were displayed as an almost-full-screen popup with a sweet transparent background. Once inside a call, the background became dark gray, and Milestone 3 presented the user with a surprisingly advanced feature set: mute, speakerphone, hold, and call conferencing buttons. Multiple calls were presented as overlapping, semi-transparent cards, and users had options to swap or merge calls. Swapping calls triggered a nice little card shuffle animation. + +![The contacts list, an individual contact, editing a contact, and the recent calls screen.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/recent100.png) +The contacts list, an individual contact, editing a contact, and the recent calls screen. +Photo by Ron Amadeo + +Contacts was a stark, black and blue list of names. Contact cards had a spot for a contact picture but couldn't assign one to the space (at least in the emulator). The only frill in this area was XMPP presence dots to the left of each name in Contacts. An always-on XMPP connection has traditionally been at the heart of Android, and that deep integration already started in Milestone 3. Android used XMPP to power a 24/7 connection to Google’s servers, powering Google Talk, cloud-to-device push messaging, and app install and uninstall messages. + +![The browser’s fake Google homepage, the address bar, and the history interface.](http://cdn.arstechnica.net/wp-content/uploads/2013/11/browser3.png) +The browser’s fake Google homepage, the address bar, and the history interface. +Photo by Ron Amadeo + +The browser ran Webkit 419.3, which put it in the same era as Mac OS X 10.4's Safari 2. The homepage was not Google.com, but a hard-coded home.html file included with Android. It looked like Google.com from a thousand years ago. The browser's OS X heritage was still visible, rendering browser buttons with a glossy, Aqua-style search button. + +The tiny BlackBerry-style screen necessitated a separate address bar, which was brought up by a "go to" option in the browser's menu. While autocomplete didn't work, the address bar live searched your history as you typed. The picture on the right was the History display, which used thumbnails to display each site. The current thumbnail was in front of the other two, and scrolling through them triggered a swooping animation. But at this early stage, the browser didn’t support multiple tabs or windows—you had the current website, and that was it. + +![A video-screengrab-derived Google Maps Photoshop, the directions interface, and the gallery test view.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/maps.png) +A video-screengrab-derived Google Maps Photoshop, the directions interface, and the gallery test view. +Photo by Ron Amadeo + +From the beginning, Google knew maps would be important on mobile, even shipping a Maps client on the Milestone 5 emulator. That version of Google Maps was the first thing we came across that died from cloud rot. The client can't load information from Google’s servers, so the map displayed as a blank, gray grid. Nothing works. + +Luckily, for the first screenshot above, we were able to piece together an accurate representation from the Android launch video. Old Google Maps seemed fully prepared for a non-touch device, listing hardware key shortcuts along the bottom of the screen. It’s unclear if places worked, or if Maps only ran on addresses at this point. + +Hidden behind the menu were options for search, directions, and satellite and traffic layers. The middle screenshot is of the directions UI, where you could even pick a contact address as a start or end address. Maps lacked any kind of GPS integration, however; you can't find a "my location" button anywhere. + +While there was no proper gallery, on the right is a test view for a gallery, which was hidden in the "API Demos" app. The pictures scrolled left and right, but there was no way to open photos to a full screen view. There were no photo management options either. It was essentially a test of a scrolling picture view. + +![The time picker and calendar, with ridiculous kerning issues, and the vertical list test, featuring Ars.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/datetimeshoutout.png) +The time picker and calendar, with ridiculous kerning issues, and the vertical list test, featuring Ars. +Photo by Ron Amadeo + +There was also no settings app, but we can look at the original time and date pickers, thanks to the API Demos. This demonstrates how raw a lot of Android was: kerning issues all over the place, a huge gap in between the minute digits, and unevenly spaced days of the week on the calendar. While the time picker let you change each digit independently, there was no way to change months or years other than moving the day block out of the current month and on to the next or previous month. + +Keep in mind that while this may seem like dinosaur remnants from some forgotten era, this was only released six years ago. We tend to get used to the pace of technology. It's easy to look back on stuff like this and think that it was from 20 years ago. Compare this late-2007 timeframe to desktop OSes, and Microsoft was trying to sell Windows Vista to the world for almost a year, and Apple just released OS X 10.5 Leopard. + +One last Milestone 3 detail: Google gave Ars Technica a shoutout in the Milestone 3 emulator. Opening the “API Demos" app and going to "Views," "Focus," then "Vertical" revealed a test list headlined by *this very Website*. + +![The new emulator skin that comes with Milestone 3, RC37a, which uses a more modern, all-touchscreen style.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/bigscreen.png) +The new emulator skin that comes with Milestone 3, RC37a, which uses a more modern, all-touchscreen style. + +Photo by Ron Amadeo + +Two months later, in December 2007, Google released an update for the Milestone 3 emulator that came with a much roomier 480×320 device configuration. This was tagged "m3-rc37a." The software was still identical to the BlackBerry build, just with much more screen real estate available. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://arstechnica.com/gadgets/2014/06/how-we-found-and-installed-every-version-of-android/ +[2]:http://arstechnica.com/gadgets/2013/09/official-the-next-edition-of-android-is-kitkat-version-4-4/ +[3]:http://arstechnica.com/gadgets/2007/11/its-official-google-announces-open-source-mobile-phone-os-android/ +[4]:http://www.zdnet.com/blog/mobile-gadgeteer/mwc08-hands-on-with-a-working-google-android-device/860 +[5]:http://www.theatlantic.com/technology/archive/2013/12/the-day-google-had-to-start-over-on-android/282479/ +[6]:http://www.letsgomobile.org/en/2974/google-android/ +[7]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/%E2%80%9D +[8]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/%E2%80%9D +[9]:http://www.theatlantic.com/technology/archive/2013/12/the-day-google-had-to-start-over-on-android/282479/ +[10]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/1/#milestone3 +[11]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/2/#milestone5 +[12]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/3/#0.9 +[13]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/6/#1.0 +[14]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/7/#1.1 +[15]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/8/#cupcake +[16]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/9/#Mapsmarket +[17]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/9/#donut +[18]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/10/#2.0eclair +[19]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/11/#nexusone +[20]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/12/#2.1eclair +[21]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/13/#alloutwar +[22]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/13/#froyo +[23]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/14/#voiceactions +[24]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/14/#gingerbread +[25]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/16/#honeycomb +[26]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/19/#music +[27]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/19/#ics +[28]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/21/#googleplay +[29]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/21/#4.1jellybean +[30]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/21/#playservices +[31]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/22/#4.2jellybean +[32]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/23/#outofcycle +[33]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/24/#4.3jellybean +[34]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/25/#kitkat +[35]:http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/26/#conclusion +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo diff --git a/sources/talk/The history of Android/02 - The history of Android.md b/sources/talk/The history of Android/02 - The history of Android.md new file mode 100644 index 0000000000..ca8a81bf23 --- /dev/null +++ b/sources/talk/The history of Android/02 - The history of Android.md @@ -0,0 +1,78 @@ +The history of Android +================================================================================ +![Left: the Milestone 5 home screen showing the “all" button, two dock icons, and four recent apps. Center: the home screen with the app list open. Right: the power menu.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/homescree052n.jpg) +Left: the Milestone 5 home screen showing the “all" button, two dock icons, and four recent apps. Center: the home screen with the app list open. Right: the power menu. +Photo by Ron Amadeo + +### Android 0.5, Milestone 5—the land of scrapped interfaces ### + +The first major Android change came three months after the first emulator release: the "m5-rc14" build. Released in February 2008, “Milestone 5" dumped the stretched-out BlackBerry interface and went with a totally revamped design—Google's first attempt at a finger-friendly interface. + +This build was still identified as "Android 0.5" in the browser user agent string, but Milestone 5 couldn't be more different from the first release of Android. Several core Android features can directly trace their lineage back to this version. The layout and functionality of the notification panel was almost ready to ship, and, other than a style change, the menu was present in its final form, too. Android 1.0 was only eight months away from shipping, and the basics of an OS were starting to form. + +One thing that was definitely not in its final form was the home screen. It was an unconfigurable, single-screen wallpaper with an app drawer and dock. App icons were bubbly, three-color affairs, surrounded by a square, white background with rounded corners. The app drawer consisted of an "All" button in the lower-right corner, and tapping on it expanded the list of apps out to the left. Above the "All" button was a two icon dock where "Contacts" and "Dialer" were given permanent home screen real estate. The four blocks above that were an early version of Recent Apps, showing the last apps accessed. With no left or right screens and a whole column taken up by the dock and recent apps, this layout only allowed for 21 app squares before the screen would be filled. The emulator still only sported the bare-minimum app selection, but in an actual device, this design didn't appear like it would work well. + +Holding down the "end call" button brought up a super early version of the power menu, which you can see in the rightmost picture. Google didn't have the normal smartphone nomenclature down yet: "Turn Off Screen" would best be described as "Lock screen" (although there was no lock screen) and "Turn Off Radio" would be called "Airplane mode" today. + +![From left to right: the surprisingly modern notification panel, the menu open in Google Maps (Maps doesn't work anymore), and the new finger-friendly list view.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/noti2.png) +From left to right: the surprisingly modern notification panel, the menu open in Google Maps (Maps doesn't work anymore), and the new finger-friendly list view. +Photo by Ron Amadeo + +All the way back in Milestone 5, Google had the basics of the notification panel nailed down. It pulled down from the top of the screen just like it does on any modern smartphone. Current notifications displayed in a list. The first version of the notification panel was an opaque white sheet with a ribbed “handle" on the bottom and an orange dot in the center. Notifications were pressable, opening the appropriate app for that notification. No one bothered to vertically align the app icons in this list, but that's OK. This was gone in the next update. + +Sticky notifications went into an "ongoing" section at the top of the panel. In this build, that seemed to only include phone calls. The "Latest Event" notifications were clearable only after opening the appropriate app. Users surprisingly managed to sign in to Google Talk over the built-in XMPP connection. But while the notification panel displayed "new chat message," there wasn't actually an instant messaging app. + +The artwork in Milestone 5 was all new. The app icons were redrawn, and the menu switched from a boring BlackBerry-style text list to full-color, cartoony icons on a large grid. The notification panel icons switched from simple, sharp, white icons to a bubbly green design. There was now a strange black line under the signal bar indicator with no apparent purpose. The tiny list view from earlier builds really wasn't usable with a finger, so Milestone 5 came with an overall beefier layout. + +![The dialer, recent calls, and an incoming call.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/phonestuff.png) +The dialer, recent calls, and an incoming call. +Photo by Ron Amadeo + +M5 was the first build to have a dialer, albeit a fairly ugly one. Numbers were displayed in a gradient-filled bar containing a bizarre speech-bubble-styled backspace button that looked like it was recycled from some other interface. Alignment issues were everywhere. The numbers on the buttons weren't vertically aligned correctly, and the “X" in the backspace button wasn’t aligned with the speech bubble. You couldn't even start a call from the dialer—with no on-screen “dial" button, a hardware button was mandatory. + +Milestone 5 had a few tabbed interfaces, all of which demonstrated an extremely odd idea of how tabs should work. The active tab was white, and the background tabs were black with a tiny strip of white at the bottom. Were background tabs supposed to "shrink" downward? There was no animation when switching tabs. It wasn't clear what the design tried to communicate. + +Recent Calls, shown in the second picture, was downgraded from a top-tier app to a tab on the dialer. It ditched the crazy crosshair UI from earlier builds and, thanks to the chunkier list view, now displayed all the necessary information in a normal list. + +Unlike the dialer, the incoming call screen had on-screen buttons for answering and ending a call. Bizarrely, the incoming call screen was stuck to the bottom of the display, rather than the top or center. It was possibly left over from the old 4:3 BlackBerry screens. + +![An active call, the disabled touchscreen error message, and the call screen with a second call on hold.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/callsstuff.png) +An active call, the disabled touchscreen error message, and the call screen with a second call on hold. +Photo by Ron Amadeo + +The in-call interface looked normal but made zero sense in practice. Today, to stop your face from pressing buttons while on a call, phones have proximity sensors that turn the screen off when the sensor detects something. Milestone 5 didn’t support proximity sensors, though. Google’s haphazard solution was to disable the entire touch screen during a call. At the same time, the in-call screen was clearly overhauled for touch. There were big, finger-friendly buttons; *you just couldn't touch anything*. + +M5 featured a few regressions here from the old Milestone 3 build. Many decent-looking icons from the old interface were replaced with text. Buttons like "mute" no longer offered on-screen feedback that they were active. Merging calls was cut completely. + +![The browser’s primary menu, the browser’s secondary menu, the crazy zoom control, and the window interface.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/browser4.png) +The browser’s primary menu, the browser’s secondary menu, the crazy zoom control, and the window interface. +Photo by Ron Amadeo + +The browser menu got the usual touch overhaul, and for the first time a "more" button appeared. It functioned as an [extra menu for your menu][1]. Rather than turning the 3x2 grid into a 3x4 grid, Milestone 5 (and many successive versions of Android) used a long, scrolling list for the additional options. Pinch zoom wasn't supported (supposedly a [concession to Apple][2]), so Android went with the ridiculous looking zoom control in the third picture above. Rather than something sensible like a horizontal, bottom-aligned zoom control, Google stuck it smack in the middle of the screen. The last picture shows the Browser’s "window" interface, which allowed you to open multiple webpages and semi-easily switch between them. + +![Google Maps’ layers section screen, search interface, and directions screen.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/amps.png) +Google Maps’ layers section screen, search interface, and directions screen. +Photo by Ron Amadeo + +Google Maps still didn't work, but the little UI we accessed saw significant updates. You could pick map layers, although there were only two to choose from: Satellite and Traffic. The top-aligned search interface strangely hid the status bar, while the bottom-aligned directions didn't hide the status bar. Direction's enter button was labeled with "Go," and Search's enter button was labeled with a weird curvy arrow. The list goes on and demonstrates old school Android at its worst: two functions in the same app that should look and work similarly, but these were implemented as complete opposites. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/2/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://i.imgur.com/GIYGTnb.jpg +[2]:http://www.businessinsider.com/steve-jobs-on-android-founder-andy-rubin-big-arrogant-f-2013-11 +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/03 - The history of Android.md b/sources/talk/The history of Android/03 - The history of Android.md new file mode 100644 index 0000000000..9e09fc8503 --- /dev/null +++ b/sources/talk/The history of Android/03 - The history of Android.md @@ -0,0 +1,64 @@ +The history of Android +================================================================================ +![From left to right: Android 0.9’s home screen, add drawer, and shortcut deletion interfaces.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/09hom2e.png) +From left to right: Android 0.9’s home screen, add drawer, and shortcut deletion interfaces. +Photo by Ron Amadeo + +### Android 0.9, Beta—hey, this looks familiar! ### + +Six months after Milestone 5, in August 2008, [Android 0.9 was released][1]. While the Android 0.5 milestone builds were "early looks," by now 1.0 was only two months away. Thus, Android 0.9 was labeled "beta." On the other side of the aisle, Apple already released its second version of the iPhone—the iPhone 3G—a month prior. The second-gen iPhone brought a second-gen iPhone OS. Apple also launched the App Store and was already taking app submissions. Google had a lot of catching up to do. + +Google threw out a lot of the UI introduced in Milestone 5. All the artwork was redone again in full-color, and the white square icon backgrounds were tossed. While still an emulator build, 0.9 offered something that looked familiar when compared to a released version of Android. Android 0.9 had a working desktop-style home screen, a proper app drawer, multiple home screens, a lot more apps, and fully functional (first-party only) widgets. + +Milestone 5 seemingly had no plan for someone installing more than 21 apps, but Android 0.9 had a vertically scrolling app drawer accessible via a gray tab at the bottom of the screen. Back then, the app drawer was actually a drawer. Besides acting as a button, the gray tab could be pulled up the screen and would follow your finger, just like how the notification panel can be pulled down. There were additional apps like Alarm Clock, Calculator, Music, Pictures, Messaging, and Camera. + +This was the first build with a fully customizable home screen. Long pressing on an app or widget allowed you to drag it around. You could drag an app out of the app drawer and make a home screen shortcut or long press on an existing home screen shortcut to move it. + +0.9 is a reminder that Google was not the design powerhouse it is today. In fact, some of the design work for Android was farmed out to other companies at the time. You can see one sign of this in the clock widget, which contains the text “MALMO," the home town of design firm [The Astonishing Tribe][2]. + +![The “Add to Home" dialog in Android 0.9.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/widgets.png) +The “Add to Home" dialog in Android 0.9. +Photo by Ron Amadeo + +There were only three widgets: Clock, Picture frame, and Search. The Search widget didn't even have a proper icon in the list—it used the Picture icon. Perhaps the most interesting item here was a "Purchased pictures" option in the wallpaper choices—a leftover from the days when purchasing ringtones on a dumbphone was a common occurrence. Google was either planning on selling wallpapers, or it was already adding a carrier at some point. The company never went through with the plan. + +![A collection of widgets, an open folder, renaming a folder, and the copy/paste menu.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/fcp.png) +A collection of widgets, an open folder, renaming a folder, and the copy/paste menu. +Photo by Ron Amadeo + +The left screen, above, shows the widgets for Google Search and pictures. Search didn't do anything other than give you a box to type in—there was no auto complete or additional UI. Typing in the box and hitting "Go" would launch the browser. The bottom row of icons revealed a few options for "shortcuts" from the long press menu, which created icons that opened an app to a certain screen. Individual contacts, browser bookmarks, and music playlists were all shortcuts that could all be added to the home screen in 0.9. + +"Folders" was an option under the shortcuts heading despite not being a shortcut to anything. Once a blank folder was created, icons could be dragged into it and rearranged. Unlike today, there was no indication of what was in a folder; it was always a plain, white, empty-looking icon. + +0.9 was also the first Android version to have OS-level copy/paste support. Long pressing on any text box would bring up a dialog allowing you to save or recall text from the clipboard. iOS didn't support copy/paste until almost two years later, so for a while, this was one of Android's big differentiators—and the source of many Internet arguments. + +![From left to right: Android 0.9’s new menu, recent apps, power options, and lock screen.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/stuff.jpg) +From left to right: Android 0.9’s new menu, recent apps, power options, and lock screen. +Photo by Ron Amadeo + +Android 0.9 was really starting to show its maturity. The home screen had a full set of menu items, including a settings option (although it didn't work yet) and a search button (because Google likes it when you search). The menu design was already in the final form that would last until Android 2.3 swapped it to black. + +Long pressing on the hardware home button brought up a 3x2 grid of recent apps, a design that would stick around until the release of Android 3.0. Recent Apps blurred the exposed background, but that was strangely applied here and not on other popups like the "Add to home" dialog or the home screen folder view. The power menu was at least included in the blurry background club, and it was redesigned with icons and more commonly accepted names for functions. The power menu icons lacked padding, though, appearing cramped and awkward. + +Android 0.9 featured a lock screen, albeit a very basic one. The black and gray lock screen had no on-screen method of unlocking—you needed to hit the hardware menu button. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/3/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://arstechnica.com/information-technology/2008/08/robotripping-hands-on-with-the-android-sdk-beta/ +[2]:http://www.tat.se/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/04 - The history of Android.md b/sources/talk/The history of Android/04 - The history of Android.md new file mode 100644 index 0000000000..d6b2090654 --- /dev/null +++ b/sources/talk/The history of Android/04 - The history of Android.md @@ -0,0 +1,75 @@ +The history of Android +================================================================================ +![Android 0.9 showing off a horizontal home screen—a feature that wouldn’t make it to later versions.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/horizontal.png) +Android 0.9 showing off a horizontal home screen—a feature that wouldn’t make it to later versions. +Photo by Ron Amadeo + +While it's hard to separate emulator and OS functionality, Android 0.9 was the first version to show off horizontal support. Surprisingly, almost everything supported horizontal mode, and 0.9 even outperforms KitKat in some respects. In KitKat, the home screen and dialer are locked to portrait mode and cannot rotate. Here, though, horizontal support wasn't a problem for either app. (Anyone know how to upgrade a Nexus 5 from KitKat to 0.9?) + +This screenshot also shows off the new volume design used in 0.9. It dumped the old bell-style control that debuted in Milestone 3. It was a massive, screen-filling interface. Eventually, the redesign in Android 4.0 made it a bit smaller, but it remained an issue. (It's extremely annoying to not be able to see a video just because you want to bump up the volume.) + +![The new notification panel, which ditched the application shortcut and added a top section.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/n09c2.png) +The new notification panel, which ditched the application shortcut and added a top section. +Photo by Ron Amadeo + +In just about every Android version, the notification panel gets tweaked, and 0.9 was no exception. The battery indicator was redrawn and changed to a darker shade of green, and the other status bar icons switched to black, white, and gray. The left area of the status bar was brilliantly repurposed to show the date when the panel was open. + +A new top section was added to the notification panel that would display the carrier name ("Android" in the case of the emulator) and a huge button labeled "Clear notifications," which allowed you to finally remove a notification without having to open it. The application button was canned and replaced with the time the notification arrived, and the "latest events" text was swapped out for a simpler "notifications." The empty parts of the panel were now gray instead of white, and the bottom gripper was redesigned. The pictures seem misaligned on the bottom, but that was because Milestone 5's notification panel had white space around the bottom of the panel. Android 0.9 goes all the way to the edge. + +![The browsers of 0.9 and 0.5, showing the new, colorless menus.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/browser4c2.png) +The browsers of 0.9 and 0.5, showing the new, colorless menus. +Photo by Ron Amadeo + +The browser now loaded an actual website for the home page instead of the locally stored faux-Google of Milestone 5. The WebKit version rose up to 525.10, but it didn't seem to render the modern Google.com search button correctly. All throughout Android 0.9, the menu art from Milestone 5 was trashed and redrawn as gray icons. The difference between these screens is pretty significant, as all the color has been sucked out. + +The "more" list-style menu grew a little taller, and it was now just a plain list with no icons. Android 0.9 gained yet another search method, this time in the browser menu. Along with the home screen widget, home screen menu button, and browser homepage, that made four search boxes. Google never hid what its prime business was, even in its OS. + +![From left to right: Android 0.9’s browser showing off the zoom controls, find-in-page interface, browser windows, and the settings.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/b4.png) +From left to right: Android 0.9’s browser showing off the zoom controls, find-in-page interface, browser windows, and the settings. +Photo by Ron Amadeo + +Android 0.9 brought tons of browser improvements. The zoom controls were thankfully reworked from the crazy vertical controls to simpler plus and minus buttons. Google made the common-sense decision of moving the controls from the center of the screen to the bottom. In these zoom controls, the Android struggle with consistency became apparent. These appeared to be the only round buttons in the OS. + +0.9's new "find in page" feature could highlight words in the page. But overall, the UI was still very rough—the text box was much taller than it should be, and the "done" button with a checkbox was a one-of-a-kind icon for this screen. "Done" was basically a "close" button, which means it should probably have been a right-aligned "X" button. + +The main OS didn't have a settings screen in this build, but the browser finally had its own settings screen. It featured desktop-style options for pop ups, javascript, privacy and cookies, saved passwords and form data. There was even Google Gears integration (remember [Google Gears?][1]). + +![The dialer and in-progress call screen with the menu open.](http://cdn.arstechnica.net/wp-content/uploads/2014/04/revisedcalls.jpg) +The dialer and in-progress call screen with the menu open. +Photo by Ron Amadeo + +Dialer and Contacts in Android 0.9 were actually the same app—the two icons just opened different tabs. Attaching contacts to the dialer like this suggested the primary purpose of a smartphone contact was still for calls, not to text, e-mail, IM, or look up an address. Eventually Google would fully embrace alternative smartphone communications and split up contacts and dialer into separate apps. + +Most of the dialer weirdness in Milestone 5 was wiped out in Android 0.9. The "minimizing" tabs were replaced with a normal set of dark/light tabs. The speech bubble backspace button was changed to a normal backspace icon and integrated into the number display. The number buttons were changed to circles despite everything else in the OS being a rounded rectangle (at least the text was vertically aligned this time). The company also fixed the unbalanced "one," "star," and "pound" keys from Milestone 5. + +Tapping on the number display in Android 0.9 would start a call. This was important, as it was a big step in getting rid of the hardware "Call" and "End" keys on Android devices. The incoming call screen, on the other hand, went in the complete opposite direction and removed the on-screen “Answer" and “Decline" buttons present in Android 0.5. Google would spend the next few versions fumbling around between needing and not needing hardware call buttons on certain screens. With Android 2.0 and the Motorola Droid, though, call buttons were finally made optional. + +All of the options for the in-call screen were hidden under the menu button. Milestone 5 didn't support a proximity sensor, so it took the brute force route of disabling the touch screen during a call. 0.9 was developed for the G1, which had a proximity sensor. Finally, Google didn't have to kill the touch sensor during a call. + +![The individual contacts screen and edit contacts screen for Android 0.9 and 0.5.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/CONTACTS.png) +The individual contacts screen and edit contacts screen for Android 0.9 and 0.5. +Photo by Ron Amadeo + +Milestone 5 had confusing labels for some contact information, like e-mail only being labeled "primary" instead of something like “primary e-mail." Android 0.9 corrected this with horizontal headers for each section. There were now action icons for each contact type on the left side, too. + +The edit contact screen was now a much busier place. There were delete buttons for every field, per-contact ringtones, an on-screen "more info" button for adding fields, a checkbox to send calls directly to voicemail, and "Save and "discard changes" buttons at the bottom of the list. Functionally, it was a big improvement over the old version, but it still looked very messy. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/4/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.tat.se/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/05 - The history of Android.md b/sources/talk/The history of Android/05 - The history of Android.md new file mode 100644 index 0000000000..6cf77007e2 --- /dev/null +++ b/sources/talk/The history of Android/05 - The history of Android.md @@ -0,0 +1,88 @@ +The history of Android +================================================================================ +![The main alarm screen, setting an alarm, the calculator, and the calculator advanced functions screen.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/calclockonpresszx.png) +The main alarm screen, setting an alarm, the calculator, and the calculator advanced functions screen. +Photo by Ron Amadeo + +Android 0.9 gave us the first look at the Alarm and Calculator apps. The alarm app featured a plain analog clock with a scrolling list of alarms on the bottom. Rather than some kind of on/off switch, alarms were set with a checkbox. Alarms could be set to repeat at certain days of the week, and there was a whole list of selectable, unique alarm sounds. + +The calculator was an all-black app with glossy, round buttons. Through the menu, it was possible to bring up an additional panel with advanced functions. Again consistency was not Google’s strong suit. The on-press highlight on the pi key was red—in the rest of Android 0.9, the on-press highlight was usually orange. In fact, everything used in the calculator was 100 percent custom artwork limited to only the calculator. + +![Google Maps with the menu open and the new directions interface.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/mps092.png) +Google Maps with the menu open and the new directions interface. +Photo by Ron Amadeo + +Google Maps actually worked in Android 0.9—the client could connect to the Google Maps server and pull down tiles. (For our images, remember that Google Maps is cloud based. Even the oldest of clients will still pull down modern map tiles, so ignore the actual map tiles pictured.) The Maps menu got the same all-gray treatment as the browser menu, and the zoom controls were the same as the browser too. The all-important "My Location" button finally arrived, meaning this version of Maps supported GPS location. + +The directions interface was revamped. The weird speech bubbles with misaligned plus buttons were swapped out for a more communicative bookmark icon, the swap field button moved to the left, and the go button was now labeled "Route." + +![The Google Maps layers selector, search history, and the now-broken street view mode.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/maps3.png) +The Google Maps layers selector, search history, and the now-broken street view mode. +Photo by Ron Amadeo + +"Layers" was renamed "Map Mode" and switched to a radio button list. Only one map type was available at a time—you couldn't see traffic on the satellite view, for instance. Buried in the menu was a hastily thrown together search history screen. History seemed like only a proof-of-concept, with giant, blurry search icons that rammed up against search terms on a transparent background. + +Street View used to be a separate app (although it was never made available to the public), but in 0.9 it was integrated into Google Maps as a Map Mode. You could drag the little pegman around, and it would display a popup bubble showing the thumbnail for Street View. Tapping on the thumbnail would launch Street View for that area. At the time, Street View showed nothing other than a scrollable 360 degree image—there was no UI on the interface at all. + +![Our first look at the Google Maps search interface. These shots show the search bar, the results in a list, the results in a map, and a business page.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/manystarbucks.png) +Our first look at the Google Maps search interface. These shots show the search bar, the results in a list, the results in a map, and a business page. +Photo by Ron Amadeo + +Android 0.9 also gave us our first look at the texting app, called "Messaging." Like many early Android designs, Messaging wasn't sure if it should be a dark app or a light app. The first visible screen was the message list, a stark black void of nothingness that looked like it was built on top of the settings interface. After tapping on “New Message" or one of the existing conversations, though, you were taken to a white and blue scrolling list of text messages. The two connected screens couldn’t be more different. + +![The SMS app’s chat window, attachment screen, chat list, and setting.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/sms09.png) +The SMS app’s chat window, attachment screen, chat list, and setting. +Photo by Ron Amadeo + +Messaging supported a range of attachments: you could tack on pictures, audio, or a slideshow to your message. Pictures and audio could be recorded on the fly or pulled from phone storage. Another odd UI choice was that Android already had an established icon for almost everything in the attach menu, but Messaging used all-custom art instead. + +Messaging was one of the first apps to have its own settings screen. Users could request read and delivery reports and set download preferences. + +![The slideshow creator. The right picture shows the menu options.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/slideshow.png) +The slideshow creator. The right picture shows the menu options. +Photo by Ron Amadeo + +The "slideshow" option in attachments would actually launch a fully featured slideshow creator. You could add pictures, choose the slide order, add music, change the duration of each slide, and add text. This was complicated enough to have its own app icon, but amazingly it was buried in the menu of the SMS app. This was one of the few Android apps that was completely unusable in portrait mode—the only way to see the picture and the controls was in landscape. Strangely, it would still rotate to portrait, but the layout just became a train wreck. + +![The Music player’s main navigation page, song list, album list, and “now playing" screen.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/music09.png) +The Music player’s main navigation page, song list, album list, and “now playing" screen. +Photo by Ron Amadeo + +Android 0.9 was the first to bring a music app to Android. The primary screen was mostly just four big, chunky navigation buttons that would take you to each music view. At the bottom of the app was a "now playing" bar that only contained the track name, artist, and a play/pause button. The song list had only a bare minimum interface, only showing the song name, artist, album and runtime. Album art was the only hope of seeing any color in this app. It was displayed as a tiny thumbnail in the album view and as a big, quarter-screen image in the Now Playing view. + +Like most parts of Android in this era, the interface may not have been much to look at, but the features were there. The Now Playing screen had a button for a playlist queue that allowed you to drag songs around, shuffle, repeat, search, and choose background audio. + +![The “Pictures" all album view, individual album view, and a single picture view.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/pictures09.png) +The “Pictures" all album view, individual album view, and a single picture view. +Photo by Ron Amadeo + +The photo gallery was simply called "Pictures." The initial view showed all your albums. The two default ones were "Camera" and a large unified album called "All pictures." The thumbnail for each album was made up of a 2x2 grid of pictures, and every picture got a thick, white frame. + +The individual album view was about what you would expect: a scrolling grid of pictures. You couldn't swipe through individual pictures—large left and right arrows flanking the individual picture had to be tapped on to move through an album. There was no pinch-zoom either; you had to zoom in and out with buttons. + +![Picture editing! These screenshots show an open menu, the “more" menu, cropping, and the settings.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/pics209.png) +Picture editing! These screenshots show an open menu, the “more" menu, cropping, and the settings. +Photo by Ron Amadeo + +"Pictures" looked simple until you hit the menu button and suddenly accessed a myriad of options. Pictures could be cropped, rotated, deleted, or set as a wallpaper or contact icon. Like the browser, all of this was accomplished through a clumsy double-menu system. But again, why do two related menus look completely different? + +Android 0.9 came out a mere two months before the first commercial release of Android. That was just enough time for app developers to make sure their apps worked—and for Google to do some testing and bug squashing before the big release. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/5/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/06 - The history of Android.md b/sources/talk/The history of Android/06 - The history of Android.md new file mode 100644 index 0000000000..72b753a658 --- /dev/null +++ b/sources/talk/The history of Android/06 - The history of Android.md @@ -0,0 +1,73 @@ +The history of Android +================================================================================ +![The T-Mobile G1](http://cdn.arstechnica.net/wp-content/uploads/2014/04/t-mobile_g1.jpg) +The T-Mobile G1 +Photo by T-Mobile + +### Android 1.0—introducing Google Apps and actual hardware ### + +By October 2008, Android 1.0 was ready for launch, and the OS debuted on the [T-Mobile G1][1] (AKA the HTC Dream). The G1 was released into a market dominated by the iPhone 3G and the [Nokia 1680 classic][2]. (Both of those phones went on to tie for the [best selling phone][3] of 2008, selling 35 million units each.) Hard numbers of G1 sales are tough to come by, but T-Mobile announced the device broke the one million units sold barrier in April 2009. It was way behind the competition by any measure. + +The G1 was packing a single-core 528Mhz ARM 11 processor, an Adreno 130 GPU, 192MB of RAM, and a whopping 256MB of storage for the OS and Apps. It had a 3.2-inch, 320x480 display, which was mounted to a sliding mechanism that revealed a full hardware keyboard. So while Android software has certainly come a long way, the hardware has, too. Today, we can get much better specs than this in a watch form factor: the latest [Samsung smart watch][4] has 512MB of RAM and a 1GHz dual-core processor. + +While the iPhone had a minimal amount of buttons, the G1 was the complete opposite, sporting almost every hardware control that was ever invented. It had call and end call buttons, home, back, and menu buttons, a shutter button for the camera, a volume rocker, a trackball, and, of course, about 50 keyboard buttons. Future Android devices would slowly back away from thousand-button interfaces, with nearly every new flagship lessening the number of buttons. + +But for the first time, people saw Android running on actual hardware instead of a frustratingly slow emulator. Android 1.0 didn't have the smoothness, flare, or press coverage of the iPhone. It wasn't as capable as Windows Mobile 6.5. Still, it was a good start. + +![The default app selection of Android 1.0 and 0.9.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/apps.png) +The default app selection of Android 1.0 and 0.9. +Photo by Ron Amadeo + +The core of Android 1.0 didn't look significantly different from the beta version released two months earlier, but the consumer product brought a ton more apps, including the full suite of Google apps. Calendar, Email, Gmail, IM, Market, Settings, Voice Dialer, and YouTube were all new. At the time, music was the dominant media type on smartphones, the king of which was the iTunes music store. Google didn't have an in-house music service of its own, so it tapped Amazon and bundled the Amazon MP3 store. + +The most important addition to Android 1.0 was the debut of Google's store, called "Android Market Beta." While most companies were content with calling their app catalog some variant of "app store"—meaning a store that sold apps and only apps—Google had much wider ambitions. It went with the much more general name of "Android Market." The idea was that the Android Market would not just house apps, but everything you needed for your Android device. + +![The first Android Market client. Screenshots show the main page, “my downloads," an app page, and an app permissions page.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/market.png) +The first Android Market client. Screenshots show the main page, “my downloads," an app page, and an app permissions page. +Photo by [Google][5] + +At the time, the Android Market only offered apps and games, and developers weren't even able to charge for them. Apple's App Store had a four-month head start on the Android Market, but Google's big differentiator was that Android's store was almost completely open. On the iPhone, apps were subject to review by Apple and had to meet design and technical guidelines. Potential apps also weren't allowed to duplicate the stock functionality. On the Android Market, developers were free to do whatever they wanted, including replacing the stock apps. The lack of control would turn out to be a blessing and a curse. It allowed developers to innovate on the existing functionality, but it also meant even the trashiest applications were allowed in. + +Today, this client is another app that can no longer communicate with Google's servers. Luckily, it's one of the few early Android apps [actually documented][6] on the Internet. The main screen provided links to the common areas like Apps, Games, Search, and Downloads, and the top section had horizontally scrolling icons for featured apps. Search results and the "My Downloads" page displayed apps in a scrolling list, showing the name, developers, cost (at this point, always free), and rating. Individual app pages showed a brief description, install count, comments and ratings from users, and the all-important install button. This early Android Market didn’t support pictures, and the only field for developers was a description box with a 500-character limit. This made things like maintaining a changelog very difficult, as the only spot to put it was in the description. + +Right out of the gate, the Android Market showed permissions that an app required before installing. This is something Apple wouldn't get around to implementing until 2012, after an iOS app was caught [uploading entire address books][7] to the cloud without the user's knowledge. The permissions display gave a full rundown of what permissions an app was using, although this version railroaded users into agreeing. There was an “OK" button, but no way to cancel other than the back button. + +![Gmail showing the inbox, the inbox with the menu open. ](http://cdn.arstechnica.net/wp-content/uploads/2013/12/gmail1.01.png) +Gmail showing the inbox, the inbox with the menu open. +Photo by Ron Amadeo + +The next most important app was probably Gmail. Most of the base functionality was here already. Unviewed messages showed up in bold, and labels displayed as colored tags. Individual messages in the Inbox showed the subject, author(s), and number of replies in a conversation. The trademark Gmail star was here—a quick tap would star or unstar something. As usual for early versions of Android, the Menu housed all the buttons on the main inbox view. Once inside a message, though, things got a little more modern, with "reply" and "forward" buttons as permanent fixtures at the bottom of the screen. Individual replies could be expanded and collapsed just by tapping on them. + +The rounded corners, shadows, and bubbly icons gave the whole app a "cartoonish" look, but it was a good start. Android's function-first philosophy was really coming through here: Gmail supported labels, threaded messaging, searching, and push e-mail. + +![Gmail’s label view, compose screen, and settings on Android 1.0.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/gmail3.png) +Gmail’s label view, compose screen, and settings on Android 1.0. +Photo by Ron Amadeo + +But if you thought Gmail was ugly, the Email app took it to another level. There was no separate inbox or folder view—everything was mashed into a single screen. The app presented you with a list of folders and tapping on one would expand the contents in-line. Unread messages were denoted with a green line on the left, and that was about it for the e-mail interface. The app supported IMAP and POP3 but not Exchange. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/6/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://arstechnica.com/gadgets/2008/10/android-g1-review/ +[2]:http://en.wikipedia.org/wiki/Nokia_1680_classic +[3]:http://en.wikipedia.org/wiki/List_of_best-selling_mobile_phones#2008 +[4]:http://arstechnica.com/gadgets/2014/04/review-we-wear-samsungs-galaxy-gear-and-galaxy-fit-so-you-dont-have-to/ +[5]:http://android-developers.blogspot.com/2008/08/android-market-user-driven-content.html +[6]:http://android-developers.blogspot.com/2008/08/android-market-user-driven-content.html +[7]:http://arstechnica.com/gadgets/2012/02/path-addresses-privacy-controversy-but-social-apps-remain-a-risk-to-users/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/07 - The history of Android.md b/sources/talk/The history of Android/07 - The history of Android.md new file mode 100644 index 0000000000..2be62866ad --- /dev/null +++ b/sources/talk/The history of Android/07 - The history of Android.md @@ -0,0 +1,109 @@ +The history of Android +================================================================================ +![Both screens of the Email app. The first two screenshots show the combined label/inbox view, and the last shows a message.](http://cdn.arstechnica.net/wp-content/uploads/2014/01/email2lol.png) +Both screens of the Email app. The first two screenshots show the combined label/inbox view, and the last shows a message. +Photo by Ron Amadeo + +The message view was—surprise!—white. Android's e-mail app has historically been a watered-down version of the Gmail app, and you can see that close connection here. The message and compose views were taken directly from Gmail with almost no modifications. + +![The “IM" applications. Screenshots show the short-lived provider selection screen, the friends list, and a chat.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/IM2.png) +The “IM" applications. Screenshots show the short-lived provider selection screen, the friends list, and a chat. +Photo by Ron Amadeo + +Before Google Hangouts and even before Google Talk, there was "IM"—the only instant messaging client that shipped on Android 1.0. Surprisingly, multiple IM services were supported: users could pick from AIM, Google Talk, Windows Live Messenger, and Yahoo. Remember when OS creators cared about interoperability? + +The friends list was a black background with white speech bubbles for open chats. Presence was indicated with colored circles, and a little Android on the right hand side would indicate that a person was mobile. It's amazing how much more communicative the IM app was than Google Hangouts. Green means the person is using a device they are signed into, yellow means they are signed in but idle, red means they have manually set busy and don't want to be bothered, and gray is offline. Today, Hangouts only shows when a user has the app open or closed. + +The chats interface was clearly based on the Messaging program, and the chat backgrounds were changed from white and blue to white and green. No one changed the color of the blue text entry box, though, so along with the orange highlight effect, this screen used white, green, blue, and orange. + +![YouTube on Android 1.0. The screens show the main page, the main page with the menu open, the categories screen, and the videos screen.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/yt5000.png) +YouTube on Android 1.0. The screens show the main page, the main page with the menu open, the categories screen, and the videos screen. +Photo by Ron Amadeo + +YouTube might not have been the mobile sensation it is today with the 320p screen and 3G data speeds of the G1, but Google's video service was present and accounted for on Android 1.0. The main screen looked like a tweaked version of the Android Market, with a horizontally scrolling featured section along the top and vertically scrolling categories along the bottom. Some of Google's category choices were pretty strange: what would the difference be between "Most popular" and "Most viewed?" + +In a sign that Google had no idea how big YouTube would eventually become, one of the video categories was "Most recent." Today, with [100 hours of video][1] uploaded to the site every minute, if this section actually worked it would be an unreadable blur of rapidly scrolling videos. + +The menu housed search, favorites, categories, and settings. Settings (not pictured) was the lamest screen ever, housing one option to clear the search history. Categories was equally barren, showing only a black list of text. + +The last screen shows a video, which only supported horizontal mode. The auto-hiding video controls weirdly had rewind and fast forward buttons, even though there was a seek bar. + +![YouTube’s video menu, description page, and comments.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/yt3.png) +YouTube’s video menu, description page, and comments. +Photo by Ron Amadeo + +Additional sections for each video could be brought up by hitting the menu button. Here you could favorite the video, access details, and read comments. All of these screens, like the videos, were locked to horizontal mode. + +"Share" didn't bring up a share dialog yet; it just kicked the link out to a Gmail message. Texting or IMing someone a link wasn't possible. Comments could be read, but you couldn't rate them or post your own. You couldn't rate or like a video either. + +![The camera app’s picture taking interface, menu, and photo review mode.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/camera.png) +The camera app’s picture taking interface, menu, and photo review mode. +Photo by Ron Amadeo + +Real Android on real hardware meant a functional camera app, even if there wasn't much to look at. That black square on the left was the camera interface, which should be showing a viewfinder image, but the SDK screenshot utility can't capture it. The G1 had a hardware camera button (remember those?), so there wasn't a need for an on-screen shutter button. There were no settings for exposure, white balance, or HDR—you could take a picture and that was about it. + +The menu button revealed a meager two options: a way to jump to the Pictures app and Settings screen with two options. The first settings option was whether or not to enable geotagging for pictures, and the second was for a dialog prompt after every capture, which you can see on the right. Also, you could only take pictures—there was no video support yet. + +![The Calendar’s month view, week view with the menu open, day view, and agenda.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/calviews.png) +The Calendar’s month view, week view with the menu open, day view, and agenda. +Photo by Ron Amadeo + +Like most apps of this era, the primary command interface for the calendar was the menu. It was used to switch views, add a new event, navigate to the current day, pick visible calendars, and go to the settings. The menu functioned as a catch-all for every single button. + +The month view couldn't show appointment text. Every date had a bar next to it, and appointments were displayed as green sections in the bar denoting what time of day an appointment was. Week view couldn't show text either—the 320×480 display of the G1 just wasn't dense enough—so you got a white block with a strip of color indicating which calendar it was from. The only views that provided text were the agenda and day views. You could move through dates by swiping—week and day used left and right, and month and agenda used up and down. + +![The main settings page, the Wireless section, and the bottom of the about page.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/settings.png) +The main settings page, the Wireless section, and the bottom of the about page. +Photo by Ron Amadeo + +Android 1.0 finally brought a settings screen to the party. It was a black and white wall of text that was roughly broken down into sections. Down arrows next to each list item confusingly look like they would expand line-in to show more of something, but touching anywhere on the list item would just load the next screen. All the screens were pretty boring and samey looking, but hey, it's a settings screen. + +Any option with an on/off state used a cartoony-looking checkbox. The original checkboxes in Android 1.0 were pretty strange—even when they were "unchecked," they still had a gray check mark in them. Android treated the check mark like a light bulb that would light up when on and be dim when off, but that's not how checkboxes work. We did finally get an "About" page, though. Android 1.0 ran Linux kernel 2.6.25. + +A settings screen means we can finally open the security settings and change lock screens. Android 1.0 only had two styles, the gray square lock screen pictured in the Android 0.9 section, and pattern unlock, which required you to draw a pattern over a grid of 9 dots. A swipe pattern like this was easier to remember and input than a PIN even if it did not add any more security. + +![The Voice Dialer, pattern lock screen, low battery warning, and time picker.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/grabbag.png) +The Voice Dialer, pattern lock screen, low battery warning, and time picker. +Photo by Ron Amadeo + +oice functions arrived in 1.0 with Voice Dialer. This feature hung around in various capacities in AOSP for a while, as it was a simple voice command app for calling numbers and contacts. Voice Dialer was completely unrelated to Google's future voice products, however, and it worked the same way a voice dialer on a dumbphone would work. + +As for a final note, low battery popup would occur when the battery dropped below 15 percent. It was a funny graphic, depicting plugging the wrong end of the power cord into the phone. That wasn't (and still isn't) how phones work, Google. + +Android 1.0 was a great first start, but there were still so many gaps in functionality. Physical keyboards and tons of hardware buttons were mandatory, as Android devices were still not allowed to be sold without a d-pad or trackball. Base smartphone functionality like auto-rotate wasn't here yet, either. Updates for built-in apps weren't possible through the Android Market the way they were today. All the Google Apps were interwoven with the operating system. If Google wanted to update a single app, an update for the entire operating system needed to be pushed out through the carriers. There was still a lot of work to do. + +### Android 1.1—the first truly incremental update ### + +![All of Android 1.1’s new features: Search by voice, the Android Market showing paid app support, Google Latitude, and the new “system updates" option in the settings.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/11.png) +All of Android 1.1’s new features: Search by voice, the Android Market showing paid app support, Google Latitude, and the new “system updates" option in the settings. +Photo by Ron Amadeo + +Four and a half months after Android 1.0, in February 2009, Android got its first public update in Android 1.1. Not much changed in the OS, and just about every new thing Google added with 1.1 has been shut down by now. Google Voice Search was Android's first foray into cloud-powered voice search, and it had its own icon in the app drawer. While the app can't communicate with Google's servers anymore, you can check out how it used to work [on the iPhone][2]. It wasn't yet Voice Actions, but you could speak and the results would go to a simple Google Search. + +Support for paid apps was added to the Android Market, but just like the beta client, this version of the Android Market could no longer connect to the Google Play servers. The most that we could get to work was this sorting screen, which lets you pick between displaying free apps, paid apps, or a mix of both. + +Maps added [Google Latitude][3], a way to share your location with friends. Latitude was shut down in favor of Google+ a few months ago and no longer works. There was an option for it in the Maps menu, but tapping on it just brings up a loading spinner forever. + +Given that system updates come quickly in the Android world—or at least, that was the plan before carriers and OEMs got in the way—Google also added a button to the "About Phone" screen to check for system updates. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/7/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.youtube.com/yt/press/statistics.html +[2]:http://www.youtube.com/watch?v=y3z7Tw1K17A +[3]:http://arstechnica.com/information-technology/2009/02/google-tries-location-based-social-networking-with-latitude/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/08 - The history of Android.md b/sources/talk/The history of Android/08 - The history of Android.md new file mode 100644 index 0000000000..3bd0c3a8c5 --- /dev/null +++ b/sources/talk/The history of Android/08 - The history of Android.md @@ -0,0 +1,128 @@ +The history of Android +================================================================================ +![Android 1.5’s on-screen keyboard showing the suggestion bar while typing, the capital letters keyboard, the number and symbols screen, and an additional key popup.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/kb5.png) +Android 1.5’s on-screen keyboard showing the suggestion bar while typing, the capital letters keyboard, the number and symbols screen, and an additional key popup. +Photo by Ron Amadeo + +### Android 1.5, Cupcake—a virtual keyboard opens up device design ### + +In April 2009, almost three months after the release of 1.1, Android 1.5 was released. It was the first Android version to have a public, marketed code name: Cupcake. From here on out, Android releases would have alphabetical, snack-themed names. + +The most important Cupcake addition was easily the on-screen keyboard. For the first time, it was possible for OEMs to build a slate-style Android device without a thousand hardware keyboard keys and a complicated slide mechanism. + +Android's key labels could switch between uppercase and lowercase, depending on if caps lock was on or not. While it was off by default, there was an option to turn on the suggestion bar, which appeared along the top edge of the keyboard. Keys with ellipses in the popup, like the "u," above, could be held down to input [diacritical marks][1], which would display in a popup. The keyboard could switch to numbers and alternate characters, and long pressing on the period key would bring up even more punctuation. + +![Composite images of the app lineup in 1.5 and 1.1 and the notification panels from each version.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/abweave.png) +Composite images of the app lineup in 1.5 and 1.1 and the notification panels from each version. +Photo by Ron Amadeo + +New icons were added for the new "Camcorder" functionality, and Google Talk was broken out from IM into its own separate app. The Amazon MP3 and Browser icons were redesigned, too. The Amazon MP3 icon was changed primarily because Amazon was planning on launching other Android apps soon, and the "A" icon was far too generic. The browser icon was easily the worst in Android 1.1, so it was changed and no longer resembled a desktop OS dialog box. The last app drawer change was to "Pictures," which was renamed to "Gallery." + +The notification panel was redesigned again as well. The panel background got a weave texture, and the gradients on notifications were smoothed out. Android 1.5 had a lot of little design changes to core OS pieces that affected all apps. On the "Clear notifications" button, you could see the new system-wide button style, which had a gradient, a thinner outline, and less shadowing than the old version. + +![The “Add to Home" dialog boxes in 1.5 and 1.1.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/widget.png) +The “Add to Home" dialog boxes in 1.5 and 1.1. +Photo by Ron Amadeo + +Third-party widgets were another headline feature of Cupcake, and they still remain one of Android's defining features. Developers could bundle a home screen widget along with their apps that would either control or display information from that app. Google showed off a few new widgets of its own, too, with the Calendar and Music apps. + +![Left: a screenshot of the calendar widget, music widget, and a row of live folders. Center: the folder list. Right: an open view of the “contacts with phone numbers" live folder.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/folders-and-widgets-and-stuff.png) +Left: a screenshot of the calendar widget, music widget, and a row of live folders. Center: the folder list. Right: an open view of the “contacts with phone numbers" live folder. +Photo by Ron Amadeo + +On the left screenshot, above, you can see the new Calendar and Music icons. The Calendar widget could only show a single event for the day, and tapping it would open the calendar. It wouldn't let you choose what calendars to display, and widgets weren't resizable—it only ever looked like this. The music widget was blue—despite the music app not having a drop of blue in it—and showed the song and artist name, along with play and next buttons. + +Also in the left shot, the first three folders on the bottom row were a new feature called "Live Folders." These were accessible under the new top-level "Folders" section in the "Add to Home" menu, which you can see in the center picture. Live Folders showed the content of an application without having to open that application. The ones that came with Cupcake were all contacts-related, showing all of the user's contacts, contacts with phone numbers, or starred contacts. + +Rather than icons, Live Folders used a simple list view that popped up over the home screen. Contacts were just for starters, Live Folders was a whole API that developers could use. Google demoed a folder of books from the Google Books app, and it was possible to have an RSS feed or top stories from a website as a live folder. Live folders were one of the few Android ideas that didn't work out, and the feature was shut down in Honeycomb. + +![The camcorder and camera UI, with on-screen shutter buttons.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/device-2013-12-26-11016071.png) +The camcorder and camera UI, with on-screen shutter buttons. +Photo by Ron Amadeo + +If you couldn't tell from the new "Camcorder" icon, video recording was added to Android in 1.5. The two icons, camera and camcorder, were actually the same app, and you could jump between the two of them with an option in the menu labeled "Switch to camera" and "Switch to camcorder." Video quality on the T-Mobile G1 was not that great. A test video on "High" quality output; a .3GP video file with a resolution of 352 x 288 and a lagtastic frame rate of 4 FPS. + +Along with the new video feature, the Camera app saw a few much-needed UI tweaks. A thumbnail in the top left showed the last picture that was taken, and tapping on it would jump to the camera roll in the Gallery. The circle icon on the top right of both screens was an on-screen shutter button, meaning that, post 1.5, Android devices no longer required a hardware camera button. + +This interface was actually much closer to the Android 4.2 design than many of the subsequent camera apps. While later designs would add silly leather textures and more controls to the camera, Android went back to basics with later designs, and that 4.2 redesign shares a lot in common with this. What was a primitive layout in Android 1.5 became a minimal, full-screen viewfinder in Android 4.2. + +![Google Talk running in the Google Talk app versus Google Talk running in the IM app.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/gtalk-im.png) +Google Talk running in the Google Talk app versus Google Talk running in the IM app. +Photo by Ron Amadeo + +Android 1.0's IM app was used for Google Talk functionality, but in Android 1.5, Google Talk was broken off into its own app. Support for it in the IM app was removed. Google Talk (above, left) was clearly based on the IM app (above, right), but as soon as the stand alone app was released in 1.5, work on the IM app was abandoned. + +The new Google Talk app had a redesigned status bar, presence lights on the right side, and a redesigned mobile icon, which was a gray monogram of the bugdroid. The blue compose bar switched to a more sensible gray in the chat view, and the message backgrounds changed from light green and white to light green and green. With a stand alone app, Google could add Gtalk-only features like chatting "off the record," which would stop Gmail from saving a copy of every chat. + +![The calendar in Android 1.5 got a lot lighter.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/cal15.png) +The calendar in Android 1.5 got a lot lighter. +Photo by Ron Amadeo + +The calendar dumped the ugly white squares on a black background and changed to an all-light app. The background of everything became white, and day-of-the-week headers were changed to blue. The individual appointment blocks switched from a small color strip to entirely colored, and the text changed to white. This will be the last time the calendar is touched for a long time. + +![From left to right: the browser’s new controls, the zoomed-out magnifying view, and highlighting text for copy/pasting.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/browser-craziness.png) +From left to right: the browser’s new controls, the zoomed-out magnifying view, and highlighting text for copy/pasting. +Photo by Ron Amadeo + +Android 1.5 changed the zoom controls system-wide. Instead of two big circles, the zoom controls became two halves of a rectangle with rounded corners. These new controls applied to the browser, Google Maps, and the gallery. + +The browser had lots of work done on the zoom functionality. After zooming in or out, the "1x" button would return you to the standard zoom level. The button in the bottom right corner would zoom all the way out of the page and display a magnifying rectangle over the page, which you can see in the center image. Grabbing the rectangle and releasing it would zoom that part of the page to a "1x" view. Android didn't have acceleratable scrolling, which made the max scrolling speed pretty slow—this was Google's solution for navigating a long webpage. + +Another addition to the browser was the ability to copy text on a webpage—previously you could only copy text from an input box. Selecting "copy text" from the menu would activate highlight mode, and dragging your finger over text in a Web page would highlight it. The G1’s trackball was very handy for super-precise movement like this and could control the mouse cursor. There were no draggable handles, and as soon as you lifted your finger off the screen, Android would copy the text and remove the highlight, so you had to be ridiculously precise to get any use out of the copy feature. + +The browser in Android 1.5 would crash a lot—much more than in previous versions. Just viewing Ars Technica in desktop mode would crash the browser, as did many other sites. + +![](http://cdn.arstechnica.net/wp-content/uploads/2013/12/lockscreen.png) +Photo by Ron Amadeo + +The default lock screen and pattern lock screen both changed their empty, black backgrounds to the same wallpaper as the home screen. + +The lighter background on the pattern unlock screen revealed the sloppy job Google did on the alignment of the circles. The white circles were nowhere near centered inside the black circles—basic alignment issues like this continued to be a frequent problem for Android in these early days. + +![The YouTube uploader, contacts thumbnails, the auto rotate setting, and the new music design.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/TWEAKS2.png) +The YouTube uploader, contacts thumbnails, the auto rotate setting, and the new music design. +Photo by Ron Amadeo + +![The HTC Magic, the second Android device, and the first without a hardware keyboard.](http://cdn.arstechnica.net/wp-content/uploads/2014/04/htc-magic-white.jpg) +The HTC Magic, the second Android device, and the first without a hardware keyboard. +Photo by HTC + +> #### Google Maps is the first built-in app to hit the Android Market #### +> +> While this article is (mostly) organizing app updates by Android version for simplicity's sake, there are a few outliers that deserve special recognition. On June 14, 2009, Google Maps was the first packed-in Android app to be updated via the Android Market. While every other app required a full system release to be updated, Maps was broken out of the OS, free to receive out-of-cycle updates whenever a new feature was ready. +> +> Moving apps out of the core OS and onto the Android Market would be a big focus for Google going forward. In general, OTA updates were a big initiative—they required the cooperation of the OEM and the carrier, both of which could drag their feet. Updates also didn’t make it to every device. Today, the Android Market gives Google a direct line to every Android phone with no such interference from outside parties. +> +> These were problems for a later date, though. In 2009, Google had only two unskinned phones to support, and the early Android carriers were seemingly responsive to Google’s update needs. This early move would prove to be a very proactive decision on Google’s part. At first, the company went this route only with its most important properties—Maps and Gmail—but later it would port the majority of the packed-in apps to the Android Market. Later initiatives like Google Play Services even brought app APIs out of the OS and into Google’s store. +> +> As for the new Maps at the time, it gained a new directions interface, along with the ability to give mass transit and walking directions. For now, directions were given on a plain black list—turn-by-turn-style navigation would come later. +> +> June 2009 was also the time Apple launched the third iPhone—the 3GS—and the third version of iPhone OS. iPhone OS 3's headline features were mostly catch-up items like copy/paste and MMS support. Apple's hardware was still nicer, and the software was smoother, more cohesive, and better designed. Google's insane pace of development was putting it on a path to parity though. iPhone OS 2 launched just before the Milestone 5 build of Android 0.5, which makes five Android releases in the span of the yearly iOS release cycle. + +Android 1.5 gave the YouTube app the ability to upload videos to the site. Uploading was accomplished by sharing a video from the Gallery to the YouTube app, or by opening a video directly from the YouTube app. This would bring up an upload screen, where the user would set things like the video title, tags, and access rights. Photos could be uploaded to Picasa, Google's original photo site, in a similar fashion. + +There were little tweaks all over the OS. Favorite contacts now showed a picture in the contacts list (although regular contacts were still pictureless). The third picture shows the new auto-rotate option in the settings—this was also the first version to support automatically switching orientations based on readings from the devices’ internal sensors. + +Cupcake did a great job of improving Android, particularly in terms of hardware options. The on-screen keyboard meant a hardware keyboard was no longer necessary. Auto rotate brought the OS a little closer to the iPhone, and an on-screen camera shutter button meant that hardware camera buttons were now optional, too. Shortly after the release of 1.5, a second Android device came out that would show the future direction of the platform: the HTC Magic. The Magic (right) didn’t have a hardware keyboard or a camera button. It was a solid, slider-less slate device that relied on Android’s on-screen buttons to get the job done. + +Android flagships started with the most buttons possible—a hardware qwerty phone—and slowly began whittling the button count down over time. While the Magic was a big step, eliminating an entire keyboard and a camera button, it still used start and end call buttons, four system buttons, and a trackball. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/8/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://en.wikipedia.org/wiki/Diacritic +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/09 - The history of Android.md b/sources/talk/The history of Android/09 - The history of Android.md new file mode 100644 index 0000000000..c629e9cc75 --- /dev/null +++ b/sources/talk/The history of Android/09 - The history of Android.md @@ -0,0 +1,76 @@ +The history of Android +================================================================================ +![The new Android Market—less black, more white and green.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/marketab2.png) +The new Android Market—less black, more white and green. +Photo by Ron Amadeo + +### Android 1.6, Donut—CDMA support brings Android to any carrier ### + +The fourth version of Android—1.6, Donut—launched in September 2009, five months after Cupcake hit the market. Despite the myriad of updates, Google was still adding basic functionality to Android. Donut brought support for different screen sizes, CDMA support, and a text-to-speech engine. + +Android 1.6 is a great example of an update that, today, would have little reason to exist as a separate point update. The major improvements basically boiled down to new versions of the Android Market, camera, and YouTube. In the years since, apps like this have been broken out of the OS and can be updated by Google at any time. Before all this modularization work, though, even seemingly minor app updates like this required a full OS update. + +The other big improvement—CDMA support—demonstrated that, despite the version number, Google was still busy getting basic functionality into Android. + +The Android Market was christened as version "1.6" and got a complete overhaul. The original all-black design was tossed in favor of a white app with green highlights—the Android designers were clearly using the Android mascot for inspiration. + +The new market was definitely a new style of app design for Google. The top fifth of the screen was dedicated to a banner logo announcing that this app is indeed the “Android Market." Below the banner were buttons for Apps, Games, and Downloads, and a search button was placed to the right of the banner. Below the navigation was a thumbnail display of featured apps, which could be swiped through. Below that were even more featured apps in a vertically scrolling list. + +![The new Market design, showing an app page with screenshots, the apps categories page, an app top list, and the downloads section.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/marketpages.png) +The new Market design, showing an app page with screenshots, the apps categories page, an app top list, and the downloads section. +Photo by Ron Amadeo + +The biggest addition to the market was the inclusion of app screenshots. Android users could finally see what an app looked like before installing it—previously they only had a brief description and user reviews to go on. Your personal star review and comment was given top billing, followed by the description, and then finally the screenshots. Viewing the screenshots would often require a bit of scrolling—if you were looking for a well-designed app, it was a lot of work. + +Tapping on App or Games would bring up a category list, which you can see in the second picture, above. After picking a category, more navigation was shown at the top of the screen, where users could see "Top paid," "Top free," or "Just in" apps within a category. While these sorta looked like buttons that would load a new screen, they were really just a clunky tabbed interface. To denote which "tab" was currently active, there were little green lights next to each button. The nicest part of this interface was that the list of apps would scroll infinitely—once you hit the bottom, more apps would load in. This made it easy to look through the list of apps, but opening any app and coming back would lose your spot in the list—you’d be kicked to the top. The downloads section would do something the new Google Play Store still can't do: simply display a list of your purchased apps. + +While the new Market definitely looked better than the old market, cohesion across apps was getting worse and worse. It seemed like each app was made by a different group with no communication about how all Android apps should look. + +![The Camera viewfinder, photo review screen, and menu.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/device-2013-12-27-145949.png) +The Camera viewfinder, photo review screen, and menu. +Photo by Ron Amadeo + +For instance, the camera app was changed from a full-screen, minimal design to a boxed viewfinder with controls on the side. With the new camera app, Google tried its hand at skeuomorphism, wrapping the whole app in a leather texture roughly replicating the exterior of a classic camera. Switching between the camera and camcorder was done with a literal switch, and below that was the on-screen shutter button. + +Tapping on the previous picture thumbnail no longer launched the gallery, but a custom image viewer that was built in to the camera app. When viewing a picture the leather control area changed the camera controls to picture controls, where you could delete, share a picture, or set the picture as a wallpaper or contact image. There was still no swiping between pictures—that was still done with arrows on either side of the image. + +This second picture shows one of the first examples of designers reducing dependence on the menu button, which the Android team slowly started to realize functioned terribly for discoverability. Many app designers (including those within Google) used the menu as a dumping ground for all sorts of controls and navigational elements. Most users didn't think to hit the menu button, though, and never saw the commands. + +A common theme for future versions of Android would be moving things out of the menu and on to the main screen, making the whole OS more user-friendly. The menu button was completely killed in Android 4.0, and it's only supported in Android for legacy apps. + +![The battery and TTS settings.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/settings1.png) +The battery and TTS settings. +Photo by Ron Amadeo + +Donut was the first Android version to keep track of battery usage. Buried in the "About phone" menu was an option called "Battery use," which would display battery usage by app and hardware function as a percentage. Tapping on an item would bring up a separate page with relevant stats. Hardware items had buttons to jump directly to their settings, so for instance, you could change the display timeout if you felt the display battery usage was too high. + +Android 1.6 was also the first version to support text-to-speech (TTS) engines, meaning the OS and apps would be able to talk back to you in a robot voice. The “Speech synthesizer controls" would allow you to set the language, choose the speech rate, and (critically) install the voice data from the Android market. Today, Google has its own TTS engine that ships with Android, but it seems Donut was hard coded to accept one specific TTS engine made by SVOX. But SVOX’s engine didn’t ship with Donut, so tapping on “install voice data" linked to an app in the Android Market. (In the years since Donut’s heyday, the app has been taken down. It seems Android 1.6 will never speak again.) + +![From left to right: new widgets, the search bar UI, the new notification clear button, and the new gallery controls.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/grabbag16.png) +From left to right: new widgets, the search bar UI, the new notification clear button, and the new gallery controls. +Photo by Ron Amadeo + +There was more work on the widget front. Donut brought an entirely new widget called "Power control." This comprised on/off switches for common power-hungry features: Wi-FI, Bluetooth, GPS, Sync (to Google's servers), and brightness. + +The search widget was redesigned to be much slimmer looking, and it had an embedded microphone button for voice search. It now had some actual UI to it and did find-as-you-type live searching, which searched not only the Internet, but your applications and history too. + +The "Clear notifications" button has shrunk down considerably and lost the "notifications" text. In later Android versions it would be reduced to just a square button. The Gallery continues the trend of taking functionality out of the menu and putting it in front of the user—the individual picture view gained buttons for "Set as," "Share," and "Delete." + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/9/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/10 - The history of Android.md b/sources/talk/The history of Android/10 - The history of Android.md new file mode 100644 index 0000000000..f01a0a0f7f --- /dev/null +++ b/sources/talk/The history of Android/10 - The history of Android.md @@ -0,0 +1,88 @@ +The history of Android +================================================================================ + +注:youtube视频地址 + + +### Android 2.0, Éclair‎—blowing up the GPS industry ### + +Forty-one days—that was how much time passed between Android 1.6 and 2.0. The first big version number bump for Android launched in October 2009 [on the Motorola Droid][1], the first "second generation" Android device. The Droid offered huge hardware upgrades over the G1, starting with the massive (at the time) 3.7 inch, 854×480 LCD. It brought a lot more power, too: a (still single-core) 600Mhz TI OMAP Cortex A8 with 256MB of RAM. + +![The Motorola Droid stares into your soul.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/2181.jpg) +The Motorola Droid stares into your soul. + +The most important part of the Droid, though, was the large advertising campaign around it. The Droid was the flagship device for Verizon Wireless in the US, and with that title came a ton of ad money from America's biggest carrier. Verizon licensed the word "droid" from Lucasfilm and started up the ["Droid Does" campaign][2]—a shouty, explosion-filled set of commercials that positioned the device (and by extension, Android) as the violent, ass-kicking alternative to the iPhone. The press frequently declared the T-Mobile G1 as trying to be an “iPhone Killer," but the Droid came out and owned it. + +Like the G1, the Droid had a hardware keyboard that slid out from the side of the phone. The trackball was gone, but some kind of d-pad was still mandatory, so Motorola placed a five-way d-pad on the right side of the keyboard. On the front, the Droid switched from hardware buttons to capacitive touch buttons, which were just paint on the glass touchscreen. Android 2.0 also finally allowed devices to do away with the “Call" and “End" buttons. So together with the demotion of the d-pad to the keyboard tray, the front buttons could all fit in a nice, neat strip. The result of all this streamlining was the best-looking Android device yet. The T-Mobile G1 looked like a Fisher-Price toy, but the Motorola Droid looked like an industrial tool that you could cut someone with. + +![The lock and home screens from 2.0 and 1.6.](http://cdn.arstechnica.net/wp-content/uploads/2014/01/intro202.png) +The lock and home screens from 2.0 and 1.6. +Photo by Ron Amadeo + +Some of Verizon's grungy ad campaign leaked over to the software, where the default wallpaper was changed from a calm, watery vista to a picture of dirty concrete. The boot animation used a pulsing, red, Hal 9000 eyeball and the default notification tone shouted "[DRRRRROOOOIIIIDDDD][3]" every time you received an e-mail. Éclair was Android’s angsty teenager phase. + +One of the first things Android 2.0 presented to the user was a new lock screen. Slide-to-unlock was patented by Apple, so Google went with a rotary-phone-inspired arc unlock gesture. Putting your finger on the lock icon and sliding right would unlock the device, and sliding left from the volume icon would silence the phone. A thumb naturally moves in an arc, so this felt like an even more natural gesture than sliding in a straight line. + +The default homescreen layout scrapped the redundant analog clock widget and introduced what is now an Android staple: a search bar at the top of the home screen. SMS Messaging and the Android Market were also given top billing in the new layout. The app drawer tab was given a sharp redesign, too. + +![The app drawers and pictures of the “Add to Home" menus.](http://cdn.arstechnica.net/wp-content/uploads/2014/01/icons.png) +The app drawers and pictures of the “Add to Home" menus. +Photo by Ron Amadeo + +Android was developed at such a breakneck pace in the early days that the Android Team could never really plan for future devices when making interface art. The Motorola Droid—with its 854×480 LCD—was a huge bump up in resolution over the 320×480 G1-era devices. Nearly everything needed to be redrawn. Starting from scratch with interface art would pretty much be the main theme of Android 2.0. + +Google took this opportunity to redesign almost every icon in Android, going from a cartoony look with an isometric perspective to straight-on icons done in a more serious style. The only set of icons that weren't redrawn were the status bar icons, which now look very out of place compared to the rest of the OS. These icons would hang around from Android 0.9 until 2.3. + +There were a few changes to the app lineup as well. Camcorder was merged into the camera, the IM app was killed, and two new Google-made apps were added: Car Home, a launcher with big buttons designed for use while driving, and Corporate Calendar, which is identical to the regular calendar except it supports Exchange instead of Google Calendar. Weirdly, Google also included two third-party apps out of the box: Facebook and Verizon's Visual VM app. (Neither works today.) The second set of pictures displays the “Add to Home screen" menu, and it received all new art, too. + +![A Places page, showing the “Navigate" option, the Navigation disclaimer, the actual Navigation screen, and the traffic info screen.](http://cdn.arstechnica.net/wp-content/uploads/2014/01/nav2.png) +A Places page, showing the “Navigate" option, the Navigation disclaimer, the actual Navigation screen, and the traffic info screen. +Photo by Ron Amadeo + +Beyond a redesign, the clear headline feature of Android 2.0 was Google Maps Navigation. Google updated Maps to allow for free turn-by-turn navigation, complete with a point of interest search and text to speech, which could read the names of streets aloud just like a standalone GPS unit. Turning GPS navigation from a separate product into a free smartphone feature pretty much [destroyed][4] the standalone GPS market overnight. TomTom’s stock dropped almost 40 percent during the week of Android 2.0’s launch. + +But navigation was pretty hard to get to at first. You had to open the search box, type in a place or address, and tap on the search result. Next, after tapping on the "Navigate" button, Google showed a warning stating that Navigation was in beta and should not be trusted. After tapping on "accept," you could jump in a car, and a harsh-sounding robot voice would guide you to your destination. Hidden behind the menu button was an option to check out the traffic and accidents for the entire route. This design of Navigation hung around forever. Even when the main Google Maps interface was updated in Android 4.0, the Android 2.0 stylings in the Navigation section hung around until almost Android 4.3. + +Maps would also show a route overview, which contained traffic data for your route. At first it was just licensed by the usual traffic data provider, but later, Google would use information from Android and iOS phones running Google Maps to [crowd source traffic data][5]. It was the first step in Google's dominance of the mobile map game. After all, real-time traffic monitoring is really just a matter of how many points of data you have. Today, with hundreds of millions of Google Maps users across iOS and Android, Google has become the best provider of traffic data in the world. + +With Maps Navigation, Android finally found its killer app. Google was offering something no one else could. There was finally an answer to the "Why should I buy this over an iPhone?" question. Google Maps didn't require PC-based updating like many GPS units did, either. It was always up-to-date thanks to the cloud, and all of those updates were free. The only downside was that you needed an Internet connection to use Google Maps. + +As was greatly publicized during the [Apple Maps fiasco][6], accurate maps have become one of the most important features of a smartphone, even if no one really appreciates them when they work. Mapping the world is really only solvable with tons of person power, and today, Google’s “Geo" division is the largest in the company with more than [7,000 employees][7]. For most of these people, their job is to literally drive down every road in the world with the company’s camera-filled Street View cars. After eight years of data collection, Google has more than [five million miles][8] of 360-degree Street View imagery, and Google Maps is one of the biggest, most untouchable pillars of the company. + +![The Car Home screen, and, because we have room, a horizontal version of Navigation.](http://cdn.arstechnica.net/wp-content/uploads/2014/01/carhome1.png) +The Car Home screen, and, because we have room, a horizontal version of Navigation. +Photo by Ron Amadeo + +Along with Google Maps Navigation came "Car Home," a large-buttoned home screen designed to help you use your phone while driving. It wasn't customizable, and each button was just a shortcut to a standard app. The Motorola Droid and its official [car dock accessory][9] had special magnets that would automatically trigger Car Home. While docked, pressing the hardware home button on the Droid would open Car Home instead of the normal home screen, and an on-screen home button led to the normal home screen. + +Car Home, while useful, didn’t last long—it was cut in Android 3.0 and never came back. GPS systems are almost entirely used in cars while driving, but encouraging users to do so with options like “search," which would bring up a keyboard, is something that Google’s lawyers probably weren’t very fond of. With [Apple’s CarPlay][10] and Google’s [Open Automotive Alliance][11], car computers are seeing a resurgence these days. This time, though, there is more of a focus on safety, and government organizations like the National Highway Traffic Safety Administration are on board to help out. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/10/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://arstechnica.com/gadgets/2009/12/review-of-the-motorola-droid/ +[2]:http://www.youtube.com/watch?v=e52TSXwj774 +[3]:http://www.youtube.com/watch?v=UBL47tHrvMA +[4]:http://techcrunch.com/2009/10/28/googles-new-mobile-app-cuts-gps-nav-companies-at-the-knees/ +[5]:http://googleblog.blogspot.com/2009/08/bright-side-of-sitting-in-traffic.html +[6]:http://arstechnica.com/apple/2012/09/apple-ceo-tim-cook-apologizes-for-ios-6-maps-promises-improvements/ +[7]:http://www.businessinsider.com/apple-has-7000-fewer-people-working-on-maps-than-google-2012-9 +[8]:https://developers.google.com/events/io/sessions/383278298 +[9]:http://www.amazon.com/Motorola-Generation-Vehicle-Charger-Packaging/dp/B002Y3BYQA +[10]:http://arstechnica.com/apple/2014/03/ios-in-the-car-becomes-carplay-coming-to-select-dashboards-this-year/ +[11]:http://arstechnica.com/information-technology/2014/01/open-automotive-alliance-aims-to-bring-android-inside-the-car/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/11 - The history of Android.md b/sources/talk/The history of Android/11 - The history of Android.md new file mode 100644 index 0000000000..94a9e762e8 --- /dev/null +++ b/sources/talk/The history of Android/11 - The history of Android.md @@ -0,0 +1,85 @@ +The history of Android +================================================================================ +![The redesigned Dialer and Contacts pages.](http://cdn.arstechnica.net/wp-content/uploads/2014/01/dialercontacts.png) +The redesigned Dialer and Contacts pages. +Photo by Ron Amadeo + +The rounded tabs in the contacts/dialer app were changed to a sharper, more mature-looking design. The dialer changed its name to "Phone" and the dial pad buttons changed from circles to rounded rectangles. Buttons for voicemail, call, and delete were placed at the bottom. This screen is a great example of Android’s lack of design consistency in the pre-3.0 days. Just on this screen, the tabs used sharp-cornered rectangles, the dial pad used rounded rectangles, and the sides of the bottom buttons were complete circles. It was a grab bag of UI widgets where no one ever tried to make anything match anything else. + +One of the new features in Android 2.0 was "Quick Contacts," which took the form of contact thumbnails that were added all over the OS. Tapping on them would bring up a list of shortcuts to contact that person through other apps. This didn't make as much sense in the contacts app, but in something like Google Talk, being able to tap on the contact thumbnail and call the person was very handy. + +![](http://cdn.arstechnica.net/wp-content/uploads/2014/01/calls.png) +Photo by Ron Amadeo + +Android 2.0 was finally equipped with all the on-screen buttons needed to answer and hang up a call without needing a hardware button, and the Droid took advantage of this and removed the now-redundant buttons from its design. Android’s solution to accept or reject calls was these left and right pull tabs. They work a lot like slide-to-unlock (and would later be used for slide-to-unlock)—a slide from the green button to the right would answer, and a slide from the red button to the left would reject the call. Once inside a call, it looked a lot like Android 1.6. All the options were still hidden behind the menu button. + +Someone completely phoned-in the art for the dialpad drawer. Instead of redrawing the number "5" button from Android 1.6, they just dropped in bold text that said "Dialpad" and called it a day. + +![The Calculator and Browser.](http://cdn.arstechnica.net/wp-content/uploads/2014/01/calcubrowser.png) +The Calculator and Browser. +Photo by Ron Amadeo + +The calculator was revamped for the first time since its introduction in Android 0.9. The black glass balls were replaced with gradiented blue and black buttons. The crazy red on-press highlight of the old calculator was replaced with a more normal looking white outline. + +The browser's tiny website name bar grew into a full, functional address bar, along with a button for bookmarks. To save on screen real estate, the address bar was attached to the page, so the bar scrolled up with the rest of the page and left you with a full screen for reading. Android 1.6's unique magnifying rectangle zoom control and its associated buttons were tossed in favor of a much simpler double-tab-to-zoom gesture, and the browser could once again render arstechnica.com without crashing. There still wasn't pinch zoom. + +![The camera with the settings drawer open, the flash settings, and the menu over top of the photo review screen.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/cam2-these-are-settigns.jpg) +The camera with the settings drawer open, the flash settings, and the menu over top of the photo review screen. +Photo by Ron Amadeo + +The camera app gained an entire drawer on the left side, which opened to reveal a ton of settings. The Motorola Droid was one of the first Android phones with an LED flash, so there was a setting for flash control, along with settings like scene mode, white balance, effects, picture size, and storage location (SD or Internal). + +On the photo review screen, Google pared down the menu button options. They were no longer redundant when compared to the on-screen options. With the extra room in the menu, all the options fit in the menu bar without needing a "more" button. + +![The “accounts" page of the e-mail app, the new combined inbox, the account & sync page from the system settings, and the auto brightness setting. ](http://cdn.arstechnica.net/wp-content/uploads/2014/02/emailacc2ountsetc.png) +The “accounts" page of the e-mail app, the new combined inbox, the account & sync page from the system settings, and the auto brightness setting. +Photo by Ron Amadeo + +The e-mail app got a big functionality boost. The most important of which is that it finally supported Microsoft Exchange. The Android 2.0 version of Email finally separated the inbox and folder views instead of using the messy mashed-together view introduced in Android 1.0. Email even had a unified inbox that would weave all your messages together from different accounts. + +The inbox view put the generic Email app on even ground with the Gmail app. Combined inbox even trumped Gmail's functionality, which was an extremely rare occurrence. Email still felt like the unwanted stepchild to Gmail, though. It used the Gmail interface to view messages, which meant the inbox and folders used a black theme, and the message view oddly used a light theme. + +The bundled Facebook app had an awesome account sync feature, which would download contact pictures and information from the social network and seamlessly integrate it into the contacts app. Later down the road when Facebook and Google stopped being friends, [Google removed this feature][1]. The company said it didn't like the idea of sharing information with Facebook when Facebook wouldn't share information back, thus a better user experience lost out to company politics. + +(Sadly, we couldn't show off the Facebook app because it is yet another client that died at the hands of OAuth updates. It's no longer possible to sign in from a client this old.) + +The last picture shows the auto brightness control, which Android 2.0 was the first version to support. The Droid was equipped with an ambient light sensor, and tapping on the checkbox would make the brightness slider disappear and allow the device to automatically control the screen brightness. + +As the name would imply, Android 2.0 was Google's biggest update to date. Motorola and Verizon brought Android a slick-looking device with tons of ad dollars behind it, and for a time, “Droid" became a household name. + +### The Nexus One—enter the Google Phone ### + +![](http://cdn.arstechnica.net/wp-content/uploads/2014/03/nexus_4_lineup.jpg) + +In January 2010, the first Nexus device launched, appropriately called the "[Nexus One][2]". The device was a huge milestone for Google. It was the first phone designed and branded by the company, and Google planned to sell the device directly to consumers. The HTC-manufactured Nexus One had a 1GHz, single-core Qualcomm Snapdragon S1 SoC, 512MB of RAM, 512MB of storage, and a 3.7-inch AMOLED display. + +The Nexus One was meant to be a pure Android experience free of carrier meddling and crapware. Google directly controlled the updates. It was able to push software out to users as soon as it was done, rather than having to be approved by carriers, who slowed the process down and were not always eager to improve a phone customers already paid for. + +Google sold the Nexus One [directly over the Web][3], unlocked, contract-free, and at the full retail price of $529.99. While the Nexus One was also sold at T-Mobile stores on-contract for $179.99, Google wanted to change the way the cell phone industry worked in America with its online store. The idea was to pick the phone first and the carrier second, breaking the control the wireless oligarchy had over hardware in the United States. + +Google's retail revolution didn't work out though, and six months after the opening on the online phone store, Google shut the service down. Google cited the primary problem as low sales. In 2010, Internet shopping wasn't the commonplace thing it is today, and consumers weren't ready to spend $530 on a device they couldn’t first hold in their hands. The high price was also a limiting factor; smartphone shoppers were more used to paying $200 up front for devices and agreeing to a two-year contract. There was also the issue of the Motorola Droid, which came out only three months earlier and was not significantly slower. With the Droid’s huge marketing campaign and "iPhone Killer" hype, it already captured much of the same Android enthusiast market that the Nexus One was gunning for. + +While the Nexus One online sales experiment could be considered a failure, Google learned a lot. In 2012, it [relaunched its online store][4] as the "Devices" section on Google Play. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/11/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://techcrunch.com/2011/02/22/google-android-facebook-contacts/ +[2]:http://arstechnica.com/gadgets/2010/01/nexus-one-review/ +[3]:http://arstechnica.com/gadgets/2010/01/googles-big-news-today-was-not-a-phone-but-a-url/ +[4]:http://arstechnica.com/gadgets/2012/04/unlocked-samsung-galaxy-nexus-can-now-be-purchased-from-google/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/12 - The history of Android.md b/sources/talk/The history of Android/12 - The history of Android.md new file mode 100644 index 0000000000..6f7058c56a --- /dev/null +++ b/sources/talk/The history of Android/12 - The history of Android.md @@ -0,0 +1,98 @@ +The history of Android +================================================================================ +### Android 2.1—the discovery (and abuse) of animations ### + +Android 2.1 came out with the launch of the Nexus One, which was only three months after the release of 2.0. The new OS wasn't a huge release, so it still kept the codename "Éclair." Android development was chugging along at an unheard-of pace, with Google averaging a new OS release every two-and-a-half months over the last 15 months. + +Thanks mostly to the marketing efforts of Verizon and the "Droid" line of phones, Android was gaining in popularity. The OS was still considered ugly, though, and while the Android engineers at the time seemed to have almost no formal design training, in Android 2.1 they tried to spruce things up a bit by slathering on heavy-handed animation effects wherever they could. The result was an OS that seemed to be desperately trying to prove that it could do animation effects. Many of the new additions felt more like tech demos than user-experience improvements. + +![The lock and home screens from Android 2.1 and 2.0.](http://cdn.arstechnica.net/wp-content/uploads/2014/01/21.png) +The lock and home screens from Android 2.1 and 2.0. +Photo by Ron Amadeo + +Android 2.0's rotary dial lock screen was kicked to the curb after only one version and replaced with the same pull tabs the incoming call screen used. The lock screen clock was an attempt at a uniquely Android font, but as typefaces go, it was pretty hideous looking. + +One of the biggest features in Android 2.1 was "Live Wallpapers"—interactive or moving images that could be set as the wallpaper. The default Live Wallpaper was a grid of squares with blue, red, yellow, and green lights continually streaking across it. Tapping on the screen would send lights firing out in all four directions from the center of your tap. While Live Wallpapers looked neat (and was a unique feature over the iPhone), the animated backgrounds sucked up battery power and CPU cycles. It seemed to make the whole phone run a little slower. + +On the home screen, the default Google Search widget was given a lot more padding and now sits centered in its row. Page indicators now lived in the bottom left and right corners of the screen, and the number of home screen pages jumped from three to five. The app drawer tab at the bottom was replaced with an icon showing a grid of squares, a metaphor that Google still uses today. + +![A picture showing the app drawer design and a composite image showing the app selection for Android 2.1 and 2.0.](http://cdn.arstechnica.net/wp-content/uploads/2014/01/21icons.png) +A picture showing the app drawer design and a composite image showing the app selection for Android 2.1 and 2.0. +Photo by Ron Amadeo + +With the new app drawer icon came a totally new app drawer. Instead of a tabbed container that lifted up from the bottom of the screen, the app drawer displayed as a full-screen interface. The carbon fiber weave was removed, and the background switched to a plain black background—a decision that would stick around all the way up to KitKat. + +Google decided to add a floating, semi-transparent home icon to the bottom of the app drawer to give people an easy way out of the full-screen tab interface. This could be seen as a precursor to the on-screen home button that was introduced in Android 4.0. + +The app drawer was given a tacky graphics effect, too. While scrolling, the icons at the top and bottom of the list would bend inward and appear to move deeper into the phone, sort of like the opening scroll in Star Wars. + +There were a few changes to the icons. "Amazon MP3" and "Alarm Clock" both lost their first names, along with their premium alphabetical real-estate at the top of the app drawer. Two new apps showed up: News and Weather, and Google Voice, which was Google's telecommunication service. Since the Nexus One was not a Verizon phone, Verizon's Visual Voicemail app was dumped. + +![The revamped clock app.](http://cdn.arstechnica.net/wp-content/uploads/2014/01/clo2ck.png) +The revamped clock app. +Photo by Ron Amadeo + +Along with the name change, the clock app got a total revamp. Tapping on the clock shortcut no longer opened the alarms page; instead it went to a "desk clock" interface (left picture, above) with a background that matched the wallpaper. The clock used the same font from the lock screen, pulling in weather from the new News And Weather app. + +The new alarm page cleaned up a lot of the weirder design decisions made in the old version. The analog clock and selectable clock designs were dead. The checkboxes were replaced with a green on/off light, which was much easier to parse than "gray check/green check." While it might be hard to see from the thumbnail (click for a bigger version), the old alarm design displayed AM and PM next to the time. The 2.1 design did away with that, only showing the relevant meridian. A digital clock was placed at the bottom, and the clock icon took you back to the desk clock interface. + +![The Gallery and individual image screens from 2.1 and 2.0.](http://cdn.arstechnica.net/wp-content/uploads/2014/01/gallery1.png) +The Gallery and individual image screens from 2.1 and 2.0. +Photo by Ron Amadeo + +Google's desire to improve the look of Android was most evident in the 2.1 Gallery, which was all about heavy-handed animation effects and transparencies. When the app opened, individual pictures flew in from the top of the screen and shuffled into little piles that made up an album. When opening an album, the picture stack separated, and the photos slid into a grid formation. Everything you touched would pop open, squish, and stretch like a spring-loaded piece of Jell-o. + +There was no "normal" background for the Gallery. It would randomly pick a picture on the screen and heavily distort it for use as a background image. When that picture scrolled off-screen, it would pick a new background image, so the tone of the background always matched your pictures. + +The top left of the screen housed a breadcrumbs bar. It displayed your current location and any folders between you and the main screen—it could be thought of as an early precursor to the "Up" button that would debut in Android 3.0. In the top right was a link to the camera app, which still sported the same faux-leather design that debuted in Android 1.6—the two designs could not be more different. + +While the camera was another weird, one-off design, never was the wild UI disparity between Android apps more apparent than in the new Gallery. It didn't use Android buttons, menus, or any of the existing UI paradigms. It even hid the status bar in every screen—you could barely tell you were looking at Android. + +In the individual photo view, you could finally swipe between images, which removed the need for chunky left and right arrows. For some reason, the color-matched background wasn't on this screen. It was the only part of the app where the background is black. Zoom controls were in the top-right (still no pinch zoom), and commands were held in a single strip along the bottom of the screen. Hitting the "menu" button (software or hardware) didn't bring up a 2×3 grid of options like every other app—the items in the bottom strip just changed from two options to three other options. + +![The animation-filled Gallery app.](http://cdn.arstechnica.net/wp-content/uploads/2014/01/gallery2.png) +The animation-filled Gallery app. +Photo by Ron Amadeo + +The first picture, above, shows an album view. You could scroll horizontally through a large album or use the fast scroll bar at the bottom of the screen. Long pressing on a picture (or, bizarrely, pressing the hardware menu button) would bring up a "checkbox" interface, where you could tap on several pictures to select them. After you've selected pictures, you could then batch share, delete, or rotate them. + +The menus on this screen and the next individual picture screen were semi-transparent speech bubbles that would spring out of their respective buttons when tapped on. Again, this was about as far away from the normal Android conventions as you could get. The Gallery was also one of the first apps to have an overscroll effect. When you hit the end of the photo wall, the entire surface would skew in the direction of the scrolling. + +The 2.1 Gallery was the first photo client to show your cloud-stored Picasa photos along with local pictures. These were marked with a white camera shutter icon in the bottom left corner of a thumbnail. This would later become Google+ Photos. + +No Android app before or since had looked like the gallery. There was good reason for that—it wasn’t made by Google! The app was farmed out to Cooliris, who didn't bother following a single existing Android UI paradigm. While the app was usable, all the animations and effects made it seem like a case of style over substance. + +![The "News and Weather" app showing... the news and weather.](http://cdn.arstechnica.net/wp-content/uploads/2014/01/newsandweather.png) +The "News and Weather" app showing... the news and weather. +Photo by Ron Amadeo + +Compare the Gallery to the other new Android 2.1 app: News And Weather. While the Gallery was a transparency-filled animation fest, News And Weather was all about dark gradients and contrasting colors. This app powered the weather display on the desk clock app, and it even came with a home screen widget. The first screen just showed the weather and a six-day forecast for your current location. Along the top of the screens were tabs, next to the city name was a small "i" button that would bring up a temperature and precipitation graph. You could slide your finger along the graph to get exact temperatures and precipitation for any given minute. + +The big innovation in this app was swipeable tabs, an idea that would eventually become a standard Android UI convention. After the weather were a bunch of user configurable news tabs, and besides tapping on the tabs to switch to them, you could just swipe horizontally across the screen and the tab would change. The news tabs all showed a list of news headlines that were almost always truncated to the point that you had no idea what the story was about. When opening a webpage from this app, it didn't load the browser. Instead, it opened the story within the app complete with a weird white border. + +![Google Maps showing off some Labs features, the new widget designs, the only screen we can access in Google Voice, and the new tabbed music design.](http://cdn.arstechnica.net/wp-content/uploads/2014/04/ccccombo.jpg) +Google Maps showing off some Labs features, the new widget designs, the only screen we can access in Google Voice, and the new tabbed music design. +Photo by Ron Amadeo + +Widgets in 2.1 were all redesigned, with almost everything receiving a black gradient, and made better use of the available space. The clock changed back to a circle, and the calendar got a blue top, which matched the app a little more closely. Google Voice will start up, but the sign-in is broken—this is as far as you can get. + +The oft-neglected Music app got a minor update. The four-button home screen was removed completely, and tabs for each music display mode were added to the top of the screen. This meant when opening the app, you were immediately presented with a list of music, instead of a navigational page. Unlike the News and Weather app, these newly installed tabs here could not be swiped between. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/13 - The history of Android.md b/sources/talk/The history of Android/13 - The history of Android.md new file mode 100644 index 0000000000..85c04441ac --- /dev/null +++ b/sources/talk/The history of Android/13 - The history of Android.md @@ -0,0 +1,104 @@ +The history of Android +================================================================================ +![](http://cdn.arstechnica.net/wp-content/uploads/2014/03/ready-fight.png) + +### Android 2.1, update 1—the start of an endless war ### + +Google was a major launch partner for the first iPhone—the company provided Google Maps, Search, and YouTube for Apple’s mobile operating system. At the time, Google CEO Eric Schmidt was a member of Apple’s board of directors. In fact, during the original iPhone presentation, [Schmidt was the first person on stage][] after Steve Jobs, and he joked that the two companies were so close they could merge into “AppleGoo." + +While Google was developing Android, the relationship between the two companies slowly became contentious. Still, Google largely kept Apple happy by keeping key iPhone features, like pinch zoom, out of Android. The Nexus One, though, was the first slate-style Android flagship without a keyboard, which gave the device the same form factor as the iPhone. Combined with the newer software and Google branding, this was the last straw for Apple. According to Walter Isaacson’s biography on Steve Jobs, after seeing the Nexus One in January 2010, the Apple CEO was furious, saying "I will spend my last dying breath if I need to, and I will spend every penny of Apple's $40 billion in the bank, to right this wrong... I'm going to destroy Android, because it's a stolen product. I'm willing to go thermonuclear war on this." + +All of this happened behind closed doors, only coming out years after the Nexus One was released. The public first caught wind of this growing rift between Google and Apple when, a month after the release of Android 2.1, an update shipped for the Nexus One called “[2.1 update 1.][2]" The updated added one feature, something iOS long held over the head of Android: pinch-zoom. + +While Android supported multi-touch APIs since version 2.0, the default operating system apps stayed clear of this useful feature at the behest of Jobs. After reconciliation meetings over the Nexus One failed, there was no longer a reason to keep pinch zoom out of Android. Google pushed all their chips into the middle of the table, hit the update button, and was finally “all-in" with Android. + +With pinch zoom enabled in Google Maps, the Browser, and the Gallery, the Google-Apple smartphone war was on. In the coming years, the two companies would become bitter enemies. A month after the pinch zoom update, Apple went on the warpath, suing everyone and everything that used Android. HTC, Motorola, and Samsung were all brought to court, and some of them are still in court. Schmidt resigned from Apple’s board of directors. Google Maps and YouTube were kicked off of the iPhone, and Apple even started a rival mapping service. Today, the two players that were almost "AppleGoo" compete in smartphones, tablets, laptops, movies, TV shows, music, books, apps, e-mail, productivity software, browsers, personal assistants, cloud storage, mobile advertising, instant messaging, mapping, and set-top-boxes... and soon the two will be competing in car computers, wearables, mobile payments, and living room gaming. + +### Android 2.2 Froyo—faster and Flash-ier ### + +[Android 2.2][3] came out four months after the release of 2.1, in May 2010. Froyo featured major under-the-hood improvements for Android, all made in the name of speed. The biggest addition was just-in-time (JIT) compilation. JIT automatically converted java bytecode into native code at runtime, which led to drastic performance improvements across the board. + +The Browser got a performance boost, too, thanks to the integration of the V8 javascript engine from Chrome. This was the first of many features the Android browser would borrow from Chrome, and eventually the stock browser would be completely replaced by a mobile version of Chrome. Until that day came, though, the Android team needed to ship a browser. Pulling in Chrome parts was an easy way to upgrade. + +While Google was focusing on making its platform faster, Apple was making its platform bigger. Google's rival released the 10-inch iPad a month earlier, ushering in the modern era of tablets. While some large Froyo and Gingerbread tablets were released, Google's official response—Android 3.0 Honeycomb and the Motorola Xoom—would not arrive for nine months. + +![Froyo added a two-icon dock at the bottom and universal search.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/22-2.png) +Froyo added a two-icon dock at the bottom and universal search. +Photo by Ron Amadeo + +The biggest change on the Froyo homescreen was the new dock at the bottom, which filled the previously empty space to the left and right of the app drawer with phone and browser icons. Both of these icons were custom-designed white versions of the stock icons, and they were not user-configurable. + +The default layout removed all the icons, and it only stuck the new tips widget on the screen, which directed you to click on the launcher icon to access your apps. The Google Search widget gained a Google logo which doubled as a button. Tapping it would open the search interface and allow you to restrict a search by Web, apps, or contacts. + +![The downloads page showing the “update all" button, the Flash app, a flash-powered site where anything is possible, and the “move to SD" button. ](http://cdn.arstechnica.net/wp-content/uploads/2014/03/small-market-2.jpg) +The downloads page showing the “update all" button, the Flash app, a flash-powered site where anything is possible, and the “move to SD" button. +Photo by [Ryan Paul][4] + +Some of the best additions to Froyo were more download controls for the Android Market. There was now an “Update all" button pinned to the bottom of the Downloads page. Google also added an automatic updating feature, which would automatically install apps as long as the permissions hadn't changed; automatic updating was off by default, though. + +The second picture shows Adobe Flash Player, which was exclusive to Froyo. The app plugged in to the browser and allowed for a “full Web" experience. In 2010, this meant pages heavy with Flash navigation and video. Flash was one of Android's big differentiators compared to the iPhone. Steve Jobs started a holy war against Flash, declaring it an obsolete, buggy piece of software, and Apple would not allow it on iOS. So Android picked up the Flash ball and ran with it, giving users the option of having a semi-workable implementation on Android. + +At the time, Flash could bring even a desktop computer to its knees, so keeping it on all the time on a mobile phone delivered terrible performance. To fix this, Flash on Android's browser could be set to "on-demand"—Flash content would not load until users clicked on the Flash placeholder icon. Flash support would last on Android until 4.1, when Adobe gave up and killed the project. Ultimately Flash never really worked well on Android. The lack of Flash on the iPhone, the most popular mobile device, pushed the Internet to eventually dump the platform. + +The last picture shows the newly added ability to move apps to the SD card, which, in an era when phones came with 512MB of internal storage, was sorely needed. + +![The car app and camera app. The camera could now rotate.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/22carcam-2.png) +The car app and camera app. The camera could now rotate. +Photo by Ron Amadeo + +The camera app was finally updated to support portrait mode. The camera settings were moved out of the drawer and into a semi-transparent strip of buttons next to the shutter button and other controls. This new design seemed to take a lot of inspiration from the Cooliris Gallery app, with transparent, springy speech bubble popups. It was quite strange to see the high-tech Cooliris-style UI design grafted on to the leather-bound camera app—the aesthetics didn't match at all. + +![The semi-broken Facebook app is a good example of the common 2x3 navigation page. Google Goggles was included but also broken.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/facebook.png) +The semi-broken Facebook app is a good example of the common 2x3 navigation page. Google Goggles was included but also broken. +Photo by Ron Amadeo + +Unlike the Facebook client included in Android 2.0 and 2.1, the 2.2 version still sort of works and can sign in to Facebook's servers. The Facebook app is a good example of Google's design guidelines for apps at the time, which suggested having a navigational page consisting of a 3x2 grid of icons as the main page of an app. + +This was Google's first standardized attempt at getting navigational elements out of the menu button and onto the screen, where users could find them. This design was usable, but it added an extra roadblock between launching an app and using an app. Google would later realize that when users launch an app, it was a better idea to show them content instead of an interstitial navigational screen. In Facebook for instance, opening to the news feed would be much more appropriate. And later app designs would relegate navigation to a second-tier location—first as tabs at the top of the screen, and later Google would settle on the "Navigation Drawer," a slide-out panel containing all the locations in an app. + +Also packed in with Froyo was Google Goggles, a visual search app which would try to identify the subject of a picture. It was useful for identifying works of art, landmarks, and barcodes, but not much else. These first two setup screens, along with the camera interface, are all that work in the app anymore. Today, you can't actually complete a search with a client this old. There wasn't much to see anyway; it was a camera interface that returned a search results page. + +![The Twitter app, which was an animation-filled collaboration between Google and Twitter.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/twitters-2.png) +The Twitter app, which was an animation-filled collaboration between Google and Twitter. +Photo by Ron Amadeo + +Froyo included the first Android Twitter app, which was actually a collaboration between Google and Twitter. At the time, a Twitter app was one of the big holes in Android's app lineup. Developers favored the iPhone, and with Apple's head start and stringent design requirements, the App Store's app selection was far superior to Android's. But Google needed a Twitter app, so it teamed up with the company to get the first version out the door. + +This represented Google's newer design language, which meant it had an interstitial navigation page and a "tech-demo" approach to animations. The Twitter app was even more heavy-handed with animation effects than the Cooliris Gallery—everything moved all the time. The clouds at the top and bottom of every page continually scrolled at varying speeds, and the Twitter bird at the bottom flapped its wings and moved its head left and right. + +The Twitter app actually featured an early precursor to the Action Bar, a persistent strip of top-aligned controls that was introduced in Android 3.0 . Along the top of every screen was a blue bar containing the Twitter logo and buttons like search, refresh, and compose tweet. The big difference between this and the later action bars was that the Twitter/Google design lacks an "Up" button in the top right corner, and it actually uses an entire second bar to show your current location within the app. In the second picture above, you can see a whole bar dedicated to the location label "Tweets" (and, of course, the continuously scrolling clouds). The Twitter logo in the second bar acted as another navigational element, sometimes showing additional drill down areas within the current section and sometimes showing the entire top-level shortcut group. + +The 2.3 Tweet stream didn't look much different from what it does today, save for the hidden action buttons (reply, retweet, etc), which were all under the right-aligned arrow buttons. They popped up in a speech bubble menu that looked just like the navigational popup. The faux-action bar was doing serious work on the create tweet page. It housed the twitter logo, remaining character count, and buttons to attach a picture, take a picture, and a contact mention button. + +The Twitter app even came with a pair of home screen widgets. The big one took up eight slots and gave you a compose bar, update button, one tweet, and left and right arrows to view more tweets. The little one showed a tweet and reply button. Tapping on the compose bar on the large widget immediately launched the main "Create Tweet," rendering the "update" button worthless. + +![Google Talk and the new USB dialog.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/talkusb.png) +Google Talk and the new USB dialog. +Photo by Ron Amadeo + +Elsewhere, Google Talk (and the unpictured SMS app) changed from a dark theme to a light theme, which made both of them look a lot closer to the current, modern apps. The USB storage screen that popped up when you plugged into a computer changed from a simple dialog box to a full screen interface. Instead of a text-only design, the screen now had a mutant Android/USB-stick hybrid. + +While Android 2.2 didn’t feature much in the way of user-facing features, a major UI overhaul was coming in the next two versions. Before all the UI work, though, Google wanted to revamp the core of Android. Android 2.2 accomplished that. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/13/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.youtube.com/watch?v=9hUIxyE2Ns8#t=3016 +[2]:http://arstechnica.com/gadgets/2010/02/googles-nexus-one-gets-multitouch/ +[3]:http://arstechnica.com/information-technology/2010/07/android-22-froyo/ +[4]:http://arstechnica.com/information-technology/2010/07/android-22-froyo/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/14 - The history of Android.md b/sources/talk/The history of Android/14 - The history of Android.md new file mode 100644 index 0000000000..2825d7eee8 --- /dev/null +++ b/sources/talk/The history of Android/14 - The history of Android.md @@ -0,0 +1,82 @@ +The history of Android +================================================================================ +### Voice Actions—a supercomputer in your pocket ### + +In August 2010, a new feature “[Voice Actions][1]" launched in the Android Market as part of the Voice Search app. Voice Actions allowed users to issue voice commands to their phone, and Android would try to interpret them and do something smart. Something like "Navigate to [address]" would fire up Google Maps and start turn-by-turn navigation to your stated destination. You could also send texts or e-mails, make a call, open a Website, get directions, or view a location on a map—all just by speaking. + +注:youtube视频地址 + + +Voice Actions was the culmination of a new app design philosophy for Google. Voice Actions was the most advanced voice control software for its time, and the secret was that Google wasn’t doing any computing on the device. In general, voice recognition was very CPU intensive. In fact, many voice recognition programs still have a “speed versus accuracy" setting, where users can choose how long they are willing to wait for the voice recognition algorithms to work—more CPU power means better accuracy. + +Google’s innovation was not bothering to do the voice recognition computing on the phone’s limited processor. When a command was spoken, the user’s voice was packaged up and shipped out over the Internet to Google’s cloud servers. There, Google’s farm of supercomputers pored over the message, interpreted it, and shipped it back to the phone. It was a long journey, but the Internet was finally fast enough to accomplish something like this in a second or two. + +Many people throw the phrase “cloud computing" around to mean “anything that is stored on a server," but this was actual cloud computing. Google was doing hardcore compute operations in the cloud, and because it is throwing a ridiculous amount of CPU power at the problem, the only limit to the voice recognition accuracy is the algorithms themselves. The software didn't need to be individually “trained" by each user, because everyone who used Voice Actions was training it all the time. Using the power of the Internet, Android put a supercomputer in your pocket, and, compared to existing solutions, moving the voice recognition workload from a pocket-sized computer to a room-sized computer greatly increased accuracy. + +Voice recognition had been a project of Google’s for some time, and it all started with an 800 number. [1-800-GOOG-411][1] was a free phone information service that Google launched in April 2007. It worked just like 411 information services had for years—users could call the number and ask for a phone book lookup—but Google offered it for free. No humans were involved in the lookup process, the 411 service was powered by voice recognition and a text-to-speech engine. Voice Actions was only possible after three years of the public teaching Google how to hear. + +Voice recognition was a great example of Google’s extremely long-term thinking—the company wasn't afraid to invest in a project that wouldn’t become a commercial product for several years. Today, voice recognition powers products all across Google. It’s used for voice input in the Google Search app, Android’s voice typing, and on Google.com. It’s also the primary input interface for Google Glass and [Android Wear][2]. + +The company even uses it beyond input. Google's voice recognition technology is used to transcribe YouTube videos, which powers automatic closed captioning for the hearing impaired. The transcription is even indexed by Google, so you can search for words that were said in the video. Voice is the future of many products, and this long-term planning has led Google to be one of the few major tech companies with an in-house voice recognition service. Most other voice recognition products, like Apple’s Siri and Samsung devices, are forced to use—and pay a license fee for—voice recognition from Nuance. + +With the computer hearing system up and running, Google is applying this strategy to computer vision next. That's why things like Google Goggles, Google Image Search, and [Project Tango][3] exist. Just like the days of GOOG-411, these projects are in the early stages. When [Google's robot division][4] gets off the ground with a real robot, it will need to see and hear, and Google's computer vision and hearing projects will likely give the company a head start. + +![The Nexus S, the first Nexus phone made by Samsung.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/NS500.png) +The Nexus S, the first Nexus phone made by Samsung. + +### Android 2.3 Gingerbread—the first major UI overhaul ### + +Gingerbread was released in December 2010, a whopping seven months after the release of 2.2. The wait was worth it, though, as Android 2.3 changed just about every screen in the OS. It was the first major overhaul since the initial formation of Android in version 0.9. 2.3 would kick off a series of continual revamps in an attempt to turn Android from an ugly duckling into something that was capable of holding its own—aesthetically—against the iPhone. + +And speaking of Apple, six months earlier, the company released the iPhone 4 and iOS 4, which added multitasking and Facetime video chat. Microsoft was finally back in the game, too. The company jumped into the modern smartphone era with the launch of Windows Phone 7 in November 2010. + +Android 2.3 focused a lot on the interface design, but with no direction or design documents, many apps ended up getting a new bespoke theme. Some apps went with a flatter, darker theme, some used a gradient-filled, bubbly dark theme, and others went with a high-contrast white and green look. While it wasn't cohesive, Gingerbread accomplished the goal of modernizing nearly every part of the OS. It was a good thing, too, because the next phone version of Android wouldn’t arrive until nearly a year later. + +Gingerbread’s launch device was the Nexus S, Google’s second flagship device and the first Nexus manufactured by Samsung. While today we are used to new CPU models every year, back then that wasn't the case. The Nexus S had a 1GHz Cortex A8 processor, just like the Nexus One. The GPU was slightly faster, and that was it in the speed department. It was a little bigger than the Nexus One, with a 4-inch, 800×480 AMOLED display. + +Spec wise, the Nexus S might seem like a tame upgrade, but it was actually home to a lot of firsts for Android. The Nexus S was Google’s first flagship to shun a MicroSD slot, shipping with 16GB on-board memory. The Nexus One had only 512MB of storage, but it had a MicroSD slot. Removing the SD slot simplified storage management for users—there was just one pool now—but hurt expandability for power users. It was also Google's first phone to have NFC, a special chip in the back of the phone that could transfer information when touched to another NFC chip. For now, the Nexus S could only read NFC tags—it couldn't send data. + +Thanks to some upgrades in Gingerbread, the Nexus S was one of the first Android phones to ship without a hardware D-Pad or trackball. The Nexus S was now down to just the power, volume, and the four navigation buttons. The Nexus S was also a precursor to the [crazy curved-screen phones][6] of today, as Samsung outfitted the Nexus S with a piece of slightly curved glass. + +![Gingerbread changed the status bar and wallpaper, and it added a bunch of new icons.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/appdrawershop.png) +Gingerbread changed the status bar and wallpaper, and it added a bunch of new icons. +Photo by Ron Amadeo + +An upgraded "Nexus" live wallpaper was released as an exclusive addition to the Nexus S. It was basically the same idea as the Nexus One version, with its animated streaks of light. On the Nexus S, the "grid" design was removed and replaced with a wavy blue/gray background. The dock at the bottom was given square corners and colored icons. + +![The new notification panel and menu.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/32.png) +The new notification panel and menu. +Photo by Ron Amadeo + +The status bar was finally overhauled from the version that first debuted in 0.9. The bar was changed from a white gradient to flat black, and all the icons were redrawn in gray and green. Just about everything looked crisper and more modern thanks to the sharp-angled icon design and higher resolution. The strangest decisions were probably the removal of the time period from the status bar clock and the confusing shade of gray that was used for the signal bars. Despite gray being used for many status bar icons, and there being four gray bars in the above screenshot, Android was actually indicating no cellular signal. Green bars would indicate a signal, gray bars indicated “empty" signal slots. + +The green status bar icons in Gingerbread also doubled as a status indicator of network connectivity. If you had a working connection to Google's servers, the icons would be green, if there was no connection to Google, the icons turned white. This let you easily identify the connectivity status of your connection while you were out and about. + +The notification panel was changed from the aging Android 1.5 design. Again, we saw a UI piece that changed from a light theme to a dark theme, getting a dark gray header, black background, and black-on-gray text. + +The menu was darkened too, changing from a white background to a black one with a slight transparency. The contrast between the menu icons and the background wasn’t as strong as it should be, because the gray icons are the same color as they were on the white background. Requiring a color change would mean every developer would have to make new icons, so Google went with the preexisting gray color on black. This was a change at the system level, so this new menu would show up in every app. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/14/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://arstechnica.com/gadgets/2010/08/google-beefs-up-voice-search-mobile-sync/ +[2]:http://arstechnica.com/business/2007/04/google-rolls-out-free-411-service/ +[3]:http://arstechnica.com/gadgets/2014/03/in-depth-with-android-wear-googles-quantum-leap-of-a-smartwatch-os/ +[4]:http://arstechnica.com/gadgets/2014/02/googles-project-tango-is-a-smartphone-with-kinect-style-computer-vision/ +[5]:http://arstechnica.com/gadgets/2013/12/google-robots-former-android-chief-will-lead-google-robotics-division/ +[6]:http://arstechnica.com/gadgets/2013/12/lg-g-flex-review-form-over-even-basic-function/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/15 - The history of Android.md b/sources/talk/The history of Android/15 - The history of Android.md new file mode 100644 index 0000000000..078e106d1c --- /dev/null +++ b/sources/talk/The history of Android/15 - The history of Android.md @@ -0,0 +1,86 @@ +The history of Android +================================================================================ +![Gingerbread's new keyboard, text selection UI, overscroll effect, and new checkboxes.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/3kb-high-over-check.png) +Gingerbread's new keyboard, text selection UI, overscroll effect, and new checkboxes. +Photo by Ron Amadeo + +One of the most important additions to Android 2.3 was the system-wide text selection interface, which you can see in the Google search bar in the left screenshot. Long pressing a word would highlight it in orange and make draggable handles appear on either side of the highlight. You could then adjust the highlight using the handles and long press on the highlight to bring up options for cut, copy, and paste. Previous methods used tiny controls that relied on a trackball or D-Pad, but with this first finger-driven text selection method, the Nexus S didn’t need the extra hardware controls. + +The right set of images shows the new checkbox design and overscroll effect. The Froyo checkbox worked like a light bulb—it would show a green check when on and a gray check when off. Gingerbread now displayed an empty box when an option is turned off—which made much more sense. Gingerbread was the first version to have an overscroll effect. An orange glow appeared when you hit the end of a list and grew larger as you pulled more against the dead end. Bounce scrolling would probably have made the most sense, but that was patented by Apple. + +![The new dialer and dialog box design.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/dialdialog.png) +The new dialer and dialog box design. +Photo by Ron Amadeo + +The dialer received a little more love in Gingerbread. It became darker, and Google finally addressed the combination of sharp corners, rounded corners, and complete circles that it had going on. Now every corner was a sharp right angle. All the dial pad buttons were replaced with a weird underline, like some faint leftovers of what used to be a button. You were never really sure if you were supposed to see a button or not—our brains wanted to imagine the rest of the square. + +The Wi-Fi network dialog is pictured to show off the rest of the system-wide changes. All the dialog box titles were changed from gray to black, every dialog box, dropdown, and button corner was sharpened up, and everything was a little bit darker. All these system-wide changes made all of Gingerbread look a lot less bubbly and more mature. The "all black everything" look wasn't necessarily the most welcoming color palette, but it certainly looked better than Android's previous gray-and-beige color scheme. + +![The new Market, which added a massive green header.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/4market.png) +The new Market, which added a massive green header. +Photo by Ron Amadeo + +While not exclusive to Gingerbread, with the launch of the new OS came "Android Market 2.0." Most of the list design was the same, but Google covered the top third of the screen with a massive green banner that was used for featured apps and navigation. The primary design inspiration here was probably the green Android mascot—the color is a perfect match. At a time when the OS was getting a darker design, the neon green banner and white list made the Market a lot brighter. + +However, the same green background image was used across phones, which meant on lower resolution devices, the green banner was even bigger. Users complained so much about the wasted screen space that later updates would make the green banner scroll up with the content. At the time, horizontal mode was even worse—it would fill the left half of the screen with the static green banner. + +![An app page from the Market showing the collapsible text section, the "My apps" section, and Google Books screenshots.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/5rest-of-market-and-books.png) +An app page from the Market showing the collapsible text section, the "My apps" section, and Google Books screenshots. +Photo by Ron Amadeo + +App pages were redesigned with collapsible sections. Rather than having to scroll through a thousand-line description, text boxes were truncated to only the first few lines. After that, a "more" button needed to be tapped. This allowed users to easily scroll through the list and find things like pictures and "contact developer," which would usually be farther down the page. + +The other parts of the Android homescreen wisely toned down the green monster. The rest of the app was mostly just the old Market with new green navigational elements. Any of the old tabbed interfaces were upgraded to swipeable tabs. In the right Gingerbread image, swiping right-to-left would switch from "Top Paid" to "Top Free," which made navigation a little easier. + +Gingerbread came with the first of what would become the Google Play content stores: Google Books. The app was a basic book reader that would display books in a simple thumbnail grid. The "Get eBooks" link at the top of the screen opened the browser and loaded a mobile website where you could buy books. + +Google Books and the “My Apps" page of the Market were both examples of early precursors to the Action Bar. Just like the current guidelines, a stickied top bar featured the app icon, the name of the screen within the app, and a few controls. The layout of these two apps was actually pretty modern looking. + +![The new Google Maps.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/maps1.png) +The new Google Maps. +Photo by Ron Amadeo + +Google Maps (which, again, at this point was on the Android Market and not exclusive to this version of Android) now featured another action bar precursor in the form of a top-aligned control bar. This version of an early action bar featured a lot of experimenting. The majority of the bar was taken up with a search box, but you could never type into the bar. Tapping on it would open the old search interface from Android 1.x, with a totally different bar design and bubbly buttons. This 2.3 bar wasn't anything more than a really big search button. + +![The new business pages, which switched from black to white.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/maps2-Im-hungry.png) +The new business pages, which switched from black to white. +Photo by Ron Amadeo + +Along with Places' new top billing in the app drawer came a redesigned interface. Unlike the rest of Gingerbread, this switched from black to white. Google also kept the old buttons with rounded corners. This new version of Maps helpfully displayed the hours of operation of a business, and it offered advanced search options like places that were currently open or thresholds for ratings and price. Reviews were brought to the surface, allowing a user to easily get a feel for the current business. It was now also possible to "star" a location from the search results and save it for later. + +![The new YouTube design, which, amazingly, sort of matches the old Maps business page design.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/youtube22.png) +The new YouTube design, which, amazingly, sort of matches the old Maps business page design. +Photo by Ron Amadeo + +The YouTube app seemed completely separate from the rest of Android, as if whoever designed this had no idea what Gingerbread would end up looking like. Highlights were red and gray instead of green and orange, and rather than the flat black of Gingerbread, YouTube featured bubbly buttons, tabs, and bars with rounded corners and heavy gradients. The new app did get a few things right, though. All the tabs could be horizontally swiped through, and the app finally added a vertical viewing mode for videos. Android seemed like such an uncoordinated effort at this stage. It’s like someone told the YouTube team “make it black," and that was all the direction they were given. The only Android entity this seemed to match was the old Google Maps business page design. + +Despite the weird design choices, the YouTube app had the best approximation yet of an action bar. Besides the bar at the top with an app logo and a few buttons, the rightmost button was labeled “more" and would bring up options that didn’t fit in the bar. Today, this is called the “Overflow" button, and it's a standard UI piece. + +![The new Google Talk, which supported voice and video calls, and the new Voice Actions interface.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/talkvoice.png) +The new Google Talk, which supported voice and video calls, and the new Voice Actions interface. +Photo by Ron Amadeo + +One last update for Gingerbread came with Android 2.3.4, which brought a new version of Google Talk. Unlike the Nexus One, the Nexus S had a front-facing camera—and the redesigned version of Google Talk had voice and video calling. The colored indicators on the right of the friends list were used to indicate not only presence, but voice and video availability. A dot was text only, a microphone was text or voice, and a camera was text, voice, or video. If available, tapping on a voice or video icon would immediately start a call with that person. + +Gingerbread is the oldest version of Android still supported by Google. Firing up a Gingerbread device and letting it sit for a few minutes will result in a ton of upgrades. Gingerbread will pull down Google Play Services, resulting in a ton of new API support, and it will upgrade to the very newest version of the Play Store. Open the Play Store and hit the update button, and just about every single Google app will be replaced with a modern version. We tried to keep this article authentic to the time Gingerbread was released, but a real user stuck on Gingerbread today will be treated to a flood of anachronisms. + +Gingerbread is still supported because there are a good number of users still running the now ancient OS. Gingerbread's staying power is due to the extremely low system requirements, making it the go-to choice for slow, cheap phones. The next few versions of Android were much more exclusive and/or demanding on hardware. For instance, Android 3.0 Honeycomb is not open source, meaning it could only be ported to a device with Google's cooperation. It was also only for tablets, making Gingerbread the newest phone version of Android for a very long time. 4.0 Ice Cream Sandwich was the next phone release, but it significantly raised Android’s systems requirements, cutting off the low-end of the market. Google is hoping to get cheaper phones back on the update track with 4.4 KitKat, which brings the system requirements back down to 512MB of RAM. The passage of time helps, too—by now, even cheap SoCs have caught up to the demands of a 4.0-era version of Android. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/15/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/16 - The history of Android.md b/sources/talk/The history of Android/16 - The history of Android.md new file mode 100644 index 0000000000..91e0946078 --- /dev/null +++ b/sources/talk/The history of Android/16 - The history of Android.md @@ -0,0 +1,66 @@ +The history of Android +================================================================================ +### Android 3.0 Honeycomb—tablets and a design renaissance ### + +Despite all the changes made in Gingerbread, Android was still the ugly duckling of the mobile world. Compared to the iPhone, its level of polish and design just didn't hold up. On the other hand, one of the few operating systems that could stand up to iOS's aesthetic acumen was Palm's WebOS. WebOS was a cohesive, well-designed OS with several innovative features, and it was supposed to save the company from the relentless march of the iPhone. + +A year after launch though, Palm was running out of cash. The company never saw the iPhone coming, and by the time WebOS was ready, it was too late. In April 2010, Hewlett-Packard purchased Palm for $1 billion. While HP bought a product with a great user interface, the lead designer of that interface, a man by the name of Matias Duarte, did not join HP. In May 2010, just before HP took control of Palm, Duarte jumped ship to Google. HP bought the bread, but Google hired the baker. + +![The first Honeycomb device, the Motorola Xoom 10-inch tablet.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/Motorola-XOOM-MZ604.jpg) +The first Honeycomb device, the Motorola Xoom 10-inch tablet. + +At Google, Duarte was named the Director of Android User Experience. This was the first time someone was publicly in charge of the way Android looked. While Matias landed at Google during the launch of Android 2.2, the first version he truly impacted was Android 3.0, Honeycomb, released in February 2011. + +By Google's own admission, Honeycomb was rushed out the door. Ten months prior, Apple modernized the tablet with the launch of the iPad, and Google wanted to respond as quickly as possible. Honeycomb was that response, a version of Android that ran on 10-inch touchscreens. Sadly, getting this OS to market was such a priority that corners were cut to save time. + +The new OS was for tablets only—phones would not be updated to Honeycomb, which spared Google the difficult problem of making the OS work on wildly different screen sizes. But with phone support off the table, a Honeycomb source drop never happened. Previous Android versions were open source, enabling the hacking community to port the latest version to all sorts of different devices. Google didn't want app developers to feel pressured to support half-broken Honeycomb phone ports, so Google kept the source to itself and strictly controlled what could and couldn't have Honeycomb. The rushed development led to problems with the software, too. At launch, Honeycomb wasn't particularly stable, SD cards didn't work, and Adobe Flash—one of Android's big differentiators—wasn't supported. + +One of the few devices that could have Honeycomb was [the Motorola Xoom][1], the flagship product for the new OS. The Xoom was a 10-inch, 16:9 tablet with 1GB of RAM and a dual-core, 1GHz Nvidia Tegra 2 processor. Despite being the launch device of a new version of Android where Google controlled the updates directly, the device wasn't called a "Nexus." The most likely reason for this was that Google didn't feel confident enough in the product to call it a flagship. + +Nevertheless, Honeycomb was a major milestone for Android. With an experienced designer in charge, the entire Android user interface was rebuilt, and most of the erratic app designs were brought to heel. Android's default apps finally looked like pieces of a cohesive whole with similar layouts and theming across the board. Redesigning Android would be a multi-version project though—Honeycomb was just the start of getting Android whipped into shape. This first draft laid the groundwork for how future versions of Android would function, but it also used a heavy-handed sci-fi theme that Google would spend the next few versions toning down. + +![The home screens of Honeycomb and Gingerbread.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/homeskreen.png) +The home screens of Honeycomb and Gingerbread. +Photo by Ron Amadeo + +While Gingerbread only experimented with a sci-fi look in its photon wallpaper, Honeycomb went full sci-fi with a Tron-inspired theme for the entire OS. Everything was made black, and if you needed a contrasting color, you could choose from a few different shades of blue. Everything that was made blue was also given a "glow" effect, making the entire OS look like it was powered by alien technology. The default background was a holographic grid of hexagons (a Honeycomb! get it?) that looked like it was the floor of a teleport pad on a spaceship. + +The most important change of Honeycomb was the addition of the system bar. The Motorola Xoom had no hardware buttons other than power and volume, so a large black bar was added along the bottom of the screen that housed the navigational buttons. This meant the default Android interface no longer needed specialized hardware buttons. Previously, Android couldn't function without hardware Back, Menu, and Home keys. Now, with the software supplying all the necessary buttons, anything with a touch screen was able to run Android. + +The biggest benefit of the new software buttons was flexibility. The new app guidelines stated that apps should no longer require a hardware menu button, but for those that do, Honeycomb detects this and adds a fourth button to the system bar that allows these apps to work. The other flexibility attribute of software buttons was that they could change orientation with the device. Other than the power and volume buttons, the Xoom's orientation really wasn't important. The system bar always sat on the "bottom" of the device from the user's perspective. The trade off was that a big bar along the bottom of the screen definitely sucked up some screen real estate. To save space on 10-inch tablets, the status bar was merged into the system bar. All the usual status duties lived on the right side—there was battery and connectivity status, the time, and notification icons. + +The whole layout of the home screen changed, placing UI pieces in each of the four corners of the device. The bottom left housed the previously discussed navigational buttons, the bottom right was for status and notifications, the top left displayed text search and voice search, and the top right had buttons for the app drawer and adding widgets. + +![The new lock screen and Recent Apps interface.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/lockscreen-and-recent.png) +The new lock screen and Recent Apps interface. +Photo by Ron Amadeo + +(Since the Xoom was a [heavy] 10-inch, 16:9 tablet, it was primarily meant to be used horizontally. Most apps also supported portrait mode, though, so for the sake of our formatting, we're using mostly portrait mode shots. Just keep in mind the Honeycomb shots come from a 10-inch tablet, and the Gingerbread shots come from a 3.7-inch phone. The densities of information are not directly comparable.) + +The unlock screen—after switching from a menu button to a rotary dial to slide-to-unlock—removed any required accuracy from the unlock process by switching to a circle unlock. Swiping from the center outward in any direction would unlock the device. Like the rotary unlock, this was much nicer ergonomically than forcing your finger to follow a perfectly straight path. + +The strip of thumbnails in the second picture was the interface brought up by the newly christened "Recent Apps" button, now living next to Back and Home. Rather than the group of icons brought up in Gingerbread by long-pressing on the home button, Honeycomb showed app icons and thumbnails on the screen, which made it a lot easier to switch between tasks. Recent Apps was clearly inspired by Duarte's "card" multitasking in WebOS, which used full-screen thumbnails to switch tasks. This design offered the same ease-of-recognition as WebOS's task switcher, but the smaller thumbnails allowed more apps to fit on screen at once. + +While this implementation of Recent Apps may look like what you get on a current device, this version was very early. The list didn't scroll, meaning it showed seven apps in portrait mode and only five apps in horizontal mode. Anything beyond that was bumped off the list. You also couldn't swipe away thumbnails to close apps—this was just a static list. + +Here we see the Tron influence in full effect: the thumbnails had blue outlines and an eerie glow around them. This screenshot also shows a benefit of software buttons—context. The back button closed the list of thumbnails, so instead of the normal arrow, this pointed down. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/16/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://arstechnica.com/gadgets/2011/03/ars-reviews-the-motorola-xoom/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/17 - The history of Android.md b/sources/talk/The history of Android/17 - The history of Android.md new file mode 100644 index 0000000000..5422877252 --- /dev/null +++ b/sources/talk/The history of Android/17 - The history of Android.md @@ -0,0 +1,86 @@ +The history of Android +================================================================================ +![The Honeycomb app lineup lost a ton of apps. This also shows the notification panel and the new quick settings.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/apps-and-notifications2.png) +The Honeycomb app lineup lost a ton of apps. This also shows the notification panel and the new quick settings. +Photo by Ron Amadeo + +The default app icons were slashed from 32 to 25, and two of those were third-party games. Since Honeycomb was not for phones and Google wanted the default apps to all be tablet-optimized, a lot of apps didn't make the cut. We lost the Amazon MP3 store, Car Home, Facebook, Google Goggles, Messaging, News and Weather, Phone, Twitter, Google Voice, and Voice Dialer. Google was quietly building a music service that would launch soon, so the Amazon MP3 store needed to go anyway. Car Home, Messaging, and Phone made little sense on a non-phone device, Facebook and Twitter still don't have tablet Android apps, and Goggles, News and Weather, and Voice Dialer were barely supported applications that most people wouldn't miss. + +Almost every app icon was new. Just like the switch from the G1 to the Motorola Droid, the biggest impetus for change was probably the bump in resolution. The Nexus S had an 800×480 display, and Gingerbread came with art assets to match. The Xoom used a whopping 1280×800 10-inch display, which meant nearly every piece of art had to go. But again, this time a real designer was in charge, and things were a lot more cohesive. Honeycomb marked the switch from a vertically scrolling app drawer to paginated horizontal drawer. This change made sense on a horizontal device, but on phones it was still much faster to navigate the app drawer with a flingable, vertical list. + +The second Honeycomb screenshot shows the new notification panel. The gray and black Gingerbread design was tossed for another straight-black panel that gave off a blue glow. At the top was a block showing the time, date, connection status, battery, and a shortcut to the notification quick settings, and below that were the actual notifications. Non-permanent notifications could now be dismissed by tapping on an "X" on the right side of the notification. Honeycomb was the first version to enable controls within a notification. The first (and at the launch of Honeycomb, only) app to take advantage of this was the new Google Music app, which placed previous, play/pause, and next buttons in its notification. These new controls could be accessed from any app and made controlling music a breeze. + +!["Add to home screen" was given a zoomed-out interface for easy organizing. The search interface split auto suggest and universal search into different panes.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/widgetkeyboard.png) +"Add to home screen" was given a zoomed-out interface for easy organizing. The search interface split auto suggest and universal search into different panes. +Photo by Ron Amadeo + +Pressing the plus button in the top right corner of the home screen or long pressing on the background would open the new home screen configuration interface. Honeycomb showed a zoomed-out view of all the home screens along the top of the screen, and it filled the bottom half of the screen with a tabbed drawer containing widgets and shortcuts. Items could be dragged out of the bottom drawer and into any of the five home screens. Gingerbread would just show a list of text, but Honeycomb showed full thumbnail previews of the widgets. This gave you a much better idea of what a widget would look like instead of an app-name-only description like "calendar." + +The larger screen of the Motorola Xoom allowed the keyboard to take on a more PC-style layout, with keys like backspace, enter, shift, and tab put in the traditional locations. The keyboard took on a blueish tint and gained even more spacing between the keys. Google also added a dedicated smiley-face button. :-) + +![Gmail on Honeycomb versus Gmail on Gingerbread with the menu open. Buttons were placed on the main screen for easier discovery.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/thebasics.png) +Gmail on Honeycomb versus Gmail on Gingerbread with the menu open. Buttons were placed on the main screen for easier discovery. +Photo by Ron Amadeo + +Gmail demonstrated all the new UI concepts in Honeycomb. Android 3.0 did away with hiding all the controls behind a menu button. There was now a strip of icons along the top of the screen called the Action Bar, which lifted many useful controls to the main screen where users could see them. Gmail showed buttons for search, compose, and refresh, and it put less useful controls like settings, help, and feedback in a dropdown called the "overflow" button. Tapping checkboxes or selecting text would cause the entire action bar to change to icons relating to those actions—for instance, selecting text would bring up cut, copy, and select all buttons. + +The app icon displayed in the top left corner doubled as a navigation button called "Up." While "Back" worked similarly to a browser back button, navigating to previously visited screens, "Up" would navigate up the app hierarchy. For instance, if you were in the Android Market, pressed the "Email developer" button, and Gmail opened, "Back" would take you back to the Android Market, but "Up" would take you to the Gmail inbox. "Back" might close the current app, but "Up" never would. Apps could control the "Back" button, and they usually reprogrammed it to replicate the "Up" functionality. In practice, there was rarely a difference between the two buttons. + +Honeycomb also introduced the "Fragments" API, which allowed developers to use a single app for tablets and phones. A "Fragment" was a single pane of a user interface. In the Gmail picture above, the left folder list was one fragment and the inbox was another fragment. Phones would show one fragment per screen, and tablets could show two side-by-side. The developer defined the look of individual fragments, and Android would decide how they should be displayed based on the current device. + +![The calculator finally used regular Android buttons, but someone spilled blue ink on the calendar.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/calculendar.png) +The calculator finally used regular Android buttons, but someone spilled blue ink on the calendar. +Photo by Ron Amadeo + +For the first time in Android's history, the calculator got a makeover with non-custom buttons, so it actually looked like part of the OS. The bigger screen made room for more buttons, enough that all the calculator functionality could fit on one screen. The calendar greatly benefited from the extra space, gaining much more room for appointment text and controls. The action bar at the top of the screen held buttons to switch views, along with showing the current time span and common controls. Appointment blocks switched to a white background with the calendar corner only showing in the top right corner. At the bottom (or side, in horizontal view) were boxes showing the month calendar and a list of displayed calendars. + +The scale of the calendar could be adjusted, too. By performing a pinch zoom gesture, portrait week and day views could show between five and 19 hours of appointments on a single screen. The background of the calendar was made up of an uneven blue splotch, which didn't look particularly great and was tossed on later versions. + +![The new camera interface, showing off the live "Negative" effect.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/camera.png) +The new camera interface, showing off the live "Negative" effect. +Photo by Ron Amadeo + +The giant 10-inch Xoom tablet did have a camera, which meant that it also had a camera app. The Tron redesign finally got rid of the old faux-leather look that Google came up with in Android 1.6. The controls were laid out in a circle around the shutter button, bringing to mind the circular controls and dials on a real camera. The Cooliris-derived speech bubble popups were changed to glowing, semi-transparent black boxes. The Honeycomb screenshot shows the new "color effect" functionality, which applied a filter to the viewfinder in real time. Unlike the Gingerbread camera app, this didn't support a portrait orientation—it was limited to landscape only. Taking a portrait picture with a 10-inch tablet doesn't make much sense, but then neither does taking a landscape one. + +![The clock app didn't get quite as much love as other areas. Google just threw it into a tiny box and called it a day.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/clocks.png) +The clock app didn't get quite as much love as other areas. Google just threw it into a tiny box and called it a day. +Photo by Ron Amadeo + +Tons of functionality went out the door when it came time to remake the clock app. The entire "Deskclock" concept was kicked out the door, replaced with a simple large display of the time against a plain black background. The ability to launch other apps and view the weather was gone, as was the ability of the clock app to use your wallpaper. Google sometimes gave up when it came time to design a tablet-sized interface, like here, where it just threw the alarm interface into a tiny, centered dialog box. + +![The Music app finally got the ground-up redesign it has needed forever.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/muzack.png) +The Music app finally got the ground-up redesign it has needed forever. +Photo by Ron Amadeo + +While music received a few minor additions during its life, this was really the first time since Android 0.9 that it received serious attention. The highlight of the redesign was a don't-call-it-coverflow scrolling 3D album art view, called "New and Recent." Instead of the tabs added in Android 2.1, navigation was handled by a Dropbox box in the Action Bar. While "New and Recent" had 3D scrolling album art, "Albums" used a flat grid of albums thumbnails. The other sections had totally different designs, too. "Songs" used a vertically scrolling list of text, and "Playlists," "Genres," and "Artists" used stacked album art. + +In nearly every view, every single item had its own individual menu, usually little arrows in the bottom right corner of an item. For now, these would only show "Play" and "add to Playlist," but this version of Google Music was built for the future. Google was launching a Music service soon, and those individual menus would be needed for things like viewing other content from that artist in the Music Store and managing the cloud storage versus local storage options. + +Just like the Cooliris Gallery in Android 2.1, Google Music would blow up one of your thumbnails and use it as a background. The bottom "Now Playing" bar now displayed the album art, playback controls, and a song progress bar. + +![Some of the new Google Maps was really nice, and some of it was from Android 1.5.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/maps.png) +Some of the new Google Maps was really nice, and some of it was from Android 1.5. +Photo by Ron Amadeo + +Google Maps received another redesign for the big screen. This one would stick around for a while and used a semi-transparent black action bar for all the controls. Search was again the primary function, given the first spot in the action bar, but this time it was an actual search bar you could type in, instead of a search bar-shaped button that launched a completely different interface. Google finally gave up on dedicating screen space to actual zoom buttons, relying on only gestures to control the map view. While the feature has since been ported to all old versions of Maps, Honeycomb was the first version to feature 3D building outlines on the map. Dragging two fingers down on the map would "tilt" the map view and show the sides of the buildings. You could freely rotate and the buildings would adjust, too. + +Not every part of Maps was redesigned. Navigation was untouched from Gingerbread, and some core parts of the interface, like directions, were pulled straight from Android 1.6 and centered in a tiny box. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/17/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/18 - The history of Android.md b/sources/talk/The history of Android/18 - The history of Android.md new file mode 100644 index 0000000000..2b795adba1 --- /dev/null +++ b/sources/talk/The history of Android/18 - The history of Android.md @@ -0,0 +1,83 @@ +The history of Android +================================================================================ +![Yet another Android Market redesign dips its toe into the "cards" interface that would become a Google staple.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/play-store.png) +Yet another Android Market redesign dips its toe into the "cards" interface that would become a Google staple. +Photo by Ron Amadeo + +The Android Market released its fourth new design in Android's two-and-a-half years on the market. This new design was hugely important as it came really close to Google's "cards" interface. By displaying Apps or other content in little blocks, Google could seamlessly transition its app design between screens of various sizes with minimal effort. Content could be displayed just like photos in a gallery app—feed the layout renderer a big list of content blocks, enable screen wrapping, and you were done. Bigger screens saw more blocks of content, and smaller screens only saw a few at a time. With the content display out of the way, Google added a "Categories" fragment to the right side and a big featured app carousel at the top. + +While the design was ready for an easily configurable interface, the functionality was not. The original shipping version of the market was locked to a landscape orientation and was Honeycomb-exclusive. + +![The app page and "My Apps" interface.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/device-2014-02-12-190002.png) +The app page and "My Apps" interface. +Photo by Ron Amadeo + +This new market sold not only apps, but brought Books and Movies rentals into the fold as well. Google was selling books since 2010; it was only ever through a Website. The new market unified all of Google's content sales in a single location and brought it one step closer to taking on Apple's iTunes juggernaut, though selling all of these items under the "Android Market" was a bit of a branding snafu, as much of the content didn't require Android to use. + +![The browser did its best to look like Chrome, and Contacts used a two-pane interface.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/browsercontactst.png) +The browser did its best to look like Chrome, and Contacts used a two-pane interface. +Photo by Ron Amadeo + +The new Browser added an honest-to-goodness tabs strip at the top of the interface. While this browser wasn't Chrome, it aped a lot of Chrome's design and features. Besides the pioneering tabs-on-top interface, it added Incognito tabs, which kept no history or autocomplete records. There was also an option to have a Chrome-style new tab page consisting of thumbnails of your most-viewed webpages. + +The new Browser even synced with Chrome. After signing in to the browser, it would download your Chrome bookmarks and automatically sign in to Google Web pages with your account. Bookmarking a page was as easy as tapping on the star icon in the address bar. Just like Google Maps, the browser dumped the zoom buttons and went with all gesture controls. + +The contacts app was finally removed from the phone app and broken out into a standalone app. The previous contacts/dialer hybrid was far too phone-centric for how people use a modern smartphone. Contacts housed information for e-mails, IM, texting, addresses, birthdays, and social networks, so tying it to the phone app makes just as much sense as trying it to Google Maps. With the telephony requirements out of the way, contacts could be simplified to a tab-less list of people. Honeycomb went with a dual pane view showing the full contact list on the left and contacts on the right. This again made use of a Fragments API; a hypothetical phone version of this app could show each panel as a single screen. + +The Honeycomb version of Contacts was the first version to have a quick scroll feature. When grabbing the left scroll bar, you could quickly scroll up and down, and a letter preview showed your current spot in the list. + +![The new YouTube app looked like something out of the Matrix.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/youtubes.png) +The new YouTube app looked like something out of the Matrix. +Photo by Ron Amadeo + +YouTube thankfully dumped the "unique" design Google came up with for 2.3 and gave the video service a cohesive design that looked like it belonged in Android. The main screen was a horizontally scrolling curved wall of video thumbnails that showed a most popular or (when signed in) personalized selection of videos. While Google never brought this design to phones, it could be considered an easily reconfigurable card interface. The action bar shined here as a reconfigurable toolbar. When not signed it, the action bar was filled with a search bar. When you were signed in, search shrank down to a button, and tabs for "Home," "Browse," and "Your Channel" were shown. + +![Honeycomb really liked to drive home that it was a computer interface with blue scaffolding. Movie Studio completes the Tron look with an orange theme.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/other2.png) +Honeycomb really liked to drive home that it was a computer interface with blue scaffolding. Movie Studio completes the Tron look with an orange theme. +Photo by Ron Amadeo + +The lone new app in Honeycomb was "Movie Studio," which was not a self-explanatory app and arrived with no explanations or instructions. As far as we could tell, you could import video clips, cut them up, and add text and scene transitions. Editing video—one of the most time consuming, difficult, and processor-intensive things you can do on a computer—on a tablet felt just a little too ambitious, and Google would completely remove this app in later versions. Our favorite part of Movie Studio was that it really completed the Tron theme. While the rest of the OS used blue highlights, this was all orange. (Movie Studio is an evil program!) + +![Widgets!](http://cdn.arstechnica.net/wp-content/uploads/2014/02/device-2014-02-12-202224.png) +Widgets! +Photo by Ron Amadeo + +Honeycomb brought a new widget framework that allowed for scrolling widgets, and the Gmail, Email, and Calendar widgets were upgraded to support it. YouTube and Books used a new widget that auto-scrolled through cards of content. By flicking up or down on the widget, you could scroll through the cards. We're not sure what the point of being constantly reminded of your book collection was, but it's there if you want it. While all of these widgets worked great on a 10-inch screen, Google never redesigned them for phones, making them practically useless on Android's most popular form factor. All the widgets had massive identifying headers and usually took up half the screen to show only a few items. + +![The scrollable Recent Apps and resizable widgets in Android 3.1.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/31new.jpg) +The scrollable Recent Apps and resizable widgets in Android 3.1. +Photo by Ron Amadeo + +Later versions of Honeycomb would fix many of the early problems 3.0 had. Android 3.1 was released three months after the first version of Honeycomb, and it brought several improvements. Resizable widgets were one of the biggest features added. After long pressing on a widget, a blue outline with grabbable handles would pop up around it, and dragging the handles around would resize the widget. The Recent Apps panel could now scroll vertically and held many more apps. The only feature missing from it at this point was the ability to swipe away apps. + +Today, an 0.1 upgrade is a major release, but in Honeycomb, point releases were considerably smaller. Besides the few UI tweaks, 3.1 added support for gamepads, keyboards, mice, and other input devices over USB and Bluetooth. It also offered a few more developer APIs. + +![Android 3.2's compatibility zoom and a typical stretched-out app on an Android tablet.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/device-2014-02-14-131132.jpg) +Android 3.2's compatibility zoom and a typical stretched-out app on an Android tablet. +Photo by Ron Amadeo + +Android 3.2 launched two months after 3.1, adding support for smaller sized tablets in the seven- to eight-inch range. It finally enabled SD card support, which the Xoom carried like a vestigial limb for the first five months of its life. + +Honeycomb was rushed out the door in order to be an ecosystem builder. No one will want an Android tablet if the tablet-specific apps aren't there, and Google knew it needed to get something in the hands of developers ASAP. At this early stage of Android's tablet ecosystem, the apps just weren't there. It was the biggest problem people had with the Xoom. + +3.2 added "Compatibility Zoom," which gave users a new option of stretching apps to the screen (as shown in the right picture) or zooming the normal app layout to fit the screen. Neither option was ideal, and without the app ecosystem to support it, Honeycomb devices sold pretty poorly. Google's tablet moves would eventually pay off though. Today, Android tablets have [taken the market share crown from iOS][1]. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/18/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://techcrunch.com/2014/03/03/gartner-195m-tablets-sold-in-2013-android-grabs-top-spot-from-ipad-with-62-share/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/19 - The history of Android.md b/sources/talk/The history of Android/19 - The history of Android.md new file mode 100644 index 0000000000..32841f5be9 --- /dev/null +++ b/sources/talk/The history of Android/19 - The history of Android.md @@ -0,0 +1,71 @@ +The history of Android +================================================================================ +![Google Music Beta running on Gingerbread.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/device-2014-03-31-110613.png) +Google Music Beta running on Gingerbread. +Photo by Ron Amadeo + +### Google Music Beta—cloud storage in lieu of a content store ### + +While Honeycomb revamped the Google Music interface, the Music app didn't go directly from the Honeycomb design to Ice Cream Sandwich. In May 2011, Google launched "[Google Music Beta][1]," an online music locker that came along with a new Google Music app. + +The new Google Music app for 2.2 and up took a few design cues from the Cooliris Gallery, of all things, going with a changing, blurry image for the background. Just about everything was transparent: the pop-up menus, the tabs at the top, and the now-playing bar at the bottom. Individual songs or entire playlists could be downloaded to the device for offline playback, making Google Music an easy way to make sure your music was on all your devices. Besides the mobile app, there was also a Webapp, which allowed Google Music to work on any desktop computer. + +Google didn't have content deals in place with the record companies to start a music store yet, so its stop-gap solution was to allow users to store songs online and stream them to a device. Today, Google has content deals for individual song purchases and all-you-can-eat subscription modes, along with the music locker service. + +### Android 4.0, Ice Cream Sandwich—the modern era ### + +![The Samsung Galaxy Nexus, Android 4.0's launch device.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/samsung-i9250-galaxy-nexus-51.jpg) +The Samsung Galaxy Nexus, Android 4.0's launch device. + +Released in October 2011, Android 4.0, Ice Cream Sandwich, got the OS back on track with a release spanning phones and tablets, and it was once again open source. It was the first update to come to phones since Gingerbread, which meant the majority of Android's user base went almost a year without seeing an update. 4.0 was all about shrinking the Honeycomb design to smaller devices, bringing on-screen buttons, the action bar, and the new design language to phones. + +Ice Cream Sandwich debuted on the Samsung Galaxy Nexus, one of the first Android phones with a 720p screen. Along with the higher resolution, the Galaxy Nexus pushed phones to even larger sizes with a 4.65-inch screen—almost a full inch larger than the original Nexus One. This was called "too big" by many critics, but today many Android phones are even bigger. (Five inches is "normal" now.) Ice Cream Sandwich required a lot more power than Gingerbread did, and the Galaxy Nexus delivered with a dual core, 1.2Ghz TI OMAP processor and 1GB of RAM. + +In the US, the Galaxy Nexus debuted on Verizon with an LTE modem. Unlike previous Nexus devices, the most popular model—the Verizon version—was under the control of a carrier, and Google's software and updates had to be approved by Verizon before the phone could be updated. This led to delays in updates and the removal of software Verizon didn't like, namely Google Wallet. + +Thanks to the software improvements in Ice Cream Sandwich, Google finally achieved peak button removal on a phone. With the on-screen navigation buttons, the capacitive buttons could be removed, leaving the Galaxy Nexus with only power and volume buttons. + +![Android 4.0 shrunk down a lot of the Honeycomb design.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/2home.png) +Android 4.0 shrunk down a lot of the Honeycomb design. +Photo by Ron Amadeo + +The Tron aesthetic in Honeycomb was a little much. Immediately in Ice Cream Sandwich, Google started turning down some of the more sci-fi aspects of the design. The sci-fi clock font changed from a folded over semi-transparent thing to a thin, elegant, normal-looking font. The water ripple touch effect on the unlock circle was removed, and the alien Honeycomb clock widget was scrapped in favor of a more minimal design. The system buttons were redesigned, too, changing from blue outlines with the occasional thick side to thin, even, white outlines. The default wallpaper changed from the blue Honeycomb spaceship interior to a streaky, broken rainbow, which added some much-needed color to the default layout. + +The Honeycomb system bar features were split into a two-bar design for phones. At the top was the traditional status bar, and at the bottom was the new system bar, which housed the three system buttons: Back, Home, and Recent. A permanent search bar was added to the top of the home screen. The bar persisted on the screen the same way the dock did, so over the five home screens, it took up 20 icon spots. On the Honeycomb unlock screen, the small inner circle could be moved anywhere outside the larger circle to unlock the device. In Ice Cream Sandwich, you had to actually hit the unlock icon with the inner circle. This new accuracy requirement allowed Google to add another option to the lock screen: a camera shortcut. Dragging the inner circle to the camera icon would directly launch the camera, skipping the home screen. + +![A Phone OS meant a ton more apps, and the notification panel became a full-screen interface again.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/appsandnotic40.png) +A Phone OS meant a ton more apps, and the notification panel became a full-screen interface again. +Photo by Ron Amadeo + +The App drawer was still tabbed, but the "My Apps" tab from Honeycomb was replaced with "Widgets," which was a simple 2×3 thumbnail view of widgets. Like Honeycomb, this app drawer was paginated and had to be swiped through horizontally. (Android still uses this app drawer design today.) New in the app drawer was an Android Google+ app, which existed separately for some time. Along with it came a shortcut to "Messenger," the Google+ private messaging service. ("Messenger" is not to be confused with "Messaging," the stock SMS app.) + +Since we're back to a phone now, Messaging, News and Weather, Phone, and Voice Dialer returned, and Cordy, a tablet game, was removed. Our screenshots are from the Verizon variant, which, despite being a Nexus device, was sullied by crapware like "My Verizon Mobile," and "VZ Backup Assistant." In keeping with the de-Tronification theme of Ice Cream Sandwich, the Calendar and Camera icons now looked more like something from Planet Earth rather than alien artifacts. Clock, Downloads, Phone, and Android Market got new icons, too, and "Contacts" got a new icon and a new name, becoming "People." + +The Notification panel got a big overhaul, especially when compared to the [previous Gingerbread design][2]. There was now a top header featuring the date, a settings shortcut, and a "clear all." While first Honeycomb allowed users to dismiss individual notifications by tapping on an "X" in the notification, Ice Cream Sandwich's implementation was much more elegant: just swipe the individual notifications to the left or right and they cleared. Honeycomb had blue highlights, but the blue tone was all over the place. Ice Cream Sandwich unified almost everything to a single blue (hex code #33B5E5, if you want to get specific). The background of the notification panel was made transparent, and the "handle" at the bottom changed to a minimal blue circle with an opaque black background. + +![The main page of the Android Market changed back to black.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/market.png) +The main page of the Android Market changed back to black. +Photo by Ron Amadeo + +The Market got yet another redesign. It finally supported portrait mode again and added Music to the lineup of content you can buy in the store. The new Market extended the cards concept that debuted in Honeycomb and was the first version to use the same application on tablets and phones. The cards on the main page usually didn't link to apps, instead pointing to special promotional pages like "staff picks" or seasonal promotions. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/19/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://arstechnica.com/gadgets/2011/05/hands-on-grooving-on-the-go-with-impressive-google-music-beta/ +[2]:http://cdn.arstechnica.net/wp-content/uploads/2014/02/32.png +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/20 - The history of Android.md b/sources/talk/The history of Android/20 - The history of Android.md new file mode 100644 index 0000000000..30db4ce5c2 --- /dev/null +++ b/sources/talk/The history of Android/20 - The history of Android.md @@ -0,0 +1,93 @@ +The history of Android +================================================================================ +![Another Market design that was nothing like the old one. This lineup shows the categories page, featured, a top apps list, and an app page.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/market-pages.png) +Another Market design that was nothing like the old one. This lineup shows the categories page, featured, a top apps list, and an app page. +Photo by Ron Amadeo + +These screenshots give us our first look at the refined version of the Action Bar in Ice Cream Sandwich. Almost every app got a bar at the top of the screen that housed the app icon, title of the screen, several function buttons, and a menu button on the right. The right-aligned menu button was called the "overflow" button, because it housed items that didn't fit on the main action bar. The overflow menu wasn't static, though, it gave the action bar more screen real-estate—like in horizontal mode or on a tablet—and more of the overflow menu items were shown on the action bar as actual buttons. + +New in Ice Cream Sandwich was this design style of "swipe tabs," which replaced the 2×3 interstitial navigation screen Google was previously pushing. A tab bar sat just under the Action Bar, with the center title showing the current tab and the left and right having labels for the pages to the left and right of this screen. A swipe in either direction would change tabs, or you could tap on a title to go to that tab. + +One really cool design touch on the individual app screen was that, after the pictures, it would dynamically rearrange the page based on your history with that app. If you never installed the app before, the description would be the first box. If you used the app before, the first section would be the reviews bar, which would either invite you to review the app or remind you what you thought of the app last time you installed it. The second section for a previously used app was “What’s New," since an existing user would most likely be interested in changes. + +![Recent apps and the browser were just like Honeycomb, but smaller.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/recentbrowser.png) +Recent apps and the browser were just like Honeycomb, but smaller. +Photo by Ron Amadeo + +Recent apps toned the Tron look way down. The blue outline around the thumbnails was removed, along with the eerie, uneven blue glow in the background. It now looked like a neutral UI piece that would be at home in any time period. + +The Browser did its best to bring a tabbed experience to phones. Multi-tab browsing was placed front and center, but instead of wasting precious screen space on a tab strip, a tab button would open a Recent Apps-like interface that would show you your open tabs. Functionally, there wasn't much difference between this and the "window" view that was present in past versions of the Browser. The best addition to the Browser was a "Request desktop site" menu item, which would switch from the default mobile view to the normal site. The Browser showed off the flexibility of Google's Action Bar design, which, despite not having a top-left app icon, still functioned like any other top bar design. + +![Gmail and Google Talk—they're like Honeycomb, but smaller!](http://cdn.arstechnica.net/wp-content/uploads/2014/03/gmail2.png) +Gmail and Google Talk—they're like Honeycomb, but smaller! +Photo by Ron Amadeo + +Gmail and Google Talk both looked like smaller versions of their Honeycomb designs, but with a few tweaks to work better on smaller screens. Gmail featured a dual Action Bar—one on the top of the screen and one on the bottom. The top of the bar showed your current folder, account, and number of unread messages, and tapping on the bar opened a navigation menu. The bottom featured all the normal buttons you would expect along with the overflow button. This dual layout was used in order display more buttons on the surface level, but in landscape mode where vertical space was at a premium, the dual bars merged into a single top bar. + +In the message view, the blue bar was "sticky" when you scrolled down. It stuck to the top of the screen, so you could always see who wrote the current message, reply, or star it. Once in a message, the thin, dark gray bar at the bottom showed your current spot in the inbox (or whatever list brought you here), and you could swipe left and right to get to other messages. + +Google Talk would let you swipe left and right to change chat windows, just like Gmail, but there the bar was at the top. + +![The new dialer and the incoming call screen, both of which we haven't seen since Gingerbread.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/inc-calls.png) +The new dialer and the incoming call screen, both of which we haven't seen since Gingerbread. +Photo by Ron Amadeo + +Since Honeycomb was only for tablets, some UI pieces were directly preceded by Gingerbread instead. The new Ice Cream Sandwich dialer was, of course, black and blue, and it used smaller tabs that could be swiped through. While Ice Cream Sandwich finally did the sensible thing and separated the main phone and contacts interfaces, the phone app still had its own contacts tab. There were now two spots to view your contact list—one with a dark theme and one with a light theme. With a hardware search button no longer being a requirement, the bottom row of buttons had the voicemail shortcut swapped out for a search icon. + +Google liked to have the incoming call interface mirror the lock screen, which meant Ice Cream Sandwich got a circle-unlock design. Besides the usual decline or accept options, a new button was added to the top of the circle, which would let you decline a call by sending a pre-defined text message to the caller. Swiping up and picking a message like "Can't talk now, call you later" was (and still is) much more informative than an endlessly ringing phone. + +![Honeycomb didn't have folders or a texting app, so here's Ice Cream Sandwich versus Gingerbread.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/thenonmessedupversion.png) +Honeycomb didn't have folders or a texting app, so here's Ice Cream Sandwich versus Gingerbread. +Photo by Ron Amadeo + +Folders were now much easier to make. In Gingerbread, you had to long press on the screen, pick "folders," and then pick "new folder." In Ice Cream Sandwich, just drag one icon on top of another, and a folder is created containing those two icons. It was dead simple and much easier than finding the hidden long-press command. + +The design was much improved, too. Gingerbread used a generic beige folder icon, but Ice Cream Sandwich actually showed you what was in the folder by stacking the first three icons on top of each other, drawing a circle around them, and using that as the folder icon. Open folder containers resized to fit the amount of icons in the folder rather than being a full-screen, mostly empty box. It looked way, way better. + +![YouTube switched to a more modern white theme and used a list view instead of the crazy 3D scrolling](http://cdn.arstechnica.net/wp-content/uploads/2014/03/youtubes.png) +YouTube switched to a more modern white theme and used a list view instead of the crazy 3D scrolling +Photo by Ron Amadeo + +YouTube was completely redesigned and looked less like something from The Matrix and more like, well, YouTube. It was a simple white list of vertically scrolling videos, just like the website. Making videos on your phone was given prime real estate, with the first button on the action bar dedicated to recording a video. Strangely, different screens used different YouTube logos in the top left, switching between a horizontal YouTube logo and a square one. + +YouTube used swipe tabs just about everywhere. They were placed on the main page to browse and view your account and on the video pages to switch between comments, info, and related videos. The 4.0 app showed the first signs of Google+ YouTube integration, placing a "+1" icon next to the traditional rating buttons. Eventually Google+ would completely take over YouTube, turning the comments and author pages into Google+ activity. + +![Ice Cream Sandwich tried to make things easier on everyone. Here is a screen for tracking data usage, the new developer options with tons of analytics enabled, and the intro tutorial.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/data.png) +Ice Cream Sandwich tried to make things easier on everyone. Here is a screen for tracking data usage, the new developer options with tons of analytics enabled, and the intro tutorial. +Photo by Ron Amadeo + +Data Usage allowed users to easily keep track of and control their data usage. The main page showed a graph of this month's data usage, and users could set thresholds to be warned about data consumption or even set a hard usage limit to avoid overage charges. All of this was done easily by dragging the horizontal orange and red threshold lines higher or lower on the chart. The vertical white bars allowed users to select a slice of time in the graph. At the bottom of the page, the data usage for the selected time was broken down by app, so users could select a spike and easily see what app was sucking up all their data. When times got really tough, in the overflow button was an option to restrict all background data. Then, only apps running in the foreground could have access to the Internet connection. + +The Developer Options typically only housed a tiny handful of settings, but in Ice Cream Sandwich the section received a huge expansion. Google added all sorts of on-screen diagnostic overlays to help app developers understand what was happening inside their app. You could view CPU usage, pointer location, and view screen updates. There were also options to change the way the system functioned, like control over animation speed, background processing, and GPU rendering. + +One of the biggest differences between Android and the iOS is Android's app drawer interface. In Ice Cream Sandwich's quest to be more user-friendly, the initial startup launched a small tutorial showing users where the app drawer was and how to drag icons out of the drawer and onto the homescreen. With the removal of the off-screen menu button and changes like this, Android 4.0 made a big push to be more inviting to new smartphone users and switchers. + +![The "touch to beam" NFC support, Google Earth, and App Info, which would let you disable crapware.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/2014-03-06-03.57.png) +The "touch to beam" NFC support, Google Earth, and App Info, which would let you disable crapware. + +Built into Ice Cream Sandwich was full support for [NFC][1]. While previous devices like the Nexus S had NFC, support was limited and the OS couldn't do much with the chip. 4.0 added a feature called Android Beam, which would let two NFC-equipped Android 4.0 devices transfer data back and forth. NFC would transmit data related to whatever was on the screen at the time, so tapping when a phone displayed a webpage would send that page to the other phone. You could also send contact information, directions, and YouTube links. When the two phones were put together, the screen zoomed out, and tapping on the zoomed-out display would send the information. + +In Android, users are not allowed to uninstall system apps, which are often integral to the function of the device. Carriers and OEMs took advantage of this and started putting crapware in the system partition, which they would often stick with software they didn't want. Android 4.0 allowed users to disable any app that couldn't be uninstalled, meaning the app remained on the system but didn't show up in the app drawer and couldn't be run. If users were willing to dig through the settings, this gave them an easy way to take control of their phone. + +Android 4.0 can be thought of as the start of the modern Android era. Most of the Google apps released around this time only worked on Android 4.0 and above. There were so many new APIs that Google wanted to take advantage of that—initially at least—support for versions below 4.0 was limited. After Ice Cream Sandwich and Honeycomb, Google was really starting to get serious about software design. In January 2012, the company [finally launched][2] *Android Design*, a design guideline site that taught Android app developers how to create apps to match the look and feel of Android. This was something iOS not only had from the start of third-party app support, but Apple enforced design so seriously that apps that did not meet the guidelines were blocked from the App Store. The fact that Android went three years without any kind of public design documents from Google shows just how bad things used to be. But with Duarte in charge of Android's design revolution, the company was finally addressing basic design needs. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/20/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://arstechnica.com/gadgets/2011/02/near-field-communications-a-technology-primer/ +[2]:http://arstechnica.com/business/2012/01/google-launches-style-guide-for-android-developers/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/21 - The history of Android.md b/sources/talk/The history of Android/21 - The history of Android.md new file mode 100644 index 0000000000..265e7a867b --- /dev/null +++ b/sources/talk/The history of Android/21 - The history of Android.md @@ -0,0 +1,103 @@ +The history of Android +================================================================================ +![](http://cdn.arstechnica.net/wp-content/uploads/2014/03/playicons2.png) +Photo by Ron Amadeo + +### Google Play and the return of direct-to-consumer device sales ### + +On March 6, 2012, Google unified all of its content offerings under the banner of "Google Play." The Android Market became the Google Play Store, Google Books became Google Play Books, Google Music became Google Play Music, and Android Market Movies became Google Play Movies & TV. While the app interfaces didn't change much, all four content apps got new names and icons. Content purchased in the Play Store would be downloaded to the appropriate app, and the Play Store and Play content apps all worked together to provide a fairly organized content experience. + +The Google Play update was Google's first big out-of-cycle update. Four packed-in apps were all changed without having to issue a system update—they were all updated through the Android Market/Play Store. Enabling out-of-cycle updates to individual apps was a big focus for Google, and being able to do an update like this was the culmination of an engineering effort that started in the Gingerbread era. Google had been working on "decoupling" the apps from the operating system and making everything portable enough to be distributed through the Android Market/Play Store. + +While one or two apps (mostly Maps and Gmail) had previously lived on the Android Market, from here on you'll see a lot more significant updates that have nothing to do with an operating system release. System updates require the cooperation of OEMs and carriers, so they are difficult to push out to every user. Play Store updates are completely controlled by Google, though, providing the company a direct line to users' devices. For the launch of Google Play, the Android Market updated itself to the Google Play Store, and from there, Books, Music, and Movies were all issued Google Play-flavored updates. + +The design of the Google Play apps was still all over the place. Each app looked and functioned differently, but for now, a cohesive brand was a good start. And removing "Android" from the branding was necessary because many services were available in the browser and could be used without touching an Android device at all. + +In April 2012, Google started [selling devices though the Play Store again][1], reviving the direct-to-customer model it had experimented with for the launch of the Nexus One. While it was only two years after ending the Nexus One sales, Internet shopping was now more common place, and buying something before you could hold it didn't seem as crazy as it did in 2010. + +Google also saw how price-conscious consumers became when faced with the Nexus One's $530 price tag. The first device for sale was an unlocked, GSM version of the Galaxy Nexus for $399. From there, price would go even lower. $350 has been the entry-level price for the last two Nexus smartphones, and 7-inch Nexus tablets would come in at only $200 to $220. + +Today, the Play Store sells eight different Android devices, four Chromebooks, a thermostat, and tons of accessories, and the device store is the de-facto location for a new Google product launch. New phone launches are so popular, the site usually breaks under the load, and new Nexus phones sell out in a few hours. + +### Android 4.1, Jelly Bean—Google Now points toward the future ### + +![The Asus-made Nexus 7, Android 4.1's launch device.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/ASUS_Google_Nexus_7_4_11.jpg) +The Asus-made Nexus 7, Android 4.1's launch device. + +With the release of Android 4.1, Jelly Bean in July 2012, Google settled into an Android release cadence of about every six months. The platform matured to the point where a release every three months was unnecessary, and the slower release cycle gave OEMs a chance to catch their breath. Unlike Honeycomb, point releases were now fairly major updates, with 4.1 bringing major UI and framework changes. + +One of the biggest changes in Jelly Bean that you won't be able to see in screenshots is "Project Butter," the name for a concerted effort by Google's engineers to make Android animations run smoothly at 30FPS. Core changes were made, like Vsync and triple buffering, and individual animations were optimized so they could be drawn smoothly. Animation and scrolling smoothness had always been a weak point of Android when compared to iOS. After some work on both the core animation framework and on individual apps, Jelly Bean brought Android a lot closer to iOS' smoothness. + +Along with Jelly Bean came the [Nexus][2] 7, a 7-inch tablet manufactured by Asus. Unlike the primarily horizontal Xoom, the Nexus 7 was meant to be used in portrait mode, like a large phone. The Nexus 7 showed that, after almost a year-and-a-half of ecosystem building, Google was ready to commit to the tablet market with a flagship device. Like the Nexus One and GSM Galaxy Nexus, the Nexus 7 was sold online directly by Google. While those earlier devices had shockingly high prices for consumers that were used to carrier subsidies, the Nexus 7 hit a mass market price point of only $200. The price bought you a device with a 7-inch, 1280x800 display, a quad core, 1.2 GHz Tegra 3 processor, 1GB of RAM, and 8GB of storage. The Nexus 7 was such a good value that many wondered if Google was making any money at all on its flagship tablet. + +This smaller, lighter, 7-inch form factor would be a huge success for Google, and it put the company in the rare position of being an industry trendsetter. Apple, which started with a 10-inch iPad, was eventually forced to answer the Nexus 7 and tablets like it with the iPad Mini. + +![4.1's new lock screen design, wallpaper, and the new on-press highlight on the system buttons.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/picture.png) +4.1's new lock screen design, wallpaper, and the new on-press highlight on the system buttons. +Photo by Ron Amadeo + +The Tron look introduced in Honeycomb was toned down a little in Ice Cream Sandwich, and Jelly Bean took things a step further. It started removing blue from large chunks of the operating system. The hint was the on-press highlights on the system buttons, which changed from blue to gray. + +![A composite image of the new app lineup and the new notification panel with expandable notifications.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/jb-apps-and-notications.png) +A composite image of the new app lineup and the new notification panel with expandable notifications. +Photo by Ron Amadeo + +The Notification panel was completely revamped, and we've finally arrived at the design used today in KitKat. The new panel extended to the top of the screen and covered the usual status icons, meaning the status bar was no longer visible when the panel was open. The time was prominently displayed in the top left corner, along with the date and a settings shortcut. The clear all notions button, which was represented by an "X" in Ice Cream Sandwich, changed to a stairstep icon, symbolizing the staggered sliding animation that cleared the notification panel. The bottom handle changed from a circle to a single line that ran the length of the notification panel. All the typography was changed—the notification panel now used bigger, thinner fonts for everything. This was another screen where the blue introduced in Ice Cream Sandwich and Honeycomb was removed. The notification panel was entirely gray now except for on-touch highlights. + +There was new functionality in the panel, too. Notifications were now expandable and could show much more information than the previous two-line design. It now showed up to eight lines of text and could even show buttons at the bottom of the notification. The screenshot notification had a share button at the bottom, and you could call directly from a missed call notification, or you could snooze a ringing alarm all from the notification panel. New notifications were expanded by default, but as they piled up they would collapse back to the traditional size. Dragging down on a notification with two fingers would expand it. + +![The new Google Search app, with Google Now cards, voice search, and text search.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/googlenow.png) +The new Google Search app, with Google Now cards, voice search, and text search. +Photo by Ron Amadeo + +The biggest feature addition to Jelly Bean for not only Android, but for Google as a whole, was the new version of the Google Search application. This introduced "Google Now," a predictive search feature. Google Now was displayed as several cards that sit below the search box, and it would offer results to searches Google thinks you care about. These were things like Google Maps searches for places you've recently looked at on your desktop computer or calendar appointment locations, the weather, and time at home while traveling. + +The new Google Search app could, of course, be launched with the Google icon, but it could also be accessed from any screen with a swipe up from the system bar. Long pressing on the system bar brought up a ring that worked similarly to the lock screen ring. The card section scrolled vertically, and cards could be a swipe away if you didn't want to see them. Voice Search was a big part of the updates. Questions weren't just blindly entered into Google; if Google knew the answer, it would also talk back using a text-To-Speech engine. And old-school text searches were, of course, still supported. Just tap on the bar and start typing. + +Google frequently called Google Now "the future of Google Search." Telling Google what you wanted wasn't good enough. Google wanted to know what you wanted before you did. Google Now put all of Google's data mining knowledge about you to work for you, and it was the company's biggest advantage against rival search services like Bing. Smartphones knew more about you than any other device you own, so the service debuted on Android. But Google slowly worked Google Now into Chrome, and eventually it will likely end up on Google.com. + +While the functionality was important, it became clear that Google Now was the most important design work to ever come out of the company, too. The white card aesthetic that this app introduced would become the foundation for Google's design of just about everything. Today, this card style is used in the Google Play Store and in all of the Play content apps, YouTube, Google Maps, Drive, Keep, Gmail, Google+, and many others. It's not just Android apps, either. Many of Google's desktop sites and iOS apps are inspired by this design. Design was historically one of Google's weak areas, but Google Now was the point where the company finally got its act together with a cohesive, company-wide design language. + +![Yet another YouTube redesign. Information density went way down.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/yotuube.png) +Yet another YouTube redesign. Information density went way down. +Photo by Ron Amadeo + +Another version, another YouTube redesign. This time the list view was primarily thumbnail-based, with giant images taking up most of the screen real estate. Information density tanked with the new list design. Before YouTube would display around six items per screen, now it could only display three. + +YouTube was one of the first apps to add a sliding drawer to the left side of an app, a feature which would become a standard design style across Google's apps. The drawer has links for your account and channel subscriptions, which allowed Google to kill the tabs-on-top design. + +![Google Play Service's responsibilities versus the rest of Android.](http://cdn.arstechnica.net/wp-content/uploads/2013/08/playservicesdiagram2.png) +Google Play Service's responsibilities versus the rest of Android. +Photo by Ron Amadeo + +### Google Play Services—fragmentation and making OS versions (nearly) obsolete ### + +It didn't seem like a big deal at the time, but in September 2012, Google Play Services 1.0 was automatically pushed out to every Android phone running 2.2 and up. It added a few Google+ APIs and support for OAuth 2.0. + +While this update might sound boring, Google Play Services would eventually grow to become an integral part of Android. Google Play Services acts as a shim between the normal apps and the installed Android OS, allowing Google to update or replace some core components and add APIs without having to ship out a new Android version. + +With Play Services, Google had a direct line to the core of an Android phone without having to go through OEM updates and carrier approval processes. Google used Play Services to add an entirely new location system, a malware scanner, remote wipe capabilities, and new Google Maps APIs, all without shipping an OS update. Like we mentioned at the end of the Gingerbread section, thanks to all the "portable" APIs implemented in Play Services, Gingerbread can still download a modern version of the Play Store and many other Google Apps. + +The other big benefit was compatibility with Android's user base. The newest release of an Android OS can take a very long time to get out to the majority of users, which means APIs that get tied to the latest version of the OS won't be any good to developers until the majority of the user base upgrades. Google Play Services is compatible with Froyo and above, which is 99 percent of active devices, and the updates pushed directly to phones through the Play Store. By including APIs in Google Play Services instead of Android, Google can push a new API out to almost all users in about a week. It's [a great solution][3] to many of the problems caused by version fragmentation. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/21/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://arstechnica.com/gadgets/2012/04/unlocked-samsung-galaxy-nexus-can-now-be-purchased-from-google/ +[2]:http://arstechnica.com/gadgets/2012/07/divine-intervention-googles-nexus-7-is-a-fantastic-200-tablet/ +[3]:http://arstechnica.com/gadgets/2013/09/balky-carriers-and-slow-oems-step-aside-google-is-defragging-android/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/22 - The history of Android.md b/sources/talk/The history of Android/22 - The history of Android.md new file mode 100644 index 0000000000..79cf7bd2a5 --- /dev/null +++ b/sources/talk/The history of Android/22 - The history of Android.md @@ -0,0 +1,84 @@ +The history of Android +================================================================================ +### Android 4.2, Jelly Bean—new Nexus devices, new tablet interface ### + +The Android Platform was rapidly maturing, and with Google hosting more and more apps in the Play Store, there was less and less that needed to go out in the OS update. Still, the relentless march of updates must continue, and in November 2012 Android 4.2 was released. 4.2 was still called "Jelly Bean," a nod to the relatively small amount of changes that were present in this release. + +![The LG-made Nexus 4 and Samsung-made Nexus 10.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/unnamed.jpg) +The LG-made Nexus 4 and Samsung-made Nexus 10. +Photo by Google/Ron Amadeo + +Along with Android 4.2 came two flagship devices, the Nexus 4 and the Nexus 10, both of which were sold direct by Google on the Play Store. The Nexus 4 applied the Nexus 7 strategy of a quality device at a shockingly low price and sold for $300 unlocked. The Nexus 4 had a quad-core 1.5 GHz Snapdragon S4 Pro, 2GB of RAM and a 4.7-inch 1280×768 LCD. Google's new flagship phone was manufactured by LG, and with the manufacturer switch came a focus on materials and build quality. The Nexus 4 had a glass front and back, and while you couldn't drop it, it was one of the nicest-feeling Android phones to date. The biggest downside to the Nexus 4 was the lack of LTE at a time when most phones, including the Verizon Galaxy Nexus, came with the faster modem. Still, demand for the Nexus 4 greatly exceeded Google's expectations—the launch rush crashed the Play Store Web site on launch day. The device sold out in under an hour. + +The Nexus 10 was Google's first 10-inch Nexus tablet. The highlight of the device was the 2560×1600 display, which was the highest resolution in its class. All those pixels were powered by a dual core, 1.7GHz Cortex A15 processor and 2GB of RAM. With each passing month, it's looking more and more like the Nexus 10 is the first and last 10-inch Nexus tablet. Usually these devices are upgraded every year, but the Nexus 10 is now 16 months old, and there's no sign of the new model on the horizon. Google is doing well with smaller-sized 7-inch tablets, and it seems content to let partners [like Samsung][1] explore the larger end of the tablet spectrum. + +![The new lock screen, wallpaper, and clock widget design.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/JBvsjb.jpg) +The new lock screen, wallpaper, and clock widget design. +Photo by Ron Amadeo + +4.2 brought lots of changes to the lock screen. The font was centered and used an extremely thick weight for the hour and a thin font for the minutes. The lock screen was now paginated and could be customized with widgets. Rather than a simple clock on the lock screen, users could replace it with another widget or add extra pages to the lock screen for more widgets. + +![The lock screen's add widget page, the list of widgets, the Gmail widget on the lock screen, and swiping over to the camera.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/locksc2reen.jpg) +The lock screen's add widget page, the list of widgets, the Gmail widget on the lock screen, and swiping over to the camera. +Photo by Ron Amadeo + +The lock screen now worked like a stripped-down version of the home screen. Page outlines would pop up on the left and right sides of the lock screen to hint to users that they could swipe to other pages with other widgets. Swiping to the left would show a simple blank page with a plus sign in the center, and tapping on it would bring up a list of widgets that were compatible with the lock screen. Lock screens were limited to one widget per page and could be expanded or collapsed by dragging up or down on the widget. The right-most page was reserved for the camera—a simple over would open the camera interface, but you weren't able to swipe back. + +![The new Quick Settings panel and a composite image of the app lineup.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/42fix.png) +The new Quick Settings panel and a composite image of the app lineup. +Photo by Ron Amadeo + +One of the biggest additions to 4.2 was the new "Quick Settings" panel. Android 3.0 brought a way to quickly change power settings to tablets, and 4.2 finally brought that ability to phones. A new icon was added to the top right corner of the notification panel that would switch between the normal list of notifications and the new quick settings screen. Quick Settings offered faster access to screen brightness, network connections, and battery and data usage without having to dig through the full settings screen. The top level settings button in Android 4.1 was removed, and a square was added to the Quick Settings screen for it. + +There were lots of changes to the app drawer and 4.2's lineup of apps and icons. Thanks to the wider aspect ratio of the Nexus 4 (5:3 vs 16:9 on the Galaxy Nexus), the app drawer on that device could now show a five-wide grid of icons. 4.2 replaced the stock browser with Google Chrome and the stock calendar with Google Calendar, both of which brought new icon designs. The Clock and Camera apps were revamped in 4.2, and new icons were part of the deal. "Google Settings" was a new app that offered shortcuts to all the existing Google Account settings around the OS, and it had a unified look with Google Search and the new Google+ icon. Google Maps got a new icon, and Google Latitude, which was part of Google Maps, was retired in favor of Google+ location. + +![The browser was replaced with Chrome, and the new camera interface with a full screen viewfinder.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/chroemcam.jpg) +The browser was replaced with Chrome, and the new camera interface with a full screen viewfinder. +Photo by Ron Amadeo + +The stock browser did its best Chrome imitation for a while—it took many cues from Chrome’s interface, many Chrome features, and was even using Chrome’s javascript engine—but by the time Android 4.2 rolled around, Google deemed the Android version of Chrome ready to replace the imitator. On the surface, it didn't seem like much of a difference; the interface looked different, and early versions of Chrome for Android didn't scroll as smoothly as the stock browser. Under the hood, though, everything was different. Development of Android's main browser was now handled by the Google Chrome team instead of being a side project of the Android team. Android's default browser moved from being a stagnant app tied to Android releases to a Play Store app that was continually updated. Today there is even a beta channel that receives several updates per month. + +The camera interface was redesigned. It was now a completely full-screen app, showing a live view of the camera and places controls on top of it. The layout aesthetic had a lot in common with the [camera design][2] of Android 1.5: minimal controls with a focus on the viewfinder output. The circle of controls in the center appeared when you either held your finger on the screen or pressed the circle icon in the bottom right corner. When holding your finger down, you could slide around to pick the options around the circle, often expanding out into a sub-menu. Releasing over a highlighted item would select it. This was clearly inspired by the Quick Controls in the Android 4.0 browser, but arranging the options in a circle meant your finger was almost always blocking part of the interface. + +![The clock app, which went from a two-screen app to a feature-packed, useful application.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/clock-1.jpg) +The clock app, which went from a two-screen app to a feature-packed, useful application. +Photo by Ron Amadeo + +The clock application was completely revamped, going from a simple two-screen alarm clock to a world clock, alarm, timer, and stopwatch. The clock app design was like nothing Google introduced before, with an ultra-minimal aesthetic and red highlights. It seemed to be an experiment for Google. Even several versions later, this design language seemed to be confined only to this app. + +The clock's time picker was particularly well-designed. It showed a simple number pad, and it would intelligently disable numbers that would result in an invalid time. It was also impossible to set an alarm time without implicitly selecting AM or PM, forever solving the problem of accidentally setting an alarm for 9pm instead of 9am. + +![The new system UI for tablets used a stretched-out phone interface.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/tablet2.jpg) +The new system UI for tablets used a stretched-out phone interface. +Photo by Ron Amadeo + +The most controversial change in Android 4.2 was made to the tablet UI, which switched from a unified single bottom system bar to a two-bar interface with a top status bar and bottom system bar. The new design unified the phone and tablet interfaces, but critics said it was a waste of space to stretch the phone interface to a 10-inch landscape tablet. Since the navigation buttons had the whole bottom bar to themselves now, they were centered, just like the phone interface. + +![Multiple users on a tablet, and the new gesture-driven keyboard.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/2014-03-06-14.55.png) +Multiple users on a tablet, and the new gesture-driven keyboard. +Photo by Ron Amadeo + +On tablets, Android 4.2 brought support for multiple users. In the settings, a "Users" section was added, where you could manage users on a device. Setup was done from within each user account, where Android would keep separate settings, home screens, apps, and app data for each user. + +4.2 also added a new keyboard with swiping abilities. Rather than just tapping each individual letter, users could now keep a finger on the screen the whole time and just slide from letter to letter to type. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/22/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://arstechnica.com/gadgets/2014/01/hands-on-with-samsungs-notepro-and-tabpro-new-screen-sizes-and-magazine-ui/ +[2]:http://cdn.arstechnica.net/wp-content/uploads/2013/12/device-2013-12-26-11016071.png +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/23 - The history of Android.md b/sources/talk/The history of Android/23 - The history of Android.md new file mode 100644 index 0000000000..e67dff87e6 --- /dev/null +++ b/sources/talk/The history of Android/23 - The history of Android.md @@ -0,0 +1,59 @@ +The history of Android +================================================================================ +![Another Play Store redesign! This one is very close to the current design and uses cards that make layout changes a piece of cake.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/get-em-Kirill.jpg) +Another Play Store redesign! This one is very close to the current design and uses cards that make layout changes a piece of cake. +Photo by Ron Amadeo + +### Out-of-cycle updates—who needs a new OS? ### + +In between Android 4.2 and 4.3, Google went on an out-of-cycle update tear and showed just how much Android could be improved without having to fire up the arduous OTA update process. Thanks to the [Google Play Store and Play Services][1], all of these updates were able to be delivered without updating any core system components. + +In April 2013, Google released a major redesign to the Google Play Store. Like most redesigns from here on out, the new Play Store fully adopted the Google Now aesthetic, with white cards on a gray background. The action bar changed color based on the current content section, and since the first screen featured content from all sections of the store, the action bar was a neutral gray. Buttons to navigate to the content sections were now given top billing, and below that was usually a promotional block or rows of recommended apps. + +In April 2013, Google released a major redesign to the Google Play Store. Like most redesigns from here on out, the new Play Store fully adopted the Google Now aesthetic, with white cards on a gray background. The action bar changed color based on the current content section, and since the first screen featured content from all sections of the store, the action bar was a neutral gray. Buttons to navigate to the content sections were now given top billing, and below that was usually a promotional block or rows of recommended apps. + +![The individual content sections are beautifully color-coded.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/content-rainbow.jpg) +The individual content sections are beautifully color-coded. +Photo by Ron Amadeo + +The new Play Store showed off the real power of Google’s card design language, which enabled a fully responsive layout across all screen sizes. One large card could be stuck next to several little cards, larger-screened devices could show more cards, and rather than stretch things in horizontal mode, more cards could just be added to a row. The Play Store content editors were free to play with the layout of the cards, too; a big release that needed to be highlighted could get a larger card. This design would eventually trickle down to the other Google Play content apps, finally resulting in a unified design. + +![Hangouts replaced Google Talk and is now continually developed by the Google+ team.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/talkvhangouts2.jpg) +Hangouts replaced Google Talk and is now continually developed by the Google+ team. +Photo by Ron Amadeo + +Google I/O, the company's annual developer conference, was usually where a new Android version was announced. But at the 2013 edition, Google made just as many improvements without having to update the OS. + +One of the biggest things announced at the show was an update to Google Talk, Google's instant messaging platform. For a long time, Google shipped four text communication apps for Android: Google Talk, Google+ Messenger, Messaging (the SMS app), and Google Voice. Having four apps that accomplished the same task—sending a text message to someone—was very confusing for users. At I/O, Google killed Google Talk and started their messaging product over from scratch, creating [Google Hangouts][2]. While initially it only replaced Google Talk, the plan for Hangouts was to unify all of Google's various messaging apps into a single interface. + +The layout of the Hangouts UI really wasn't drastically different from Google Talk. The main page contained your open conversations, and tapping on one opened a chat page. The design was updated, the chat page now used a card-style display for each paragraph, and the chat list was now a "drawer"-style interface, meaning you could open it with a horizontal swipe. Hangouts had read receipts and a typing status indicator, and group chat was now a primary feature. + +Google+ was the center of Hangouts now, so much so that the full name of the product was actually "Google+ Hangouts." Hangouts was completely integrated with the Google+ desktop site so that video and chats could be made from one to the other. Identity and avatars were pulled from Google+, and tapping on an avatar would open that person's Google+ profile. And much like the change from Browser to Google Chrome, core Android functionality was passed off to a separate team—the Google+ team—as opposed to being a side product of the very busy Android engineers. With the Google+ takeover, Android's main IM client now became a continually developed application. It was placed into the Play Store and received fairly regular updates. + +![The new navigation drawer interface.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/navigation_drawer_overview1.png) +The new navigation drawer interface. +Photo by [developer.android.com][3] + +Google also introduced a new design element for the action bar: the navigation drawer. This drawer was shown as a set of three lines next to the app icon in the top-right corner. By tapping on it or dragging from the edge of the screen to the right, a side-mounted menu would appear. As the name implies, this was used to navigate around the app, and it would show several top-level locations within the app. This allowed the first screen to show content, and it gave users a consistent, easy-to-access place for navigation elements. The nav drawer was basically a super-sized version of the normal menu, scrollable and docked to the right side. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/23/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://arstechnica.com/gadgets/2013/09/balky-carriers-and-slow-oems-step-aside-google-is-defragging-android/ +[2]:http://arstechnica.com/information-technology/2013/05/hands-on-with-hangouts-googles-new-text-and-video-chat-architecture/ +[3]:https://developer.android.com/design/patterns/navigation-drawer.html +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/24 - The history of Android.md b/sources/talk/The history of Android/24 - The history of Android.md new file mode 100644 index 0000000000..b95ceb29c7 --- /dev/null +++ b/sources/talk/The history of Android/24 - The history of Android.md @@ -0,0 +1,82 @@ +The history of Android +================================================================================ +![The slick new Google Play Music app, which changed from Tron to a perfect match for the Play Store.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/Goooogleplaymusic.jpg) +The slick new Google Play Music app, which changed from Tron to a perfect match for the Play Store. +Photo by Ron Amadeo + +Another app update pushed out at I/O was a new Google Music app. The app was completely redesigned, finally doing away with the blue-on-blue design introduced in Honeycomb. Play Music's design was unified with the new Play Store released a few months earlier, with a responsive white card layout. Music was also one of the first major apps to take advantage of the new navigation drawer style. Along with the new app, Google launched Google Play Music All Access, an all-you-can-eat subscription service for $10 a month. Google Music now had a subscription plan, à la carte purchasing, and a cloud music locker. This version also introduced "Instant Mix," a mode where Google would cloud-compute a playlist of similar songs. + +![A game showing support for Google Play Games. This lineup shows the Play Store game feature descriptions, the permissions box triggered by signing into the game, a Play Games notification, and the achievements screen.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/gooooogleplaygames.jpg) +A game showing support for Google Play Games. This lineup shows the Play Store game feature descriptions, the permissions box triggered by signing into the game, a Play Games notification, and the achievements screen. +Photo by Ron Amadeo + +Google also introduced "Google Play Games," a back-end service that developers could plug into their games. The service was basically an Android version of Xbox Live or Apple's Game Center. Developers could build Play Games support into their game, which would easily let them integrate achievements, leaderboards, multiplayer, matchmaking, user accounts, and cloud saves by using Google's back-end services. + +Play Games was the start of Google's big push into gaming. Just like standalone GPS units, flip phones, and MP3 players, smartphone makers were hoping standalone gaming devices would be turned into nothing more than a smartphone feature bullet point. Why buy a Nintendo DS or PS Vita when you had a smartphone with you? An easy-to-use multiplayer service would be a big part of this, and we've still yet to see the final consequence of this move. Today, Google and Apple are both rumored to be planning living room gaming devices. + +![Google Keep, Google's first note taking service since Google Notebook.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/goooglekeep.jpg) +Google Keep, Google's first note taking service since Google Notebook. +Photo by Ron Amadeo + +It was clear some products were developed in time for presentation at Google I/O, [but the three-and-a-half hour keynote][1] was already so massive, some things were cut from being announced. Once the smoke cleared three days after Google I/O, Google introduced Google Keep, a note taking app for Android and the Web. Keep was a fairly straightforward affair, applying the responsive Google Now-style design to a note taking app. Users could change the size of the cards from a multi-column layout to a single column view. Notes could consist of plain text, checklists, voice note with automatic transcription, or pictures. Note cards could be dragged around and rearranged on the main screen, and you could even assign a color to a note. + +![Gmail 4.5, which switched to the new navigation drawer design and merged the action bars, thanks to some clever button elimination.](http://cdn.arstechnica.net/wp-content/uploads/2014/05/gmail.png) +Gmail 4.5, which switched to the new navigation drawer design and merged the action bars, thanks to some clever button elimination. +Photo by Ron Amadeo + +After I/O, not much was safe from Google's out-of-cycle updating. In June 2013, Google released a redesigned version of Gmail. The headline feature of the new design was the new navigation drawer interface that was introduced a month earlier at Google I/O. The most eye catching change was the addition of Google+ profile pictures instead of checkboxes. While the checkboxes were visibly removed, they were still there, just tap on a picture. + +![The new Google Maps, which switched to an all-white Google Now-style theme.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/newmaps11.png.) +The new Google Maps, which switched to an all-white Google Now-style theme. +Photo by Ron Amadeo + +One month later, Google released a completely overhauled version of Google Maps to the Play Store. It was the first ground-up redesign of Google Maps since Ice Cream Sandwich. The new version fully adopted the Google Now white card aesthetic, and it greatly reduced the amount of stuff on the screen. The new Google Maps seemed to have a design mandate to always show a map on the screen somewhere, as you’ll be hard pressed to find something other than the settings that fully covers the map. + +This version of Google Maps seemed to live in its own little design world. The white search bar “floated" above the map, with maps showing on the sides and top of the bar. That didn't really make it seem like the traditional Action Bar design. The navigation drawer, in the top left on every other app, was in the bottom left. There was no up button, app icon, or overflow button on the main screen. + +![The new Google Maps cut a lot of fat and displayed more information on a single screen.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/newmaps21.png) +The new Google Maps cut a lot of fat and displayed more information on a single screen. +Photo by Ron Amadeo + +The left picture shows what popped up when you tapped on the search bar (along with the keyboard, which had been closed). In the past, Google would show an empty page below a blank search bar, but in Maps, Google used that space to link to the new “Local" page. The “blank" search results displayed links to common, browsable results like restaurant listings, gas stations, and attractions. At the bottom of the results page was a list of nearby results from your search history and an option to manually cache parts of the map. + +The right set of images shows location page. The map shown in the top of the Maps 7 screenshot isn’t a thumbnail; that’s the full map view. In the new version of Google Maps, a location was displayed as a card that “floats" overtop of the main map, and the map was repositioned to center on the location. Scrolling up would move the card up and cover the map, and scrolling down would show the whole map with the result reduced to a small strip at the bottom. If the location was part of a list of search results, swiping left and right would move through the results. + +The location pages were redesigned to be much more useful at a glance. On the first page, the new version added critical information, like the location on a map, the review score, and the number of reviews. Since this is a phone, and the software will be dialing for you, the phone number was deemed pointless and was removed. The old version showed the distance to the location in miles, while the new version of Google Maps showed the distance in terms of time, based on traffic and preferred mode of transportation—a much more useful metric. The new version also put a share button front and center, which made coordination over IM or text messaging a lot easier. + +### Android 4.3, Jelly Bean—getting wearable support out early ### + +Android 4.3 would have been an incredible update if Google had done the traditional thing and not released updates between 4.3 and 4.2 through the Play Store. If the new Play Store, Gmail, Maps, Books, Music, Hangouts, Keep, and Play Games were bundled into a big brick as a new version of Android, it would have been hailed as the biggest release ever. Google didn't need to do hold back features anymore though. With very little left that required an OS update, at the end of July 2013, Google released the seemingly insignificant update called "Android 4.3." + +![Android Wear plugging into Android 4.3's Notification access screen.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/2014-03-28-12.231.jpg) +Android Wear plugging into Android 4.3's Notification access screen. +Photo by Ron Amadeo + +Google made no qualms about the low importance of 4.3, calling the newest release "Jelly Bean" (the third one in a row). Android 4.3's feature list read like a laundry list of things Google couldn't update from the Play Store or through Google Play Services, mostly consisting of low-level framework changes for developers. + +Many of the additions seemed to fit a singular purpose, though—Android 4.3 was Google's trojan horse for wearable computing support. 4.3 added support for Bluetooth Low Energy, a way to wirelessly connect Android to another device and pass data back and forth while using a very small amount of power—an integral feature to a wearable device. Android 4.3 also added a "Notification Access" API, which allowed apps to completely replicate and control the notification panel. Apps could display notification text and pictures and interact with the notification the same way users do—namely pressing action buttons and dismissing notifications. Doing this from an on-board app when you have the notification panel is useless, but on a device that is separate from your phone, replicating the information in the notification panel becomes much more useful. One of the few apps that plugged into this was "Android Wear Preview," which used the notification API to power most of the interface for Android Wear. + +The "4.3 is for wearables" theory explained the relatively low number of features in 4.3: it was pushed out the door to give OEMs time to update devices in time for the launch of [Android Wear][2]. The plan seems to have worked. Android Wear requires Android 4.3 and up, which has been out for so long now that most major flagships have updated. + +Android 4.3 was not all that exciting, but Android releases from here on out didn't need to be all that exciting. Everything became so modularized that Google could push updates out as soon as they were done through Google Play, rather than drop everything in one huge brick as an OS update. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/24/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://live.arstechnica.com/liveblog-google-io-2013-keynote/ +[2]:http://arstechnica.com/gadgets/2014/03/in-depth-with-android-wear-googles-quantum-leap-of-a-smartwatch-os/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/25 - The history of Android.md b/sources/talk/The history of Android/25 - The history of Android.md new file mode 100644 index 0000000000..39eeb55768 --- /dev/null +++ b/sources/talk/The history of Android/25 - The history of Android.md @@ -0,0 +1,70 @@ +The history of Android +================================================================================ +![The LG-made Nexus 5, the launch device for KitKat.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/nexus56.jpg) +The LG-made Nexus 5, the launch device for KitKat. + +Android 4.4, KitKat—more polish; less memory usage + +Google got really cute with the launch of Android 4.4. The company [teamed up with Nestlé][1] to name the OS "KitKat," and it launched on Halloween, October 31, 2013. Nestlé produced limited-edition Android-shaped KitKat bars, and KitKat packaging in stores promoted the new OS while offering a chance to win a Nexus 7. + +KitKat launched with a new Nexus device, the Nexus 5. The new flagship had the biggest display yet: a five-inch, 1920x1080 LCD. Despite the bigger screen size, LG—again the manufacturer for the device—was able to fit the Nexus 5 into the same dimensions as a Galaxy Nexus or Nexus 4. + +The Nexus 5 was specced comparatively to the highest-end phones at the time, with a 2.3Ghz Snapdragon 800 processor and 2GB of RAM. The phone was again sold unlocked on the Play Store, but while most phones with specs like this would go for $600-$700, Google sold the Nexus 5 for only $350. + +One of the most important improvements in KitKat was one you couldn't see: significantly lower memory usage. For KitKat, Google started a concerted effort to lower memory usage across the OS and bundled apps called "Project Svelte." After tons of optimization work and a "low memory" mode that disabled expensive graphical effects, Android could now run on as little as 340MB of RAM. Lower memory requirements were a big deal, because devices in the developing world—the biggest growth markets for smartphones—often ran on only 512MB of RAM. Ice Cream Sandwich's more advanced UI significantly raised the system requirements of Android devices, which left many low-end devices—even newly released low-end devices—stuck on Gingerbread. The lower system requirements of KitKat meant to bring these cheap devices back into the fold. With KitKat, Google hoped to finally kill Gingerbread (which, at the time of writing, is around 20 percent of the market). Just in case the lower system requirements weren't enough, there have even been reports that Google will [no longer license][2] the Google apps to Gingerbread devices. + +Besides bringing low-end phones to a modern version of the OS, Project Svelte's lower memory requirements were to be a boon to wearable computers, too. Google Glass [announced][3] it was also switching to the slimmer OS, and [Android Wear][4] ran on KitKat, too. The lower memory requirements in Android 4.4 and the notification API and Bluetooth LE support in 4.3 came together nicely to support wearable computing. + +KitKat also featured a lot of polish to the core OS interfaces that couldn't be updated via the Play Store. The System UI, Dialer, Clock, and Settings all saw updates. + +![KitKat's transparent bars on the Google Now Launcher.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/1homescreenz.png) +KitKat's transparent bars on the Google Now Launcher. +Photo by Ron Amadeo + +KitKat not only got rid of the unpopular lines to the left and right sides of the lock screen—it completely disabled lock screen widgets by default! Google obviously felt multiple lock screens and multiple home screens were a little to complicated for new users, so lock screen widgets now needed to be enabled in the settings. The lopsided time here and in the clock app was switched to a symmetrical weight, which looked a lot nicer. + +In KitKat, apps had the ability to make the system and status bars transparent, which significantly changed the look of the OS. The bars now blended into the wallpaper and any other app that chose to enable transparent bars. The bars could also be completely hidden by any app via a new feature called “immersive" mode. + +KitKat was the final nail in the “Tron" coffin, removing almost all traces of blue from the operating system. The status bar icons were changed from a blue to a neutral white. The status and system bars on the home screen weren’t completely transparent; a dark gradient was added to the top and bottom of the screen so that the white icons would still be visible on a light background. + +![Tweaks to Google Now and the folders.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/nowfolders.png) +Tweaks to Google Now and the folders. +Photo by Ron Amadeo + +The home screen that shipped with KitKat on the Nexus 5 was actually exclusive to the Nexus 5 for a few months, but it could now be on any Nexus device. The new home screen was called the "Google Now Launcher," and it was actually [the Google Search app][5]. Yes, Google Search grew from a simple search box to an entire home screen, and in KitKat, it drew the wallpaper, icons, app drawer, widgets, home screen settings, Google Now, and, of course, the search box. Thanks to Search now running the entire home screen, any time the home screen was open and the screen was on, voice commands could be activated by saying “OK Google." This was pointed out to the user with introductory “Say 'OK Google' text in the search bar, which would fade away after a few uses. + +Google Now was more integrated, too. Besides the usual swipe up from the system bar, Google Now was also the leftmost home screen. The new version brought some design tweaks as well. The Google logo was moved into the search bar, and the whole top area was compacted. A few card designs were cleaned up, and a new set of buttons at the bottom led to reminders, customization options, and an overflow button with settings, feedback, and help. Since Google Now was part of the home screen, it got transparent system and status bars, too. + +Transparency and “brightening up" certain parts of the OS were design themes in KitKat. Black was removed in the status and system bars by switching to transparent, and the black background of the folders was switched to white. + +![A screenshot showing the new, cleaner app screen layout, and a composite image of the app lineup.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/apps.png) +A screenshot showing the new, cleaner app screen layout, and a composite image of the app lineup. +Photo by Ron Amadeo + +The KitKat icon lineup changed significantly from 4.3. To be more dramatic, it was a bloodbath, with Google removing seven icons over the 4.3 loadout. Google Hangouts could handle SMS now, so the Messaging app was removed. Hangouts also took over Google+ Messenger duties, so that app shortcut was cut. Google Currents was removed as a default app, as it would soon be killed—along with Google Play Magazines—in favor of Google Play Newsstand. Google Maps was beaten back into a single icon, which meant Local and Navigation shortcuts were removed. The impossible-to-understand Movie Studio was cut, too—Google must have realized no one wants to edit movies on a phone. Thanks to the home screen “OK Google" hotword detection, the Voice Search icon was rendered redundant and removed. Depressingly, the long abandoned News & Weather app remained. + +There was a new app called “Photos"—really the Google+ app—which took over picture management duties. On the Nexus 5, the Gallery and Google+ Photos were pretty similar, but in newer builds of KitKat present on Google Play Edition devices, the Gallery was completely replaced by Google+ photos. Play Games was an interface for Google’s back-end multiplayer service—a Googly version of Xbox Live or Apple’s Game Center. Google Drive, which existed for years as a Play Store app, was finally made a default app. Google bought Quickoffice back in June 2012, now finally deeming the app acceptable for inclusion by default. While Drive opened Google Documents, Quickoffice opened Microsoft Office Documents. If keeping track, that was two document editing apps and two photo editing apps included on most KitKat loadouts. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/25/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://arstechnica.com/gadgets/2013/09/official-the-next-edition-of-android-is-kitkat-version-4-4/ +[2]:http://www.androidpolice.com/2014/02/10/rumor-google-to-begin-forcing-oems-to-certify-android-devices-with-a-recent-os-version-if-they-want-google-apps/ +[3]:http://www.androidpolice.com/2014/03/01/glass-xe14-delayed-until-its-ready-promises-big-changes-and-a-move-to-kitkat/ +[4]:http://arstechnica.com/gadgets/2014/03/in-depth-with-android-wear-googles-quantum-leap-of-a-smartwatch-os/ +[5]:http://arstechnica.com/gadgets/2013/11/google-just-pulled-a-facebook-home-kitkats-primary-interface-is-google-search/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/talk/The history of Android/26 - The history of Android.md b/sources/talk/The history of Android/26 - The history of Android.md new file mode 100644 index 0000000000..3f9e1427ba --- /dev/null +++ b/sources/talk/The history of Android/26 - The history of Android.md @@ -0,0 +1,87 @@ +The history of Android +================================================================================ +![The new "add to home screen" interface was definitely inspired by Honeycomb.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/homesetupthrowback.png) +The new "add to home screen" interface was definitely inspired by Honeycomb. +Photo by Ron Amadeo + +KitKat added a nice throwback to Honeycomb with the home screen configuration screen. On the massive 10-inch screen of a Honeycomb tablet (right picture, above), long pressing on the home screen background would present you with a zoomed-out view of all your home screens. Widgets could be dragged from the bottom widget drawer into any home screen—it was very handy. When it came time to bring the Honeycomb interface to phones, from Android 4.0 all the way to 4.3, Google skipped this design and left it to the larger screened devices, presenting only a list of options after a long press (center picture). + +For KitKat though, Google finally came up with a solution. After a long press, 4.4 presented a slightly zoomed out view—you could see the current home screen and the screens to the left and right of it. Tapping on the “widgets" button would open a full screen list of widget thumbnails, but after long-pressing on a widget, you were thrown back into the zoomed-out view and could scroll through home screen pages and place the icon where you wanted. By dragging an icon or widget all the way past the rightmost home page, you could create a new home page. + +![Contacts and the Keyboard both removed any trace of blue.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/RIP33B5E5.png) +Contacts and the Keyboard both removed any trace of blue. +Photo by Ron Amadeo + +KitKat was the end of the line for the Tron design. In most parts of the OS, any remaining blue highlights were removed in favor of gray. In the People app, blue was sucked out of the header and the letter separators in the contact list. The pictures swapped sides and the bottom bar was changed to a light gray to match the top. The Keyboard, which injected the color blue into nearly every app, was changed to gray-on-gray-on-gray. That wasn't a bad thing. Apps should be allowed to have their own color scheme—forcing a potentially clashing color on them via the keyboard wasn’t good design. + +![The first three screenshots show KitKat's dialer, and the last one is 4.3.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/phone.png) +The first three screenshots show KitKat's dialer, and the last one is 4.3. +Photo by Ron Amadeo + +Google completely revamped the dialer in KitKat, creating a wild new design that changed the way users thought about a phone. Actual numbers in the new dialer were hidden as much as possible—there wasn’t even a dial pad on the main screen. The primary interface for making a phone call was now a search bar! If you wanted to call someone in your contacts, just type their name in; if you wanted to call a business, just type the business name in and the dialer would search through Google Maps’ extensive database of phone numbers. It worked incredibly well and was something only Google could pull off. + +If searching for numbers wasn’t your thing, the app also intelligently displayed a listing for the previous phone call, your most-contacted people, and a link to all contacts. At the bottom were links to your call history, the now old school number pad, and the usual overflow button containing a settings page. + +![Office stuff: Google Drive, which was now packed in, and the printing support.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/googledrive-and-printing.png) +Office stuff: Google Drive, which was now packed in, and the printing support. +Photo by Ron Amadeo + +It was amazing it took this long, but in KitKat, Google Drive was finally included as a default app. Drive allowed users to create and edit Google Docs spreadsheets and documents, scan documents with the camera and upload them as PDFs, or view (but not edit) presentations. Drive, by this point, had a great, modern design with a slide-out navigation drawer and a Google Now-style card design. + +For even more mobile office fun, KitKat included an OS-level printing framework. At the bottom of the settings was a "Printing" screen, and any printer OEM could make a plugin for it. Google Cloud Print was, of course, one of the first supporters. Once your printer was hooked up to Cloud Print, either natively or through a computer with Chrome installed, you could print to it over the Internet. Apps needed to support the printing framework, too. Pressing the little "i" button on Google Drive would show information about the document and give you the option to print it. Just like a desktop OS, a print dialog would pop up with settings like copies, paper size, and page selection. + +![The "Photos" section of the Google+ app, which replaced the Gallery.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/that-is-one-dead-gallery.png) +The "Photos" section of the Google+ app, which replaced the Gallery. +Photo by Ron Amadeo + +Google+ Photos and the Gallery initially shipped together on the Nexus 5, but in a later build of KitKat on Google Play devices, the Gallery was axed and Google+ completely took over photo duties. The new app changed the photo app from a light theme to a dark theme, and Google+ Photos brought a modern navigation drawer design. + +Android had long included an instant upload feature, which would automatically backup all pictures on Google’s cloud storage, first on Picasa and later on Google+. The big benefit of G+ Photos over the Gallery was that it could finally manage those cloud-stored photos. Little cloud icons in the lower right of a photo indicated backup status, and it would fill from right to left to indicate an upload-in-progress. G+ photos brought its own photo editor along with support for a million of other Google+ photo features, like highlights, auto awesome, and, of course, sharing to Google+. + +![Tweaks to the Clock app, which added an alarms tab and changed the time input dialog.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/clocks.png) +Tweaks to the Clock app, which added an alarms tab and changed the time input dialog. +Photo by Ron Amadeo + +Google changed the excellent time picker that was introduced in 4.2 to this strange clock interface, which was both slower and less precise than the old interface. First you were presented with a one-handed clock which you used to choose the hour, then that clock went away and another one-handed clock allowed you to choose the minute. Having to spin the minute hand or tap a spot on the clock face made it very difficult to pick times in non-five-minute increments. Unlike the old time picker, which required you to pick a time period, this just defaulted to AM (again making it possible to accidentally be off by 12 hours). + +### Today—Android everywhere ### + +![](http://cdn.arstechnica.net/wp-content/uploads/2014/05/android-everywhere2.png) +Photo by Google/Sony/Motorola/Ron Amadeo + +What started out as a curious BlackBerry clone from a search engine company became the most popular OS in the world from one of the biggest titans in the tech industry. Android has become Google's de-facto consumer operating system, and it powers phones, tablets, Google Glass, Google TV, and more. [Parts of it][1] are even used in the Chromecast. In the future, Google will be bringing Android to watches and wearables with [Android Wear][2], and the [Open Automotive Alliance][3] will be bringing Android to cars. Google will be making a renewed commitment to the living room soon, too, with [Android TV][4]. The OS is such a core pillar of Google, that events that are supposed to cover company-wide products, like Google I/O, end up becoming Android launch parties. + +![Top row: the Google Play content stores. Bottom row: the Google Play Apps.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/2014-03-30-03.08.jpg) +Top row: the Google Play content stores. Bottom row: the Google Play Apps. +Photo by Ron Amadeo + +What was once the ugly duckling of the mobile industry has transformed so much it now [wins design awards][5] for its user interface. The design of things like Google Now have affected everything the company produces, with even the desktop sites like Search, Google+, YouTube, and Maps getting in on the card design unity. The design keeps evolving as well. Google's next plan is to [unify design][6] across not just Android, but all of its products. The goal is to take something like Gmail and make it feel the same, whether you're using it on Android, a desktop browser, or a watch. + +Google outsourced so many pieces of Android to the Play Store, that version releases are becoming less and less necessary. Google decided the best way to beat carrier and OEM update issues was to sidestep those roadblocks completely. From here on out, there isn't much left to include in an Android update other than core under-the-hood changes—but even many APIs have been pushed to Google Play Services. If you just look at version releases, it seems like Android development has slowed down from the peak 2.5-month release cycle. But the reality is Google can now continually push out improvements to the Play Store in a never-ending, somewhat subtler stream of updates. + +With 1.5 million activations per day, Android has no where to go but up. In the future, Android will be headed from phones and tablets to cars and watches, and the lower system requirements of KitKat will drive phones to even lower prices in the developing world. The bottom line? More and more people will get online. And for many of those people, Android will be not just their phone but their primary computing device. With Android leading the charge for Google in so many areas, the OS that started off as a tiny acquisition has become one of Google's most important products. + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/26/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://blog.gtvhacker.com/2013/chromecast-exploiting-the-newest-device-by-google/ +[2]:http://arstechnica.com/gadgets/2014/03/in-depth-with-android-wear-googles-quantum-leap-of-a-smartwatch-os/ +[3]:http://arstechnica.com/information-technology/2014/01/open-automotive-alliance-aims-to-bring-android-inside-the-car/ +[4]:http://arstechnica.com/gadgets/2014/04/documents-point-to-android-tv-googles-latest-bid-for-the-living-room/ +[5]:http://userexperienceawards.com/uxa2012/ +[6]:http://arstechnica.com/gadgets/2014/04/googles-next-design-challenge-unify-app-design-across-platforms/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo \ No newline at end of file diff --git a/sources/tech/20140616 How to Rescue a Non-booting GRUB 2 on Linux.md b/sources/tech/20140616 How to Rescue a Non-booting GRUB 2 on Linux.md deleted file mode 100644 index b7b8119d0c..0000000000 --- a/sources/tech/20140616 How to Rescue a Non-booting GRUB 2 on Linux.md +++ /dev/null @@ -1,131 +0,0 @@ - ->>chenguang is translating it - -How to Rescue a Non-booting GRUB 2 on Linux -================================================================================ -![Figure 1: GRUB 2 menu with cool Apollo 17 background.](http://www.linux.com/images/stories/41373/grub-command-shell.jpg) -Figure 1: GRUB 2 menu with cool Apollo 17 background. - -Once upon a time we had legacy GRUB, the Grand Unified Linux Bootloader version 0.97. Legacy GRUB had many virtues, but it became old and its developers did yearn for more functionality, and thus did GRUB 2 come into the world. - -GRUB 2 is a major rewrite with several significant differences. It boots removable media, and can be configured with an option to enter your system BIOS. It's more complicated to configure with all kinds of scripts to wade through, and instead of having a nice fairly simple `/boot/grub/menu.lst` file with all configurations in one place, the default is `/boot/grub/grub.cfg`. Which you don't edit directly, oh no, for this is not for mere humans to touch, but only other scripts. We lowly humans may edit `/etc/default/grub`, which controls mainly the appearance of the GRUB menu. We may also edit the scripts in `/etc/grub.d/`. These are the scripts that boot your operating systems, control external applications such as memtest and os_prober, and theming`./boot/grub/grub.cfg` is built from `/etc/default/grub` and `/etc/grub.d/*` when you run the update-grub command, which you must run every time you make changes. - -The good news is that the update-grub script is reliable for finding kernels, boot files, and adding all operating systems to your GRUB boot menu, so you don't have to do it manually. - -We're going to learn how to fix two of the more common failures. When you boot up your system and it stops at the grub> prompt, that is the full GRUB 2 command shell. That means GRUB 2 started normally and loaded the normal.mod module (and other modules which are located in /boot/grub/[arch]/), but it didn't find your grub.cfg file. If you see grub rescue> that means it couldn't find normal.mod, so it probably couldn't find any of your boot files. - -How does this happen? The kernel might have changed drive assignments or you moved your hard drives, you changed some partitions, or installed a new operating system and moved things around. In these scenarios your boot files are still there, but GRUB can't find them. So you can look for your boot files at the GRUB prompt, set their locations, and then boot your system and fix your GRUB configuration. - -### GRUB 2 Command Shell ### - -The GRUB 2 command shell is just as powerful as the shell in legacy GRUB. You can use it to discover boot images, kernels, and root filesystems. In fact, it gives you complete access to all filesystems on the local machine regardless of permissions or other protections. Which some might consider a security hole, but you know the old Unix dictum: whoever has physical access to the machine owns it. - -When you're at the `grub>` prompt, you have a lot of functionality similar to any command shell such as history and tab-completion. The `grub rescue>` mode is more limited, with no history and no tab-completion. - -If you are practicing on a functioning system, press C when your GRUB boot menu appears to open the GRUB command shell. You can stop the bootup countdown by scrolling up and down your menu entries with the arrow keys. It is safe to experiment at the GRUB command line because nothing you do there is permanent. If you are already staring at the `grub>` or `grub rescue>`prompt then you're ready to rock. - -The next few commands work with both `grub>` and `grub rescue>`. The first command you should run invokes the pager, for paging long command outputs: - - grub> set pager=1 - -There must be no spaces on either side of the equals sign. Now let's do a little exploring. Type ls to list all partitions that GRUB sees: - - grub> ls - (hd0) (hd0,msdos2) (hd0,msdos1) - -What's all this msdos stuff? That means this system has the old-style MS-DOS partition table, rather than the shiny new Globally Unique Identifiers partition table (GPT). (See [Using the New GUID Partition Table in Linux (Goodbye Ancient MBR)][1]. If you're running GPT it will say (hd0,gpt1). Now let's snoop. Use the ls command to see what files are on your system: - - grub> ls (hd0,1)/ - lost+found/ bin/ boot/ cdrom/ dev/ etc/ home/ lib/ - lib64/ media/ mnt/ opt/ proc/ root/ run/ sbin/ - srv/ sys/ tmp/ usr/ var/ vmlinuz vmlinuz.old - initrd.img initrd.img.old - -Hurrah, we have found the root filesystem. You can omit the msdos and gpt labels. If you leave off the slash it will print information about the partition. You can read any file on the system with the cat command: - - grub> cat (hd0,1)/etc/issue - Ubuntu 14.04 LTS \n \l - -Reading /etc/issue could be useful on a multi-boot system for identifying your various Linuxes. - -### Booting From grub> ### - -This is how to set the boot files and boot the system from the grub> prompt. We know from running the ls command that there is a Linux root filesystem on (hd0,1), and you can keep searching until you verify where /boot/grub is. Then run these commands, using your own root partition, kernel, and initrd image: - - grub> set root=(hd0,1) - grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1 - grub> initrd /boot/initrd.img-3.13.0-29-generic - grub> boot - -The first line sets the partition that the root filesystem is on. The second line tells GRUB the location of the kernel you want to use. Start typing /boot/vmli, and then use tab-completion to fill in the rest. Type root=/dev/sdX to set the location of the root filesystem. Yes, this seems redundant, but if you leave this out you'll get a kernel panic. How do you know the correct partition? hd0,1 = /dev/sda1. hd1,1 = /dev/sdb1. hd3,2 = /dev/sdd2. I think you can extrapolate the rest. - -The third line sets the initrd file, which must be the same version number as the kernel. - -The fourth line boots your system. - -On some Linux systems the current kernels and initrds are symlinked into the top level of the root filesystem: - - $ ls -l / - vmlinuz -> boot/vmlinuz-3.13.0-29-generic - initrd.img -> boot/initrd.img-3.13.0-29-generic - -So you could boot from grub> like this: - - grub> set root=(hd0,1) - grub> linux /vmlinuz root=/dev/sda1 - grub> initrd /initrd.img - grub> boot - -### Booting From grub-rescue> ### - -If you're in the GRUB rescue shell the commands are different, and you have to load the normal.mod andlinux.mod modules: - - grub rescue> set prefix=(hd0,1)/boot/grub - grub rescue> set root=(hd0,1) - grub rescue> insmod normal - grub rescue> normal - grub rescue> insmod linux - grub rescue> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1 - grub rescue> initrd /boot/initrd.img-3.13.0-29-generic - grub rescue> boot - -Tab-completion should start working after you load both modules. - -### Making Permanent Repairs ### - -When you have successfully booted your system, run these commands to fix GRUB permanently: - - # update-grub - Generating grub configuration file ... - Found background: /usr/share/images/grub/Apollo_17_The_Last_Moon_Shot_Edit1.tga - Found background image: /usr/share/images/grub/Apollo_17_The_Last_Moon_Shot_Edit1.tga - Found linux image: /boot/vmlinuz-3.13.0-29-generic - Found initrd image: /boot/initrd.img-3.13.0-29-generic - Found linux image: /boot/vmlinuz-3.13.0-27-generic - Found initrd image: /boot/initrd.img-3.13.0-27-generic - Found linux image: /boot/vmlinuz-3.13.0-24-generic - Found initrd image: /boot/initrd.img-3.13.0-24-generic - Found memtest86+ image: /boot/memtest86+.elf - Found memtest86+ image: /boot/memtest86+.bin - done - # grub-install /dev/sda - Installing for i386-pc platform. - Installation finished. No error reported. - -When you run grub-install remember you're installing it to the boot sector of your hard drive and not to a partition, so do not use a partition number like /dev/sda1. - -### But It Still Doesn't Work ### - -If your system is so messed up that none of this works, try the [Super GRUB2 live rescue disk][2]. The official [GNU GRUB Manual 2.00][3] should also be helpful. - --------------------------------------------------------------------------------- - -via: http://www.linux.com/learn/tutorials/776643-how-to-rescue-a-non-booting-grub-2-on-linux - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://www.linux.com/learn/tutorials/730440-using-the-new-guid-partition-table-in-linux-good-bye-ancient-mbr- -[2]:http://www.supergrubdisk.org/ -[3]:https://www.gnu.org/software/grub/manual/grub.html diff --git a/sources/tech/20140616 How to diskless boot a Linux machine.md b/sources/tech/20140616 How to diskless boot a Linux machine.md deleted file mode 100644 index 37d980bc8d..0000000000 --- a/sources/tech/20140616 How to diskless boot a Linux machine.md +++ /dev/null @@ -1,152 +0,0 @@ -zsJacky translating - -How to diskless boot a Linux machine -================================================================================ -Diskless booting implies that a client computer does not have any disk storage when booting an operating system. In that case, the computer can load the kernel as well as the root filesystem from a remote NFS server over network. It may use several different methods to load the kernel and the root filesystem from an NFS server: RARP, BOOTP or DHCP protocols. In this tutorial, I will use BOOTP/DHCP protocol because they are supported by many network cards. - -### Advantage of Diskless Computers ### - -Imagine you have 30 computers in your office, all of which need to access the same application. If you are managing the computers as an administrator, what would you do? It will be a waste of your time if you install the application on every computer. On the other hand, a diskless system can eliminate the problem. With a diskless system, you just need to install the application on a central NFS server, and then boot all 30 clients over network. - -### Requirements ### - -Two or more Linux computers equipped with network cards that support DHCP protocol. The computer that will act as an NFS server should have a hard drive, and the other client computer(s) do not need any hard drive. The server and client computer(s) need to be connected to the same local network. - -There are five steps to setting up the diskless system. - -1. Install required packages -1. Configure a TFTP server -1. Configure a DHCP server -1. Configure an NFS server -1. Booting diskless clients - -In this tutorial, I assume that the computer which will run as a booting server is running Ubuntu. If you are using other Linux distribution, the principle is the same. - -### Step One: Install Required Packages ### - -Use apt-get to install all necessary packages as follows. - - $ sudo apt-get install dhcp3-server tftpd-hpa syslinux nfs-kernel-server initramfs-tools - -### Step Two: Configure a TFTP Server ### - -TFTP server is a small FTP server which is needed for automated transfer of boot files between a client computer and server in the local network. - -Add the following lines to /etc/default/tftpd-hpa - - RUN_DAEMON="yes" - OPTIONS="-l -s /var/lib/tftpboot/" - -Next, create a boot directory. - - $ sudo mkdir -p /var/lib/tftpboot/pxelinux.cfg - -Copy the bootstrap ROM. - - $ sudo cp /usr/lib/syslinux/pxelinux.0 /var/lib/tftpboot - -Create a default boot configuration file as follows. - - $ sudo vi /tftpboot/pxelinux.cfg/default - ----------- - - LABEL Ubuntu - KERNEL vmlinuz - APPEND root=/dev/nfs initrd=initrd.img nfsroot=10.10.101.1:/nfsroot ip=dhcp rw - -Note: - -- "root=/dev/nfs" means the network filesystem on the server (doesn't need to change). -- "initrd=initrd.img" is a boot script for system startup. -- "nfsroot=10.10.101.1/nfsroot" indicates the server's IP address and the NFS share folder name. Substitute the IP address with your server's address. -- "ip=dhcp" means that client computers use DHCP addressing scheme. -- "rw" means that the NFS share is read/write. - -Finally, restart the TFTPD service. - - sudo /etc/init.d/tftpd-hpa restart - -### Step Three: Configure DHCP Service ### - -You also need to configure DHCP service on the NFS server to allow booting with /var/lib/tftpboot/pxelinux.0. Your configuration might look like the following, assuming you using subnet 10.10.101.0. - - $ sudo vi /etc/dhcp3/dhcpd.conf - ----------- - - allow booting; - allow bootp; - - subnet 10.10.101.0 netmask 255.255.255.0 { - range 10.10.101.2 10.10.101.254; - option broadcast-address 10.10.101.255; - option routers 10.10.101.1; - filename "/pxelinux.0"; - } - -Then restart DHCP service. - - $ sudo service isc-dhcp-server restart - -### Step Four: Configure an NFS server ### - -Create a directory that holds the client root filesystem. - - $ sudo mkdir /nfsroot - -Next, configure the NFS server to export the client root filesystem. For that, add the following line to /etc/exports. - - /nfsroot *(rw,no_root_squash,async,insecure,no_subtree_check) - -Run the following command to reload modified /etc/exports. - - $ sudo exportfs -rv - -By default, Ubuntu does not add network boot support to the initrd image. Thus you need to create a new initrd.img file. For that, first add the following line to /etc/initramfs-tools/initramfs.conf - - BOOT=nfs - MODULES=netboot - -Then run the following command to create a new initrd.img. - - $ sudo mkinitramfs -o /var/lib/tftpboot/initrd.img - -Copy the new kernel image to /var/lib/tftpboot. - -$ sudo cp /boot/vmlinuz-`uname -r` /var/lib/tfftpboot/vmlinuz -Now it is time to copy the entire root filesystem to /nfsroot. - -Assuming tgat you are using a fresh Ubuntu server installation, you just need to clone the server filesystem to the NFS root. - - $ sudo cp -ax / /nfsroot - -Then open /nfsroot/etc/fstab with a text editor to add the following line. - - /dev/nfs / nfs defaults 1 1 - -The directory /var/lib/tftpboot should have world read/write permissions. Otherwise the client would not be able to boot from network. - - $ sudo chmod -R 777 /var/lib/tfftpboot - -Lastly, to avoid any misconfiguration on the server, I recommend using a static IP address for the interface which DHCP service is running on. For example, if its network interface is named eth0, your configuration in /etc/network/interfaces should look like this: - - iface eth0 inet static - address 10.10.101.1 - netmask 255.255.255.0 - broadcast 10.10.101.255 - network 10.10.101.0 - -### Step Five: Booting a Diskless Client ### - -After you completed the configuration on the server. Boot your client from network. To boot from network, you typically need to change the boot order priority in your BIOS configuration. - -If a client booted successful, then your diskless environment is ready. You can add one or more client computers without changing anything. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/2014/06/diskless-boot-linux-machine.html - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/sources/tech/20140616 Linux Screenshot App Shutter Updates with Bug Fixes, New Icon.md b/sources/tech/20140616 Linux Screenshot App Shutter Updates with Bug Fixes, New Icon.md deleted file mode 100644 index befaf9834a..0000000000 --- a/sources/tech/20140616 Linux Screenshot App Shutter Updates with Bug Fixes, New Icon.md +++ /dev/null @@ -1,39 +0,0 @@ -Translating by shipsw - -Linux Screenshot App Shutter Updates with Bug Fixes, New Icon -================================================================================ -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/06/shutter.jpg) - -**[Shutter][1], our favourite screenshot tool for Linux, has been updated with select bug fixes and a new application icon. ** - -The open-source and feature-rich screenshot utility allows you to snap sections of your desktop, app windows or the whole screen and add annotations, text or effects. - -Version 0.91 fixes a number of outstanding bugs, including an issue where thumbnails were not shown in the Session tab on 14.04, and removes the option to upload screenshots to Pixlr’s image hosting service ‘imm.io’, which was discontinued earlier this year. - -Finally, the update features a refined version of the familiar camera shutter application icon courtesy of artist Lucas Romero Di Benedetto. - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/06/compare-350x200.png) - -### Install Shutter 0.91 in Ubuntu ### - -Upgrading to the new version of Shutter is simple enough — providing you add the official PPA. [The Shutter PPA][2] provides new stable releases to Ubuntu 12.04 LTS, 13.10 and 14.04 LTS. - - sudo add-apt-repository ppa:shutter/ppa - - sudo apt-get update && sudo apt-get install shutter - -Don’t like PPAs? You can also download Debian installers from the download section on the project homepage. If you’re running Ubuntu 14.04 LTS you can grab the installer by hitting the button below. - -- [Download Shutter 0.91 for Ubuntu 14.04 LTS][3] - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2014/06/shutter-0-91-new-icon - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:https://apps.ubuntu.com/cat/applications/shutter/ -[2]:https://launchpad.net/~shutter/+archive/ppa -[3]:https://launchpad.net/~shutter/+archive/ppa/+files/shutter_0.91%7Eppa2%7Eubuntu14.04.1_all.deb diff --git a/sources/tech/20140616 Managing Vim extensions with NeoBundle.md b/sources/tech/20140616 Managing Vim extensions with NeoBundle.md deleted file mode 100644 index 34e28ae657..0000000000 --- a/sources/tech/20140616 Managing Vim extensions with NeoBundle.md +++ /dev/null @@ -1,86 +0,0 @@ -Managing Vim extensions with NeoBundle -================================================================================ -[NeoBundle][1] is a third-generation extension manager for [Vim][2], building on [Vundle][3], which builds on [Pathogen][4]. In an earlier article, I [advised against using Neobundle][5] because of its rapid development and minimal English documentation. Now, more than a year later, both problems are more manageable. - -Why use an extension manager? Vim supports a healthy number of plugins, but its unmodified structure makes administering them difficult because extension files can be spread over several directories. Vim extension managers simplify things. Pathogen, Vundle, and NeoBundle create the directory ~/.vim/bundle, with a separate subdirectory for all the files of each extension. This structure allows users to easily and thoroughly delete extensions, either manually or via a file manager, and helps minimize potential conflicts when you have a couple of dozen extensions. - -NeoBundle openly models itself on Vundle. Like Vundle, it both installs and updates extensions. However, the help file openly admits that "Neobundle is not a stable plugin manager. If you want [a] stable plugin manager, you should use Vundle." New releases, the help warns, "may break compatibility" – a comment that is less than reassuring, coming from the developers. - -So why should you use NeoBundle? One reason is that Vundle works only with [Git][6], while NeoBundle also supports [Subversion][7] and [Mercurial][8] repositories. Another reason is that, if you want to keep extension updates from breaking your Vim ecosystem, you can lock NeoBundle so that it uses only a specific version of any particular extension. - -In addition, NeoBundle's creator, Shougo Matsuishita, is adding its command structures to several other extensions in order to reduce the list of commands they use. Currently, NeoBundle supports three such extensions: [unite.vim][9], a file and buffer manager that works within Vim; [vimshell.vim][10], a scripting shell for Vim; and [vimproc.vim][11], which works within vimshell.vim to allow asynchronous events. That's an idiosyncratic collection, and all three are poorly documented in English, so average users may wish to forgo them. Before tackling any of them, most users should focus on the basics of NeoBundle. - -### Installing and initializing NeoBundle ### - -NeoBundle requires Vim 7.2.051 or higher and requires git be installed, and depends on [cURL][12] for downloading files. You can install NeoBundle manually, but the fast way to install it is to clone its repository on GitHub using cURL. From your home directory, enter the following command to copy the files for NeoBundle into .vim/bundle/neobundle.vim, where the extension can manage itself: - - curl https://raw.githubusercontent.com/Shougo/neobundle.vim/master/bin/install.sh | sh - -You also need to modify your .vimrc file. NeoBundle's GitHub page offers a sample .vimrc file, but copying it means installing five plugins you may not want. This is the minimal content that you need: - - if has('vim_starting') - set nocompatible - set runtimepath+=~/.vim/bundle/neobundle.vim/ - call neobundle#begin(expand('~/.vim/bundle/')) - NeoBundleFetch 'Shougo/neobundle.vim' - call neobundle#end() - filetype plugin indent on - -These lines set up and start NeoBundle, and set NeoBundle to update itself just like any other plugin. NeoBundle defaults to updating itself from GitHub repositories, so if you use GitHub, all you have to do is specify the maintainer's username and the directory for the plugin; in the lines above, NeoBundleFetch needs to specify only "Shougo/neobundle.vim" instead of the complete path on GitHub. If you want to use another site instead, including one that supports Subversion or Mecurial, you need to add the complete URL to the repository. - -If you want to install other NeoBundle plugins, use this generic form: - - curl -k https://github.com/[MAINTAINER]/ [PLUGIN PATH] > ~/.vim/bundle/[PLUGIN PATH] - -or, to give a more specific example, you can install the [vim-abolish plugin][13], a super-charged search and replace extension, with the command - - curl -k https://github.com/tpope/vim-abolish > ~/.vim/bundle/abolish - -To have the extension updated automatically, add a line below the NeoBundleFetch line that gives the path to its repository. For example: - - NeoBundle 'tpope/vim-abolish' - -Optionally, you can specify a particular branch or revision of NeoBundle to use, preventing any updates. This option can be useful if you are using extensions that are in rapid development and you want to avoid having them break when you update any other extensions. For instance: - - NeoBundle 'Shougo/vimshell', { 'rev' : '3787e5' } - -Another option is to place the directive NeoBundleCheck on a line at the end of the NeoBundle stanza in .vimrc. When this line is present, NeoBundle checks for uninstalled bundles and prompts you to install them. You can also run the utility `:NeoBundleInstall` from within NeoBundle to initialize or update installed extensions. - -### NeoBundle utilities ### - -Many of NeoBundle's utilities function similarly to Vundle's, but they are differently named. You use the utilities to administer plugins from within NeoBundle: - -- Run `:NeoBundleUpdate` when you install or update extensions, and when you manually remove an extension's files. It can be followed by a specific plugin, such as "/Shougo/neobundle.vim," or without a plugin name to configure all plugins that are installed but not configured. The command NeoBundleInstall! provides the same functionality. -- `:NeoBundle {REPOSITORY URI} [[REVISION}] [,OPTIONS}]]` configures an extension while locking it into a specified version, preventing any updates. -- `:NeoBundleList` lists unintialized extensions. -- `:NeoBundleClean` runs an interactive utility for removing unused extensions. - -These utilities are also available in slightly different forms when you run NeoBundle with unite.vim. You can learn more about the utilities in all their forms by running the command `:help neobundle`. - - Deciding whether to use NeoBundle - -NeoBundle is a powerful tool, but its seemingly permanent state of rapid development can be a blessing or a curse, depending on your preferences. If you want the latest features and extensions, NeoBundle can make Vundle and Pathogen look decidedly old-fashioned. - -However, with the online help itself warning of instability, ignoring the possibility of the latest version of one extension interfering with the proper functioning of another would be rash. At the very least, you should specify in your .vimrc a version of NeoBundle that you know to be stable. You might also do the same for any extension that you use regularly. With this precaution, you can enjoy following the development of NeoBundle and its related extensions while avoiding the consequence of working on the bleeding edge. - --------------------------------------------------------------------------------- - -via: http://www.openlogic.com/wazi/bid/348084/Managing-Vim-extensions-with-NeoBundle - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:https://github.com/Shougo/neobundle.vim -[2]:http://olex.openlogic.com/packages/vim -[3]:https://github.com/gmarik/Vundle.vim -[4]:https://github.com/tpope/vim-pathogen -[5]:http://www.openlogic.com/wazi/bid/262302/Three-tools-for-managing-Vim-plugins -[6]:http://olex.openlogic.com/packages/git -[7]:http://olex.openlogic.com/packages/subversion -[8]:http://olex.openlogic.com/packages/mercurial -[9]:https://github.com/Shougo/unite.vim -[10]:https://github.com/Shougo/vimshell.vim/blob/master/doc/vimshell.txt -[11]:https://github.com/Shougo/vimproc.vim/blob/master/doc/vimproc.txt -[12]:http://olex.openlogic.com/packages/curl -[13]:https://github.com/tpope/vim-abolish \ No newline at end of file diff --git a/sources/tech/20140617 Make Ubuntu 14.04 Look Like Mac With Zukimac Theme.md b/sources/tech/20140617 Make Ubuntu 14.04 Look Like Mac With Zukimac Theme.md deleted file mode 100644 index ae92f1ac56..0000000000 --- a/sources/tech/20140617 Make Ubuntu 14.04 Look Like Mac With Zukimac Theme.md +++ /dev/null @@ -1,52 +0,0 @@ -(翻译中 by runningwater) -Make Ubuntu 14.04 Look Like Mac With Zukimac Theme -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/06/Make_Ubuntu_Look_Like_Mac_OS.jpeg) - -Ubuntu Unity itself is a beautiful desktop but people over the world are smitten by the looks of Mac OS X. If you are among one of those, you don’t need to ditch Ubuntu just for the sake of OS X looks. Instead you can give it a makeover and **make Ubuntu 14.04 look like Mac OS X**. - -### Make Ubuntu 14.04 look like Mac OS X ### - -To give Ubuntu a makeover of Mac, we shall be using Zukimac theme. - -- Get Zukimac theme from the link below:[Download Zukimac Theme for Ubuntu 14.04][1] -- Extract the downloaded zipped file. You will find two directories in there, Zukimac and Zukimac-ml. Copy these to .themes directory in your home directory. Go to Home and press Ctrl+H to show all the hidden folders. If there is no .themes folder here, create one. -- Use [Unity Tweak Tool to change the theme][2]. - -That’s it. Zukimac gives some a basic look and feel of Mac OS. Here is what it looks like with default OS X Maveric wallpaper. - -![Make Ubuntu 14.04 look like Mac OS X](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/06/Ubuntu_MAC_OS_Looks.jpeg) - -### Further changes to get Mac feel in Ubuntu 14.04 ### - -Additionally, you can **install a dock launcher like Plank** or Docky. To install Plank in Ubuntu 14.04 use the commands below: - - sudo add-apt-repository ppa:ricotz/docky - sudo apt-get update - sudo apt-get install plank - -Along with the dock launcher, you can also install S**ynapse indicator as an alternative of Mac Spotlight**. Use the following PPA from Noobslabs to install Synapse indicator: - - sudo add-apt-repository ppa:noobslab/apps - sudo apt-get update - sudo apt-get install indicator-synapse - -Apart from these two, you can also install **Slingscold launcher, alternative of Mac OS X launchpad**. Use the same Noobslabs PPA as mentioned above to install Slingscold launcher in Ubuntu 14.04: - - sudo add-apt-repository ppa:noobslab/apps - sudo apt-get update - sudo apt-get install slingscold - -Honestly, I am an avid Ubuntu fan and I like Ubuntu’s default Unity looks. In addition, there are plenty of [beautiful icon themes in Ubuntu 14.04][3] to beautify it. But as I mentioned before there are plenty of people who like Mac OS X and I hope this tutorial helped them to make Ubuntu 14.04 look and feel like Mac OS X. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/ubuntu-1404-mac-zukimac-theme/ - -译者:[runningwater](https://github.com/runningwater) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://gnome-look.org/content/show.php/Zukimac?content=165450 -[2]:http://itsfoss.com/how-to-install-themes-in-ubuntu-13-10/ -[3]:http://itsfoss.com/best-icon-themes-ubuntu-1404/ \ No newline at end of file diff --git a/sources/tech/20140620 How to enable testing and unstable repository on Debian.md b/sources/tech/20140620 How to enable testing and unstable repository on Debian.md deleted file mode 100644 index 4c22d5c1ee..0000000000 --- a/sources/tech/20140620 How to enable testing and unstable repository on Debian.md +++ /dev/null @@ -1,159 +0,0 @@ -[Translating] --213edu - -How to enable testing and unstable repository on Debian -================================================================================ -Testing/Unstable sources - -The testing and unstable repositories of Debian provide with a higher version of software applications than what is present in the stable repository. Note that these names are actually aliases such that the stable repository points to the current Debian stable release and the Testing repository is what is going to be part of the next Debian stable release. So at the time of this post, Wheezy 7.x is the Stable release and Jessie is the Testing source which is going to be the next stable release. - -At times, when you need to get a more recent version of a particular application, then the testing/unstable repository is a good option. I had the task of installing Apache 2.4.x onto a Debian wheezy system. But the repo had only 2.2.x and the testing repo had the required 2.4.x version. So the solution is to grab it from the testing repo. - -Most of the time, when looking for newer versions of software applications, we would fiddle with the "Testing" repository only. - -This post is going to show you how to setup the Testing and Unstable sources on a Debian system and how to install software from them, without breaking your existing system. - -> Stable < Testing < Unstable -> Wheezy < Jessie < Sid - -### 1. Setup the apt sources for testing/unstable repo ### - -The first step is to add the testing/unstable sources to your sources.list file. The /etc/apt/sources.list file on a Debian wheezy system looks something like this by default. - - $ cat /etc/apt/sources.list - ----------- - - ... - deb http://security.debian.org/ wheezy/updates main - deb http://http.us.debian.org/debian/ wheezy main - deb-src http://security.debian.org/ wheezy/updates main - ... - -Note down the url of the repository server - http://http.us.debian.org/debian/ -This repository server is a mirror that is located nearest to you. It shall be different in your sources.list file. The same shall be used in the next steps - -To add the testing and unstable sources you need to add something like this to your sources.list file - - # Testing repository - main, contrib and non-free branches - deb http://http.us.debian.org/debian testing main non-free contrib - deb-src http://http.us.debian.org/debian testing main non-free contrib - - - # Testing security updates repository - deb http://security.debian.org/ testing/updates main contrib non-free - deb-src http://security.debian.org/ testing/updates main contrib non-free - - - # Unstable repo main, contrib and non-free branches, no security updates here - deb http://http.us.debian.org/debian unstable main non-free contrib - deb-src http://http.us.debian.org/debian unstable main non-free contrib - -The format is - - deb - -Instead of testing/unstable the corresponding codenames jessie and sid can also be used - - deb http://http.us.debian.org/debian jessie main non-free contrib - deb http://security.debian.org/ jessie/updates main contrib non-free - deb http://http.us.debian.org/debian sid main non-free contrib - -### 2. Do some apt pinning - Important ! ### - -> After adding the testing and unstable repos, if you update the system then all available updates for all installed applications would be installed right away, leading the system to an unpredictable state. - -Therefore some rules have to be setup in order to restrict the package selection during regular updates/upgrades. - -This is done through "apt pinning" where we tell the apt system to use only the stable system as always, but we may select to install a particular package from the testing or unstable repository if we wish to. - -The apt pinning preferences can be configured into either of the following 2 files. - - /etc/apt/preferences - OR - /etc/apt/preferences.d/my_preferences - -Open either of the 2 locations (create one if it does not exist) and fill the following into the file - - Package: * - Pin: release a=stable - Pin-Priority: 700 - - Package: * - Pin: release a=testing - Pin-Priority: 650 - - Package: * - Pin: release a=unstable - Pin-Priority: 600 - -Mentioned earlier, stable will point to your current debian version, testing to the next, and unstable would be further away in future. Main thing to note is the priority. The stable/current version has been given the highest priority which means that for regular tasks apt-get will install packages only from the current stable repository (wheezy in this case). - -#### Update the package cache #### - -After adding the new repository and specify the pinning rules, update the package cache. - - $ sudo apt-get update - -#### Confirm the apt policy #### - -We must ensure that the pinning configuration is correct and that the priorities are met correctly. Check the effective apt policy with the apt-cache command - - $ apt-cache policy apache2 - apache2: - Installed: (none) - Candidate: 2.2.22-13 - Version table: - 2.4.7-1 0 - 600 http://http.us.debian.org/debian/ unstable/main amd64 Packages - 2.4.6-3 0 - 650 http://http.us.debian.org/debian/ testing/main amd64 Packages - 2.2.22-13 0 - 700 http://http.us.debian.org/debian/ wheezy/main amd64 Packages - -The above output confirms that version 2.2.22 ( the wheezy main/stable ) repository is selected, its on highest priority. - -### 3. Install apps from testing/unstable source ### - -Now its time to pick a particular package out from the testing or unstable repo and install it. So lets say we want to install apache2 from testing source. - -There are 2 ways to do it and each has a different effect. - -#### Method 1 #### - - # apt-get install apache2/testing - -The above command will install the apache2 package from the testing source and install dependencies from stable source (or whatever the apt policy holds). This command fail in situations where the dependencies are outdated compared to what the installation package (apache2) needs. - -#### Method 2 #### - - # apt-get -t testing install apache2 - -The above command will install apache2 from testing source and install all dependencies from testing source as well. This should work better than the above command. - -So to install newer version of any package, simply head towards the testing/unstable sources and enjoy. Note that the priority numbers are not just plain numbers, but have special meanings. Check the man page on apt preferences to learn more about them - - $ man 5 apt_preferences - -### Summary ### - -Using the testing/unstable repository with pinning is an easy way to get newer versions of packages, but it is not recommended. If done wrong, it can mess up the system by pulling packages from different branches that may not be compatible. - -A more recommended method to install updated packages is using the backports repository. It provides newer versions of selected packages from testing/unstable repo, but compiled for the current stable version. So on debian wheezy you can use wheezy-backports repository. Check out http://backports.debian.org/ for more information. - -### Resources ### - -- [https://wiki.debian.org/AptPreferences][1] -- [https://wiki.debian.org/DebianTesting][2] -- [https://www.debian.org/security/][3] - --------------------------------------------------------------------------------- - -via: http://www.binarytides.com/enable-testing-repo-debian/ - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://wiki.debian.org/AptPreferences -[2]:http://wiki.debian.org/DebianTesting -[3]:http://www.debian.org/security/ diff --git a/sources/tech/20140620 Tips to Push Your Git Skills to the Next Level.md b/sources/tech/20140620 Tips to Push Your Git Skills to the Next Level.md deleted file mode 100644 index c174a4c4bf..0000000000 --- a/sources/tech/20140620 Tips to Push Your Git Skills to the Next Level.md +++ /dev/null @@ -1,190 +0,0 @@ -hyaocuk is translating - -10 Tips to Push Your Git Skills to the Next Level -================================================================================ -Recently we published a couple of tutorials to get you familiar with [Git basics][1] and [using Git in a team environment][2]. The commands that we discussed were about enough to help a developer survive in the Git world. In this post, we will try to explore how to manage your time effectively and make full use of the features that Git provides. - -> Note: Some commands in this article include part of the command in square brackets (e.g. `git add -p [file_name]`). In those examples, you would insert the necessary number, identifier, etc. without the square brackets. - -### 1. Git Auto Completion ### - -If you run Git commands through the command line, it’s a tiresome task to type in the commands manually every single time. To help with this, you can enable auto completion of Git commands within a few minutes. - -To get the script, run the following in a Unix system: - - cd ~ - curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash - -Next, add the following lines to your ~/.bash_profile file: - - if [ -f ~/.git-completion.bash ]; then - . ~/.git-completion.bash - fi - -Although I have mentioned this earlier, I can not stress it enough: If you want to use the features of Git fully, you should definitely shift to the command line interface! - -### 2. Ignoring Files in Git ### - -Are you tired of compiled files (like `.pyc`) appearing in your Git repository? Or are you so fed up that you have added them to Git? Look no further, there is a way through which you can tell Git to ignore certain files and directories altogether. Simply create a file with the name `.gitignore` and list the files and directories that you don’t want Git to track. You can make exceptions using the exclamation mark(!). - - *.pyc - *.exe - my_db_config/ - - !main.pyc - -### 3. Who Messed With My Code? ### - -It’s the natural instinct of human beings to blame others when something goes wrong. If your production server is broke, it’s very easy to find out the culprit — just do a `git blame`. This command shows you the author of every line in a file, the commit that saw the last change in that line, and the timestamp of the commit. - - git blame [file_name] - -![git blame demonstration](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946443git-ninja-01.png) - -And in the screenshot below, you can see how this command would look on a bigger repository: - -![git blame on the ATutor repository](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946441git-ninja-02.png) - -### 4. Review History of the Repository ### - -We had a look at the use of `git log` in a previous tutorial, however, there are three options that you should know about. - - -- **--oneline** – Compresses the information shown beside each commit to a reduced commit hash and the commit message, all shown in a single line. -- **--graph** – This option draws a text-based graphical representation of the history on the left hand side of the output. It’s of no use if you are viewing the history for a single branch. -- **--all** – Shows the history of all branches. - -Here’s what a combination of the options looks like: - -![Use of git log with all, graph and oneline](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946444git-ninja-03.png) - -### 5. Never Lose Track of a Commit ### - -Let’s say you committed something you didn’t want to and ended up doing a hard reset to come back to your previous state. Later, you realize you lost some other information in the process and want to get it back, or at least view it. This is where `git reflog` can help. - -A simple `git log` shows you the latest commit, its parent, its parent’s parent, and so on. However, `git reflog` is a list of commits that the head was pointed to. Remember that it’s local to your system; it’s not a part of your repository and not included in pushes or merges. - -If I run `git log`, I get the commits that are a part of my repository: - -![Project history](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946446git-ninja-04.png) - -However, a `git reflog` shows a commit (`b1b0ee9` – `HEAD@{4}`) that was lost when I did a hard reset: - -![Git reflog](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946447git-ninja-05.png) - -### 6. Staging Parts of a Changed File for a Commit ### - -It is generally a good practice to make feature-based commits, that is, each commit must represent a feature or a bug fix. Consider what would happen if you fixed two bugs, or added multiple features without committing the changes. In such a situation situation, you could put the changes in a single commit. But there is a better way: Stage the files individually and commit them separately. - -Let’s say you’ve made multiple changes to a single file and want them to appear in separate commits. In that case, we add files by prefixing `-p` to our add commands. - - git add -p [file_name] - -Let’s try to demonstrate the same. I have added three new lines to `file_name` and I want only the first and third lines to appear in my commit. Let’s see what a `git diff` shows us. - -![Changes in repo](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946449git-ninja-06.png) - -And let’s see what happes when we prefix a `-p` to our `add` command. - -![Running add with -p](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946450git-ninja-07.png) - -It seems that Git assumed that all the changes were a part of the same idea, thereby grouping it into a single hunk. You have the following options: - -- Enter y to stage that hunk -- Enter n to not stage that hunk -- Enter e to manually edit the hunk -- Enter d to exit or go to the next file. -- Enter s to split the hunk. - -In our case, we definitely want to split it into smaller parts to selectively add some and ignore the rest. - -![Adding all hunks](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946452git-ninja-08.png) - -As you can see, we have added the first and third lines and ignored the second. You can then view the status of the repository and make a commit. - -![Repository after selectively adding a file](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946454git-ninja-09.png) - -### 7. Squash Multiple Commits ### - -When you submit your code for review and create a pull request (which happens often in open source projects), you might be asked to make a change to your code before it’s accepted. You make the change, only to be asked to change it yet again in the next review. Before you know it, you have a few extra commits. Ideally, you could squash them into one using the rebase command. - - git rebase -i HEAD~[number_of_commits] - -If you want to squash the last two commits, the command that you run is the following. - - git rebase -i HEAD~2 - -On running this command, you are taken to an interactive interface listing the commits and asking you which ones to squash. Ideally, you `pick` the latest commit and `squash` the old ones. - -![Git squash interactive](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946455git-ninja-10.png) - -You are then asked to provide a commit message to the new commit. This process essentially re-writes your commit history. - -![Adding a commit message](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946457git-ninja-11.png) - -### 8. Stash Uncommitted Changes ### - -Let’s say you are working on a certain bug or a feature, and you are suddenly asked to demonstrate your work. Your current work is not complete enough to be committed, and you can’t give a demonstration at this stage (without reverting the changes). In such a situation, `git stash` comes to the rescue. Stash essentially takes all your changes and stores them for further use. To stash your changes, you simply run the following- - - git stash - -To check the list of stashes, you can run the following: - - git stash list - -![Stash list](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946458git-ninja-12.png) - -If you want to un-stash and recover the uncommitted changes, you apply the stash: - - git stash apply - -In the last screenshot, you can see that each stash has an indentifier, a unique number (although we have only one stash in this case). In case you want to apply only selective stashes, you add the specific identifier to the apply command: - - git stash apply stash@{2} - -![After un-stashing changes](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946461git-ninja-13.png) - -### 9. Check for Lost Commits ### - -Although `reflog` is one way of checking for lost commits, it’s not feasible in large repositories. That is when the `fsck` (file system check) command comes into play. - - git fsck --lost-found - -![Git fsck results](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946463git-ninja-14.png) - -Here you can see a lost commit. You can check the changes in the commit by running git show [commit_hash] or recover it by running `git merge [commit_hash]`. - -`git fsck` has an advantage over `reflog`. Let’s say you deleted a remote branch and then cloned the repository. With `fsck` you can search for and recover the deleted remote branch. - -### 10. Cherry Pick ### - -I have saved the most elegant Git command for the last. The `cherry-pick` command is by far my favorite Git command, because of its literal meaning as well as its utility! - -In the simplest of terms, `cherry-pick` is picking a single commit from a different branch and merging it with your current one. If you are working in a parallel fashion on two or more branches, you might notice a bug that is present in all branches. If you solve it in one, you can cherry pick the commit into the other branches, without messing with other files or commits. - -Let’s consider a scenario where we can apply this. I have two branches and I want to cherry-pick the commit `b20fd14: Cleaned junk` into another one. - -![Before cherry pick](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946465git-ninja-15.png) - -I switch to the branch into which I want to cherry-pick the commit, and run the following: - - git cherry-pick [commit_hash] - -![After cherry pick](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946467git-ninja-16.png) - -Although we had a clean `cherry-pick` this time, you should know that this command can often lead to conflicts, so use it with care. - -### Conclusion ### - -With this, we come to the end of our list of tips that I think can help you take your Git skills to a new level. Git is the best out there and it can accomplish anything you can imagine. Therefore, always try to challenge yourself with Git. Chances are, you will end up learning something new! - --------------------------------------------------------------------------------- - -via: http://www.sitepoint.com/10-tips-git-next-level/ - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://www.sitepoint.com/git-for-beginners/ -[2]:http://www.sitepoint.com/getting-started-git-team-environment/ diff --git a/sources/tech/20140624 Super Pi Brothers.md b/sources/tech/20140624 Super Pi Brothers.md new file mode 100644 index 0000000000..9e0ef9b0fd --- /dev/null +++ b/sources/tech/20140624 Super Pi Brothers.md @@ -0,0 +1,70 @@ +Super Pi Brothers +================================================================================ +I don't game as much as I used to. Although I've certainly spent countless hours of my life in front of a Nintendo, SNES, or after that, playing a first-person shooter on my computer (Linux only, thank you), these days, my free time tends to go toward one of the many nongaming hobbies I've accumulated. Recently though, I found myself dusting off my Wii console just so I could play an NES and SNES game I re-purchased for it. The thing is, those games require using a somewhat strange controller, and I already have a modified SNES controller that can connect over USB. That was enough to encourage me to search for a better solution. Of course, I simply could connect three or four consoles and stack up games in my living room, but I've grown accustomed to ripping my CDs and DVDs and picking what I want to listen to or watch from a central media center. It would be nice if I didn't have to get up and find a cartridge every time I wanted to switch games. This, of course, means going with emulation, but although in the past I'd had success with a modified classic Xbox, I didn't have that hardware anymore. I figured someone must have gotten this set up on the Raspberry Pi, and sure enough, after a brief search and a few commands, I had a perfect retro-gaming arcade set up on a spare Raspberry Pi. + +One nice thing about the Raspberry Pi project is the large number of people out there with identical hardware. For me, that meant instead of having to go through someone else's instructions, knowing I'd likely have to tweak it to suit my setup, I basically could follow someone else's guide verbatim. In my case, I found the RetroPie project, which wrapped up all of the commands you would need to install everything on a Raspberry Pi into a single large script. At the end, you have the RetroArch project fully installed and configured, which includes all of the major emulators you'd want and a centralized method to configure them, plus an EmulationStation graphical front end the Pi can boot directly into that makes it simple to navigate to the game you want, all from a gamepad. + +### Install RetroPie ### + +Before you install RetroPie, you will want to make sure your Raspbian distribution (the default Linux distribution for a Raspberry Pi, and the one this project assumes you will use) is completely up to date, including any new firmware images. This just means a few common `apt` commands. Although you certainly could connect a keyboard to your Raspberry Pi for this step, I've found it more convenient to `ssh` in to the device so I could copy and paste commands: + + $ sudo apt-get update + $ sudo apt-get -y upgrade + +Now that the Raspberry Pi is up to date, make sure the git and dialog packages are installed, and then use git to download RetroPie: + + + $ sudo apt-get -y install git dialog + $ cd + $ git clone --depth=0 + ↪git://github.com/petrockblog/RetroPie-Setup.git + +This will create a RetroPie-Setup directory containing the main setup script. Now you just need to go inside that directory and execute it: + + $ cd RetroPie-Setup + $ chmod +x retropie_setup.sh + $ sudo ./retropie_setup.sh + +This script presents you with an in-terminal menu (Figure 1) where you can choose to perform a binary installation or source installation, set up RetroPie, or perform a series of updates for the RetroPie setup script and binaries. Choose either the binary or source installation. The binary installation won't take as much time, but you may risk running older versions of some of the software. The source installation requires you to compile software, so it takes longer, but at the end, you will have the latest possible versions of everything. Personally, I opted for the binary install, knowing I always could re-run the script and go with the source install if I found any problems. + +![](http://www.linuxjournal.com/files/linuxjournal.com/ufiles/imagecache/medium-350px-centered/u1002061/11576f1.png) + +#### Figure 1. RetroPie Setup Menu #### + +This part of the process will take quite some time on a vanilla Raspbian image, as there are a lot of different packages to download and install. Once the installation completes, go back to the main RetroPie setup screen and select SETUP from the main menu. In this submenu, you can tweak settings, such as whether to start EmulationStation from boot (recommended) and whether to enable a splash screen. In my case, I enabled both settings as I intended my device to be a standalone emulation machine. Note that if you do allow EmulationStation to start up from boot, you still can always ssh in to the machine and run the original RetroPie configuration script to change the settings. + +### Adding ROMs ### + +You also can add ROMs within the RetroPie setup screen. If you choose the Samba method in the menu, you then can locate a local Samba mountpoint on your network, and you can copy ROMs from that. With the USB stick method, RetroPie will generate a directory structure on a USB stick that you plug in to your Raspberry Pi that represents the different emulators it supports. After this point, you can take that USB stick to another computer and copy ROMs over to the appropriate directory, and the next time you plug it in to the Raspberry Pi, it automatically will sync the files over. Finally (and this is what I did), you just can use scp or rsync to copy over ROMs to the appropriate directory under ~/RetroPie/roms/. So for instance, NES games would be copied to ~/RetroPie/roms/nes/. + +Once you are done with the configuration and exit out of the RetroPie setup script, you will want to reboot back into EmulationStation, but before you do, you should reconfigure the memory split on the Raspberry Pi so that it is set to 192 or 128, so run: + + + $ sudo raspi-config + +and go to the Advanced Settings to change the memory split setting. Now you can reboot safely. + +### EmulationStation ### + +Once you reboot, you should be greeted with the initial EmulationStation screen, which will prompt you to set up your joystick, gamepad or keyboard buttons so it can work with the EmulationStation menu. Note that this doesn't affect how your controllers work within games, just within the EmulationStation menu. After your controller or controllers are set up, you should be able to press right and left on your controller to switch between the different emulator menus. In my case, all of the buttons on my gamepad were going to be used within games, so I made a point to bind a key on a separate keyboard to the menu function so I could exit out of games when I was done without having to reboot the Raspberry Pi. + +EmulationStation will show you only menus that represent emulators for which it has detected ROMs, so if you haven't copied ROMs for a particular emulator yet, you will want to do that and potentially restart your Raspberry Pi before you can see them. Also, by default, your controller will not be configured for any games, but if you press the right arrow enough times within EmulationStation, you will get to an input configuration screen that allows you to map keys on your controller to keys inside a game. The nice thing about this setup is that after you configure the keys, it will apply appropriately within each emulator. + +That's it. From this point, you can browse through your collection of games and press whatever button you bound to Accept to start playing. At first I was concerned the Raspberry Pi wouldn't have the horsepower to play my games, but so far, it has been able to play any games I tried without a problem. + +### Resources ### + +The RetroPie Project: [http://blog.petrockblock.com/retropie][1] + +RetroPie Installation Docs: [https://github.com/petrockblog/RetroPie-Setup][2] + +-------------------------------------------------------------------------------- + +via: http://www.linuxjournal.com/content/super-pi-brothers + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://blog.petrockblock.com/retropie +[2]:https://github.com/petrockblog/RetroPie-Setup \ No newline at end of file diff --git a/sources/tech/20140701 Get OpenVPN up and running, enjoy your privacy.md b/sources/tech/20140701 Get OpenVPN up and running, enjoy your privacy.md new file mode 100644 index 0000000000..54ee1ff9c2 --- /dev/null +++ b/sources/tech/20140701 Get OpenVPN up and running, enjoy your privacy.md @@ -0,0 +1,499 @@ +Get OpenVPN up and running, enjoy your privacy +================================================================================ +![](http://parabing.com/assets/uploads/2014/06/openVPN-featured.jpg) + +> We are fanatic supporters of privacy. Not so much because we have super secrets to hide, but because we consider privacy as a basic human right. So we believe that anytime anyone chooses to exercise that right on the net, then they should have unencumbered access to all the necessary tools and services. OpenVPN is such a service and there are also many tools (clients) which allow us to utilize and enjoy that service. + +By establishing a connection to an [OpenVPN][1] server, we basically create a secure communications channel between our device and the remote host OpenVPN runs on. Although traffic flowing between these two end-points can be intercepted, it is strongly encrypted and thus practically useless to the interceptor. In addition to the OpenVPN acting as the facilitator of this encrypted channel (or tunnel), we may configure the server to also play the role of our Internet gateway. By doing so, we can for example hook up to any open, inherently insecure WiFi network, then immediately connect to the remote OpenVPN server and start using any Internet-enabled application without worrying of prying eyes or bored administrators. (Note though that we still need to trust any administrator in the vicinity of the OpenVPN server. But more on that towards the end of the post.) + +This article is a step-by-step guide on how to setup OpenVPN on [Ubuntu Server 14.04 LTS][2]. The OpenVPN host computer may be a VPS in the cloud, a virtual machine running on one of our computers at home, or even that somewhat aged box we tend to forget we have. + +### Step 01 -- System Preparation ### + +We gain access to a command shell in the Ubuntu Server host, for example by remotely connecting to it via SSH, and immediately refresh the local repository database: + + sub0@delta:~$ sudo apt-get update + +To perform any upgrades for all installed packages and the operating system itself, we type: + + sub0@delta:~$ sudo apt-get dist-upgrade + +If a new kernel gets pulled in, a system reboot will be required. After refreshing and upgrading, it’s time to install OpenVPN: + + sub0@delta:~$ sudo apt-get -y install openvpn easy-rsa dnsmasq + +Notice that we installed three packages with apt-get: + +- openvpn provides the core of OpenVPN +- easy-rsa contains some handy scripts for key management +- dnsmasq is the name server we’ll be using later on, when our OpenVPN server box/VM will assume the role of a router for all OpenVPN clients` + +### Step 02 -- Master certificate and private key for the Certificate Authority ### + +The most important –and admittedly the most crucial– step during the setup of an OpenVPN server, is the establishment of a corresponding Public Key Infrastructure (PKI). This infrastructure comprises the following: + +- A certificate (public key) and a private key for the OpenVPN server +- A certificate and a private key for any OpenVPN client +- A master certificate and a private key for the Certificate Authority (CA). This private key is used for signing the OpenVPN certificate as well as the client certificates. + +Beginning with the latter, we create a convenient working directory + + sub0@delta:~$ sudo mkdir /etc/openvpn/easy-rsa + +and then copy easy-rsa’s files to it: + + sub0@delta:~$ sudo cp -r /usr/share/easy-rsa/* /etc/openvpn/easy-rsa + +Before we actually create the keys for the CA, we open /etc/openvpn/easy-rsa/vars for editing (we like the nano text editor but this is just our preference): + + sub0@delta:~$ sudo nano /etc/openvpn/easy-rsa/vars + +Towards the end of the file we assign values to a set of variables which are read during the creation of the master certificate and private key. Take a look at the variables we assigned values to: + + export KEY_COUNTRY="GR" + export KEY_PROVINCE="Central Macedonia" + export KEY_CITY="Thessaloniki" + export KEY_ORG="Parabing Creations" + export KEY_EMAIL="nobody@parabing.com" + export KEY_CN="VPNsRUS" + export KEY_NAME="VPNsRUS" + export KEY_OU="Parabing" + export KEY_ALTNAMES="VPNsRUS" + +It goes without saying that you may assign different values, more appropriate for your case. Also take particular note of the last line, in which we set a value to the KEY_ALTNAMES variable. This line is not part of the original vars file but we nevertheless append it at the end of said file, or the build-ca script we’re going to run next will fail. + +To save the changes in vars we hit [CTRL+O] followed by the [Enter] key. To quit nano we hit [CTRL+X]. Now, we gain access to the root account and move on to building of the master certificate and private key: + + sub0@delta:~$ sudo su + root@delta:/home/sub0# cd /etc/openvpn/easy-rsa + root@delta:/etc/openvpn/easy-rsa# source vars + NOTE: If you run ./clean-all, I will be doing a rm -rf on /etc/openvpn/easy-rsa/keys + root@delta:/etc/openvpn/easy-rsa# sh clean-all + root@delta:/etc/openvpn/easy-rsa# sh build-ca + Generating a 1024 bit RSA private key + ...++++++ + ................++++++ + writing new private key to 'ca.key' + ----- + You are about to be asked to enter information that will be incorporated + into your certificate request. + What you are about to enter is what is called a Distinguished Name or a DN. + There are quite a few fields but you can leave some blank + For some fields there will be a default value, + If you enter '.', the field will be left blank. + ----- + Country Name (2 letter code) [GR]: + State or Province Name (full name) [Central Macedonia]: + Locality Name (eg, city) [Thessaloniki]: + Organization Name (eg, company) [Parabing Creations]: + Organizational Unit Name (eg, section) [Parabing]: + Common Name (eg, your name or your server's hostname) [VPNsRUS]: + Name [VPNsRUS]: + Email Address [nobody@parabing.com]: + root@delta:/etc/openvpn/easy-rsa# + +In our example the default answers were used for all the questions. After the build-ca script finishes we have the file for the master certificate (keys/ca.crt) and also the file for the private key (keys/ca.key). The latter must be kept secret at all costs. + +### Step 03 -- Certificate and private key for the OpenVPN server ### + +Before we make a certificate and private key for our OpenVPN server, we need to pick a name for it. We decided to name ours “delta” and then ran the build-key-server script to get the keys: + + root@delta:/etc/openvpn/easy-rsa# sh build-key-server delta + Generating a 1024 bit RSA private key + ....++++++ + ...++++++ + writing new private key to 'delta.key' + ----- + You are about to be asked to enter information that will be incorporated + into your certificate request. + What you are about to enter is what is called a Distinguished Name or a DN. + There are quite a few fields but you can leave some blank + For some fields there will be a default value, + If you enter '.', the field will be left blank. + ----- + Country Name (2 letter code) [GR]: + State or Province Name (full name) [Central Macedonia]: + Locality Name (eg, city) [Thessaloniki]: + Organization Name (eg, company) [Parabing Creations]: + Organizational Unit Name (eg, section) [Parabing]: + Common Name (eg, your name or your server's hostname) [delta]: + Name [VPNsRUS]:deltaVPN + Email Address [nobody@parabing.com]: + + Please enter the following 'extra' attributes + to be sent with your certificate request + A challenge password []: + An optional company name []: + Using configuration from /etc/openvpn/easy-rsa/openssl-1.0.0.cnf + Check that the request matches the signature + Signature ok + The Subject's Distinguished Name is as follows + countryName :PRINTABLE:'GR' + stateOrProvinceName :PRINTABLE:'Central Macedonia' + localityName :PRINTABLE:'Thessaloniki' + organizationName :PRINTABLE:'Parabing Creations' + organizationalUnitName:PRINTABLE:'Parabing' + commonName :PRINTABLE:'delta' + name :PRINTABLE:'deltaVPN' + emailAddress :IA5STRING:'nobody@parabing.com' + Certificate is to be certified until Apr 7 08:06:02 2024 GMT (3650 days) + Sign the certificate? [y/n]:y + + 1 out of 1 certificate requests certified, commit? [y/n]y + Write out database with 1 new entries + Data Base Updated + root@delta:/etc/openvpn/easy-rsa# + +The script successfully finished and we got a certificate (keys/delta.crt) as well as a private key (keys/delta.key) for our server. Note that the server certificate is signed by the CA’s private key. + +### Step 04 -- Diffie-Hellman parameters ### + +The secure passing of keys over an insecure communications channel is made possible thanks to a well-known technique involving the so called Diffie-Hellman parameters. To generate those we just type + + root@delta:/etc/openvpn/easy-rsa# sh build-dh + Generating DH parameters, 2048 bit long safe prime, generator 2 + This is going to take a long time + .......................+.....................................+.. + ...........................+..+.....................+........... + ..............................................+................. + .......................+........................................ + ................................................+............... + .......................................++*++*++* + root@delta:/etc/openvpn/easy-rsa# + +The certificates, private keys and the file containing the Diffie-Hellman parameters we just generated, are all stored into the /etc/openvpn/easy-rsa/keys directory. So up until now we have five files in total and in our case they are as follows: + +1. **ca.crt** – the certificate of the Certificate Authority +2. **ca.key** – the private key of the CA +3. **delta.crt** – the certificate of the OpenVPN server +4. **delta.key** – the private key of the OpenVPN server +5. **dh2048.pem** – the Diffie-Hellman parameters file + +In all likelihood, the keys for your own OpenVPN server are named differently. We now need to copy all files but the ca.key over to the /etc/openvpn directory: + + root@delta:/etc/openvpn/easy-rsa# cd keys + root@delta:/etc/openvpn/easy-rsa/keys# cp ca.crt delta.crt delta.key dh2048.pem /etc/openvpn + root@delta:/etc/openvpn/easy-rsa/keys# cd .. + root@delta:/etc/openvpn/easy-rsa# + +### Step 05 -- Certificates and private keys for the OpenVPN clients ### + +Let’s assume we’d like to connect to the OpenVPN server from our laptop. That’s actually a very common scenario and in order to be able to do so we first need to generate a certificate as well as a private key for the client, i.e. our laptop. There’s a script for that and it lives in the /etc/openvpn/easy-rsa directory: + + root@delta:/etc/openvpn/easy-rsa# source vars + NOTE: If you run ./clean-all, I will be doing a rm -rf on /etc/openvpn/easy-rsa/keys + root@delta:/etc/openvpn/easy-rsa# ./build-key laptop + Generating a 1024 bit RSA private key + .......................................++++++ + ...................................................................................................++++++ + writing new private key to 'laptop.key' + ----- + You are about to be asked to enter information that will be incorporated + into your certificate request. + What you are about to enter is what is called a Distinguished Name or a DN. + There are quite a few fields but you can leave some blank + For some fields there will be a default value, + If you enter '.', the field will be left blank. + ----- + Country Name (2 letter code) [GR]: + State or Province Name (full name) [Central Macedonia]: + Locality Name (eg, city) [Thessaloniki]: + Organization Name (eg, company) [Parabing Creations]: + Organizational Unit Name (eg, section) [Parabing]: + Common Name (eg, your name or your server's hostname) [laptop]: + Name [VPNsRUS]: + Email Address [nobody@parabing.com]: + + Please enter the following 'extra' attributes + to be sent with your certificate request + A challenge password []: + An optional company name []: + Using configuration from /etc/openvpn/easy-rsa/openssl-1.0.0.cnf + Check that the request matches the signature + Signature ok + The Subject's Distinguished Name is as follows + countryName :PRINTABLE:'GR' + stateOrProvinceName :PRINTABLE:'Central Macedonia' + localityName :PRINTABLE:'Thessaloniki' + organizationName :PRINTABLE:'Parabing Creations' + organizationalUnitName:PRINTABLE:'Parabing' + commonName :PRINTABLE:'laptop' + name :PRINTABLE:'VPNsRUS' + emailAddress :IA5STRING:'nobody@parabing.com' + Certificate is to be certified until Apr 7 18:00:51 2024 GMT (3650 days) + Sign the certificate? [y/n]:y + + 1 out of 1 certificate requests certified, commit? [y/n]y + Write out database with 1 new entries + Data Base Updated + root@delta:/etc/openvpn/easy-rsa# + +The base name we chose for the keys was “laptop”, so after the build-key finished we got keys/laptop.crt (certificate) and keys/laptop.key (private key). Those two keys for the particular client along with the CA’s certificate file go together, and it’s a good idea to copy them to a directory where our user (sub0) has full access to. We can, for example, create a new directory in the user’s home directory and copy those three files there: + + root@delta:/etc/openvpn/easy-rsa# mkdir /home/sub0/ovpn-client + root@delta:/etc/openvpn/easy-rsa# cd keys + root@delta:/etc/openvpn/easy-rsa/keys# cp ca.crt laptop.crt laptop.key /home/sub0/ovpn-client + root@delta:/etc/openvpn/easy-rsa/keys# chown -R sub0:sub0 /home/sub0/ovpn-client + root@delta:/etc/openvpn/easy-rsa/keys# cd .. + root@delta:/etc/openvpn/easy-rsa# + +The directory ovpn-client must be securely copied to our laptop. We are allowed to distribute those three files to more than one clients, as long as they are all ours. Of course, should we need a different certificate-private key couple, we run the build-key script again. + +### Step 06 -- OpenVPN server configuration ### + +In a little while our OpenVPN server will be up and running. But first, there are some configuration changes that need to be made. There’s a sample configuration file in /usr/share/doc/openvpn/examples/sample-config-files which is excellent for our setup. That file is named server.conf.gz: + + root@delta:/etc/openvpn/easy-rsa# cd /etc/openvpn + root@delta:/etc/openvpn# cp /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz . + root@delta:/etc/openvpn# gunzip -d server.conf.gz + root@delta:/etc/openvpn# mv server.conf delta.conf + root@delta:/etc/openvpn# + +As you can see, we copied server.conf.gz into the /etc/openvpn directory, uncompressed it and renamed it to delta.conf. You may choose any name you like for your OpenVPN server’s configuration file, as long as it has the “.conf” extension. Whatever the base name, we now open the configuration file with nano: + + root@delta:/etc/openvpn# nano delta.conf + +Here are the changes and additions we should make. + +- First, we locate the lines + + cert server.crt + key server.key + +and make sure they reflect the names of our OpenVPN server’s certificate and private key. In our case, those lines were changed into + + cert delta.crt + key delta.key + +- We locate the line + + dh dh1024.pem + +and replace “1024″ with “2048″: + + dh dh2048.pem + +- At the end of the configuration file we add the following two lines: + + push "redirect-gateway def1" + push "dhcp-option DNS 10.8.0.1" + +Those last two lines instruct the clients to use OpenVPN as the default gateway to the Internet, and also use 10.8.0.1 as the server to deal with DNS requests. Notice that 10.8.0.1 is the IP address of the tunnel network interface OpenVPN automatically creates upon startup. If the clients were to use any other server for name resolution, then we would have a situation in which all DNS requests were served from a possibly untrustworthy server. To avoid such DNS leaks, we instruct all OpenVPN clients to use 10.8.0.1 as the DNS server. + +We start our OpenVPN server like this: + + root@delta:/etc/openvpn# service openvpn start + +By default, OpenVPN listens for connections on port 1194/UDP. One way to see that is with the netstat tool: + + root@delta:/etc/openvpn# netstat -anup + Active Internet connections (servers and established) + Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name + udp 0 0 0.0.0.0:54149 0.0.0.0:* 555/dhclient + udp 0 0 0.0.0.0:1194 0.0.0.0:* 3024/openvpn + udp 0 0 0.0.0.0:53 0.0.0.0:* 2756/dnsmasq + udp 0 0 0.0.0.0:68 0.0.0.0:* 555/dhclient + udp6 0 0 :::60622 :::* 555/dhclient + udp6 0 0 :::53 :::* 2756/dnsmasq + +All is well, though we have no properly configured DNS server for the clients yet. + +### Step 07 -- A DNS service for OpenVPN clients ### + +That’s why we’ve installed dnsmasq for. We open up its configuration file + + root@delta:/etc/openvpn# nano /etc/dnsmasq.conf + +locate this line + + #listen-address= + +and change it into the following one: + + listen-address=127.0.0.1, 10.8.0.1 + +We also locate this line + + #bind-interfaces + +and delete the hash character on the left: + +bind-interfaces + +To make dnsmasq take these changes into account, we just restart the service: + + root@delta:/etc/openvpn# service dnsmasq restart + * Restarting DNS forwarder and DHCP server dnsmasq [ OK ] + root@delta:/etc/openvpn# + +As it is now, dnsmasq listens for DNS requests from the loopback (lo) and also from the tunnel (tun0) interface. The output of netstat confirms that: + + root@delta:/etc/openvpn# netstat -anup + Active Internet connections (servers and established) + Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name + udp 0 0 0.0.0.0:57219 0.0.0.0:* 638/dhclient + udp 0 0 0.0.0.0:1194 0.0.0.0:* 911/openvpn + udp 0 0 127.0.0.1:53 0.0.0.0:* 1385/dnsmasq + udp 0 0 10.8.0.1:53 0.0.0.0:* 1385/dnsmasq + udp 0 0 0.0.0.0:68 0.0.0.0:* 638/dhclient + udp6 0 0 :::39148 :::* 638/dhclient + +### Step 08 -- Router functionality ### + +We want the VM/box our OpenVPN server runs on to behave like a router, and that means that IP forwarding must be enabled. To enable it right now, from the root account we just type + + root@delta:/etc/openvpn# echo "1" > /proc/sys/net/ipv4/ip_forward + +To make this setting persistent across reboots we open up /etc/sysctl.conf + + root@delta:/etc/openvpn# nano /etc/sysctl.conf + +locate the line + + #net.ipv4.ip_forward=1 + +and remove the hash character on the left: + + net.ipv4.ip_forward=1 + +There are also some iptables-related rules we should activate: + + root@delta:/etc/openvpn# iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT + root@delta:/etc/openvpn# iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT + root@delta:/etc/openvpn# iptables -A FORWARD -j REJECT + root@delta:/etc/openvpn# iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE + root@delta:/etc/openvpn# + +And of course we want these rules activated every time Ubuntu boots up, so we add them inside /etc/rc.local: + + #!/bin/sh -e + # + # rc.local + # + # This script is executed at the end of each multiuser runlevel. + # Make sure that the script will "exit 0" on success or any other + # value on error. + # + # In order to enable or disable this script just change the execution + # bits. + # + # By default this script does nothing. + + iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT + iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT + iptables -A FORWARD -j REJECT + iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE + + service dnsmasq restart + + exit 0 + +Please notice the line before the last one: + +service dnsmasq restart + +> This is crucial: During system startup dnsmasq tries to come up before OpenVPN does. But without OpenVPN there is no tunnel interface (tun0) present so naturally dnsmasq fails. A bit later, when /etc/rc.local is read the tun0 interface is present, so at this point we restart dnsmasq and everything is as it's supposed to be. + +### Step 09 -- Client configuration ### + +In Step 05 we created the directory ovpn-client inside our user’s home directory (/home/sub0, in our example). In there we have the CA certificate plus the client certificate and private key. There’s only one file missing and that’s the configuration file for the client. A sample file we can use is inside /usr/share/doc/openvpn/examples/sample-config-files: + + root@delta:/etc/openvpn# exit + exit + sub0@delta:~$ cd ~/ovpn-client + sub0@delta:~/ovpn-client$ cp /usr/share/doc/openvpn/examples/sample-config-files/client.conf . + sub0@delta:~/ovpn-client$ + +We open up client.conf for editing and immediately locate the following line: + + remote my-server-1 1194 + +This “my-server-1″ string is a placeholder and we are now going to replace it for our server’s public domain name or public IP. If we do have a public domain name already assigned to the server, then there’s nothing more to do than put it in place of my-server-1. Things get a tiny bit more involved if there’s no public domain name for our server. What’s the public IP for it? One way to find out is by typing the following: + + sub0@delta:~/ovpn-client$ curl ipecho.net/plain ; echo + +(If instead of a numeric IP address you get an error, just wait a few seconds and try again.) So now we know our server’s public IP, but is it static or dynamic? Well, if we’re dealing with a server at home or even at the office, chances are it has a dynamic IP address. In that case it is advisable to use a free dynamic DNS service, such as the one provided by http://www.noip.com. In the case of NoIP, assuming we have chosen the free domain dnsalias.net then we may end up with a line like this + + remote ovpn.dnsalias.net 1194 + +where “ovpn” is the hostname we’ve given to the server. On the other hand, if our server is hosted in the cloud then it probably has a static public IP address. In that case, the remote directive inside client.conf will look like the following: + + remote 1.2.3.4 1194 + +There are two more lines we need to modify: + + cert client.crt + key client.key + +In our case, the certificate and private key files for the client are named laptop.crt and laptop.key respectively, so our client.conf contains these two lines: + + cert laptop.crt + key laptop.key + +After making sure the changes to client.conf are saved, we need to securely transfer the whole ovpn-client directory to the client. One way to do so is by using the scp command (secure copy or copy over SSH). An alternative is provided by the excellent and free FileZilla, which supports FTP over SSH connections (SFTP). + +### Step 10 -- Connecting and testing ### + +![](http://parabing.com/assets/uploads/2014/06/01-Firewall.png) + + +So how do we actually connect to the remote OpenVPN server? It all depends on the type of the device we have in hand and of course on the operating system is runs. In a bit we are going to examine the cases of four different OS families — or OS categories, if you will: Linux, Windows, OS X and iOS/Android. Note though that no matter the device or the OS, for the connection to be successful we need to be outside of the OpenVPN server’s local network. In addition, if there’s a firewall in front of the server –and it probably is– then we ought to put a new rule in place which essentially states something like this: + +*Redirect all incoming UDP packets for port 1194 to port 1194/UDP of the server’s public-facing network interface.* + +That’s some simple firewall rule, don’t you think? And without further ado, let’s establish our first connection to the fabulous OpenVPN server of ours. + +**Linux**. All we need is the openvpn package installed. One way to connect to the remote OpenVPN server is to fire up a terminal, change to the ovpn-client directory and from the root user account –or with the assistance of sudo– type something like this: + + /usr/sbin/openvpn --config client.conf + +Anytime we want to terminate the connection we just hit [CTRL+C]. + +**Windows**. A free OpenVPN client is the so called [OpenVPN Desktop Client][3]. The configuration file client.conf must be renamed to client.ovpn and that’s the file we should give to the OpenVPN Desktop Client. The application will read client.ovpn and create a new connection profile for the OpenVPN server. + +![](http://parabing.com/assets/uploads/2014/06/02-Connected.jpg) + +**OS X**. A free OpenVPN client for OS X is [tunnelblick][4]. There is also [Viscosity][5] which is commercial and happens to be our favorite. Viscosity will read client.conf and create a new connection profile for the remote server. + +iOS/Android. An excellent choice is OpenVPN connect. It is free of charge and available from the [App Store][6] as well as the Google [Play store][7]. + +Regardless of the computing platform, sometimes we’d like to check if we’re actually using the OpenVPN server we think we’re using. One way to do that is by following this simple 4-step procedure: + +Prior to connecting to the OpenVPN server we… + +- visit a site such as [whatip.com][8] and take note of our public IP +- visit [dnsleaktest.com][10, perform the standard test, take note of the name servers we’re using + +![](http://parabing.com/assets/uploads/2014/06/03-DNS.png) + +After connecting to the OpenVPN server we repeat the above two steps. If we get two different public IPs, this means we do go out on the net through the remote OpenVPN server. In addition, if we get two different sets of name servers, then there are no DNS leaks. + +### Final thoughts ### + +I use three different OpenVPN servers, all custom-made. One of them runs on the pfSense router at my home office in Thessaloniki, Greece. I use this server when I’m out of office and want secure access to the home LAN. The other two OpenVPN servers are hosted on two different VPSes, one in Reykjavik, Iceland, and the other in New Jersey, USA. Whenever I’m out and about and feel like using a random WiFi hotspot, I don’t even have to think of the security implications: I simply connect to the Reykjavik server and start surfing the web normally. There are also some times when I want to casually check out a service which is geographically restricted to the US. In these not-so-common cases the New Jersey server comes in handy, for when I connect to it I get a public IP from the U, S of A and hence access to that otherwise restricted service. It is worth noting that some service providers maintain blacklists with numerous well-known VPN companies. And that’s *exactly* one of the advantages of setting up your own OpenVPN server on a VPS provider of your choosing: It’s unlikely that this provider is blacklisted. + +No matter where the physical location of your server is, OpenVPN ensures that the traffic flow between the client and the server is strongly encrypted. What happens to the traffic leaving the OpenVPN server is another story. Depending on the application-layer protocol it may still be encrypted, but it could be unencrypted as well. So unless you have absolute control of the OpenVPN server and of the local network it belongs to, you cannot fully trust the administrator at the other end. The moral of this is apparent: If you really care about your privacy, then you should keep in mind that your own behavior may indeed undermine it. + +One example will hopefully get the point across. You have a well configured OpenVPN server in the cloud. You use any random WiFi hotspot anytime you feel like it and without the slightest bit of worry, thanks to that heroic OpenVPN server. Then you fire up your favorite mail client to get your email from this good, old mail server which still uses plain SMTP. Guess what? Your username and password leave the OpenVPN server in plain text, i.e. unencrypted. At the same time a bored administrator in the vicinity of the OpenVPN server could be easily sniffing-out your credentials and storing them in their ever-growing list named “random happy people.txt”. + +So what do you do? Simple. You continue using your OpenVPN server, but refrain from using applications which talk old and/or insecure protocols. + +Enjoy your brand new OpenVPN server! + +-------------------------------------------------------------------------------- + +via: http://parabing.com/2014/06/openvpn-on-ubuntu/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://en.wikipedia.org/wiki/Openvpn +[2]:http://www.ubuntu.com/server +[3]:http://swupdate.openvpn.net/downloads/openvpn-client.msi +[4]:https://code.google.com/p/tunnelblick +[5]:https://www.sparklabs.com/viscosity +[6]:https://itunes.apple.com/us/app/openvpn-connect/id590379981?mt=8 +[7]:https://play.google.com/store/apps/details?id=net.openvpn.openvpn +[8]:http://www.whatip.com/ +[9]:https://dnsleaktest.com/ \ No newline at end of file diff --git a/sources/tech/20140702 Wine 1.7.21 (Development Version) Released--Install in RedHat and Debian Based Systems.md b/sources/tech/20140702 Wine 1.7.21 (Development Version) Released--Install in RedHat and Debian Based Systems.md new file mode 100644 index 0000000000..fcf41447d8 --- /dev/null +++ b/sources/tech/20140702 Wine 1.7.21 (Development Version) Released--Install in RedHat and Debian Based Systems.md @@ -0,0 +1,103 @@ +2q1w2007翻译中 +Wine 1.7.21 (Development Version) Released – Install in RedHat and Debian Based Systems +================================================================================ +Wine, a most popular and powerful open source application for Linux, that used to run Windows based applications and games on Linux Platform without any trouble. + +![Install Wine (Development Version) in Linux](http://www.tecmint.com/wp-content/uploads/2014/05/Install-Wine-Development-Version.png) +Install Wine (Development Version) in Linux + +**WineHQ** team, recently announced a new development version of **Wine 1.7.21**. This new development build arrives with a number of new important features and bug fixes. + +Wine team, keep releasing their development builds almost on weekly basis and adding numerous new features and fixes. Each new version brings support for new applications and games, making Wine a most popular and must have tool for every user, who want to run Windows based software in a Linux platform. + +According to the changelog, following key features are added in this release: + +- Added support for critical sections in the C runtime. +- The Unicode data updated to Unicode 7. +- Implemented support for interlaced PNG encoding. +- Added an initial stub for the Package library. +- And several bug fixes have been implemented. + +For more in-depth details about this build can be found at the official [changelog][1] page. + +This article guides you how to install most recent development version of **Wine 1.7.21** on **Red Hat** and **Debian** based systems such as CentOS, Fedora, Ubuntu, Linux Mint and other supported distributions. + +### Installing Wine 1.7.21 Development Version in Linux ### + +Unfortunately, there are no official Wine repository available for the **Red Hat** based systems and the only way to install Wine, is to compile it from source. To do this, you need to install some dependency packages such as gcc, flex, bison, libX11-devel freetype-devel and Development Tools, etc. These packages are must required to compile Wine from source. Let’s install them using following **YUM** command. + +#### On RedHat, Fedora and CentOS #### + + # yum -y groupinstall 'Development Tools' + # yum -y install flex bison libX11-devel freetype-devel + +Next, download the latest development version of Wine (i.e. **1.7.21**) and extract the source tallball package using the following commands. + + $ cd /tmp + $ wget http://citylan.dl.sourceforge.net/project/wine/Source/wine-1.7.21.tar.bz2 + $ tar -xvf wine-1.7.21.tar.bz2 -C /tmp/ + +Now, it’s time to compile and build Wine installer using the following commands as normal user. (**Note**: The installation process might take up-to **15-20** minutes depending upon your internet and hardware speed, during installation it will ask you to enter **root** password. + +**On 32-Bit Systems** + + $ cd wine-1.7.21/ + $ ./tools/wineinstall + +**On 64-Bit Systems** + + $ cd wine-1.7.21/ + $ ./configure --enable-win64 + $ make + # make install + +#### On Ubuntu, Debian and Linux Mint #### + +Under **Ubuntu** based systems, you can easily install the latest development build of Wine using the official **PPA**. Open a terminal and run the following commands with sudo privileges. + + $ sudo add-apt-repository ppa:ubuntu-wine/ppa + $ sudo apt-get update + $ sudo apt-get install wine 1.7 winetricks + +**Note**: At the time of writing this article, available version was **1.7.20** and the new build not yet updated in official Wine Repository, but the above instructions will install **1.7.21** when they made available. + +Once the installation completes successfully, you can install or run any windows based applications or games using wine as shown below. + + $ wine notepad + $ wine notepad.exe + $ wine c:\\windows\\notepad.exe + +**Note**: Please remember, this is a development build and cannot be installed or used on production systems. It is advised to use this version only for testing purpose. + +If you’re looking for a most recent stable version of Wine, you can go through our following articles, that describes how to install most latest version on almost all Linux environments. + +- [Install Wine 1.6.2 (Stable) in RHEL, CentOS and Fedora][2] +- [Install Wine 1.6.2 (Stable) in Debian, Ubuntu and Mint][3] + +### Reference Links ### + +- [WineHQ Homepage][4] + +---------- + +![](http://1.gravatar.com/avatar/7badddbc53297b2e8ed7011cf45df0c0?s=80&d=blank&r=G) + +#### Ravi Saive #### + +Owner at [TecMint.com][5] + +Simple Word a Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-wine-in-linux/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.winehq.org/announce/1.7.21 +[2]:http://www.tecmint.com/install-wine-in-rhel-centos-and-fedora/ +[3]:http://www.tecmint.com/install-wine-on-ubuntu-and-linux-mint/ +[4]:http://www.winehq.org/ +[5]:http://www.tecmint.com/ \ No newline at end of file diff --git a/sources/tech/20140711 How to Install Lightweight Budgie Desktop in Ubuntu 14.04.md b/sources/tech/20140711 How to Install Lightweight Budgie Desktop in Ubuntu 14.04.md new file mode 100644 index 0000000000..8614116006 --- /dev/null +++ b/sources/tech/20140711 How to Install Lightweight Budgie Desktop in Ubuntu 14.04.md @@ -0,0 +1,59 @@ +Love-xuan 翻译中 +How to Install Lightweight Budgie Desktop in Ubuntu 14.04 +================================================================================ +**If you follow us over on Twitter you may have caught a glimpse of a screenshot we shared recently, along with the invitation to name the desktop environment pictured. ** + +Did you guess correctly? The answer is [Budgie][1] — a simple desktop designed for, but not exclusive to, an openSUSE-based Linux distribution called Evolve OS. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/BsCvTxJIcAAPjUR.png-large.png) + +We first wrote about Budgie back in March and were suitably bowled over by both the clean, minimal aesthetic and nimble framework, but also by the decision to reuse common components and the standard stack of GNOME 3.10 technologies readily available in most modern distributions. + +I’m a huge admirer of the development choices taken by the project lead, Ikey Doherty. There’s no denying that forking has its merits, but by deciding to favour upstream projects whole project is able to move faster, both development-wise (less technical debt) and in being available for users (easier to run on other distributions). + +Politics of choice aside, the desktop is clean and minimal with a nod to the Ash desktop of Google’s Chrome OS. If you don’t mind a few rough edges, its well worth a play with. But how do you install Budgie on Ubuntu? + +### Unofficial PPA is Unofficial ### + +Open source being what it is means if you have a bit of terminal know-how you can grab the source and get it up and running with a bit of wily compiling. + +But if you’re too lazy for that and happen to be running Ubuntu 14.04 LTS (or a distro based on it) you can get it the easy way. + +Just add one **unofficial PPA**, refresh your Software Sources and then install. A few minutes later and you’ll have both a new uncle in the family by the [name of Bob][2] and a new desktop shell to play with. + +### Add the Budgie PPA ### + +With a terminal window open copy and paste the following commands carefully, entering your password when/if prompted: + + sudo add-apt-repository ppa:sukso96100/budgie-desktop + sudo apt-get update && sudo apt-get install budgie-desktop + +### Log into the Budgie Session ### + +After installation you’ll be able to select ‘Budgie’ from the session selector of the Unity Greeter. (Don’t forget to change this back to a stable DE at a later date.) + +### Notes ### + +**Budgie is not stable, finished nor is it officially supported on Ubuntu**. It is in active development and features remain missing, including, but not limited to: no network management support, no volume control applet (keyboard keys will work fine), no notification system and no way to ‘pin’ apps to the task bar. + +It also doesn’t play too nicely with Ubuntu’s overlay scrollbars, some GTK themes, and session management (e.g., logout, restart, etc.) on distributions using Upstart (like Ubuntu, [though that’s changing][3]) does not work. + +As a workaround you can disable overlay scrollbars, set a different default theme and quit a session from the terminal using the following command: + + gnome-session-quit + +With all of those caveats in mind, I’d suggest those whose sanity hinges on a stable, dependable system avoid using it for now. + +But for the rest of you crazy folks? Well, let us know what you think of it in the comments below. I’m off to let Bob in. + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/07/install-budgie-evolve-os-desktop-ubuntu-14-04 + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.omgubuntu.co.uk/2014/03/budgie-desktop-chrome-os-like +[2]:http://en.wikipedia.org/wiki/Bob +[3]:http://www.omgubuntu.co.uk/2014/02/ubuntu-debian-switching-systemd \ No newline at end of file diff --git a/sources/tech/20140711 How to simulate key press and mouse movement in Linux.md b/sources/tech/20140711 How to simulate key press and mouse movement in Linux.md new file mode 100644 index 0000000000..a0413a31a1 --- /dev/null +++ b/sources/tech/20140711 How to simulate key press and mouse movement in Linux.md @@ -0,0 +1,104 @@ +How to simulate key press and mouse movement in Linux +================================================================================ +Have you ever dreamed of your computer doing stuff automatically for you? Probably not if you just watched Terminator. But except for that, scripting and task automation are every power user's dreams. If a lot of solutions exist today to fit such goal, it is sometimes hard to pick the simple, smart, and efficient one out of the lot. I cannot pretend to have found it myself, but in the mean time, my preference goes to neat software called xdotool. Its approach is intuitive as it stands as an X11 automation tool. In other words, xdotool can simulate key presses and even mouse events from reading a text file. + +### Installation of Xdotool on Linux ### + +For Ubuntu, Debian or Linux Mint, you can just do: + + $ sudo apt-get install xdotool + +For Fedora, use yum command: + + $ sudo yum install xdotool + +For CentOS user, the package is available in [EPEL repo][1]. After enabling EPEL repo, simply use yum command as above. + +For Arch user, the package is available in the Community repo: + + $ sudo pacman -S xdotool + +If you cannot find xdotool for your distribution, you can always download it from the [official website][2]. + +### Basic Usage of Xdotool ### + +As intuitive as it is, xdotool remains a scripting application. Hence you have to know the syntax in order to use it properly. Rest assured though, the syntax is very simple and quick to pick up, relative to the extent of the program's features. + +First, it is very easy to simulate key press. From the terminal, you can type the command: + + $ xdotool key [name of the key] + +If you want to chain two keys, use the "+" operator between them. So: + + $ xdotool key alt+Tab + +will switch window for you. + +To have xdotool type for you, use the type command: + + $ xdotool type '' + +That's already enough for basic key pressing. But one of the many strengths of xdotool is its ability to put the focus on a particular window. It can fetch the right window, and then type in it, preventing all your recorded keystrokes to just vaporize in thin air. For this, the simplest command is: + + $ xdotool search --name [name of the window] key [keys to press] + +This will search through the opened window for one with the name matching the search, give it the focus, and then simulate the key pressing. + +A bit more advanced, but very useful, xdotool can simulate mouse movement and click. With: + + $ xdotool mousemove x y + +you can place the cursor at coordinates (x,y) of your screen (in pixels). You can also combine it with the "click" argument: + + $ xdotool mousemove x y click 1 + +This will move the mouse to (x,y), and click with the left button. The "1" represents the left button of the mouse, "2" would be the scroll wheel, "3" the right button, etc. + +Finally, once you have your commands in mind, you might want to actually dump it in a file to edit and play. For that, there is more than one syntax. You can write is a bash script: + + #!/bin/bash + + xdotool [command 1] + xdotool [command 2] + etc + +Or you can use: + + $ xdotool [filename] + +where you write your commands in a separate file and plug its name as the argument. + +### Bonus ### + +As a bonus to this post, here is a concrete example of xdotool in action. You may or may not have heard of Bing, the Microsoft's search engine. In the latter case, you have then never heard of Bing Rewards: a program that allows you to trade Bing points for Amazon's and other gift cards. To earn those points, you can do up to 30 searches a day on Bing, each search giving you 0.5 point. In other words, you have to make Bing your default search engine, and use it every day. + +Or, you can use this xdotool script, which will automatically give focus to Firefox (replace it with your favorite navigator), and perform a search using the fortune command to generate some random words. In about 30 seconds, all your daily searches will be done. + + #!/bin/bash + + for i in {1..30} + do + WID=`xdotool search --title "Mozilla Firefox" | head -1` + xdotool windowfocus $WID + xdotool key ctrl+l + xdotool key Tab + SENTENCE="$(fortune | cut -d' ' -f1-3 | head -1)" + xdotool type $SENTENCE + xdotool key "Return" + sleep 4 + done + +To conclude, I really like xdotool even if its full capabilities extend way beyond the scope of this post. It is a really approachable way to scripting and task automation. The downside is that it probably is not the most efficient one. But again, it does the job, and isn't too much of a bother to learn. + +What are your thoughts on xdotool? Do you prefer another automation tool to it? And why? Let us know in the comments. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/2014/07/simulate-key-press-mouse-movement-linux.html + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://xmodulo.com/2013/03/how-to-set-up-epel-repository-on-centos.html +[2]:http://www.semicomplete.com/projects/xdotool/ \ No newline at end of file diff --git a/sources/tech/20140711 How to use systemd for system administration on Debian.md b/sources/tech/20140711 How to use systemd for system administration on Debian.md new file mode 100644 index 0000000000..a464473fe4 --- /dev/null +++ b/sources/tech/20140711 How to use systemd for system administration on Debian.md @@ -0,0 +1,106 @@ +How to use systemd for system administration on Debian +================================================================================ +Soon enough, hardly any Linux user will be able to escape the ever growing grasp that systemd imposes on Linux, unless they manually opt out. systemd has created more technical, emotional, and social issues than any other piece of software as of late. This predominantly came to show in the [heated discussions][1] also dubbed as the 'Init Wars', that occupied parts of the Debian developer body for months. While the Debian Technical Comittee finally decided to include systemd in Debian 8 "Jessie", there were efforts to [supersede the decision][2] by a General Resolution, and even threats to the health of developers in favor of systemd. + +This goes to show how deep systemd interferes with the way of handling Linux systems that has, in large parts, been passed down to us from the Unix days. Theorems like "one tool for the job" are overthrown by the new kid in town. Besides substituting sysvinit as init system, it digs deep into system administration. For right now a lot of the commands you are used to will keep on working due to the compatibility layer provided by the package systemd-sysv. That might change as soon as systemd 214 is uploaded to Debian, destined to be released in the stable branch with Debian 8 "Jessie". From thereon, users need to utilize the new commands that come with systemd for managing services, processes, switching run levels, and querying the logging system. A workaround is to set up aliases in .bashrc. + +So let's have a look at how systemd will change your habits of administrating your computers and the pros and cons involved. Before making the switch to systemd, it is a good security measure to save the old sysvinit to be able to still boot, should systemd fail. This will only work as long as systemd-sysv is not yet installed, and can be easily obtained by running: + + # cp -av /sbin/init /sbin/init.sysvinit + +Thusly prepared, in case of emergency, just append: + + init=/sbin/init.sysvinit + +to the kernel boot-time parameters. + +### Basic Usage of systemctl ### + +systemctl is the command that substitutes the old "/etc/init.d/foo start/stop", but also does a lot more, as you can learn from its man page. + +Some basic use-cases are: + +- systemctl - list all loaded units and their state (where unit is the term for a job/service) +- systemctl list-units - list all units +- systemctl start [NAME...] - start (activate) one or more units +- systemctl stop [NAME...] - stop (deactivate) one or more units +- systemctl disable [NAME...] - disable one or more unit files +- systemctl list-unit-files - show all installed unit files and their state +- systemctl --failed - show which units failed during boot +- systemctl --type=mount - filter for types; types could be: service, mount, device, socket, target +- systemctl enable debug-shell.service - start a root shell on TTY 9 for debugging + +For more convinience in handling units, there is the package systemd-ui, which is started as user with the command systemadm. + +Switching runlevels, reboot and shutdown are also handled by systemctl: + +- systemctl isolate graphical.target - take you to what you know as init 5, where your X-server runs +- systemctl isolate multi-user.target - take you to what you know as init 3, TTY, no X +- systemctl reboot - shut down and reboot the system +- systemctl poweroff - shut down the system + +All these commands, other than the ones for switching runlevels, can be executed as normal user. + +### Basic Usage of journalctl ### + +systemd does not only boot machines faster than the old init system, it also starts logging much earlier, including messages from the kernel initialization phase, the initial RAM disk, the early boot logic, and the main system runtime. So the days where you needed to use a camera to provide the output of a kernel panic or otherwise stalled system for debugging are mostly over. + +With systemd, logs are aggregated in the journal which resides in /var/log/. To be able to make full use of the journal, we first need to set it up, as Debian does not do that for you yet: + + # addgroup --system systemd-journal + # mkdir -p /var/log/journal + # chown root:systemd-journal /var/log/journal + # gpasswd -a $user systemd-journal + +That will set up the journal in a way where you can query it as normal user. Querying the journal with journalctl offers some advantages over the way syslog works: + +- journalctl --all - show the full journal of the system and all its users +- journalctl -f - show a live view of the journal (equivalent to "tail -f /var/log/messages") +- journalctl -b - show the log since the last boot +- journalctl -k -b -1 - show all kernel logs from the boot before last (-b -1) +- journalctl -b -p err - shows the log of the last boot, limited to the priority "ERROR" +- journalctl --since=yesterday - since Linux people normally do not often reboot, this limits the size more than -b would +- journalctl -u cron.service --since='2014-07-06 07:00' --until='2014-07-06 08:23' - show the log for cron for a defined timeframe +- journalctl -p 2 --since=today - show the log for priority 2, which covers emerg, alert and crit; resembles syslog priorities emerg (0), alert (1), crit (2), err (3), warning (4), notice (5), info (6), debug (7) +- journalctl > yourlog.log - copy the binary journal as text into your current directory + +Journal and syslog can work side-by-side. On the other hand, you can remove any syslog packages like rsyslog or syslog-ng once you are satisfied with the way the journal works. + +For very detailed output, append "systemd.log_level=debug" to the kernel boot-time parameter list, and then run: + + # journalctl -alb + +Log levels can also be edited in /etc/systemd/system.conf. + +### Analyzing the Boot Process with systemd ### + +systemd allows you to effectively analyze and optimize your boot process: + +- systemd-analyze - show how long the last boot took for kernel and userspace +- systemd-analyze blame - show details of how long each service took to start +- systemd-analyze critical-chain - print a tree of the time-critical chain of units +- systemd-analyze dot | dot -Tsvg > systemd.svg - put a vector graphic of your boot process (requires graphviz package) +- systemd-analyze plot > bootplot.svg - generate a graphical timechart of the boot process + +![](https://farm6.staticflickr.com/5559/14607588994_38543638b3_z.jpg) + +![](https://farm6.staticflickr.com/5565/14423020978_14b21402c8_z.jpg) + +systemd has pretty good documentation for such a young project under heavy developement. First of all, there is the [0pointer series by Lennart Poettering][3]. The series is highly technical and quite verbose, and holds a wealth of information. Another good source is the distro agnostic [Freedesktop info page][4] with the largest collection of links to systemd resources, distro specific pages, bugtrackers and documentation. A quick glance at: + + # man systemd.index + +will give you an overview of all systemd man pages. The command structure for systemd for various distributions is pretty much the same, differences are found mainly in the packaging. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/2014/07/use-systemd-system-administration-debian.html + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://lists.debian.org/debian-devel/2013/10/msg00444.html +[2]:https://lists.debian.org/debian-devel/2014/02/msg00316.html +[3]:http://0pointer.de/blog/projects/systemd.html +[4]:http://www.freedesktop.org/wiki/Software/systemd/ \ No newline at end of file diff --git a/sources/tech/20140714 Fix No Sound In Ubuntu 14.04 As HDMI Enabled BY Default.md b/sources/tech/20140714 Fix No Sound In Ubuntu 14.04 As HDMI Enabled BY Default.md new file mode 100644 index 0000000000..202a1c734f --- /dev/null +++ b/sources/tech/20140714 Fix No Sound In Ubuntu 14.04 As HDMI Enabled BY Default.md @@ -0,0 +1,61 @@ +Fix No Sound In Ubuntu 14.04 As HDMI Enabled BY Default +================================================================================ +Sound problem is not new in Ubuntu. I have previously written on various ways to [fix “no sound” issue in Ubuntu][1]. But the soud issue I am going to discuss here is different than those mentioned in the other article. + +So I installed Ubuntu 14.04, actually re-installed it. As always, I did all those [things to do after a fresh install of Ubuntu 14.04][2]. And than I realized that the system had no sound. While investigating the issue I found one strange thing. I checked [alsamixer][3] and it was in a weird state: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/06/alsamixer_Set_HDMI_Default.jpeg) + +As you can see, **HDMI is set by default in alsamixer**. Which means by default HDMI output has been selected instead of the built in speakers. This is why I get no sound from the built in speakers in my system. + +Use the following command to check the state of alsamixer: + + alsamixer + +If alsamixer is set by default to HDMI or some other audio output, continue this article to see how can we fix it. + +### Fixing no sound in Ubuntu when HDMI is set as default ### + +Now to force Ubuntu to use analog output instead of HDMI by default, we need a little information. Open a terminal and use the following command: + + aplay -l + +This will list the devices, card number etc. Note down the card and device number for analog output. For me the output was like this: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/07/AlsaMixer_List_Device.jpeg) + +Once you have the required card and device number, make a new configuration file like this: + + sudo gedit /etc/asound.conf + +The above command will also open the file. Add the following lines to it, replacing with your card and device number of course: + + defaults.pcm.card 1 + defaults.pcm.device 0 + +Save the file and restart the computer. You should hear the sound now. Just to mention, this will work for all the Linux distributions such as Linux Mint, Elementary OS, Fedora, Arch Linux etc. As I said previously, this “no sound fix” only works with the case where HDMI is set by default. For other cases, you can read [this article about fixing no sound issue in Ubuntu and Linux Mint][4]. + +Feel free to use the comment section to let me know if it worked or not or if you have some better trick to handle this such issue. Ciao ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-includes/images/smilies/icon_smile.gif) + +---------- + +![](http://1.gravatar.com/avatar/20749c268f5d3e4d2c785499eb6a17c0?s=100&r=pg&d=mm) + +About Abhishek + +I am Abhishek Prakash, 'creator' of It's F.O.S.S. I have a Masters in Communication System Engineering. I am an avid Linux lover and Open Source enthusiast. I use Ubuntu and believe in sharing knowledge. Apart from Linux, I love classic detective mystery. Huge fan of Agatha Christie work. Feel free to circle me on [Google Plus][g] and Follow [@abhishek_pc][t] + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/fix-sound-ubuntu-1404/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://itsfoss.com/fix-sound-ubuntu-1304-quick-tip/ +[2]:http://itsfoss.com/things-to-do-after-installing-ubuntu-14-04/ +[3]:http://en.wikipedia.org/wiki/Alsamixer +[4]:http://itsfoss.com/fix-sound-ubuntu-1304-quick-tip/ +[g]:https://plus.google.com/u/0/110180944531110746460 +[t]:https://twitter.com/abhishek_pc \ No newline at end of file diff --git a/sources/tech/20140714 Linux slabtop command--Display Kernel Slab Cache Information.md b/sources/tech/20140714 Linux slabtop command--Display Kernel Slab Cache Information.md new file mode 100644 index 0000000000..8bb4e1f626 --- /dev/null +++ b/sources/tech/20140714 Linux slabtop command--Display Kernel Slab Cache Information.md @@ -0,0 +1,139 @@ +Linux slabtop command - Display Kernel Slab Cache Information +================================================================================ +The Linux kernel needs to allocate memory for temporary objects such as task or device structures and inodes. The caching memory allocator manages caches of these types of objects. The modern Linux kernel implements this caching memory allocator to hold the caches called the slabs. Different types of slab caches are maintained by the slab allocator. This article concentrates on the slabtop command which shows real-time kernel slab cache information. + +### 1. Command Usage: ### + +The command is simple to use. Default execution does not mandate any arguments to the command. But it does require root privileges to access the kernel slab information. Executing the command as normal user gives following error: + +![Run slabtop as non-privileged user](http://linoxide.com/wp-content/uploads/2014/07/001.slabtop_normal_user.png) + +You can run it by prepending “sudo” with slabtop. The default output looks like: + +![Slabtop default output](http://linoxide.com/wp-content/uploads/2014/07/002.slabtop_output.png) + +To quit from slabtop, just hit ‘q’ like you do for top command. + +### 2. Slabtop options: ### + +#### 2.1 Display Interval: #### + +By default slabtop refreshes every 3 seconds. But if you want, you can provide the refreshing interval in seconds with -d or --delay=N option: + +![Custom delay interval 01](http://linoxide.com/wp-content/uploads/2014/07/003.slabtop_delay01.png) + +![Custom delay interval 02](http://linoxide.com/wp-content/uploads/2014/07/004.slabtop_delay02.png) + +#### 2.2 Sort criteria: #### + +There are many fields in slabtop output. The -s or --sort=S option sorts the output according to the mentioned sort criteria. This option will be discussed in detail in the next section. + +#### 2.3 Output once: #### + +The -o or --once option does not refresh the output, instead it just throws the output once on STDOUT and exits. + +![Output once and exit](http://linoxide.com/wp-content/uploads/2014/07/005.slabtop_output_once.png) + +#### 2.4 Version info: #### + +The -V or --version displays the version of the command and exits. + +![Slabtop version](http://linoxide.com/wp-content/uploads/2014/07/006.slabtop_version.png) + +#### 2.5 Help: #### + +The common option, -h or --help displays usage of the command. + +![Slabtop help options](http://linoxide.com/wp-content/uploads/2014/07/007.slabtop_help.png) + +### 3. Sort Criteria: ### + +The sort criteria determines which slab caches are displayed on top. Following are the sort criteria for slabtop: + +#### 3.1 ACTIVE: #### + +Caches can be sorted by number of active objects with “a”. + +![Sort by Active 01](http://linoxide.com/wp-content/uploads/2014/07/008.slabtop_sort_active01.png) + +![Sort by Active 02](http://linoxide.com/wp-content/uploads/2014/07/009.slabtop_sort_active02.png) + +#### 3.2 OBJ/SLAB: #### + +The Objects per Slab can be selected with “b”. + +![Sort by objects per slab 01](http://linoxide.com/wp-content/uploads/2014/07/010.slabtop_sort_objslab01.png) + +![Sort by objects per slab 02](http://linoxide.com/wp-content/uploads/2014/07/011.slabtop_sort_objslab02.png) + +#### 3.3 CACHE SIZE: #### + +For selecting cache size, you need to provide “c”. + +![Sort by cache size 01](http://linoxide.com/wp-content/uploads/2014/07/012.slabtop_sort_cache_size01.png) + +![Sort by cache size 02](http://linoxide.com/wp-content/uploads/2014/07/013.slabtop_sort_cache_size02.png) + +#### 3.4 SLABS: #### + +The number of slabs. Select it with “l” + +![Sort by number of slabs 01](http://linoxide.com/wp-content/uploads/2014/07/014.slabtop_sort_slabs01.png) + +![Sort by number of slabs 02](http://linoxide.com/wp-content/uploads/2014/07/015.slabtop_sort_slabs02.png) + +#### 3.5 Active Slabs: #### + +The number of Active Slabs. (Note that this is different from number of Active Objects described above.) Use “v” to sort according to this criteria. + +![Sort by Active Slabs 01](http://linoxide.com/wp-content/uploads/2014/07/016.slabtop_sort_active_slabs01.png) + +![Sort by Active Slabs 02](http://linoxide.com/wp-content/uploads/2014/07/017.slabtop_sort_active_slabs02.png) + +#### 3.6 NAME: #### + +Name of cache. Corresponding character is “n” + +![Sort by cache name 01](http://linoxide.com/wp-content/uploads/2014/07/018.slabtop_sort_cache_name01.png) + +![Sort by cache name 02](http://linoxide.com/wp-content/uploads/2014/07/019.slabtop_sort_cache_name02.png) + +#### 3.7 OBJS: #### + +To sort by number of objects, use “o” + +![Sort by number of objects 01](http://linoxide.com/wp-content/uploads/2014/07/020.slabtop_sort_objectnunber01.png) + +![Sort by number of objects 02](http://linoxide.com/wp-content/uploads/2014/07/021.slabtop_sort_objectnunber02.png) + +#### 3.8 Pages Per Slab: #### + +“p” will sort by pages per slab + +![Sort by pages per slab 01](http://linoxide.com/wp-content/uploads/2014/07/022.slabtop_sort_pagesperslab01.png) + +![Sort by pages per slab 02](http://linoxide.com/wp-content/uploads/2014/07/023.slabtop_sort_pagesperslab02.png) + +#### 3.9 OBJ SIZE: #### + +The object size is sorted by “s” + +![Sort by object size 01](http://linoxide.com/wp-content/uploads/2014/07/024.slabtop_sort_object_size01.png) + +![Sort by object size 02](http://linoxide.com/wp-content/uploads/2014/07/025.slabtop_sort_object_size02.png) + +#### 3.10 USE: #### + +“u” sorts by the cache utilization. + +![Sort by cache utilization 01](http://linoxide.com/wp-content/uploads/2014/07/026.slabtop_sort_cache_utilization01.png) + +![Sort by cache utilization 02](http://linoxide.com/wp-content/uploads/2014/07/027.slabtop_sort_cache_utilization02.png) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-command/kernel-slab-cache-information/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/sources/tech/20140714 Test read or write speed of usb and ssd drives with dd command on Linux.md b/sources/tech/20140714 Test read or write speed of usb and ssd drives with dd command on Linux.md new file mode 100644 index 0000000000..43ca1aa34e --- /dev/null +++ b/sources/tech/20140714 Test read or write speed of usb and ssd drives with dd command on Linux.md @@ -0,0 +1,139 @@ +Test read/write speed of usb and ssd drives with dd command on Linux +================================================================================ +### Drive speed ### + +The speed of a drive is measured in terms of how much data it can read or write in unit time. The dd command is a simple command line tool that can be used to read and write arbitrary blocks of data to a drive and measure the speed at which the data transfer took place. + +In this post we shall use the dd command to test and read and write speed of usb and ssd drives using the dd command. + +The data transfer speed does not depend solely on the drive, but also on the interface it is connected to. For example a usb 2.0 port has a maximum operational speed limit of 35 Mbytes/s, so even if you were to plug a high speed usb 3 pen drive into a usb 2 port, the speed would be capped to the lower limit. + +The same applies to SSD. SSD connect via SATA ports which have different versions. Sata 2.0 has a maximum theoretical speed limit of 3Gbits/s which is roughly 375 Mbytes/s. Whereas Sata 3.0 supports twice that speed. + +### Test Method ### + +Mount the drive and navigate into it from the terminal. Then use the dd command to first write a file using fixed sized blocks. Then read the same file out using the same block site. + +The general syntax of the dd command looks like this + + dd if=path/to/input_file of=/path/to/output_file bs=block_size count=number_of_blocks + +When writing to the drive, we simply read from /dev/zero which is a source of infinite useless bytes. And when read from the drive, we read the file written earlier and send it to /dev/null which is nowhere. In the whole process, dd keeps track of the speed with which the transfer takes place and reports it. + +### SSD ### + +The SSD that we are using is a "Samsung Evo 120GB" ssd. It is a beginner level ssd that comes within a decent budget and is also my first SSD. It is also one of the best performing ssds, in the market. + +In this test the ssd is connected to a sata 2.0 port. + +#### Write speed #### + +Lets first write to the ssd + + $ dd if=/dev/zero of=./largefile bs=1M count=1024 + 1024+0 records in + 1024+0 records out + 1073741824 bytes (1.1 GB) copied, 4.82364 s, 223 MB/s + +Block size is actually quite large. You can try with smaller sizes like 64k or even 4k. + +#### Read speed #### + +Now read back the same file. However, first clear the memory cache to ensure that the file is actually read from drive. + +Run the following command to clear the memory cache + + $ sudo sh -c "sync && echo 3 > /proc/sys/vm/drop_caches" + +Now read the file + + $ dd if=./largefile of=/dev/null bs=4k + 165118+0 records in + 165118+0 records out + 676323328 bytes (676 MB) copied, 3.0114 s, 225 MB/s + +The Arch Linux wiki has a page full of information about the read/write speed of various SSDs from different vendors like Intel, Samsung, Sandisk etc. Check it out at the following url. + +[https://wiki.archlinux.org/index.php/SSD_Benchmarking][1] + +### USB ### + +In this test we shall measure the read and write speed of ordinary usb/pen drives. The drives are plugged to standard usb 2 ports. The first one is a sony 4gb usb drive and the second is a strontium 16gb drive. + +First plug the drive into the port and mount it, so that it is readable. Then navigate into the mount directory from the command line. + +#### Sony 4GB - Write #### + +In this test, the dd command is used to write 10,000 chunks of 8 Kbyte each to a single file on the drive. + + # dd if=/dev/zero of=./largefile bs=8k count=10000 + 10000+0 records in + 10000+0 records out + 81920000 bytes (82 MB) copied, 11.0626 s, 7.4 MB/s + +So the write speed is around 7.5 MBytes/s. This is a low figure. + +#### Sony 4GB - Read #### + +The same file is read back to test the read speed. Run the following command to clear the memory cache + + $ sudo sh -c "sync && echo 3 > /proc/sys/vm/drop_caches" + +Now read the file using the dd command + + # dd if=./largefile of=/dev/null bs=8k + 8000+0 records in + 8000+0 records out + 65536000 bytes (66 MB) copied, 2.65218 s, 24.7 MB/s + +The read speed comes out around 25 Mbytes/s which is a more or less the standard for cheap usb drives. + +> USB 2.0 has a theoretical maximum signaling rate of 480 Mbits/s or 60 Mbytes/s. However due to various constraints the maximum throughput is restricted to around 280 Mbit/s or 35 Mbytes/s. Beyond this the actual speed achieved depends on the quality of the pen drives and other factors too. + +And the above usb drive was plugged inside a USB 2.0 port and it achieved a read speed of 24.7 Mbytes/s which is not very bad. But the write speed lags much behind + +Now lets do the same test with a Strontium 16gb drive. Strontium is another very cheapy brand, although usb drives are reliable. + +#### Strontium 16gb write speed #### + + # dd if=/dev/zero of=./largefile bs=64k count=1000 + 1000+0 records in + 1000+0 records out + 65536000 bytes (66 MB) copied, 8.3834 s, 7.8 MB/s + +Strontium 16gb read speed + + # sudo sh -c "sync && echo 3 > /proc/sys/vm/drop_caches" + + # dd if=./largefile of=/dev/null bs=8k + 8000+0 records in + 8000+0 records out + 65536000 bytes (66 MB) copied, 2.90366 s, 22.6 MB/s + +The read speed is lower than the Sony drive. + +### Resources ### + +- [http://en.wikipedia.org/wiki/USB][2] +- [https://wiki.archlinux.org/index.php/SSD_Benchmarking][1] + +---------- + +![](http://0.gravatar.com/avatar/e23f2767e6907e798da5b28694a2bf28?s=64&d=&r=G) + +About Silver Moon + +Php developer, blogger and Linux enthusiast. He can be reached at [m00n.silv3r@gmail.com][e]. Or find him on [Google+][g] + +-------------------------------------------------------------------------------- + +via: http://www.binarytides.com/linux-test-drive-speed/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://wiki.archlinux.org/index.php/SSD_Benchmarking +[2]:http://en.wikipedia.org/wiki/USB +[e]:m00n.silv3r@gmail.com +[g]:http://plus.google.com/117145272367995638274/posts \ No newline at end of file diff --git a/sources/tech/20140715 Command Line Tuesdays--Part Five.md b/sources/tech/20140715 Command Line Tuesdays--Part Five.md new file mode 100644 index 0000000000..2f6822192b --- /dev/null +++ b/sources/tech/20140715 Command Line Tuesdays--Part Five.md @@ -0,0 +1,88 @@ +Command Line Tuesdays – Part Five +================================================================================ +Yes, you’ve guessed what time it is! It’s time to rrrrrrrrummmbleeeee! And this time, we’ll learn how to work with commands. So without further ado, let’s get to business. + +Mr Shotts states that until now, we worked with a few mysterious commands, arguments and options, and today is the day we shed a little light upon that mystery. We’ll learn the following commands and what they do: type, which, help and man. But first, let’s learn… + +### …what are commands? ### + +All great things come in fours, and it’s the same with commands. We can split them up into four categories: + +**1) An executable program:** a command can be an executable program. If you’ve ‘traveled’ across your file system in the previous lessons like you were supposed to, you probably visited the /usr/bin folder. You’ve seen quite a number of familiar names like transmission-gtk, deluge-gtk etc. What’s less important for us novices currently is that programs there can be compiled binaries or programs written in scripting languages. Point is, since they are executable programs, you can run them. Try it. Navigate to it, list the files inside, pick one and run it simply by typing its name. + +**2) A command built into the shell:** bash provides a number of commands internally called shell builtins. The cd command, for example, is a shell builtin, mr Shotts says. + +**3) A shell function:** miniature shell script, built into the environment. For the time being, we’ll just mention it, as it will be covered in the following weeks. + +**4) An alias:** commands you can define yourself, using other commands. Also coming in the following lessons. + +Now, it’s useful to know what type of command we’re dealing with. And we can find out using… + +### …type ### + +You can use **type + command** to inspect what kind of command is the command you’d like to use. You do it by simply typing: type command and you’ll get an output. For example: + +![type mkdir](https://news.opensuse.org/wp-content/uploads/2014/07/Zaslonska-slika-2014-07-15-091448.png) + +or + +![type ls](https://news.opensuse.org/wp-content/uploads/2014/07/Zaslonska-slika-2014-07-15-091640.png) + +…where we can see that the ‘ls’ command is actually an alias of ‘_ls’! + +### which ### + +Sometimes (but rarely on a desktop system, though) there are more versions of one executable installed on a machine. To find out the exact location of a given executable, we can use command which. Additionally, it only works with executable programs. + +![which transmission-gtk](https://news.opensuse.org/wp-content/uploads/2014/07/Zaslonska-slika-2014-07-15-092052.png) + +Now, mostly every command has documentation that comes with it. So you’re somewhere doing your CLI thing, no access to the internet so you can’t bug geekos on the forums or IRC, and you need to find out how to exactly use a command. You can do it two ways. First being… + +### …help ### + +help command works with shell builtins (the second category we have mentioned above). So you can pick a shell builtin, like cd, for example, and simply type help cd. You’ll get a helpful page printed out in your terminal, so go ahead and read what cd has to offer. It shows in what ways you can use the command, what options you can use (it’s in square brackets, which means they are optional! Also, if there’s a vertical separator inside the square brackets, it means the options mentioned are mutually exclusive. Don’t use them together!) + +### –help ### + +help works only for the shell builtins. But most executables work with –help. As far as usage goes, it’s similar to help, but you have to type –help after the command you want to inspect. For example, transmission-gtk –help. Try it out, and see what options you can use with that executable etc. + +### man ### + +Most executables come with a formal documentation page. You can inspect it using the man command. You just enter man program, and see what it prints out. Pick any program on your computer, and try it out. For example, let’s try man transmission-gtk. You get a file opened, split into categories. It gives you information what the program is, what it does, how you can use it etc., but it doesn’t offer examples, as it’s not a tutorial. + +And we’re stoping to a halt there. + +I’d like to take a minute and thank everyone commenting and contributing to this section. You make this series vastly better, and I hope that with your help, us noobs will be able to use the CLI basics by the end of summer (just in time for 13.2 :) ). You guys are the best. Newbie users like me, who are feeling lost, stick with it. It will pay off in the end! + +And I’d also like to add a formal heads up: part six will not come next Tuesday, as I’ll sadly be away, so we’ll see/hear each other in 14 days, on July 29th. And until then… + +### …have a lot of fun! ### + +-------------------------------------------------------------------------------- + +via: https://news.opensuse.org/2014/07/15/command-line-tuesdays-part-five/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]: +[2]: +[3]: +[4]: +[5]: +[6]: +[7]: +[8]: +[9]: +[10]: +[11]: +[12]: +[13]: +[14]: +[15]: +[16]: +[17]: +[18]: +[19]: +[20]: \ No newline at end of file diff --git a/sources/tech/20140716 5 Simple Ways To Make Cinnamon Feel at Home on Ubuntu.md b/sources/tech/20140716 5 Simple Ways To Make Cinnamon Feel at Home on Ubuntu.md new file mode 100644 index 0000000000..fcc2322265 --- /dev/null +++ b/sources/tech/20140716 5 Simple Ways To Make Cinnamon Feel at Home on Ubuntu.md @@ -0,0 +1,103 @@ +[su-kaiyao]翻译中 + +5 Simple Ways To Make Cinnamon Feel at Home on Ubuntu +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/des.jpg) + +**The latest stable release of the popular Cinnamon desktop environment is [once again available for Ubuntu users to install][1].** + +And while it’s good to go out of the box (or rather PPA) there are a handful of small tweaks you can make to get an even better experience. + +If you don’t have Cinnamon installed in Ubuntu head on over to our previous article about it. + +### Change the Mint Menu Icon ### + +The Mint Menu is one of the standout features of Cinnamon. It’s a simple, fast and familiar way to search, open and organise your applications. By default the menu uses the Linux Mint logo on the launcher item. Since you’re running the DE on Ubuntu rather than Mint you may prefer the menu to use Ubuntu’s familiar orange circle of friends logo instead. How? It’s easy. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/min-menu.jpg) + +To change the Cinnamon menu icon to the Ubuntu emblem right click on the applet and select ‘Configure‘. In the Settings window that appears check ‘Use a custom icon’ and enter the following to use the Ubuntu logo: + + /usr/share/icons/ubuntu-mono-dark/actions/24/package-supported.svg + +You can use any supported image type. Just enter the path to the icon in the field, or click the box at the end to open a file picker. + +### Try Out Cinnamon Themes ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/cinnamon-themes-zukitwo.jpg) + +Like GNOME Shell Cinnamon also supports custom themes. And by that I don’t mean just GTK themes for apps and window decoration, but visual styles that theme the shell as a whole — panel, menu, applets, and so on. + +Cinnamon themes can be browsed, downloaded and enabled without leaving the desktop — no downloads or manual installation required. Open the Appearance pane of the Cinnamon Settings tool and select the ‘Online Themes’ tab to get started. + +Below are a handful of our favourite themes. + +- [**Android Holo**][2] — Android 4.x style theme +- [**Zukitwo**][3] — Sleek, stylish and light +- [**Minty**][4] — Dark theme with bold green accents +- [**Metro**][5] — Based on the visual style of Windows 8.x + +### Find Your Perfect Layout ### + +Unity may insist that its app launcher stay bolted firmly to the side of the screen, but Cinnamon has no such qualms about letting you rearrange the desktop layout to suit your own style. + +Panels can be added, edited and moved manually, or by selecting one of three preset layouts: + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/traditional.jpg) + +Open `Settings > Panel > Layout Options > Panel Layout` and select from one of the following: + +- Traditional – this is the default layout, with a panel at the bottom of the screen +- Flipped – like traditional, but with panel on top of the screen +- Classic – two panels, one at the top, one at the bottom + +You will need to log out or restart Cinnamon before your selected changes will take effect. + +### Add Panel Applets ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/weather-applet.png) + +Cinnamon embraces extensibility with the same gusto as GNOME Shell. A wealth of community add-ons and applets offering extra features and functionality, such as weather, system monitors and window management tools, are available to browse, install and enable straight form the desktop. + +Right click on the panel you wish to add an applet to and select ‘…Add Applets to the Panel‘. Some notable applets to check out: + +- [**Weather**][6] - does what it forecasts (ho ho) +- [**Stark Menu**][7] - Clone of the Windows 7 Start Menu +- [**Screenshot**][8] — Easy way to grab screenshots with delays + +### Change Date Format ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/applet.jpg) + +Cinnamon’s time and date applet is handy if, like me, you’re prone to never remembering the date. + +But it defaults to only showing the time in the 24 hour clock format. The good news is that we can tweak the time format of the clock applet fairly easily. + +Right click and select the ‘Configure’ option. In the settings window that appears tick the box listed beside “Use a custom date format“. Next, use an online generator tool to generate a date/time format suited to you, or use one of the presets listed below by copying and pasting the bit marked in bold: + +- **%B %e, %I:%M %p** (July 13, 7:19 PM) +- **%m/%d/%Y** (07/13/2014) +- **%l:%M %p** (7:19 PM) + +Changes are applied immediately, and if you make a mistake you can uncheck the custom date format option to return to the default settings. + +### Going Further ### + +These are just a handful of customisation choices available in Cinnamon, but we think they’re a good springboard for exploring more. Let us know what your favourite Cinnamon tweaks are in the comments section below, on Facebook or via Google+. + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/07/5-things-installing-cinnamon-ubuntu + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.omgubuntu.co.uk/2014/07/new-cinnamon-ubuntu-14-04-ppa-stable +[2]:http://cinnamon-spices.linuxmint.com/themes/view/122 +[3]:http://cinnamon-spices.linuxmint.com/themes/view/219 +[4]:http://cinnamon-spices.linuxmint.com/themes/view/25 +[5]:http://cinnamon-spices.linuxmint.com/themes/view/188 +[6]:http://cinnamon-spices.linuxmint.com/applets/view/17 +[7]:http://cinnamon-spices.linuxmint.com/applets/view/168 +[8]:http://cinnamon-spices.linuxmint.com/applets/view/35 diff --git a/sources/tech/20140716 7 dmesg Commands for Troubleshooting and Collecting Information of Linux Systems.md b/sources/tech/20140716 7 dmesg Commands for Troubleshooting and Collecting Information of Linux Systems.md new file mode 100644 index 0000000000..d7137f39e4 --- /dev/null +++ b/sources/tech/20140716 7 dmesg Commands for Troubleshooting and Collecting Information of Linux Systems.md @@ -0,0 +1,197 @@ +7 ‘dmesg’ Commands for Troubleshooting and Collecting Information of Linux Systems +================================================================================ +The ‘dmesg‘ command displays the messages from the kernel ring buffer. A system passes multiple runlevel from where we can get lot of information like system architecture, cpu, attached device, RAM etc. When computer boots up, a kernel (core of an operating system) is loaded into memory. During that period number of messages are being displayed where we can see hardware devices detected by kernel. + +![dmesg Command Examples](http://www.tecmint.com/wp-content/uploads/2014/07/dmesg-Command-Examples.png) +dmesg Command Examples + +The messages are very important in terms of diagnosing purpose in case of device failure. When we connect or disconnect hardware device on the system, with the help of dmesg command we come to know detected or disconnected information on the fly. The dmesg command is available on most **Linux and Unix** based Operating System. + +Let’s throw some light on most famous tool called ‘dmesg’ command with their practical examples as discussed below. The exact syntax of dmesg as follows. + + # dmseg [options...] + +### 1. List all loaded Drivers in Kernel ### + +We can use text-manipulation tools i.e. ‘**more**‘, ‘**tail**‘, ‘**less**‘ or ‘**grep**‘ with dmesg command. As output of dmesg log won’t fit on a single page, using dmesg with pipe more or less command will display logs in a single page. + + [root@tecmint.com ~]# dmesg | more + [root@tecmint.com ~]# dmesg | less + +#### Sample Output #### + + [ 0.000000] Initializing cgroup subsys cpuset + [ 0.000000] Initializing cgroup subsys cpu + [ 0.000000] Initializing cgroup subsys cpuacct + [ 0.000000] Linux version 3.11.0-13-generic (buildd@aatxe) (gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu8) ) #20-Ubuntu SMP Wed Oct 23 17:26:33 UTC 2013 + (Ubuntu 3.11.0-13.20-generic 3.11.6) + [ 0.000000] KERNEL supported cpus: + [ 0.000000] Intel GenuineIntel + [ 0.000000] AMD AuthenticAMD + [ 0.000000] NSC Geode by NSC + [ 0.000000] Cyrix CyrixInstead + [ 0.000000] Centaur CentaurHauls + [ 0.000000] Transmeta GenuineTMx86 + [ 0.000000] Transmeta TransmetaCPU + [ 0.000000] UMC UMC UMC UMC + [ 0.000000] e820: BIOS-provided physical RAM map: + [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable + [ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved + [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000007dc08bff] usable + [ 0.000000] BIOS-e820: [mem 0x000000007dc08c00-0x000000007dc5cbff] ACPI NVS + [ 0.000000] BIOS-e820: [mem 0x000000007dc5cc00-0x000000007dc5ebff] ACPI data + [ 0.000000] BIOS-e820: [mem 0x000000007dc5ec00-0x000000007fffffff] reserved + [ 0.000000] BIOS-e820: [mem 0x00000000e0000000-0x00000000efffffff] reserved + [ 0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fed003ff] reserved + [ 0.000000] BIOS-e820: [mem 0x00000000fed20000-0x00000000fed9ffff] reserved + [ 0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000feefffff] reserved + [ 0.000000] BIOS-e820: [mem 0x00000000ffb00000-0x00000000ffffffff] reserved + [ 0.000000] NX (Execute Disable) protection: active + ..... + +### 2. List all Detected Devices ### + +To discover which hard disks has been detected by kernel, you can search for the keyword “**sda**” along with “**grep**” like shown below. + + [root@tecmint.com ~]# dmesg | grep sda + + [ 1.280971] sd 2:0:0:0: [sda] 488281250 512-byte logical blocks: (250 GB/232 GiB) + [ 1.281014] sd 2:0:0:0: [sda] Write Protect is off + [ 1.281016] sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00 + [ 1.281039] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA + [ 1.359585] sda: sda1 sda2 < sda5 sda6 sda7 sda8 > + [ 1.360052] sd 2:0:0:0: [sda] Attached SCSI disk + [ 2.347887] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) + [ 22.928440] Adding 3905532k swap on /dev/sda6. Priority:-1 extents:1 across:3905532k FS + [ 23.950543] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro + [ 24.134016] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null) + [ 24.330762] EXT4-fs (sda7): mounted filesystem with ordered data mode. Opts: (null) + [ 24.561015] EXT4-fs (sda8): mounted filesystem with ordered data mode. Opts: (null) + +**NOTE**: The ‘sda’ first SATA hard drive, ‘sdb’ is the second SATA hard drive and so on. Search with ‘hda’ or ‘hdb’ in the case of IDE hard drive. + +### 3. Print Only First 20 Lines of Output ### + +The ‘head’ along with dmesg will show starting lines i.e. ‘dmesg | head -20′ will print only 20 lines from the starting point. + + [root@tecmint.com ~]# dmesg | head -20 + + [ 0.000000] Initializing cgroup subsys cpuset + [ 0.000000] Initializing cgroup subsys cpu + [ 0.000000] Initializing cgroup subsys cpuacct + [ 0.000000] Linux version 3.11.0-13-generic (buildd@aatxe) (gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu8) ) #20-Ubuntu SMP Wed Oct 23 17:26:33 UTC 2013 (Ubuntu 3.11.0-13.20-generic 3.11.6) + [ 0.000000] KERNEL supported cpus: + [ 0.000000] Intel GenuineIntel + [ 0.000000] AMD AuthenticAMD + [ 0.000000] NSC Geode by NSC + [ 0.000000] Cyrix CyrixInstead + [ 0.000000] Centaur CentaurHauls + [ 0.000000] Transmeta GenuineTMx86 + [ 0.000000] Transmeta TransmetaCPU + [ 0.000000] UMC UMC UMC UMC + [ 0.000000] e820: BIOS-provided physical RAM map: + [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable + [ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved + [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000007dc08bff] usable + [ 0.000000] BIOS-e820: [mem 0x000000007dc08c00-0x000000007dc5cbff] ACPI NVS + [ 0.000000] BIOS-e820: [mem 0x000000007dc5cc00-0x000000007dc5ebff] ACPI data + [ 0.000000] BIOS-e820: [mem 0x000000007dc5ec00-0x000000007fffffff] reserved + +### 4. Print Only Last 20 Lines of Output ### + +The ‘tail’ along with dmesg command will print only 20 last lines, this is useful in case we insert removable device. + + [root@tecmint.com ~]# dmesg | tail -20 + + parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE] + ppdev: user-space parallel port driver + EXT4-fs (sda1): mounted filesystem with ordered data mode + Adding 2097144k swap on /dev/sda2. Priority:-1 extents:1 across:2097144k + readahead-disable-service: delaying service auditd + ip_tables: (C) 2000-2006 Netfilter Core Team + nf_conntrack version 0.5.0 (16384 buckets, 65536 max) + NET: Registered protocol family 10 + lo: Disabled Privacy Extensions + e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None + Slow work thread pool: Starting up + Slow work thread pool: Ready + FS-Cache: Loaded + CacheFiles: Loaded + CacheFiles: Security denies permission to nominate security context: error -95 + eth0: no IPv6 routers present + type=1305 audit(1398268784.593:18630): audit_enabled=0 old=1 auid=4294967295 ses=4294967295 res=1 + readahead-collector: starting delayed service auditd + readahead-collector: sorting + readahead-collector: finished + +### 5. Search Detected Device or Particular String ### + +It’s difficult to search particular string due to length of dmesg output. So, filter the lines with are having string like ‘**usb**‘ ‘**dma**‘ ‘**tty**‘ and ‘**memory**‘ etc. The ‘**-i**’ option instruct to [grep command][1] to ignore the case (upper or lower case letters). + + [root@tecmint.com log]# dmesg | grep -i usb + [root@tecmint.com log]# dmesg | grep -i dma + [root@tecmint.com log]# dmesg | grep -i tty + [root@tecmint.com log]# dmesg | grep -i memory + +#### Sample Output #### + + [ 0.000000] Scanning 1 areas for low memory corruption + [ 0.000000] initial memory mapped: [mem 0x00000000-0x01ffffff] + [ 0.000000] Base memory trampoline at [c009b000] 9b000 size 16384 + [ 0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff] + [ 0.000000] init_memory_mapping: [mem 0x37800000-0x379fffff] + [ 0.000000] init_memory_mapping: [mem 0x34000000-0x377fffff] + [ 0.000000] init_memory_mapping: [mem 0x00100000-0x33ffffff] + [ 0.000000] init_memory_mapping: [mem 0x37a00000-0x37bfdfff] + [ 0.000000] Early memory node ranges + [ 0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x000effff] + [ 0.000000] PM: Registered nosave memory: [mem 0x000f0000-0x000fffff] + [ 0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups + [ 0.000000] Memory: 2003288K/2059928K available (6352K kernel code, 607K rwdata, 2640K rodata, 880K init, 908K bss, 56640K reserved, 1146920K highmem) + [ 0.000000] virtual kernel memory layout: + [ 0.004291] Initializing cgroup subsys memory + [ 0.004609] Freeing SMP alternatives memory: 28K (c1a3e000 - c1a45000) + [ 0.899622] Freeing initrd memory: 23616K (f51d0000 - f68e0000) + [ 0.899813] Scanning for low memory corruption every 60 seconds + [ 0.946323] agpgart-intel 0000:00:00.0: detected 32768K stolen memory + [ 1.360318] Freeing unused kernel memory: 880K (c1962000 - c1a3e000) + [ 1.429066] [drm] Memory usable by graphics device = 2048M + +### 6. Clear dmesg Buffer Logs ### + +Yes, we can clear dmesg logs if required with below command. It will clear dmesg ring buffer message logs till you executed the command below. Still you can view logs stored in ‘**/var/log/dmesg**‘ files. If you connect any device will generate dmesg output. + + [root@tecmint.com log]# dmesg -c + +### 7. Monitoring dmesg in Real Time ### + +Some distro allows command ‘tail -f /var/log/dmesg’ as well for real time dmesg monitoring. + + [root@tecmint.com log]# watch "dmesg | tail -20" + +**Conclusion**: The dmesg command is useful as dmesg records all the system changes done or occur in real time. As always you can man dmesg to get more information. + +---------- + +![](http://1.gravatar.com/avatar/36c7c25164c3455f2f711b01e395de0d?s=80&d=blank&r=G) + +Narad Shrestha + +- [Twitter profile][t] +- [Facebook profile][f] +- [Google+ profile][g] + +He has over 10 years of rich IT experience which includes various Linux Distros, FOSS and Networking. Narad always believes sharing IT knowledge with others and adopts new technology with ease. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/dmesg-commands/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.tecmint.com/12-practical-examples-of-linux-grep-command/ +[t]:http://twitter.com/@nrdshrestha +[f]:http://facebook.com/narad.shrestha.9 +[g]:http://plus.google.com/104542109955805873615?rel=author \ No newline at end of file diff --git a/sources/tech/20140716 How to analyze Squid logs with SARG log analyzer on CentOS.md b/sources/tech/20140716 How to analyze Squid logs with SARG log analyzer on CentOS.md new file mode 100644 index 0000000000..857c6ea5b2 --- /dev/null +++ b/sources/tech/20140716 How to analyze Squid logs with SARG log analyzer on CentOS.md @@ -0,0 +1,117 @@ +How to analyze Squid logs with SARG log analyzer on CentOS +================================================================================ +In a [previous tutorial][1], we show how to configure a transparent proxy with Squid on CentOS. Squid provides many useful features, but analyzing a raw Squid log file is not straightfoward. For example, how could you analyze the time stamps and the number of hits in the following Squid log? + + 1404788984.429 1162 172.17.1.23 TCP_MISS/302 436 GET http://facebook.com/ - DIRECT/173.252.110.27 text/html + 1404788985.046 12416 172.17.1.23 TCP_MISS/200 4169 CONNECT stats.pusher.com:443 - DIRECT/173.255.223.127 - + 1404788986.124 174 172.17.1.23 TCP_MISS/200 955 POST http://ocsp.digicert.com/ - DIRECT/117.18.237.29 application/ocsp-response + 1404788989.738 342 172.17.1.23 TCP_MISS/200 3890 CONNECT www.google.com:443 - DIRECT/74.125.200.106 - + 1404788989.757 226 172.17.1.23 TCP_MISS/200 942 POST http://clients1.google.com/ocsp - DIRECT/74.125.200.113 application/ocsp-response + 1404788990.839 3939 172.17.1.23 TCP_MISS/200 78944 CONNECT fbstatic-a.akamaihd.net:443 - DIRECT/184.26.162.35 - + 1404788990.846 2148 172.17.1.23 TCP_MISS/200 118947 CONNECT fbstatic-a.akamaihd.net:443 - DIRECT/184.26.162.35 - + 1404788990.849 2151 172.17.1.23 TCP_MISS/200 76809 CONNECT fbstatic-a.akamaihd.net:443 - DIRECT/184.26.162.35 - + 1404788991.140 611 172.17.1.23 TCP_MISS/200 110073 CONNECT fbstatic-a.akamaihd.net:443 - DIRECT/184.26.162.35 – + +SARG (or Squid Analysis Report Generator) is a web based tool that creates reports from Squid logs. SARG provides an easy-to-understand view of network traffic handled by Squid, and it is very easy to set up and maintain. In the following tutorial, we show **how to set up SARG on a CentOS platform**. + +We start the process by installing necessary dependencies using yum. + + # yum install gcc make wget httpd crond + +Necessary services are started and loaded at startup. + + # service httpd start; service crond start + # chkconfig httpd on; chkconfig crond on + +Now we download and extract SARG. + + # wget http://downloads.sourceforge.net/project/sarg/sarg/sarg-2.3.8/sarg-2.3.8.tar.gz? + # tar zxvf sarg-2.3.8.tar.gz + # cd sarg-2.3.8 + +**NOTE**: For 64-bit Linux, the source code in log.c needs to be patched as follows. + + 1506c1506 + < if (fprintf(ufile->file, "%s\t%s\t%s\t%s\t%"PRIi64"\t%s\t%ld\t%s\n",dia,hora,ip,url,nbytes,code,elap_time,smartfilter)<=0) { + --- + > if (fprintf(ufile->file, "%s\t%s\t%s\t%s\t%"PRIi64"\t%s\t%ld\t%s\n",dia,hora,ip,url,(int64_t)nbytes,code,elap_time,smartfilter)<=0) { + 1513c1513 + < fprintf(fp_log, "%s\t%s\t%s\t%s\t%s\t%"PRIi64"\t%s\t%ld\t%s\n",dia,hora,user,ip,url,nbytes,code,elap_time,smartfilter); + --- + > fprintf(fp_log, "%s\t%s\t%s\t%s\t%s\t%"PRIi64"\t%s\t%ld\t%s\n",dia,hora,user,ip,url,(int64_t)nbytes,code,elap_time,smartfilter); + 1564c1564 + < printf("LEN=\t%"PRIi64"\n",nbytes); + --- + > printf("LEN=\t%"PRIi64"\n",(int64_t)nbytes); + +Go ahead and build/install SARG as follows. + + # ./configure + # make + # make install + +After SARG is installed, the configuration file can be modified to match your requirements. The following is one example of SARG configuration. + + # vim /usr/local/etc/sarg.conf + +---------- + + access_log /var/log/squid/access.log + temporary_dir /tmp + output_dir /var/www/html/squid-reports + date_format e ## We use Europian DD-MM-YYYY format here ## + ## we don’t want multiple reports for single day/week/month ## + overwrite_report yes + +Now it's time for a test run. We run sarg command in debug mode to find whether there is any error. + + # sarg -x + +If all goes well, sarg should analyze Squid logs, and create reports in /var/www/html/squid-reports. The reports should be visible in a web browser using the address http:///squid-reports/ + +![](https://farm3.staticflickr.com/2931/14631403935_4ff34e07b9_z.jpg) + +![](https://farm4.staticflickr.com/3901/14629281644_fec31014c5_z.jpg) + +SARG can be used to create daily, weekly and monthly reports. Time range can be specified using the "-d" parameter with possible values in the form of day-n, week-n or month-n, where n is the number of days/weeks/months to jump backward. For example, with week-1, SARG will generate a report for the previous week. With day-2, SARG will prepare reports for the previous two days. + +As a demonstration, we will prepare a cron job to run SARG daily. + + # vim /etc/cron.daily/sarg + +---------- + + #!/bin/sh + /usr/local/bin/sarg -d day-1 + +The file needs a execution permission. + + # chmod 755 /usr/local/bin/sarg + +Now SARG should prepare daily reports about Squid-managed traffic. These reports can easily be accessed from the SARG web interface. + +To sum up, SARG is a web based tool that analyzes Squid logs and presents the analysis in an informative way. System admins can leverage SARG to monitor what sites are being accessed, and to keep track of top visited sites and top users. This tutorial covers a working configuration for SARG. You can customize the configuration even further to match your requirements. + +Hope this helps.­­­­ + +---------- + +[Sarmed Rahman][w] + +- [Twitter profile][t] +- [LinkedIn profile][l] + +Sarmed Rahman is an IT professional in the Internet Industry in Bangladesh. He writes tutorial articles on technology every now and then from a belief that knowledge grows through sharing. During his free time, he loves gaming and spending time with his friends. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/2014/07/analyze-squid-logs-sarg-log-analyzer-centos.html + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://xmodulo.com/2014/06/squid-transparent-web-proxy-centos-rhel.html +[w]:http://amar-linux.blogspot.com/ +[t]:http://twitter.com/SarmedRahman +[l]:http://www.linkedin.com/in/sarmedrahman \ No newline at end of file diff --git a/sources/tech/20140716 How to check RPM package dependencies on Fedora or CentOS or RHEL.md b/sources/tech/20140716 How to check RPM package dependencies on Fedora or CentOS or RHEL.md new file mode 100644 index 0000000000..29a19f3f1d --- /dev/null +++ b/sources/tech/20140716 How to check RPM package dependencies on Fedora or CentOS or RHEL.md @@ -0,0 +1,92 @@ +nd0104 is translate +How to check RPM package dependencies on Fedora, CentOS or RHEL +================================================================================ +A typical RPM package on Red Hat-based systems requires all its dependent packages be installed to function properly. For end users, the complexity of such RPM dependency is hidden by package managers (e.g., yum or DNF) during package install/upgrade/removal process. However, if you are a sysadmin or a RPM maintainer, you need to be well-versed in RPM dependencies to maintain run-time environment for the system or roll out up-to-date RPM specs. + +In this tutorial, I am going to show **how to check RPM package dependencies**. Depending on whether a package is installed or not, there are several ways to identify its RPM dependencies. + +### Method One ### + +One way to find out RPM dependencies for a particular package is to use rpm command. The following command lists all dependent packages for a target package. + + $ rpm -qR + +![](https://farm6.staticflickr.com/5512/14659620723_4a36970efc_o.png) + +Note that this command will work only if the target package is already **installed**. If you want to check package dependencies for any **uninstalled** package, you first need to download the RPM package locally (no need to install it). + +To download a RPM package without installing it, use a command-line utility called `yumdownloader`. Install yumdownloader as follows. + + $ sudo yum install yum-utils + +Now let's check RPM depenencies of a uninstalled package (e.g., tcpdump). First download the package in the current folder with yumdownloader: + + $ yumdownloader --destdir=. tcpdump + +Then use rpm command with "-qpR" options to list dependencies of the downloaded package. + + # rpm -qpR tcpdump-4.4.0-2.fc19.i686.rpm + +### Method Two ### + +You can also get a list of dependencies for a RPM package using repoquery tool. repoquery works whether or not a target package is installed. This tool is included in yum-utils package. + + $ sudo yum install yum-utils + +To show all required packages for a particular package: + + $ repoquery --requires --resolve + +![](https://farm3.staticflickr.com/2935/14453103778_05db349b19_o.png) + +For repoquery to work, your computer needs network connectivity since repoquery pulls information from Yum repositories. + +### Method Three ### + +The third method to show RPM package dependencies is to use rpmreaper tool. Originally this tool is developed to clean up unnecessary packages and their dependencies on RPM-based systems. rpmreaper has an ncurses-based intuitive interface for browsing installed packages and their dependency trees. + +To install rpmrepater, use yum command. On CentOS, you need to [set up EPEL repo][1] first. + + $ sudo yum install rpmreaper + +To browser RPM dependency trees, simply run: + + $ rpmreaper + +![](https://farm4.staticflickr.com/3838/14636456131_99a3c26945_z.jpg) + +The rpmrepater interface will show you a list of all installed packages. You can navigate the list using up/down arrow keys. Press "r" on a highlighted package to show its dependencies. You can expand the whole dependency tree by recursively pressing "r" keys on individual dependent packages. The "L" flag indicates that a given package is a "leaf", meaning that no other package depends on this package. The "o" flag implies that a given package is in the middle of dependency chain. Pressing "b" on such a package will show you what other packages require the highlighted package. + +### Method Four ### + +Another way to show package dependencies on RPM-based systems is to use rpmdep which is a command-line tool for generating a full package dependency graph of any installed RPM package. The tool analyzes RPM dependencies, and produce partially ordered package lists from topological sorting. The output of this tool can be fed into dotty graph visualization tool to generate a dependency graph image. + +To install rpmdep and dotty on Fedora: + + $ sudo yum install rpmorphan graphviz + +To install the same tools on CentOS: + + $ wget http://downloads.sourceforge.net/project/rpmorphan/rpmorphan/1.14/rpmorphan-1.14-1.noarch.rpm + $ sudo rpm -ivh rpmorphan-1.14-1.noarch.rpm + $ sudo yum install graphviz + +To generate and plot a dependency graph of a particular installed package (e.g., gzip): + + $ rpmdep.pl -dot gzip.dot gzip + $ dot -Tpng -o output.png gzip.dot + +![](https://farm4.staticflickr.com/3918/14453050980_53de4e8277_z.jpg) + +So far in this tutorial, I demonstrate several ways to check what other packages a given RPM package relies on. If you want to know more about .deb package dependencies for Debian-based systems, you can refer to [this guide][2] instead. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/2014/07/check-rpm-package-dependencies-fedora-centos-rhel.html + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://xmodulo.com/2013/03/how-to-set-up-epel-repository-on-centos.html +[2]:http://xmodulo.com/2013/07/how-to-check-package-dependencies-on-ubuntu-or-debian.html diff --git a/sources/tech/20140716 Install Android 4.4 KitKat to Run Favourite Games and Applications in Linux.md b/sources/tech/20140716 Install Android 4.4 KitKat to Run Favourite Games and Applications in Linux.md new file mode 100644 index 0000000000..a3c19e744d --- /dev/null +++ b/sources/tech/20140716 Install Android 4.4 KitKat to Run Favourite Games and Applications in Linux.md @@ -0,0 +1,184 @@ +Vic020 + +Install “Android 4.4 KitKat” to Run Favourite Games and Applications in Linux +================================================================================ +**Android (x86)** is a project which aims to port Android system to Intel x86 processors to let users install it easily on any computer, the way they do this is by taking android source code, patching it to work on Intel x86 processors and some laptops and tablets. + +![Install Android 4.4 KitKat in Linux](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-4.4-KitKat.jpg) +Install Android 4.4 KitKat in Linux + +A few days ago, the project released “Android KitKat 4.4 RC2”, and today we will explain how to install it on VirtualBox, there is a problem that the mouse pointer doesn’t work in android in VirtualBox, but you may use this guide to install it beside other systems as a main system and the mouse should work I guess, otherwise we’ll use the keyboard. + +### Step 1: Install VirtualBox in Linux ### + +**1.** VirtualBox is available to install easily via official repositories in most Linux distributions, to install it on Ubuntu run. + + $ sudo apt-get install virtualbox + +For other Linux distributions like **RHEL, CentOS and Fedora**, use the following article to install Virtualbox. + +- [Install VirtualBox in RHEL, CentOS and Fedora][1] + +### Step 2: Download and Install Android 4.4 KitKat in Virtualbox ### + +**2.** This is an easy step, just download **Android 4.4 x86 Kit Kat** file from the [androud Sourceforge.net][2] project. + +**3.** To install **Android 4.4 kitkat** on VirtualBox, you need first to boot from the .iso image that you downloaded, to do so, open **VirtualBox**, Click on new to create a new virtual machine, and choose the settings as follow. + +![Create New Virtual Machine](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-01.png) +Create New Virtual Machine + +**4.** Then it will ask you to choose a Memory size for the machine, Android 4.4 kitkat needs 1GB of RAM to work perfectly, but I will choose 512MB since I only have 1GB of RAM on my computer. + +![Set Memory to New Machine](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-02.png) +Set Memory to New Machine + +**5.** Now select “Create a virtual hard drive now” to create a new one. + +![Create Virtual Hard Drive](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-03.png) +Create Virtual Hard Drive + +**6.** It will now ask you for the type of the new virtual hard drive, select **VDI**. + +![Select Hard Drive Type](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-04.png) +Select Hard Drive Type + +![Select Storage Type](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-05.png) +Select Storage Type + +**7.** Now choose the size of the virtual hard drive, you may choose any size you want, no less than **4GB** so the system can be installed correctly beside any future apps that you want to install. + +![Set Size for Virtual Drive](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-32.png) +Set Size for Virtual Drive + +**8.** Now that’s your first virtual machine is created, now to boot from the **.iso** file that you downloaded, select the virtual machine from the list on the left, click on **Settings**, and go for “**storage**”, do as follow and select the **.iso** image of **android 4.4 kitkat RC2**. + +![Select Android KitKat ISO](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-06.png) +Select Android KitKat ISO + +**9.** Click on **OK**, and start the machine to boot the .iso image, choose “**Installation**” to start installing the system on the virtual machine. + +![Select to Install Android Kit Kat](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-07.png) +Select to Install Android Kit Kat + +**10.** Please select a partition to install Android-x86. + +![Select Partition Drive](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-08.png) +Select Partition Drive + +**11.** Now you will be prompted **cfdisk** which is a partitioning tool that we will use to create a new hard drive, so we can install android 4.4 on it, Click on “**New**”. + +![Create New Partition](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-09.png) +Create New Partition + +**12.** Choose “**Primary**” as partition type. + +![Choose Primary Partition](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-10.png) +Choose Primary Partition + +**13.** Next, select the size of the partition. + +![Select Size of Partition](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-11.png) +Select Size of Partition + +**14.** Now, we have to make the new hard drive bootable in order to be able to write changes to the disk, click on “**Bootable**” to give the bootable flag to the new partition, you won’t notice any changes in fact but the bootable flag will be given to that partition. + +![Make Partition Bootable](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-12.png) +Make Partition Bootable + +**15.** After that, click on “**Write**” to write the changes to the hard drive. + +![Apply Changes to Partition](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-13.png) +Apply Changes to Partition + +**16.** It will ask you if you are sure, write “**yes**” and click on **Enter**. + +![Confirm Partition Changes](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-14.png) +Confirm Partition Changes + +**17.** Now that’s our new hard drive is created, now click on **Quit** and you will see something like this, select the partition that you created before in order to install android on it and hit **Enter**. + +![Choose Partition to Install Android](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-15.png) +Choose Partition to Install Android + +**18.** Choose “**ext3**” as a filesystem for the hard drive and format. + +![Select Ext3 Partition Type](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-16.png) +Select Ext3 Partition Type + +![Format Partition](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-17.png) +Format Partition + +**19.** You will be asked now if you want to install GRUB bootloader, of course you will select **Yes**, because if you don’t, you won’t be able to boot the new system, so choose “**Yes**” and hit **Enter**. + +![Install Boot Loader GRUB](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-18.png) +Install Boot Loader GRUB + +**20.** Finally, you will be asked if you want to make the **/system** partition writeable, choose Yes, it will help in a lot of things later after you install the system. + +![Make Partition Writeable](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-19.png) +Make Partition Writeable + +**21.** The installer will start it’s mission… after the installer finishes the job, choose Reboot, in my test, the “Run-Android x86” didn’t work for me, so you have to reboot. + +![Android Kit Kat Installation](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-20.png) +Android Kit Kat Installation + +**22.** Now that’s we installed **Android 4.4 KitKat RC2** on our hard drive, the problem is now that VirtualBox will keep loading the **.iso** image file instead of booting from the virtual hard drive, so to fix this problem, go to **Settings**, under “**storage**” select the **.iso** file and remove it from the booting menu. + +![Remove Android Kit Kat Image](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-21.png) +Remove Android Kit Kat Image + +**23.** Now you can start the virtual machine with the installed android system. + +![Start Android Kit Kat System](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-23.png) +Start Android Kit Kat System + +![Android Splash Screen](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-24.png) +Android Splash Screen + +**24.** Now you will start a wizard to configure some things before you start using **Android**. You will see a screen like this, Now the problem is, that the Mouse doesn’t work in **android 4.4 KitKat**, that means that we’ll be using our skills in keyboard, first choose the **language** you want using the **Up** and **Down** keys in the keyboard, and to go the next step, hit the **Right** arrow key and click **Enter**. + +![Android Welcome Screen](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-31.png) +Android Welcome Screen + +![Select WiFi Network](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-25.png) +Select WiFi Network + +![Create Android Google Account](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-26.png) +Create Android Google Account + +![Sign in Google Account](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-27.png) +Sign in Google Account + +![Set Date and Time](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-28.png) +Set Date and Time + +![Enter Your Details](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-29.png) +Enter Your Details + +![Android 4.4 Kit Kat Home Screen](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Android-Kit-Kat-in-Linux-30.jpeg) +Android 4.4 Kit Kat Home Screen + +Installing **Android x86** will be good for you if you don’t have a smartphone and you want to use the **Play Store** apps easily, have you ever tried to install android x86? What was the results? Do you think that android may become a “**real operation system**” targeting PCs in the feature? + +---------- + +![](http://1.gravatar.com/avatar/1374d0df45065e405e1b059d2fca04ff?s=80&d=blank&r=G) + +[Hanny Helal][3] + +A Linux & Foss user since 2010, working on many projects in the field of Free Software. + + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-android-kitkat-in-linux/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.tecmint.com/install-virtualbox-on-redhat-centos-fedora/ +[2]:http://sourceforge.net/projects/android-x86/ +[3]:http://www.tecmint.com/ diff --git a/sources/tech/20140716 Linux FAQs with Answers--How to define PATH environment variable for sudo commands.md b/sources/tech/20140716 Linux FAQs with Answers--How to define PATH environment variable for sudo commands.md new file mode 100644 index 0000000000..618fb2a230 --- /dev/null +++ b/sources/tech/20140716 Linux FAQs with Answers--How to define PATH environment variable for sudo commands.md @@ -0,0 +1,43 @@ +nd0104 is translate +Linux FAQs with Answers--How to define PATH environment variable for sudo commands +================================================================================ +> **Question**: I built and installed a program in /usr/local/bin. The program requires root privilege to run. But when I try to run the program with sudo, I get "sudo: XXXXX: command not found" error. Somehow /usr/local/bin is not included in the PATH environment variable. How can I fix this problem? + +When you run a program with sudo, the program is executed with a new, minimum environment for security reasons. That is, not all the environment variables you define are inherited to sudo commands. In case of PATH environment variable, it is reset to a new "default" PATH variable when sudo is used. So if the new default PATH variable does not include the folder where your program is, you will get "command not found" error with sudo. + +To customize the default PATH variable for sudo session, open /etc/sudoers file with a text editor, and look for "secure_path". The value defined in "secure_path" will be used as the default PATH variable when you execute sudo commands. + +So add any necessary path (e.g., /usr/local/bin) to "secure_path", and it will be passed to sudo commands. + + Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin + +This change will be effective immediately. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/define-path-environment-variable-sudo-commands.html + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]: +[2]: +[3]: +[4]: +[5]: +[6]: +[7]: +[8]: +[9]: +[10]: +[11]: +[12]: +[13]: +[14]: +[15]: +[16]: +[17]: +[18]: +[19]: +[20]: diff --git a/sources/tech/20140716 Simple Dock GNOME Shell Extension Puts Your Fave Apps On The Desktop.md b/sources/tech/20140716 Simple Dock GNOME Shell Extension Puts Your Fave Apps On The Desktop.md new file mode 100644 index 0000000000..cc6f1528dc --- /dev/null +++ b/sources/tech/20140716 Simple Dock GNOME Shell Extension Puts Your Fave Apps On The Desktop.md @@ -0,0 +1,40 @@ +‘Simple Dock’ GNOME Shell Extension Puts Your Fave Apps On The Desktop +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/screenshot_815_1.jpg) + +**I love GNOME Shell, but what I don’t love is having to rustle through a hidden screen to get at my favourite applications or switch between those I have running. ** + +It may make me sound awesomely retro, like a UX luddite, or like someone who has become far too accustomed to the usability of Unity but I, like many of you reading this, like having an app launcher/switcher accessible on the desktop. It’s a familiar, fast way of working. + +GNOME Shell is, by design, different. It tucks everything out of the way – from the messaging centre and notifications, to workspaces and the apps list. It’s a minimal aesthetic that makes sense: help users focus on what matters. + +But for me, my desktop needs to be more than a glorified picture frame. + +### The Beauty of GNOME Shell ### + +Despite my own preferences, the decision to hide apps is part of the beauty of GNOME Shell. It ships with a default desktop experience that is user friendly, sane and predictable — but also thoroughly extensible. Because of this there’s a huge array of add-ons catering to every need, niche and want, including traditional app menus, desktop docks and even an Ubuntu Unity Dash clone! + +In this article I’m just focusing on one add-on that caters to my needs: the aptly named **Simple Dock**. Simple Dock takes the GNOME Shell apps grid and favourites bar and puts it slap bang where I want it: on the desktop. + +For now it only supports being positioned on the bottom of the screen, and only offers a minimal set of settings. While minimal, I feel these cover all of my needs: + +- ntelligent auto hide +- Minimise/restore application windows +- Drag-and-drop favourites +- Button to launch activities overlay + +Want it? Providing you’re running GNOME Shell on Ubuntu 13.10 or above you can. Just head on over to the GNOME Extensions page linked to below in a supported browser (Firefox, GNOME Web, etc.) then slide the on-page switch from ‘off‘ to ‘on‘. + +- [Simple Dock on GNOME Shell Extensions][1] + +To adjust the settings of Simple Dock hit the cog icon on the GNOME Extensions webpage listing for it or through a desktop application like GNOME Tweak Tool. + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/07/simple-dock-gnome-shell-extension + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://extensions.gnome.org/extension/815/simple-dock/ \ No newline at end of file diff --git a/translated/news/20140709 Red Hat Announces Availability of its OpenStack Platform 5.md b/translated/news/20140709 Red Hat Announces Availability of its OpenStack Platform 5.md new file mode 100644 index 0000000000..1be373d973 --- /dev/null +++ b/translated/news/20140709 Red Hat Announces Availability of its OpenStack Platform 5.md @@ -0,0 +1,82 @@ +nd0104 is translating +Red Hat Announces Availability of its OpenStack Platform 5 +红帽公司发布 OpenStack Platform 5 +================================================================================ +![](http://farm4.static.flickr.com/3108/3191608123_67e1da2b79_o.jpg) + +Red Hat has [announced][1] the general availability of Red Hat Enterprise Linux OpenStack Platform 5,which is the third enterprise release of the company's OpenStack offering. Aside from new features, the platform is clearly being aimed at many types of organizations, including "advanced cloud users, telecommunications companies, Internet service providers (ISPs), and public cloud hosting providers." +红帽公司[宣布][1]在RHEL上推出OpenStack Platform5,这是基于OpenStack开源云的第三个发行版。该版本不仅开发了一些新功能,针对的用户群体也大为增多,如高大上的云用户、电信企业、互联网服务供应商(ISP)、公有云服务供应商等。 + +OpenStack Platform 5 is based on the latest OpenStack Icehouse release and provides more evidence of how very focused on cloud computing Red Hat has become. +OpenStack Platform 5是基于最新的Openstack Icehouse的发行版,并且针对云计算技术做了大量的修改和优化工作而来的。 + +The new release includes a three-year support lifecycle, and [I've made the point before][2] that because of its legendary support for Linux, +Red Hat's OpenStack support will be a key differentiator in wooing enterprises. +这个最新的发行版有3年的技术支持周期,[我选择了使用][2]它是考虑到红帽公司在Linux系统上对用户无以伦比的技术支持,红帽公司对其OpenStack Platform 5的技术支持服务将是促使企业购买的关键之一。 + +There has been controversy over whether Red Hat will support OpenStack distributions other than its own, + which is significant because a recent OpenStack user survey showed that [90% of OpenStack deployments today + are not running on RHEL][3], but rather use other flavors of Linux and KVM, such as Ubuntu or CentOS. +对于红帽公司是否会支持OpenStack的其他发行版尚未有定论,但一份OpenStack用户调查已经显示[90%的OpenStack开发人员并没有在RHEL上使用OpenStack}[3],而是选用了Ubuntu或者CentOS Linux和其虚拟化技术。 + +Other features in Red Hat's new release include: +OpenStack Platform 5的最新功能: + +> **Support for integration with VMware infrastructure**, +encompassing virtualization, management, networking and storage. +Customers may use existing VMware vSphere resources as virtualization drivers for OpenStack Compute (Nova) nodes, + managed from the OpenStack Dashboard (Horizon). Additionally, +Red Hat Enterprise Linux OpenStack Platform 5 supports the VMware NSX plugin for OpenStack Networking (Neutron) +and the VMware Virtual Machine Disk (VMDK) plugin for OpenStack Block Storage (Cinder). +> + +> **支持和VMware基础架构的整合**,结构包含虚拟化、管理、网络和存储。 +用户一般会使用已经在使用的VMware vSphere资源,比如虚拟化驱动作为OpenStack (Nova)的计算节点,再使用上层的OpenStack Dashboard(Horizon)对节点进行管理。 +同样的,RHEL OpenStack Platform 5也支持VMware的NSX插件,作为OpenStack NetWorking (Neutron)对网络进行管理,支持VMware虚拟磁盘(VMDK)以插件形式存在,作为OpenStack Block Storage(Cinder)来使用。 +> + +> **Better placement of workloads across cloud resources**. "Server groups enable workloads to be spread broadly across the OpenStack cloud for enhanced resiliency of distributed applications, or located proximately for lower communications latency and better performance of complex applications." +> **对云资源的使用,采取了更好的布置。**服务器组让计算散布到OpenStack云的服务节点上,这让分布式应用有了更强的弹性,对于复杂的应用,也能起到降低通信延迟,提高运算性能的作用。 +> + + +> **Improved support for virtual machines, supporting new cryptographic security requirements from the United States and United Kingdom**. +Using the para-virtualized random number generator device added in Red Hat Enterprise Linux 7, +cryptographic routines in guest applications will have access to better quality encryption and +experience improved performance. +> +> **对虚拟机更好的支持,支持加密,满足美英国家对信息安全的要求** 使用RHEL 7中提供的半虚拟化随机数生成器,在用户程序中也添加进这个工具,可以更好的加密质量和性能提升。 + +> **Improved interoperability of networking stacks**. +Red Hat claims that the new modular plugin architecture for Neutron eases the addition of new networking +technologies to OpenStack deployments. +The new architecture provides a path for customers with heterogeneous networking + environments who want to use a mix of networking solutions in their OpenStack environment. +> **提升协议栈的互通性**红帽公司宣称,Neutron中新开发的模块化的网络技术将简化OpenStack的部署。这种技术将允许用户在OpenStack中部署多种网络方案来解决异构网络的访问。 + +Radhesh Balakrishnan, general manager, Virtualization and OpenStack, Red Hat, said in a statement: +红帽公司虚拟化和OpenStack产品线总经理 Redhesh Balakrishnan说到: +> “We see momentum behind OpenStack as a private cloud platform of choice from enterprise customers and service providers alike. + Red Hat Enterprise Linux OpenStack Platform 5 not only offers a production-ready, + supported version of OpenStack Icehouse, but it brings a number of features that will simplify its use, and enhance dependability for enterprise users. + Alongside those new features, we’re extending our support lifecycle for Red Hat Enterprise Linux OpenStack Platform, + giving users confidence that the solution they deploy will be supported by our global team for the next three years.” + +> “我们看到越来越多的企业级用户或服务供应商选择OpenStack作为私有云平台,RHEL OpenStack Platform 5不只是一个基于OpenStack Icehouse产品,我们还开发了很多简单易用的功能,增强了产品的可靠性。 +在未来三年内,我们要让用户看到,RHEL OpenStack Platform 5所提供的功能和技术支持服务,将为他们部署的应用保驾护航,让用户对我们的产品充满信心。 + +You can bet on that last point--a three-year support plan--as a key reason why some enterprises will go with Red Hat + in the increasingly competitive OpenStack race. + And, clearly, Red Hat is tying its future to cloud computing and the OpenStack platform. +我敢跟你打赌,--三年的技术支持服务--将是企业用户在竞争激烈的云平台领域选择红帽的关键点。并且,毋庸置疑,红帽公司把自己的未来放在了云计算,放在了OpenStack Platform上面。 +-------------------------------------------------------------------------------- + +via: http://ostatic.com/blog/red-hat-announces-availability-of-its-openstack-platform-5 + +译者:[nd0104](https://github.com/nd0104) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.marketwatch.com/story/red-hat-announces-general-availability-of-red-hat-enterprise-linux-openstack-platform-5-2014-07-08 +[2]:http://ostatic.com/blog/why-red-hats-openstack-support-must-be-as-inclusive-as-possible +[3]:http://www.openstack.org/blog/2013/11/openstack-user-survey-october-2013/ \ No newline at end of file diff --git a/translated/news/20140714 Canonical and Ubuntu Helped Munich Save Millions of Dollars by Ditching Microsoft Products.md b/translated/news/20140714 Canonical and Ubuntu Helped Munich Save Millions of Dollars by Ditching Microsoft Products.md new file mode 100644 index 0000000000..ea4e5310f7 --- /dev/null +++ b/translated/news/20140714 Canonical and Ubuntu Helped Munich Save Millions of Dollars by Ditching Microsoft Products.md @@ -0,0 +1,26 @@ +放弃微软产品,规范和ubuntu帮助慕尼黑省下数百万美元 +================================================= +![jpg](https://camo.githubusercontent.com/fb9de25222893332a72f8d632cdeb70725e827ee/687474703a2f2f69312d6e6577732e736f667470656469612d7374617469632e636f6d2f696d616765732f6e657773322f43616e6f6e6963616c2d616e642d5562756e74752d48656c7065642d4d756e6963682d536176652d4d696c6c696f6e732d6f662d446f6c6c6172732d42792d4469746368696e672d4d6963726f736f66742d50726f64756374732d3435303537312d322e6a7067) + +慕尼黑这座城市已经成为了从微软产品转向开源的,最突出的城市管理案例之一,而且规范和ubuntu为这次变革起了很大的作用 + +慕尼黑成功脱离了微软的依赖,但是他们为这次摆脱付出了价值不菲的代价。从微软产品转向开源的好处看起来似乎很昂贵,但是转变的成本比之后的产品升级显著要低,不仅如此,在未来,我们会发现这种做法更便宜 + +当你在像慕尼黑城市这种大城市,尝试从一个专有解决方法转向开源的时候,这可并不容易。因为慕尼黑拥有22个组织单位,每个单位都有自己的IT部门,更不要说各部门之间不同版本的应用程序 + +地方政府不能只采用一个Linux发行版本。第一次的尝试是在2006年,伴随着Debian的回归,但是特定的操作系统并没有一个可预测的发布时间表。这就是新操作系统LiMux产生的原因,一个基于ubuntu的操作系统 + +“LiMux/开源项目是漫长而又反复的,但是经过几年时间运行这种大型Linux,我们意识到ubuntu才是最能满足我们需求的平台。通过结合开源软件的低成本和自由,加以对我们需要的硬件和应用程序的持续支持,这种做法才是这个项目成功的关键因素之一。当然,最终要还有我们的政治家在项目始终给予的高度支持。”慕尼黑项目经理Peter Hofmann说道 + +截至2013年,如果只考虑升级成本的话,这个项目帮助慕尼黑节省了€1000万(1360万美元)。如果我们能过量化官方支持软件和其余隐藏成本的话,这个数额显得有些多 + +眼下,慕尼黑14000台PC机运行着LiMux,而且数量还在持续增长。这很有可能影响其余德国城市在未来也这么做,尤其是慕尼黑的邻国 + +慕尼黑当局采用了13年才完成这次变革,但是最终事实证明,这样做可以省下一大笔资金,而且证明了Linux实际上是整个城市IT基础设施又好有免费的解决方案 + +---- +via: http://news.softpedia.com/news/Canonical-and-Ubuntu-Helped-Munich-Save-Millions-of-Dollars-By-Ditching-Microsoft-Products-450571.shtml + +译者:译者ID 校对:校对者ID + +本文由 LCTT 原创翻译,Linux中国 荣誉推出 diff --git a/translated/talk/20140528 Why We Shouldn't Accept Bad Linux Ports.md b/translated/talk/20140528 Why We Shouldn't Accept Bad Linux Ports.md deleted file mode 100644 index fa78d5b8fe..0000000000 --- a/translated/talk/20140528 Why We Shouldn't Accept Bad Linux Ports.md +++ /dev/null @@ -1,33 +0,0 @@ -为什么我们不接收不良Linux 接口 -================================================================================ -由于最近The Witcher 2的惨败,我想写下些想法,为什么我们不应该接受来自开发人员的不良接口。 - -最近几年在我们linux的游戏库有太多该死的游戏,导致你现在可以看到来自linux玩家的评论“我已经有很多游戏了!”现在我可以想象到很多熟悉的声音。感谢Valve&Steam,之前我们从来没有看见过这么多自来开发者的注意力。 - -同样由于开发者的提交,我们看见了伴随而来的接口,它们,坦率地说,质量十分的糟糕或者说对于多数人们彻彻底底的不会用。 - -这个问题就是如果我们继续接受低水平质量的接口,Linux就会赢得一个游戏质量水平低的声誉。严肃地想想一个贴图的大怪兽。 - -再想象一下,一个3A开发者给linux推送大量游戏,使用用了The Witcher2接口“eON”的技术。那就是说我们有了大量开发者,就像突然看起来Linux有很多大牌游戏了。然后你可以看见大量的人尝试Linux,却看见它们的游戏运行者糟糕的画面,在同等硬件水品下,就会给它们一个印象,linux对游戏不友好。所以,这对所有人都不好。 - - -我已经看见许多人说“工具包用于接口真的没关系?”。这在我的眼里看来是一个非常天真的声明。当然,这有关系, 它意味Linux的游戏质量光和天的不同。它直接导致我回到关于Linux游戏的认知之上的观点。 -你可以坚持说工具包没有关系和使用任何比较/类比你幻想,但如果工具包是导致问题的根源,如同当我们讨论计算机软件它会占用99%的时间,是的,它当然有关系! - -如今,我已经看见许多评论,来自其他主流网页声明,我们应该接受它们并且作感谢状,我们毕竟拥有他们。那真是个白痴的声明,那些不看大局的人。 - -![](http://www.gamingonlinux.com/uploads/articles/article_images/1401025331gol2.jpg) - -想想,那些开发者和发行商认为可以接受推送的糟糕linux接口送出了门,总有一天得召回。它们的脑里只有利润。消费者对Linux游戏的感知就会进一步恶化,就是因为这些不良的接口。 - -我完全赞同来子开发者的接口,当然毕竟我运行着这个网站。但是,我作为一个消费者不愿意在windows可运行的游戏付钱,可是在linux运行得却像蜗牛,为什么我应该?为什么你应该? - -最后增加一个观点:当开发者研究出有问题,发布在社区,你们应该从不攻击它们,这是不可接受的。反馈是很好,骂人是很孩子气,这使得Linux再一次看起来糟糕。 - --------------------------------------------------------------------------------- - -via: http://www.gamingonlinux.com/articles/why-we-shouldnt-accept-bad-linux-ports.3765 - -译者:[Vic020](http://www.vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/talk/20140624 Performance benchmarks--KVM vs. Xen.md b/translated/talk/20140624 Performance benchmarks--KVM vs. Xen.md new file mode 100644 index 0000000000..e6abc80fe0 --- /dev/null +++ b/translated/talk/20140624 Performance benchmarks--KVM vs. Xen.md @@ -0,0 +1,94 @@ +KVM和Xen的性能基准测试 +================================================================================ +在上周,我们讨论了 KVM 和 Xen 的性能上一些令人感兴趣的话题后,我打算自己做一些这方面的研究。我能找到的最新的资料,是来自[2013年 Phoronix Haswell 性能评测][1]上的基准测试。当然,还有[2011年的评测][2],由于 Xen 已经被收录进 Kernel 3.0,这些曾经都是热门话题。 + +2011年的测试提供了[许多很好的基准报表][3],我尽最大努力把它们列出的属性重新测试一遍,但少测了两三个基准测试,原因是它们在未经特定优化的配置后跑出来的数据不是很好,或者它们需要跑很长时间才能得到结果。 + +### 测试环境 ### + +测试环境由两台一模一样的超微服务器组成,都配备一颗[Intel 至强 E3-1220][4](4核,3.10GHz),24G 金士顿 DDR3 内存,4块西数 RE-3 160G 磁盘(组成 RAID10 阵列)。另外 BIOS 也是一模一样。 + +所有测试项目(即实体机和虚拟机)都在 Fedora 20 (开 SELinux)上进行,并且测试过程中没有跑很多的不相关的服务。这里列一下相关服务的版本: + +- Kernel: 3.14.8 +- For KVM: qemu-kvm 1.6.2 +- For Xen: xen 4.3.2 + +根文件系统是 XFS,使用默认配置。虚拟机使用 virt-manager 来创建(virt-mamager 也使用默认配置)。虚拟磁盘使用 raw 镜像,容量为 8GB,虚拟4颗 CPU。Xen 虚拟机使用 [PVHVM][5] 建立虚拟磁盘。 + +### 警告 ### + +也许有人会考虑到 Fedora 是红帽公司所有,红帽一直在维护 KVM,而 Xen 则自从[在2009年红帽重新选择 KVM 作为虚拟化产品][6]后,再没得到这个公司的维护。在本测试中这个因素不会对结果产生任何影响,不过可以在心里稍微注意一下。 + +不考虑资源竞争产生的影响。在大多数虚拟服务器上,你可以跑多个虚拟机,而这些虚拟机会争用 CPU 时间片、磁盘 IO、网络带宽等等资源。在本测试中也不考虑这些因素。一台虚拟机抢到资源少,性能就差,而另一台抢得多,性能就好(LCTT:它们的性能总和,就可以大致当作是 KVM 或 Xen 的性能了)。 + +本测试运行在 Intel 的 CPU 上。如果使用的是 AMD 或 ARM,可能有些数据会不一样。 + +### 结果 ### + +本测试使用裸机作为虚拟服务测试的基准设备。在不跑虚拟机的情况下,两台裸机的性能偏差不会大于0.51% + +在所有测试中,KVM 的性能相比宿主机而言下降了1.5%以内,除了两个测试。第一个是 7-zip 压缩,比宿主机慢了 2.79%。第二个就奇怪了,我们搭了一个邮件服务器,用 PostMark 测试其性能,结果表明 KVM 竟比宿主机快了4.11%。然后我在两台服务器中重新跑了几遍 PostMark 测试,结果性能差异基本不变,浮动在1%以内。由于我对 virtio 的内部机制没有很深的理解,我只能在以后再对这个怪现象进行进一步了解。 + +Xen 的性能相对宿主机而言差异就比较大了。有3个测试性能下降在2.5%以内,剩下的性能下降率都是 KVM 的2~4倍。PostMark 测试的性能比 KVM 慢了14.41%,这结果令我大吃一惊。重新跑了下测试,性能差还是在14%左右。KVM 表现最好的两个测试:CPU 测试和 MAFFT 对齐测试,是 Xen 表现最差的。 + +现在奉上一个总结表: + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
Best Value
Bare Metal
KVM
Xen
C-Raylower35.3535.6636.13
POV-Raylower230.02232.44235.89
Smallptlower160162167.5
John the Ripper (Blowfish)higher30262991.52856
John the Ripper (DES)higher7374833.57271833.56911167
John the Ripper (MD5)higher4954848899.546653.5
OpenSSLhigher397.68393.95388.25
7-Ziphigher12467.512129.511879
Timed MAFFT Alignmentlower7.787.7958.42
CLOMPhigher3.33.2853.125
PostMarkhigher366738243205
+ +如果需要完整数据,请查看[Goole Docs 电子表格][7]。 + +### 结论 ### + +基于上面的测试环境,KVM 的性能损耗在2%以内,Xen 则只有3项损耗在2.5%以内,其他几项损耗都在5~7%之间。虽然 KVM 在 PostMark 测试中性能表现优异,但这个测试只是众多测试中的一项,如果想证明 KVM 确实在 I/O 处理方面很强悍,就需要更多测试。 + +对我来说,我需要深入理解 KVM 和 Xen 在 I/O 处理上为什么会有这么大的差别。并且还需要跑一些压力测试,来证明虚拟机是否真的比宿主机表现得更出色。 + +我鼓励读者通过使用[Phoronix 测试套件][8]来进行一些基准测试,你们可以找到一些能模仿你们工作环境的用例。如果你的工作环境是低 CPU 高 I/O,你可以找找套件里面的 I/O 压力测试。另一方面,如果你的工作是音频、视频转码,你可以试试套件里面的 x264 或 mp3 测试。 + +更新:[Chris Behrens 指出][9],我忘了提到 Xen 虚拟机类型了。这里补充下,我使用的是 PVHVM 模型(LCTT:目前支持的模型包括 PV、HVM 和 PVHVM),因为在 Xen 4.3 中这个选拥有最好的性能。另外需要注意的是在 Xen 4.4 中可以使用 PVH,但是在 Fedora 20 中还没有使用 Xen 4.4。 + +-------------------------------------------------------------------------------- + +via: http://major.io/2014/06/22/performance-benchmarks-kvm-vs-xen/ + +译者:[bazz2](https://github.com/bazz2) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.phoronix.com/scan.php?page=article&item=intel_haswell_virtualization&num=1 +[2]:http://blog.xen.org/index.php/2011/11/29/baremetal-vs-xen-vs-kvm-redux/ +[3]:http://blog.xen.org/wp-content/uploads/2011/11/overview.png +[4]:http://ark.intel.com/products/52269/Intel-Xeon-Processor-E3-1220-8M-Cache-3_10-GHz?q=e3-1220 +[5]:http://wiki.xen.org/wiki/Xen_Linux_PV_on_HVM_drivers +[6]:http://www.infoworld.com/d/virtualization/red-hat-releases-first-kvm-support-rhel-54-376 +[7]:https://docs.google.com/spreadsheets/d/1kmudbOjCDUgfw76b8qP2GqNqF1ddlTOKyOjc0GmNOIE/edit?usp=sharing +[8]:http://www.phoronix-test-suite.com/ +[9]:https://twitter.com/comstud/status/480785742730252288 diff --git a/translated/talk/20140630 Ubuntu 14.04 LTS--Customizing Unity.md b/translated/talk/20140630 Ubuntu 14.04 LTS--Customizing Unity.md new file mode 100644 index 0000000000..3a7a19690b --- /dev/null +++ b/translated/talk/20140630 Ubuntu 14.04 LTS--Customizing Unity.md @@ -0,0 +1,54 @@ + Ubuntu 14.04 LTS: 定制 Unity +================================================================================ +虽然Unity桌面管理器自从伴随 Ubuntu 11.01首次发布以来表现出了强劲的性能,并在可用性上迈进了一大步,但是有人对自定义其外观和行为所带的限制感到反感。我们马上就去看看如何自定义Unity,让你重拾自己掌控桌面的感觉。 +### Unity中的可用定制项目 ### + +在ubuntu 14.04中,Unity 有一些以前没有的可定制项。登入你的 Unity,进入“设置”并选择“显示”,你将看到以下画面: + +![Ubuntu 14.04 LTS Display and Unity Settings](https://linuxacademy.com/blog/wp-content/uploads/2014/06/unitysettings.png) +Ubuntu 14.04 LTS 显示和 Unity 设置 + +你看到的大多数项目相比Ubuntu 11.01 中所采用的都是新的,而且一些相比较最近的Ubuntu 版本Ubuntu13.10也是新的。从Ubuntu13.10开始,Ubuntu加入了可以改变菜单栏和标题栏大小的新特性。 +Unity中所特有的一个特性是我们能够打开或者关闭的“粘性边缘”功能,它能让你的鼠标停止在多显示器组的每个屏幕的边缘,它使光标暂时停在边缘,仿佛是鼠标卡住了一样,我们可以选择关闭它。 +在“设置”中选择“外观”选项,可以看到如下画面。 +![Ubuntu 14.04 LTS Appearance and Unity Settings](https://linuxacademy.com/blog/wp-content/uploads/2014/06/unityappearance.png) + Ubuntu 14.04 LTS 显示和Unity设置 +这里我们可以看到对于 Unity 启动器栏被要求最多的选项-能够改变启动器大小的特性。虽然在Ubuntu 11.10及以后的各种版本中可以通过多种方法实现这个特性,但将其放入外观设置中使其显得更加正式。我喜欢它能将启动器图标缩小直至16号的功能(我们接下来所要谈论的工具仅能支持最小调至24号)。 +### Unity Tweak Tool-强大! ### + +在Unity首次伴随Ubuntu 11.10发布的几天之内这款工具就跟着出现了,只是你得大费周折去自己把它安装好而且在Unity升级时它可能会损坏。 + +然而现在它被正式添加进了Ubuntu的默认软件仓库并且会在Unity更新时同时更新。它附带大量的定制项,那么我们就来安装它吧: + + sudo apt-get install unity-tweak-tool + +安装好,启动后你将看到如下画面: + +![Ubuntu 14.04 LTS Official Unity Tweak Tool](https://linuxacademy.com/blog/wp-content/uploads/2014/06/unitytweaktool.png) + 正式的Unity Tweak Tool + +这款工具集中大量的Unity桌面定制项目于一体。这些定制项大多能通过默认的Unity设置,命令行操作或者是编辑有时候很难寻找的配置文件来实现。 + +我们可以改变启动器栏,网页小程序和面板的行为,可以在Unity菜单中搜索等等。所有的都通过着一个工具来实现。花些时间去挖掘适合你的选项-Unity Tweak Tool-学习它,和它一起生活,爱上它(如果你使用Unity,这是起码的) + +### 结尾的一些想法 ### + +Ubuntu 14.04 LTS 越来越向成为Linux Desktop迈进,(Canonical,对不起,你还是Linux),Linux Desktop不仅可以作为非正式的Linux使用者(的确有这样的事)的选择,也适用于骨灰级linux专家。 +那现在相比较于不借助工具,公共程序或是进行在随后的更新中可能损坏的配置文件编辑的Unity桌面我们就拥有了更多的控制权,Unity桌面性能强劲可靠,又通过Unity Tweak Tool加入一些风味元素,使得它的外观也酷极了!!!请给我们你的想法或者点击链接发表你对Unity桌面的评论,我们将有兴趣知道你是如何使用Ubuntu 14.04 LTS 的。 + + +---------- + +#### Terrence T. Cox #### +开发者,Linux倡导者,开源爱好者。 进入这个技术领域很久,被认为经验丰富,但从未感到厌倦。 +[Twitter][1] + +-------------------------------------------------------------------------------- + +via: https://linuxacademy.com/blog/linux/ubuntu-14-04-lts-customizing-unity/ + +译者:[Love-xuan](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://twitter.com/mourngrymtc/ diff --git a/translated/tech/20140603 Write your first Linux Kernel module.md b/translated/tech/20140603 Write your first Linux Kernel module.md deleted file mode 100644 index c70ec1ec11..0000000000 --- a/translated/tech/20140603 Write your first Linux Kernel module.md +++ /dev/null @@ -1,369 +0,0 @@ -编写属于你的第一个Linux内核模块 -================================================================================ -> 曾经多少次想要在内核游荡?曾经多少次茫然不知方向?你不要再对着它迷惘,让我们指引你走向前方…… -内核编程常常看起来像是黑魔法,而在亚瑟 C 克拉克的眼中,它八成就是了。Linux内核和它的用户空间是大不相同的:抛开漫不经心,你必须小心翼翼,因为你编程中的一个bug就会影响到整个系统。浮点数学做起来可不容易,堆栈固定而渺小,而你写的代码总是异步的,因此你需要想想怎样让它并发。而除了所有这一切之外,Linux内核只是一个很大的、很复杂的C程序,它对每个人开放,任何人都去读它、学习它并改进它,而你也可以是其中之一。 - -> “开始内核编程的最简单的方式 -> 是写模块——一段代码 -> 可以用来动态加载进内核。” - -可能,开始内核编程的最简单的方式,就是写模块——一段可以动态加载进内核并从内核移除的代码。模块所能做的事是有限的——例如,他们不能添加或移除像进程描述符这样的常规数据结构域。但是,在其它方面,他们是成熟的内核级的代码,可以在需要时随时编译进内核(这样就可以摒弃所有的限制了)。完全可以在Linux源代码树以外来开发并编译一个模块(这并不奇怪,它称为树外开发),如果你只是想稍微玩玩,而并不想提交修改以包含到主线内核中去,这样的方式是很方便的。 - -在本教程中,我们将开发一个简单的内核模块用以创建一个**/dev/reverse**设备。写入该设备的字符串将以逆序的方式读回(“Hello World”读成“World Hello”)。这是一个流行的节目采访智力游戏,而当你展示能力来实施时,你也可能获得一些奖励分。在开始前,有一句忠告:你的模块中的一个bug会导致系统崩溃(虽然可能性不大,但还是有可能的)和数据丢失。在开始前,请确保你已经将重要数据备份,或者,采用一种更好的方式,在虚拟机中进行试验。 -### 尽可能避免root身份 ### - -> 默认情况下,**/dev/reverse**只有root可以使用,因此你不得不使用**sudo**来测试该程序。要解决该问题,可以创建一个包含以下内容的**/lib/udev/rules.d/99-reverse.rules**文件: -> -> SUBSYSTEM=="misc", KERNEL=="reverse", MODE="0666" -> -> 别忘了重新插入模块。让设备节点让非root用户访问这往往不是一个好主意,但是在开发其间却是十分有用的,这不是说以root身份运行二进制测试文件也不是个好主意。 - -#### 模块的构造 #### - -由于大多数的Linux内核模块是用C写的(除了低级别特定架构部分),所以推荐你将模块以单一文件形式保存(例如,reverse.c)。我们已经把完整的源代码放在GitHub上——这里我们将看其中的一些片段。开始时,我们先要包含一些常见的文件头,并用预定义的宏来描述模块: - - #include - #include - #include - - MODULE_LICENSE("GPL"); - MODULE_AUTHOR("Valentine Sinitsyn "); - MODULE_DESCRIPTION("In-kernel phrase reverser"); - -这里一切都直接明了,除了**MODULE_LICENSE()**:它不仅仅是一个标记。内核坚定地支持GPL兼容代码,因此如果你把许可证设置为其它非GPL兼容的(如,“专利”),特定的内核功能将在你的模块中不可用。 - -### 什么时候不该写内核模块 ### - -> 内核编程很有趣,但是在现实项目中写(尤其是调试)内核代码要求特定的技巧。通常来讲,在没有其它方式解决你的问题时,你才应该沉入内核级别。可能你可以待在用户空间中,如果: - -> - 你开发一个USB驱动 —— 请查看[libusb][1]。 -> - 你开发一个文件系统 —— 试试[FUSE][2]。 -> - 你在扩展Netfilter —— 那么[libnetfilter_queue][3]对你有所帮助。 -> -> 通常,本地内核代码会干得更好,但是对于许多项目而言,这点性能丢失并不严重。 -由于内核编程总是异步的,没有Linux顺序执行得**main()**函数来运行你的模块。取而代之的是,你为各种事件提供了回调函数,像这个: - - static int __init reverse_init(void) - { - printk(KERN_INFO "reverse device has been registered\n"); - return 0; - } - - static void __exit reverse_exit(void) - { - printk(KERN_INFO "reverse device has been unregistered\n"); - } - - module_init(reverse_init); - module_exit(reverse_exit); - -这儿,我们定义了函数,用来访问模块的插入和移除功能,只有第一个是必要的。目前,它们只是打印消息到内核环缓冲区(可以通过**dmesg**命令从用户空间访问);**KERN_INFO**是日志等级(注意,没有逗号)。**_init**和**_exit**是属性 —— 联结到函数的元数据片(或者变量)。属性在用户空间的C代码中是很罕见的,但是内核中却很普遍。所有标记为**_init**的,会在初始化后再生(还记得那条老旧的“释放未使用的内核内存……”信息?)。**__exit**表明,当代码被静态构建进内核时,该函数可以安全地优化。最后,**module_init()**和**module_exit()**这两个宏将**reverse_init()**和**reverse_exit()**函数设置成为我们模块的生命周期回调函数。实际的函数名称并不重要,你可以称它们为**init()**和**exit()**,或者**start()**和**stop()**,你想叫什么就叫什么吧。在你的模块外,它们被申明成为静态的和不可见的。事实上,内核中的任何函数都是不可见的,除非明确地被导出。然而,在内核程序员中,给你的函数加上模块名前缀是约定俗成的。 - -这些是基本要素 —— 让我们把事情变得更有趣些。模块可以接收参数,就像这样: - - # modprobe foo bar=1 - -**modinfo**命令显示了所有模块接受的参数,而这些也可以在**/sys/module//parameters**下作为文件使用。我们的模块需要一个缓冲区来存储短语 —— 让我们把这大小设置为用户可配置。添加**MODULE_DESCRIPTION()**以下的三行: - - static unsigned long buffer_size = 8192; - module_param(buffer_size, ulong, (S_IRUSR | S_IRGRP | S_IROTH)); - MODULE_PARM_DESC(buffer_size, "Internal buffer size"); - -这儿,我们定义了一个变量来存储该值,将其包裹到一个参数中,并通过sysfs来让所有人可读。参数的描述(最后一行)会出现在modinfo的输出中。 - -由于用户可以直接设置**buffer_size**,我们需要在**reverseinit()**来清除它。你总该检查来自内核外的数据 —— 如果你不这么做,你就是会将你自身置于内核异常之中,设置造成安全漏洞。 - - static int __init reverse_init() - { - if (!buffer_size) - return -1; - printk(KERN_INFO - "reverse device has been registered, buffer size is %lu bytes\n", - buffer_size); - return 0; - } - -来自模块初始化函数的非0返回值意味着模块执行失败。 - -### 导航 ### - -> 但你开发模块时,Linux内核就是你所需一切的源头。然而,它相当大,你可能在查找你所要的内容时会有困难。幸运的是,在浏览庞大的代码库时,有工具可以帮助你干得轻松一点。首先,是Cscope —— 在终端中运行的一个令人肃然起敬的工具。你所要做的,就是在内核源代码的顶级目录中运行**make cscope && cscope**。Cscope和Vim以及Emacs整合得很好,因此你可以在使用你最喜爱的编辑器舒适地工作时来使用它。 - -> 如果基于终端的工具不是你的最爱,那么就访问[http://lxr.free-electrons.com][4]吧。它是一个基于web的内核导航工具,即使它的功能没有Cscope来得多(例如,你不能方便地找到函数的用法),但它仍然提供了足够多的快速查询功能。 -现在是时候来编译模块了。你将需要用于正在运行的内核版本的头文件(**linux-headers**,或者同等软件包)和**build-essential**(或者类似的包)。接下来,该创建一个标准的Makefile模板: - - obj-m += reverse.o - all: - make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules - clean: - make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean - -现在,调用**make**来构建你的第一个模块。如果你输入的都正确,在当前目录内会发现reverse.ko文件。使用**sudo insmod reverse.ko**插入,然后运行: - - $ dmesg | tail -1 - [ 5905.042081] reverse device has been registered, buffer size is 8192 bytes - -恭喜了!然而,目前这一行还只是在逗你玩而已 —— 还没有设备节点呢。让我们来修复它。 - -#### 混杂设备 #### - -在Linux中,有一种特殊的字符设备类型,叫做“混杂设备”(或者简称为“misc”)。它设计用于只有一个单一接入点的小型设备驱动,而这正是我们所需要的。所有混杂设备共享同一个主设备号(10),因此一个驱动(**drivers/char/misc.c**)就可以查看它们所有设备了,而这些设备用次设备号来区分。在所有其它意义上,它们只是普通字符设备。 - -要为该设备注册一个次设备号(以及一个接入点),你需要声明**struct misc_device**,填上所有字段(注意语法),然后使用指针指向该结构函数来调用**misc_register()**。为了这个能工作,你也需要包含**linux/miscdevice.h**头文件: - - static struct miscdevice reverse_misc_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "reverse", - .fops = &reverse_fops - }; - static int __init reverse_init() - { - ... - misc_register(&reverse_misc_device); - printk(KERN_INFO ... - } - -这儿,我们为名为“reverse”的设备请求一个第一个可用的(动态的)次设备号;省略号表明我们已经见过的省略的代码。别忘了在模块卸下后注销掉该设备。 - - static void __exit reverse_exit(void) - { - misc_deregister(&reverse_misc_device); - ... - } - -‘fops’字段存储了一个指针,指向结构函数**file_operations**(在Linux/fs.h中已声明),而这真是我们模块的接入点。**reverse_fops**定义如下: - - static struct file_operations reverse_fops = { - .owner = THIS_MODULE, - .open = reverse_open, - ... - .llseek = noop_llseek - }; - -再者,**reverse_fops**包含了一系列回调函数(也称之为方法),当用户空间代码打开一个设备时,就会执行。从该设备读取,向该设备写入,或者关闭文件描述符。如果你忽略了所有这些,就会使用一个灵敏的回调函数来替代。这就是为什么我们明确给**noop_llseek()**设置了**llseek**方法,而它却什么也不干(就像名称中暗指的)。默认部署改变了文件指针,我们现在也不想我们的设备被找到(这是你们的今天的回家作业)。 - -#### 我在关闭时打开 #### - -让我们实施该方法。我们将分配一个新的缓冲区给每个打开的文件描述符,并在它关闭时释放。这事实上并不安全:如果一个用户空间应用程序泄漏了描述符(也许是故意的),它就会霸占RAM,并使系统不可用。在现实世界中,你总得考虑到这些可能性。但在本教程中,这种方法可以接受。 - -我们需要一个结构函数来描述缓冲区。内核提供了许多常规的数据结构:链接列表(双联的),哈希表,树等等之类。然而,缓冲区常常从零开始实施。我们将调用我们的“struct buffer”: - - struct buffer { - char *data, *end, *read_ptr; - unsigned long size; - }; - -**data**是该缓冲区存储的一个指向字符串的指针,而最后部分是字符串结尾后的第一个字节。**read_ptr**是**read()**开始读取数据的地方。缓冲区大小为了完整性而存储 —— 目前,我们还没有使用该区域。你不能假设使用你结构体的用户会正确地初始化所有这些东西,所以最好在函数中封装缓冲区分配和解除。它们通常命名为**buffer_alloc()**和**buffer_free()**。 - - static struct buffer *buffer_alloc(unsigned long size) - { - struct buffer *buf; - buf = kzalloc(sizeof(*buf), GFP_KERNEL); - if (unlikely(!buf)) - goto out; - ... - out: - return buf; - } - -内核内存使用**kmalloc()**来分配,并使用**kfree()**来释放;**kzalloc()**的风格是将内存设置为全零。不同于标准的**malloc()**,它的内核对应部分收到的标志指定了第二个参数中请求的内存类型。这里,**GFP_KERNEL**是说我们需要一个普通的内核内存(不是在DMA或高内存中)以及函数可以按需睡眠(重新编排进程)。**sizeof(*buf)**是一种常见的方式,它用来获取可通过指针访问的结构体的大小。 - -你应该随时检查**kmalloc()**的返回值:解应用NULL指针将导致内核异常。同时也需要注意**unlikely()**宏的使用。它(及其相对宏**likely()**)被广泛用于内核中,用于表明条件几乎总是真的(或假的)。它不会影响到控制流,但是能帮助现代处理器通过分支预测技术来提升性能。 - -最后,注意**gotos**。它们常常为认为是邪恶的,但是,Linux内核(以及一些其它系统软件)采用它们来实施集中式的函数退出。这样的结果是减少嵌套深度,使代码更具可读性,而且非常像更高级语言中的**try-catch**区块。 - -有了**buffer_alloc()**和**buffer_free()**,**open**和**close**方法就变得很简单了。 - - static int reverse_open(struct inode *inode, struct file *file) - { - int err = 0; - file->private_data = buffer_alloc(buffer_size); - ... - return err; - } - -**struct file**是一个标准的内核数据结构,用以存储打开的文件的信息,如当前文件位置(**file->fpos**),标志(**file->flags**),或者打开模式(**file->fmode**)。另外一个字段**file->privatedata**用于关联文件到一些专有数据,它的类型是void *,而且它在文件拥有者以外对内核不透明。我们将一个缓冲区存储在那里。 - -如果缓冲区分配失败,我们通过返回否定值(**-ENOMEM**)来为调用的用户空间代码标明。 - -#### 学会读写 #### - -“read”和“write”方法是真正完成工作的地方。当数据写入到缓冲区时,我们就丢弃它里头先前的内容,并在没有任何临时存储时将短语恢复原状。**read**方法仅仅是从内核缓冲区复制数据到用户空间。但是如果缓冲区还没有数据,**reverseread()**会做什么呢?在用户空间中,**read()**调用会在有可用数据前阻塞它。在内核中,你必须等待。幸运的是,有一项机制用于处理这种情况,就是‘wait queues’。 - -想法很简单。如果当前进程需要等待某个事件,它的描述符(**struct task_struct**存储为‘current’)被放进非可运行(睡眠中)状态,并添加到一个队列中。然后**schedule()**就被调用来选择另一个进程运行。生成事件的代码通过使用队列将等待进程放回**TASKRUNNING**状态来唤醒它们。调度程序将在以后在某个地方选择它们之一。Linux有多种非可运行状态,最值得注意的是**TASKINTERRUPTIBLE**(一个可以通过信号中断的睡眠)和**TASKKILLABLE**(一个可被杀死的睡眠中的进程)。所有这些都应该正确处理,并等待队列为你做这些事。 - -一个用以存储读取等待队列头的天然场所就是结构缓冲区,所以从为它添加**wait_queue_head_t read_queue**字段开始。你也应该包含**linux/sched.h**。可以使用DECLARE_WAITQUEUE()宏来静态声明一个等待队列。在我们这种情况下,需要动态初始化,因此添加下面这行到**buffer_alloc()**: - - init_waitqueue_head(&buf->read_queue); - -我们等待可用数据;或者等待**read_ptr != end**条件成立。我们也想要让等待操作可以被中断(如,通过Ctrl+C)。因此,“read”方法应该像这样开始: - - static ssize_t reverse_read(struct file *file, char __user * out, - size_t size, loff_t * off) - { - struct buffer *buf = file->private_data; - ssize_t result; - while (buf->read_ptr == buf->end) { - if (file->f_flags & O_NONBLOCK) { - result = -EAGAIN; - goto out; - } - if (wait_event_interruptible - (buf->read_queue, buf->read_ptr != buf->end)) { - result = -ERESTARTSYS; - goto out; - } - } - ... - -我们让它循环,直到有可用数据,如果没有则使用**wait_event_interruptible()**(它是一个宏,不是函数,这就是为什么要给队列传递值)来等待。好吧,如果**wait_event_interruptible()**被中断,它返回一个非0值,这个值代表**-ERESTARTSYS**。这段代码意味着系统调用应该重新启动。**file->f_flags**检查以非阻塞模式打开的文件数:如果没有数据,返回**-EAGAIN**。 - -我们不能使用**if()**来替代**while()**,因为可能有许多进程正等待数据。当**write**方法唤醒它们时,调度程序选择一个来以不可预知的方式运行,因此,在这段代码有机会执行的时候,缓冲区可能再次空出。现在,我们需要将数据从**buf->data** 复制到用户空间。**copytouser()**内核函数就干了此事: - - size = min(size, (size_t) (buf->end - buf->read_ptr)); - if (copy_to_user(out, buf->read_ptr, size)) { - result = -EFAULT; - goto out; - } - -如果用户空间指针错误,那么调用可能会失败;如果发生了此事,我们就返回**-EFAULT**。记住,不要相信任何来自内核外的事物! - - buf->read_ptr += size; - result = size; - out: - return result; - } - -为了让数据能读入到专有组块中,需要进行简单运算。该方法返回读入的字节数,或者一个错误代码。 - -写方法更简短。首先,我们检查缓冲区是否有足够的空间,然后我们使用**copy_from_userspace()**函数来获取数据。再然后**read_ptr**和结束指针会被重置,缓冲区内容会被撤销掉: - - buf->end = buf->data + size; - buf->read_ptr = buf->data; - if (buf->end > buf->data) - reverse_phrase(buf->data, buf->end - 1); - -这里, **reverse_phrase()**干了所有吃力的工作。它依赖于**reverse_word()**函数,该函数相当简短并且标记为内联。这是另外一个常见的优化;但是,你不能过度使用。因为积极的内联会导致内核映像徒然增大。 - -最后,我们需要唤醒**read_queue**中等待数据的进程,就跟先前讲过的那样。**wake_up_interruptible()**就是用来干此事的: - - wake_up_interruptible(&buf->read_queue); - -唷!你现在已经有了一个内核模块,它至少已经编译成功了。现在,是时候来测试了。 - -### 调试内核代码 ### - -> 或许,内核中最常见的调试方法就是打印。如果你愿意,你可以使用普通的**printk()** (假定使用**KERN_DEBUG**日志等级)。然而,那儿还有更好的办法。如果你正在写一个设备驱动,这个设备驱动有它自己的“struct device”,可以使用**pr_debug()**或者**dev_dbg()**:它们支持动态调试(**dyndbg**)特性,并可以根据需要启用或者禁用(请查阅**Documentation/dynamic-debug-howto.txt**)。对于单纯的开发消息,使用**prdevel()**,该函数没有操作符,除非设置了DEBUG。要为我们的模块启用DEBUG,请添加以下行到Makefile中: - -> CFLAGS_reverse.o := -DDEBUG -> -> 完了之后,使用**dmesg**来查看**pr_debug()**或**pr_devel()**生成的调试信息。 -> 或者,你可以直接发送调试信息到控制台。要想这么干,你可以设置**console_loglevel**内核变量为8或者更大的值(**echo 8 /proc/sys/kernel/printk**),或者在高日志等级,如**KERN_ERR**,来临时打印要查询的调试信息。很自然,在发布代码前,你应该移除这样的调试声明。 - -> 注意出现在控制台的内核消息,而不要在Xterm这样的终端模拟器窗口中去查看;那也是你在内核开发时,经常会建议你不要再X环境下进行的原因。 - -### 惊喜,惊喜! ### - -编译模块,然后加载进内核: - - $ make - $ sudo insmod reverse.ko buffer_size=2048 - $ lsmod - reverse 2419 0 - $ ls -l /dev/reverse - crw-rw-rw- 1 root root 10, 58 Feb 22 15:53 /dev/reverse - -一切似乎就位。现在,要测试模块是否正常工作,我们将写一段小程序来翻转它的第一个命令行参数。**main()**(没有错误检查)可能看上去像这样: - - int fd = open("/dev/reverse", O_RDWR); - write(fd, argv[1], strlen(argv[1])); - read(fd, argv[1], strlen(argv[1])); - printf("Read: %s\n", argv[1]); - -像这样运行: - - $ ./test 'A quick brown fox jumped over the lazy dog' - Read: dog lazy the over jumped fox brown quick A - -它工作正常!玩得更逗一点:试试传递单个单词或者单个字母的短语,空的字符串或者是非英语字符串(如果你有这样的键盘布局设置),以及其它任何东西。 - -现在,让我们让事情变得更好玩一点。我们将创建两个进程,它们共享一个文件描述符(因而还有内核缓冲区)。其中一个会持续写入字符串到设备,而另一个将读取这些字符串。在下例中,我们使用了**fork(2)**系统调用,而pthreads也很好用。我也忽略了打开和关闭设备,以及错误检查部分的代码(又来了): - - char *phrase = "A quick brown fox jumped over the lazy dog"; - if (fork()) - /* Parent is the writer */ - while (1) - write(fd, phrase, len); - else - /* child is the reader */ - while (1) { - read(fd, buf, len); - printf("Read: %s\n", buf); - } - -你希望这个程序会输出什么呢?下面就是在我的笔记本上得到的东西: - - Read: dog lazy the over jumped fox brown quick A - Read: A kcicq brown fox jumped over the lazy dog - Read: A kciuq nworb xor jumped fox brown quick A - Read: A kciuq nworb xor jumped fox brown quick A - ... - -这里发生了什么呢?举行了一场比赛。我们认为**read**和**write**是很小的,或者从头到尾一次执行一个指令。然而,内核是并发的野兽,它可以很容易地重排**reverse_phrase()**函数内部某个地方运行着的内核模式部分的写入操作。如果进行**read()**操作的进程在写入操作结束前就被编排进去,就会产生数据不连续状态。这些bug非常难以排除。但是,怎样来处理这个问题呢? - -基本上,我们需要确保在写方法返回前没有**read**方法能被执行。如果你曾经编写过一个多线程的应用程序,你可能见过同步原语(锁),如互斥锁或者信号。Linux也有这些,但有些细微的差别。内核代码可以运行在进程条件中(“代表”用户空间代码工作,就像我们的方法那样)以及运行在中断条件中(例如,在IRQ处理器中)。如果你的程序处于进程条件中,并且你需要的锁已经被拿走,你的程序就会睡眠并重试直至成功。在中断条件中是无法睡眠的,因此代码在循环中流转,直到有可用的锁为止。关联原语被称为自旋锁,但在我们的环境中,一个简单的互斥锁 —— 在特定时间内只有唯一一个进程能“占有”的对象 —— 就足够了。处于性能方面的考虑,现实的代码可能也会使用读-写信号。 - -锁总是保护某些数据(在我们的环境中,是一个“struct buffer”实例),而且也常常会把它们嵌入到它们所保护的结构体中。因此,我们添加一个互斥锁(‘struct mutex lock’)到“struct buffer”中。我们也必须用**mutex_init()**来初始化互斥锁;**buffer_alloc**是用来处理这件事的好地方。使用互斥锁的代码也必须包含**linux/mutex.h**。 - -互斥锁很像交通信号灯 —— 除非驱动查看并跟踪信号,否则它没什么用。因此,在对缓冲区做操作并在操作完成时释放它之前,我们需要更新**reverse_read()**和**reverse_write()**来获取互斥锁。让我们来看看**read**方法 —— **write**的工作原理相同: - - static ssize_t reverse_read(struct file *file, char __user * out, - size_t size, loff_t * off) - { - struct buffer *buf = file->private_data; - ssize_t result; - if (mutex_lock_interruptible(&buf->lock)) { - result = -ERESTARTSYS; - goto out; - } - -我们在函数一开始就获取锁。**mutex_lock_interruptible()**要么抓取互斥锁然后返回,要么让进程睡眠,直到有可用的互斥锁。就像前面一样,**_interruptible**后缀意味着睡眠可以由信号来中断。 - - while (buf->read_ptr == buf->end) { - mutex_unlock(&buf->lock); - /* ... wait_event_interruptible() here ... */ - if (mutex_lock_interruptible(&buf->lock)) { - result = -ERESTARTSYS; - goto out; - } - } - -下面是我们的“等待数据”循环。当持有互斥锁,或者发生称之为“死锁”的情境时,不应该让进程睡眠。因此,如果没有数据,我们释放互斥锁并调用**wait_event_interruptible()**。当它返回时,我们重新获取互斥锁并像往常一样继续: - - if (copy_to_user(out, buf->read_ptr, size)) { - result = -EFAULT; - goto out_unlock; - } - ... - out_unlock: - mutex_unlock(&buf->lock); - out: - return result; - -最后,当函数结束,或者在互斥锁被占有过程中发生错误时,互斥锁被解锁。重新编译模块(别忘了重新加载),然后再次进行测试。现在你应该没发现毁坏的数据了。 - -### 接下来是什么? ### -现在,你体验了一把内核侵入。我们刚刚为你揭开了今天话题的外衣,里面还有更多东西供你探索。我们的第一个模块是有意识地写得简单一点,在从中学到的概念在更复杂的环境中也一样。并发、方法表、注册回调函数、使进程睡眠以及唤醒进程,这些都是内核黑客们耳熟能详的东西,而现在你已经看过了它们的运作。或许某天,你的内核代码也将被加入到主线Linux源代码树中 —— 如果真这样,请联系我们! - --------------------------------------------------------------------------------- - -via: http://www.linuxvoice.com/be-a-kernel-hacker/ - -译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://www.libusb.org/ -[2]:http://fuse.sf.net/ -[3]:http://www.linuxvoice.com/be-a-kernel-hacker/www.netfilter.org/projects/libnetfilter_queue -[4]:http://lxr.free-electrons.com/ \ No newline at end of file diff --git a/translated/tech/20140607 How To Install iCup 2014 In Linux.md b/translated/tech/20140607 How To Install iCup 2014 In Linux.md deleted file mode 100644 index 1c11d6f7e8..0000000000 --- a/translated/tech/20140607 How To Install iCup 2014 In Linux.md +++ /dev/null @@ -1,33 +0,0 @@ -用iCup在linux追世界杯 -================================================================================ -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/icup2014-790x389.png) - -嗨,Linux 极客们, - -在本文简短的叙述中,我将教你如何在Linux中安装一个非常棒的2014FIFA世界杯APP。这个应用叫iCup,支持Windows,Mac以及伟大的Linux。 - -我看足球比赛已经有很长的时间了,所以我得我的电脑上安装这样的应用来保持更新2014世界杯的最新情况。我不想在我朋友们面前看起来一无所知。iCup应用正好提供了每一场赛程、比分、球队教练组等信息。更有提供实时比赛更新,给你正在进行的比赛的最新数据。 - -### 支持一下功能: ### - -- 30种语言支持,完全本地化(使用语言菜单选择) -- 可以随意调整窗口大小的独家灵活的界面 -- 可按天、阶段检索的比赛日历 -- 可视化分组 -- 支持自动转变比赛时间来适应本地时间和格式 -- 一键化社交网络发表比赛评论(支持Facebook,Google+和Twitter) -- 支持代理(支持基本认证和摘要认证方法) - -我已经在Ubuntu12.04LTS上测试并且运很好!目前为止,我没有经历过任何错误或崩溃。你可以十分轻松地安装这个很棒的应用,通过[官方网站][1]你可以得到压缩包,然后你可以解压到任何你喜欢的地方。解压完成后,双击iCup 2014 FREE- Brazil运行。 - -iCup 对我非常有用,我希你也能享受到。 - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/install-icup-2014-linux/ - -译者:[Vic020](http://www.vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://www.e-link.it/icup/brazil2014/icup-brazil-2014-desktop-app.php \ No newline at end of file diff --git a/translated/tech/20140610 How to set up Internet connection sharing with iptables on Linux.md b/translated/tech/20140610 How to set up Internet connection sharing with iptables on Linux.md deleted file mode 100644 index 3027c6a535..0000000000 --- a/translated/tech/20140610 How to set up Internet connection sharing with iptables on Linux.md +++ /dev/null @@ -1,163 +0,0 @@ -Translating by yujianxuechuan,占坑 -How to set up Internet connection sharing with iptables on Linux -怎样使用linux的iptables工具进行网络共享 -================================================================================ -In this tutorial, I'll explain how to share a single Internet connection among multiple devices on Linux. While consumer-grade WiFi routers have become mainstream nowadays, making this problem a non-issue, suppose you don't have one at home. However, say you have a Linux box already assembled with a modem and a LAN card. The modem is connected to the Internet with a dynamic public IP address, and the LAN card connected to your switch/hub. Other devices (Linux/Windows PC, laptop) are connected to the switch without having any Internet connection. To share the Internet connection of the Linux box, you have to turn the box into a gateway, so that it can relay traffic to and from other devices. -在本教程中,我将解释多个设备怎样在linux下共享一个网络连接。目前无线路由器已经成为主流的消费品,从而解决了本文这一问题,假设你家中并没有一台无线路由器。然而,你却有一台已经有"猫"和局lan网卡的的linux主机。"猫"是以动态公有IP地址的模式连接的互联网,主机的lan网卡连接到你的交换机或者集线器。其他设备(如linux或者windows的PC或者笔记本)以网桥的形式连接并无互联网连接。为了共享linux主机的互联网,你必须把主机摄制成网关,于是它才能实现从其他设备中传送和接受信息。 -### Glossary of Terms ### -术语字汇 -- **Private IP address** (non-routeable address) is an IP address used for a Local Area Network (not visible through Internet). -- **Public IP address** (routeable address) is an IP address that is visible through Internet. -- **IP masquerading** is a function that allows set of machines to reach the Internet via a MASQ gateway. Those machines behind the MASQ gateway is never visible to the Internet. Any outgoing and incoming traffic from and to the machines behind the MASQ gateway must pass through the MASQ gateway. -- **Network Address Translation** (NAT) is a function that can make a private IP address reaches the Internet with the help of IP masquerading. --私有IP地址(不可到达地址)是一个被用于本地局域网的IP地址(在互联网中不可见)。 --公用IP地址(可到达地址)是一个在互联网中可见的IP地址。 -IP伪装是一项允许一系列机器通过MASQ网关连接互联网的功能。这些MASQ网关之外的机器在互联网中是不可见的。MASQ之后的机器中任何流入或流出的数据必须经过MASQ网关。 --网络地址转换(NAT)是一项通过IP伪装技术可以使私有IP地址访问互联网的功能。 -### Hardware Requirements ### -硬件要求 -- One Linux box with two interfaces (one public IP address and the other private IP address), which will be used as a gateway. -- One or more Linux/Windows PC or laptop with private IP addresses. -- Switch/HUB (optional). --一台有两个接口(一个公有IP地址和其他的私有IP地址)的linux主机,这个主机将被用作网关。 --一台或者多台拥有私有IP地址的linux/windows系统的PC或者笔记本。 --交换机/集线器(可选)。 -### Step-by-Step Guide ### -教程步骤 -The following procedure is required on the Linux box (the connection sharing gateway). -接下来的过程需要在linux主机(用于共享的网关)上完成。 -#### 1. Activate IP forwarding #### -1、激活IP转发 -In order to set up Internet connection sharing, you need to enable IP forwarding on the Linux box with a kernel parameter. Startup kernel parameters stored in /etc/sysctl.conf. -为了设置网络共享,你需要在linux主机上更改一个内核参数来使能IP转发功能。内核启动参数设定在/etc/sysctl.conf文件中。 -Open the file, and locate line with the following parameter "# net.ipv4.ip_forward = 0". Remove hash mark (i.e., uncomment it), and set the value to 1. It should look like the following: -打开这个文件,定位到含有"# net.ipv4.ip_forward = 0"的这一行,移除#号(即取消注释),然后将其值设置为1,改好之后应该和下面的一致。 - net.ipv4.ip_forward = 1 - -You may also activate IP forwaring at run time by the following command: -你还要使激活IP转发功能生效,通过执行下面的命令: - $ sudo sysctl -w net.ipv4.ip_forward=1 - $ sudo sysctl -p - -#### 2. NAT configuration #### -2、NAT配置 -Another important part of Internet connection sharing is NAT configuration which can be done using iptables command. iptables maintains four firewall tables: -另一个网络共享的重要部分是NAT配置,这可以通过使用iptables的命令,iptables包含四个防火墙的表格: -- FILTER (the default table) -- NAT -- MANGLE -- RAW -- FILTER (默认表格) -- NAT -- MANGLE -- RAW - -In this tutorial we will use only two tables: FILTER and NAT tables. -这个教程中我们将仅使用两个表格:FILTER和NAT表格。 -First, flush all active firewall rules. -首先,刷新所有活跃的防火墙的规则。 - $ sudo iptables -X - $ sudo iptables -F - $ sudo iptables -t nat -X - $ sudo iptables -t nat -F - -On the INPUT table, you have to set chain FORWARD to ACCEPT target, so all packets passed through the box will be processed correctly. -在输入表格中,你需要设置转发链成可接受的目的地,因此艘游通过主机的数据包将会被正确的处理。 - $ sudo iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT - $ sudo iptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT - -On the NAT table, you have to enable IP masquerading for your WAN interface. We assume that the WAN interface is ppp0. To enable IP masquerading on ppp0 interface, you can use the following command: -在NAT表中,你必须为你的WAN口使能IP伪装,我们假设WAN口协议是ppp0。为了在ppp0接口上使能IP伪造技术,我们使用以下的命令: - $ sudo iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE - -#### 3. Configuring a private IP address #### -3、配置私有IP地址 -After all configuration is completed on the Linux box, you have to configure the DNS server and default gateway of other devices (Linux/Windows PC, laptop), so that they point to the Linux box. Note that you don't need to set up a DNS server on the Linux box. Every DNS request from other devices are automatically forwarded by the Linux box to your upstream ISP. -在linux主机上的所有配置完成后,你需要配置其他设备(linux/windows的PC或笔记本)的DNS服务器以及默认网关,因此他们的数据流可以指向linux主机。注意你不需要在linux主机上设置一个DNS服务器,从其他设备发出的每一个DNS请求都会通过上游的ISP自动转发到linux主机上。 -If you are using Linux on the other devices, you can use the following command to change their default gateway and DNS servers. I assume that you are using 192.168.1.0/24 private IP address segment, and that 192.168.1.1 is the IP address assigned to the Linux box. -如果你的其他设备上用的系统是linux,你可以通过以下命令来更改他们的默认网关和DNS服务器。假设你的网段是192.168.1.0/24的私有IP地址网段,linux主机上绑定的IP地址是192.168.1.1。 - $ sudo ip route del default - $ sudo ip route add default via 192.168.1.1 - $ sudo sh -c "echo 'nameserver 192.168.1.1' > /etc/resolv.conf" - -If you have other Linux devices, you can repeat the command above on other devices. -如果还有其他的linux设备,那么你可以重复以上命令。 -If you have a Windows device, you can change the default gateway and the DNS server via network connection properties on the control panel. -如果你有windows设备,你可以通过控制面板的网络连接属性来更改默认网关和DNS服务器。 -#### 4. The complete script #### -4、完整的脚本 -Here is the complete script which sets up Internet connection sharing on the Linux box. The WAN interface (ppp0) needs to be replaced according to your environment. -这是一个在linux主机上设置网络连接共享的一个完整的脚本。WAN口(ppp0协议)需要根据你具体的网络接口协议来替换。 - $ sudo vi /usr/local/bin/ishare - ----------- - -In this tutorial we will use only two tables: FILTER and NAT tables. - -First, flush all active firewall rules. - - $ sudo iptables -X - $ sudo iptables -F - $ sudo iptables -t nat -X - $ sudo iptables -t nat -F - -On the INPUT table, you have to set chain FORWARD to ACCEPT target, so all packets passed through the box will be processed correctly. - - $ sudo iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT - $ sudo iptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT - -On the NAT table, you have to enable IP masquerading for your WAN interface. We assume that the WAN interface is ppp0. To enable IP masquerading on ppp0 interface, you can use the following command: - - $ sudo iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE - -#### 3. Configuring a private IP address #### - -After all configuration is completed on the Linux box, you have to configure the DNS server and default gateway of other devices (Linux/Windows PC, laptop), so that they point to the Linux box. Note that you don't need to set up a DNS server on the Linux box. Every DNS request from other devices are automatically forwarded by the Linux box to your upstream ISP. - -If you are using Linux on the other devices, you can use the following command to change their default gateway and DNS servers. I assume that you are using 192.168.1.0/24 private IP address segment, and that 192.168.1.1 is the IP address assigned to the Linux box. - - $ sudo ip route del default - $ sudo ip route add default via 192.168.1.1 - $ sudo sh -c "echo 'nameserver 192.168.1.1' > /etc/resolv.conf" - -If you have other Linux devices, you can repeat the command above on other devices. - -If you have a Windows device, you can change the default gateway and the DNS server via network connection properties on the control panel. - -#### 4. The complete script #### - -Here is the complete script which sets up Internet connection sharing on the Linux box. The WAN interface (ppp0) needs to be replaced according to your environment. - - $ sudo vi /usr/local/bin/ishare - ----------- - - #!/bin/bash - - ## Internet connection shating script - - sysctl -w net.ipv4.ip_forward=1 - sysctl -p - iptables -X - iptables -F - iptables -t nat -X - iptables -t nat -F - iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT - iptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT - iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE - -Save the above script to /usr/local/bin/ishare, and then change the executable bit by the following command. -保存以上的脚本到/usr/local/bin/ishare,然后添加可执行权限通过执行下面的命令。 - $ sudo chmox +x /usr/local/bin/ishare - -If you want the script executed every startup, you can register the script to /etc/rc.local. Open /etc/rc.local, before statement "exit 0", add the following line: -如果你需要这个脚本开机启动,你需要在/etc/rc.local文件中注册这个脚本,在文件中的"exit 0"之前添加下面一行。 - /usr/local/bin/ishare - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/2014/06/internet-connection-sharing-iptables-linux.html - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20140616 How to Rescue a Non-booting GRUB 2 on Linux.md b/translated/tech/20140616 How to Rescue a Non-booting GRUB 2 on Linux.md new file mode 100644 index 0000000000..0146576f04 --- /dev/null +++ b/translated/tech/20140616 How to Rescue a Non-booting GRUB 2 on Linux.md @@ -0,0 +1,128 @@ +如何拯救一台没有成功通过Grub启动的Linux电脑 +================================================================================ +![Figure 1: GRUB 2 menu with cool Apollo 17 background.](http://www.linux.com/images/stories/41373/grub-command-shell.jpg) +Figure 1: GRUB 2 menu with cool Apollo 17 background. + +自从我们拥有GRUB以来,Linux Bootloader 0.97就开始了传奇的一生。尽管传统的GRUB有很多的有点,但是他开始陈旧了,并且他的开发者也开始添加更多的功能,于是,Grub2.0时代就要来了。 + +GRUB 2 做了几个明显的改进。它可以从移动存储设备上启动,并且可以有进入BIOS配置的选项。尽管它有着更复杂的脚本配置,但是一个简单的`/boot/grub/menu.lst`文件却一个地方集中了所有配置选项,默认的是存放在`/boot/grub/grub.cfg `。你不能直接编辑,这不是人做的事,太复杂,我们需要用简单的脚本实现。我们卑微的人类可以编辑`/etc/default/grub`文件来修改,它主要是控制Grub菜单。我们还可以修改` /etc/grub.d/ `。这些脚本可以启动操作系统,控制外部应用程序,如memtest 和 os_prober,还有theming `./boot/grub/grub.cfg`是建立在`/etc/default/grub`和`/etc/grub.d/*`的基础上的。当你修改了一个地方,你必须要运行更新GRUB的命令。 + +好消息是,update-grub脚本是可以可靠的检测内核,启动文件,并添加所有的操作系统的,自动生成你的启动菜单,所以你不必手动的修改他们。 + +我们还要学习如何解决两个常见的故障。当启动系统时,它会停在GRUB >提示上,这是完整的GRUB 2命令界面,所以不要惊慌。这意味着GRUB 2依旧可以正常启动和加载normal.mod模块(和其他模块分别位于/boot/grub/[arch]/),但没有找到你的grub.cfg文件。如果你看到grub rescue> 这意味着它无法找到normal.mod,因此它有可能找不到你的启动文件。 + +这是如何发生的?因为内核可能改变驱动器分配或您移动您的硬盘驱动器,或者你手动改变一些分区,或安装一个新的操作系统或者移动一些文件。在这些情况下你的启动文件仍然存在,但GRUB不能找到他们。所以你可以看看在GRUB提示符中启动文件,设置它们的位置,然后启动您的系统和修复您的grub配置。 + +### GRUB 2 命令行 ### + +GRUB 2 命令是一个伟大的财富。你不仅可以用它来发现引导镜像,内核,和根文件系统。事实上,它给你完全访问本地计算机上的所有文件的系统权限。其中有些人可能会认为一个安全漏洞,但是你知道古老的UNIX的名言:有物理访问机器权限的人,就是拥有它的人。 + +当你在` GRUB > `提示时,你有许多类似的功能,如命令如历史和tab补全。但是`grub rescue> `模式是有限的,没有历史,没有tab补全。 + +如果你是在一个正常运作的系统上练习,那就当GRUB菜单打开GRUB命令行时,按C。你可以通过向上和向下滚动你的菜单条目箭头键停止启动倒计时。它是安全的,在此GRUB命令行下,你不会进行永久的修改,一切都是暂时的。如果你已经看到`grub > `或`grub rescue> `提示符,那就说明你的表现时刻到了。 + +接下来的几个命令可以在`grub>`和`grub rescue`模式下运行。同时,你应该第一个运行的命令如下: + + grub> set pager=1 + +等号两侧必须不能出现空格。现在让我们做一点探讨。ls列出的所有分区: + + grub> ls + (hd0) (hd0,msdos2) (hd0,msdos1) + +MSDOS是什么?这意味着该系统具有老式的MS-DOS分区表,而不是全新的全局唯一标识符的分区表(GPT)。(见[Using the New GUID Partition Table in Linux (Goodbye Ancient MBR)][1]。如果你正在运行的GPT,它会出现(hd0,GPT1)。使用ls命令查看你的系统文件是什么: + + grub> ls (hd0,1)/ + lost+found/ bin/ boot/ cdrom/ dev/ etc/ home/ lib/ + lib64/ media/ mnt/ opt/ proc/ root/ run/ sbin/ + srv/ sys/ tmp/ usr/ var/ vmlinuz vmlinuz.old + initrd.img initrd.img.old + +好的,我们已经找到了根文件系统。你可以省略MSDOS和GPT的标签。如果你无视打印的分区信息。你可以用cat命令读取文件系统上的文件: + + grub> cat (hd0,1)/etc/issue + Ubuntu 14.04 LTS \n \l + +从/etc/issue文件中,可以看到你的不同的Linux系统 + +### 从 grub> 中启动### + +这是如何设置启动文件和启动从`GRUB>`提示中进入系统。我们知道,从运行ls命令有一个Linux根文件系统(hd0,1),你可以继续寻找直到你找到你的/boot/grub所在位置。然后运行这些命令,使用您自己的根分区,内核和initrd映像: + + grub> set root=(hd0,1) + grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1 + grub> initrd /boot/initrd.img-3.13.0-29-generic + grub> boot + +第一行设置分区的根文件系统是。第二行告诉grub您想要使用的内核位置。开始输入/boot/vmli,然后使用tab完成填写。输入`root= /dev/sdX`设置根文件系统位置。是的,这似乎是多余的,但如果你忘记了输入你会得到一个kernel panic。你知道怎么正确的分区?hd0,1 = /dev/sda1。hd1,1 = /dev/sdb1。hd3,2 = /开发/ sdd2。我想你可以推出自己的。 + +第三行设置initrd文件,必须是和内核相同的版本号。 + +最后一行启动系统。 + +在一些Linux系统上,内核和initrds是被符号链接到当前的根文件系统的根目录,就像: + + $ ls -l / + vmlinuz -> boot/vmlinuz-3.13.0-29-generic + initrd.img -> boot/initrd.img-3.13.0-29-generic + +所以,你也可以这样输入命令: + + grub> set root=(hd0,1) + grub> linux /vmlinuz root=/dev/sda1 + grub> initrd /initrd.img + grub> boot + +### 从grub-rescue> 中启动 ### + +你必须要加载两个模块normal.mod 和 linux.mod,如果你的GRUB命令不同于大众。 + + grub rescue> set prefix=(hd0,1)/boot/grub + grub rescue> set root=(hd0,1) + grub rescue> insmod normal + grub rescue> normal + grub rescue> insmod linux + grub rescue> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1 + grub rescue> initrd /boot/initrd.img-3.13.0-29-generic + grub rescue> boot + +tab补全应该在你加载了这几个模块之后开始工作。 + +### 永久性的修复 ### + +当你成功地启动你的系统,运行这些命令来永久修复GRUB: + + # update-grub + Generating grub configuration file ... + Found background: /usr/share/images/grub/Apollo_17_The_Last_Moon_Shot_Edit1.tga + Found background image: /usr/share/images/grub/Apollo_17_The_Last_Moon_Shot_Edit1.tga + Found linux image: /boot/vmlinuz-3.13.0-29-generic + Found initrd image: /boot/initrd.img-3.13.0-29-generic + Found linux image: /boot/vmlinuz-3.13.0-27-generic + Found initrd image: /boot/initrd.img-3.13.0-27-generic + Found linux image: /boot/vmlinuz-3.13.0-24-generic + Found initrd image: /boot/initrd.img-3.13.0-24-generic + Found memtest86+ image: /boot/memtest86+.elf + Found memtest86+ image: /boot/memtest86+.bin + done + # grub-install /dev/sda + Installing for i386-pc platform. + Installation finished. No error reported. + +当你运行 `grub-install` 时,记得grub是安装到硬盘驱动器的引导扇区而不是到一个具体分区,所以不要加上像/dev/sda1的分区号。 + +### 如果还是不能使用 ### + +如果你的系统是如此的倒霉,而且这个方式没有能起作用,那就尝试[超级GRUB2现场救援磁盘][2]。[官方GNU GRUB手册][3]也应该是有帮助的。 + +-------------------------------------------------------------------------------- + +via: http://www.linux.com/learn/tutorials/776643-how-to-rescue-a-non-booting-grub-2-on-linux + +译者:[MikeCoder](https://github.com/MikeCoder) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.linux.com/learn/tutorials/730440-using-the-new-guid-partition-table-in-linux-good-bye-ancient-mbr- +[2]:http://www.supergrubdisk.org/ +[3]:https://www.gnu.org/software/grub/manual/grub.html diff --git a/translated/tech/20140616 How to diskless boot a Linux machine.md b/translated/tech/20140616 How to diskless boot a Linux machine.md new file mode 100644 index 0000000000..71a936803a --- /dev/null +++ b/translated/tech/20140616 How to diskless boot a Linux machine.md @@ -0,0 +1,151 @@ +如何无盘启动Linux +================================================================================ +无盘启动意味着一台客户端电脑在启动操作系统时没有任何的磁盘存储介质。在这种情形之下,电脑能够通过网络从远程NFS服务器上加载内核和根文件系统。在这过程中可能会用到数种不同的方法来从NFS服务器上加载内核和根文件系统:RARP,BOOTP或是DHCP协议。在这个指导教程中,我会使用BOOTP/DHCP协议,因为它们能够被大多数的网卡所支持。 + +### 无盘计算机的优势 ### + +想象一下你的办公室内有30台电脑,每一台都需要使用相同的应用程序。如果你作为管理这些电脑的管理员,你会怎么做?如果你在每一台电脑上安装应用程序,那只是在浪费你的时间。另一方面来说,一套无盘系统就能解决你的问题。有了一套无盘系统,你只需在中央NFS服务器上安装需要的程序,然后通过网络启动这30台客户机即可。 + +### 需要什么 ### + +两台或更多的装备有支持DHCP协议的网卡的Linux电脑。这些将扮演NFS服务器角色的电脑应当配有硬盘,其它客户机不需要任何的硬盘。服务器和客户机需要连接到同一个本地网络之内。 + +设置一个无盘系统共需要五步。 + +1. 安装所需的包 +1. 配置TFTP服务器 +1. 配置DHCP服务器 +1. 配置NFS服务器 +1. 启动无盘客户机 + +在这个指导教程中,我假设作为启动服务器的电脑运行着Ubuntu。如何你正在使用其它的Linux发行版,原理是一样的。 + +### 第一步:安装所需的包 ### + +像下面这样使用apt-get命令来安装所有需要的包。 + + $ sudo apt-get install dhcp3-server tftpd-hpa syslinux nfs-kernel-server initramfs-tools + +### 第二步:配置TFTP服务器 ### + +TFTP服务器是一个小型FTP服务器,需要用它来在本地网络中的客户机和服务器之间自动传输启动文件。 + +向/etc/default/tftpd-hpa中添加以下行: + + RUN_DAEMON="yes" + OPTIONS="-l -s /var/lib/tftpboot/" + +接着,创建一个启动文件夹。 + + $ sudo mkdir -p /var/lib/tftpboot/pxelinux.cfg + +复制引导程序镜像。 + + $ sudo cp /usr/lib/syslinux/pxelinux.0 /var/lib/tftpboot + +像下面这样创建一个默认启动配置文件。 + + $ sudo vi /tftpboot/pxelinux.cfg/default + +---------- + + LABEL Ubuntu + KERNEL vmlinuz + APPEND root=/dev/nfs initrd=initrd.img nfsroot=10.10.101.1:/nfsroot ip=dhcp rw + +注意: + +- "root=/dev/nfs"表示服务器上的网络文件系统(不需要修改)。 +- "initrd=initrd.img"是一个用于系统启动的启动脚本。 +- "nfsroot=10.10.101.1/nfsroot"指明了服务器的IP地址以及NFS共享文件夹的名称。用你的服务器地址来替换掉IP地址。 +- "ip=dhcp"表示客户端电脑使用DHCP寻址方案。 +- "rw"表示NFS共享是可读/可写的。 + +最后,重启TFTPD服务。 + + sudo /etc/init.d/tftpd-hpa restart + +### 第三步:配置DHCP服务 ### + +你还需要在NFS服务器上配置DHCP服务来允许使用/var/lib/tftpboot/pxelinux.0启动。假设你在使用10.10.101.0作为子网,你的配置可能看起来像下面这样子。 + + $ sudo vi /etc/dhcp3/dhcpd.conf + +---------- + + allow booting; + allow bootp; + + subnet 10.10.101.0 netmask 255.255.255.0 { + range 10.10.101.2 10.10.101.254; + option broadcast-address 10.10.101.255; + option routers 10.10.101.1; + filename "/pxelinux.0"; + } + +然后重启DHCP服务。 + + $ sudo service isc-dhcp-server restart + +### 第四步:配置NFS服务器 ### + +创建一个保存客户机根文件系统目录的文件夹。 + + $ sudo mkdir /nfsroot + +接着,设置NFS服务器导出客户机根文件系统。向/etc/exports添加以下行来实现。 + + /nfsroot *(rw,no_root_squash,async,insecure,no_subtree_check) + +运行下列命令来重新载入修改过的/etc/exports。 + + $ sudo exportfs -rv + +默认情况下,Ubuntu在initrd镜像中不提供网络启动支持。因此你需要创建一个新的initrd.img文件。首先添加下列行到/etc/initramfs-tools/initramfs.conf中。 + + BOOT=nfs + MODULES=netboot + +然后运行下列命令来创建一个新的initrd.img。 + + $ sudo mkinitramfs -o /var/lib/tftpboot/initrd.img + +将新的内核镜像文件复制到/var/lib/tftpboot中。 + + $ sudo cp /boot/vmlinuz-`uname -r` /var/lib/tfftpboot/vmlinuz + +是时候将整个根文件系统拷贝到/nfsroot中了。 + +假设您使用的是一个全新的Ubuntu服务器安装,你只需将文件系统拷贝到NFS的根之中。 + + $ sudo cp -ax / /nfsroot + +然后打开用文本编辑器打开/nfsroot/etc/fstab并添加以下行。 + + /dev/nfs / nfs defaults 1 1 + +文件夹/var/lib/tftpboot应拥有全局读写权限。否则客户机无法从网络启动。 + + $ sudo chmod -R 777 /var/lib/tfftpboot + +最后,为了避免任何服务器设置出现错误,我推荐对运行DHCP服务的网卡使用静态IP。举个例子,如果网卡名为eth0,你的/etc/network/interfaces中的配置应该看起来像这样: + + iface eth0 inet static + address 10.10.101.1 + netmask 255.255.255.0 + broadcast 10.10.101.255 + network 10.10.101.0 + +### 第五步:启动无盘客户机 ### + +在你完成了服务器上的配置之后,从网络启动你的客户机。要从网络启动一般你只需修改BIOS设置中的启动优先顺序即可。 + +如果客户机启动成功,你的无盘环境就配置好了。你无需修改任何东西就可以任意添加一台或多台客户端电脑。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/2014/06/diskless-boot-linux-machine.html + +译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20140616 Linux Screenshot App Shutter Updates with Bug Fixes, New Icon.md b/translated/tech/20140616 Linux Screenshot App Shutter Updates with Bug Fixes, New Icon.md new file mode 100644 index 0000000000..5f50c474b1 --- /dev/null +++ b/translated/tech/20140616 Linux Screenshot App Shutter Updates with Bug Fixes, New Icon.md @@ -0,0 +1,37 @@ +Linux截屏软件Shutter获得更新,修复bug,更换新图标 +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/06/shutter.jpg) + +**[Shutter][1],是一款Linux平台下最受欢迎的截屏软件。最近的更新中,该软件修复了若干bug,并且使用了新的应用图标。** + +这款开源并且功能强大的截屏工具可以让你选择桌面的任意区域、指定应用窗口或者整个屏幕区域来进行截屏。此外,你还可以添加注释、文本或者特效。 + +0.91版本修复了若干之前遗留的bug,包括在Ubuntu 14.04中缩略图无法正常地在应用切换栏中显示的问题。由于'imm.io'在今年早些停止服务,所以此次更新还取消了将截图上传到Pixlr图像服务的选项。 + +最后,这次更新突出了由Lucas Romero Di Benedetto精心设计的百叶窗相机式的应用图标。 + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/06/compare-350x200.png) + +### 在Ubuntu环境下安装Shutter 0.91版本 ### + +升级到Shutter的最新版本是非常简单的——前提是你添加了该软件的PPA。[The Shutter PPA][2] 面向Ubuntu 12.04 LTS、13.10、14.04 LTS提供该软件最新稳定的发行版。 + + sudo add-apt-repository ppa:shutter/ppa + + sudo apt-get update && sudo apt-get install shutter + +不喜欢PPA?那么你也可以从该项目的主页下载Debian安装包。如果你使用的是Ubuntu 14.04 LTS系统,你可以点击下面的链接来下载安装包。 + +- [下载适用于Ubuntu 14.04 LTS系统的Shutter 0.91][3] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/06/shutter-0-91-new-icon + +译者:[JonathanKang](https://github.com/JonathanKang) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://apps.ubuntu.com/cat/applications/shutter/ +[2]:https://launchpad.net/~shutter/+archive/ppa +[3]:https://launchpad.net/~shutter/+archive/ppa/+files/shutter_0.91%7Eppa2%7Eubuntu14.04.1_all.deb diff --git a/translated/tech/20140616 Managing Vim extensions with NeoBundle.md b/translated/tech/20140616 Managing Vim extensions with NeoBundle.md new file mode 100644 index 0000000000..991a62e597 --- /dev/null +++ b/translated/tech/20140616 Managing Vim extensions with NeoBundle.md @@ -0,0 +1,86 @@ +教你用NeoBundle管理Vim插件 +================================================================================ +[NeoBundle][1] 是一个 [Vim][2] 的插件管理器,以 [Vundle][3] 为基础(Vundle 是一个基于 [Pathogen][4] 的 Vim 插件管理器)。在之前的文章中,我[非常不推荐使用 Neobundle][5],原因是它当时还处于高速开发阶段(LCTT:意味着不稳定、变数大),并且当时它的英文文档很少。现在,已经过了一年多了,这两个问题都早已不再是问题。 + +我们为什么要使用插件管理器?Vim 支持大量插件,但是由于它没有严格定义框架,插件的文件可以胡乱分布在不同目录下,导致用户管理起来会很困难(LCTT:当然,前提是你有很多插件,还有点小小的强迫症,觉得理一理这些插件心里会舒服点)。而一款插件管理器能让管理变得简单许多。Pathogen, Vundle 和 NeoBundle 的工作就是为不同插件建立一个目录,然后将这些目录扔到 ~/.vim/bundle 目录下。这个文件整理方法可以让你方便彻底地删除插件,使用 'rm -rf <插件目录>' 或直接 'Ctrl + Del' 组合键把插件所在的目录删除就可以了,绝对绿色环保无残留。同时,这种方法还能最大程度避免插件与插件之间的不兼容性。 + +NeoBundle 是一个基于 Vundle 的项目,如同 Vundle,它们都可以安装和升级插件。然而 NeoBundle 的说明文件上明确指出:“NeoBundle 不是一个稳定的插件管理器,如果你想要一个稳定的,请选择 Vundle”。最新的 release-note 上也有警“可能会造成兼容性问题”——这是一个开发者写的注解,说明这个管理器还不能让人放心使用。 + +所以,我们为什么要使用 NeoBundle?它都不能保证稳定运行!好吧,它还是有可取之处的。Vundle 只支持 [Git][6] 这种版本控制系统,而 NeoBundle 可以支持 [Subversion][7] 和 [Mercurial][8]。另一个原因是如果你不想插件升级时破坏你的 Vim 生态环境,你可以锁住 NeoBundle,让它只使用某个插件的固定版本。 + +另外,NeoBundle 创建者,Shougo Matsuishita(LCTT:名字看着像日本人),正在将它的命令接口添加到其他插件项目,以便减少他们的命令使用量。现在 NeoBundle 支持3种插件:[unite.vim][9],Vim 使用的文件和缓存管理器;[vimshell.vim][10],Vim 使用的脚本程序;[vimproc.vim][11],运行于 vimshell.vim 中,用于对异步事件的支持。上面说的都是特殊案例,缺少英文文档,所以用户希望有人能完善它们。在正式使用它们之前,我们需要把注意力先集中在一些基本操作上。 + +### 安装并初始化 NeoBundle ### + +NeoBundle 依赖 Vim 7.2.051 或更高版本,依赖 git,依赖 [cURL][12](用于下载文件)。你可以手动下载 NeoBundle,也可以使用 cURL 下载它在 GitHub 上的库。在你的 home 目录下使用如下命令,可以将 NeoBundle 插件下载到 .vim/bundle/neobundle.vim 目录里,然后 NeoBundle 就能管理它自己了。 + + curl https://raw.githubusercontent.com/Shougo/neobundle.vim/master/bin/install.sh | sh + +你还需要修改 .vimrc 文件。NeoBundle 的 GitHub 主页提供一个 .vimrc 范本,使用这个范本后,NeoBundle 会为你下载5个插件。如果不需要它们,你可以使用下面的最小配置: + + if has('vim_starting') + set nocompatible + set runtimepath+=~/.vim/bundle/neobundle.vim/ + call neobundle#begin(expand('~/.vim/bundle/')) + NeoBundleFetch 'Shougo/neobundle.vim' + call neobundle#end() + filetype plugin indent on + +上述配置的作用是:启动 NeoBundle 并且像其他插件一样升级自己。NeoBundle 默认从 GitHub 下载并升级,如果你正好在使用 GitHub,你只需要为这个插件指定维护者的用户名和路径。在上面的配置中,NeoBundleFetch 只需要指定为“Shougo/neobundle.vim”,而不是完整的 GitHub 路径。如果你想使用其他网站,比如是 Subversion 或 Mecurial 的网站,你就需要添加完整的 URL。 + +如果你想安装其他插件,你可以使用下面的命令: + + curl -k https://github.com/[项目维护者]/[插件路径] > ~/.vim/bundle/[插件路径] + +举个例子:你想安装 [vim-abolish][13],一个超级 NB 的文本搜索和替换插件,就使用下面的命令: + + curl -k https://github.com/tpope/vim-abolish > ~/.vim/bundle/abolish + +如果要让它自动升级,在 NeoBundleFetch 那行下面添加一行: + + NeoBundle 'tpope/vim-abolish' + +再介绍一个小技巧:你可以为插件指定一个分支或版本号。什么意思?NeoBundle 只会关注这个插件的某个分支或版本的更新,而忽略其他更新。如果你使用的某个插件处于高速开发过程,你就可以使用这个技巧,避免用到有 bug 的插件版本。举个例子: + + NeoBundle 'Shougo/vimshell', { 'rev' : '3787e5' } + +还有一个技巧:在 .vimtc 文件内添加一行关于“NeoBundleCheck”的属性。NeoBundle 会检查被卸载的插件,并提示你安装它们。你也可以使用命令“:NeoBundleInstall”(LCTT:这是要在 Vim 编辑器的命令模式下输入)来安装或升级插件。 + +### NeoBundle 用法 ### + +很多 NeoBundle 命令用起来和 Vundle 类似,但命令的名字不一样。下面是 NeoBundle 命令的用法: + +- `:NeoBundleUpdate`:安装或升级插件,如果你手动把一个插件的目录删除了,这个命令会重新安装这个插件。在这个命令后面加上插件名称,就只升级一个插件;不加参数,会将所有己安装但没被记录在案的插件给记录下来。“:NeoBundleInstall”命令效果相同。 +- `:NeoBundle {REPOSITORY URI} [[REVISION}] [,OPTIONS}]]`:将一个插件锁定到固定版本,防止胡乱升级。 +- `:NeoBundleList`:列出所有未初始化的插件。 +- `:NeoBundleClean`:进入交互界面,删除插件。 + +这些命令在配合 unite.vim (LCTT:就是上面举过的32个例子之一)使用时,效果会稍微有些出入。你可以使用“:help neobundle”命令了解更多信息。 + +### 是否使用 NeoBundle,自己决定 ### + +NeoBundle 是强大的工具,正处于高速开发状态。任何处于这种状态的项目,都会被帖上“有前途”和“不稳定”两个标签,看你自己怎么选。如果你想要最新的稳定版本的插件,NeoBundle 可以让 Vundle 和 Pathogen 永远保持在老界面。 + +然而在线帮助文档已经给出警告,它不是个稳定的产品,不及时更新版本可能造成一些插件运行出错。最后,你需要在 .vimrc 文件为你的 Neoundle 和其他插件指定一个稳定的版本。记住这警告,然后你可以在使用这些尖端技术产品时游刃有余。 + +-------------------------------------------------------------------------------- + +via: http://www.openlogic.com/wazi/bid/348084/Managing-Vim-extensions-with-NeoBundle + +译者:[bazz2](https://github.com/bazz2) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://github.com/Shougo/neobundle.vim +[2]:http://olex.openlogic.com/packages/vim +[3]:https://github.com/gmarik/Vundle.vim +[4]:https://github.com/tpope/vim-pathogen +[5]:http://www.openlogic.com/wazi/bid/262302/Three-tools-for-managing-Vim-plugins +[6]:http://olex.openlogic.com/packages/git +[7]:http://olex.openlogic.com/packages/subversion +[8]:http://olex.openlogic.com/packages/mercurial +[9]:https://github.com/Shougo/unite.vim +[10]:https://github.com/Shougo/vimshell.vim/blob/master/doc/vimshell.txt +[11]:https://github.com/Shougo/vimproc.vim/blob/master/doc/vimproc.txt +[12]:http://olex.openlogic.com/packages/curl +[13]:https://github.com/tpope/vim-abolish diff --git a/translated/tech/20140617 9 Good Ways To Protect Your Linux System.md b/translated/tech/20140617 9 Good Ways To Protect Your Linux System.md deleted file mode 100644 index 9899e99412..0000000000 --- a/translated/tech/20140617 9 Good Ways To Protect Your Linux System.md +++ /dev/null @@ -1,51 +0,0 @@ -保护你的Linux系统的9种好方法 -================================================================================ -在现在这个世道中,保障基于Linux的系统的安全是十分重要的。但是,你得知道怎么干。一个简单反恶意程序软件这是远远不够的,你需要采取其它措施来协同工作。那么试试下面这些手段吧。 - -![](http://www.efytimes.com/admin/useradmin/photo/2Rak10143PM6172014.jpeg) - -### 1. 使用SELinux ### - -[SELinux][1]是用来对Linux进行安全加固的,有了它,用户和管理们就可以对访问控制进行更多控制。SELinux为访问控制添加了更细的颗粒度控制。与仅可以指定谁可以读、写或执行一个文件的权限不同的是,SELinux可以让你指定谁可以解链接,仅追加,移动一个文件之类。 - -### 2. 订阅漏洞警报服务 ### - -你的操作系统可能不一定受伤害的那一台。事实上,漏洞多见于安装的应用程序之中。为了避免这个问题的发生,你必须保持你的应用程序更新到最新版本。此外,订阅漏洞警报服务,如[SecurityFocus][2]。 - -### 3. 禁用不用的服务和应用 ### - -通常来讲,用户大多数时候都用不到他们系统上的服务和应用的一半。然而,这些服务和应用还是会运行,这会招来攻击者。因而,最好是把这些不用的服务停掉。 - -### 4. 检查系统日志 ### - -你的系统日志告诉你在系统上发生了什么活动,包括攻击者是否成功进入或试着访问系统。时刻保持警惕,是你第一条防线,而经常性地监控系统日志就是为了守好这道防线。 - -### 5. 考虑使用端口敲门 ### - -设置端口敲门是建立服务器安全连接的好方法。而基本上会发生的问题是,别有用心的人会发送一个特别的包给服务器,这个包会开启来自服务器的回应/连接。端口敲门对于那些有开放端口的系统上是一个很好的防护措施。 - -### 6. 使用Iptables ### - -Iptables是什么?这是一个应用程序框架,它允许用户自己为系统写一个强大的防火墙。因此,要做得好,就要学习怎样一个好的防火墙以及怎样使用Iptables框架。 - -### 7. 默认拒绝所有 ### - -防火墙允许两个宗旨:一个是允许每一点通信,另一个是拒绝所有访问,提示你是否许可。第二个选项是两者中更好的一个。你应该只允许那些重要的通信进入。 - -### 8. 使用入侵检测系统 ### - -入侵检测系统,或者叫IDS,允许你更好地管理系统上的通信和受到的攻击。[Snort][3] - -加密的数据更难窃取,有时候根本不可能被窃取,这就是你应该对整个驱动器加密的原因。采用这种方式后,如果有某个人进入到你的系统,那么他看到这些加密的数据后,就有得头痛了。根据一些报告,大多数数据丢失源于机器被盗。 - --------------------------------------------------------------------------------- - -via: http://www.efytimes.com/e1/fullnews.asp?edid=141368 - -译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://selinuxproject.org/page/Main_Page -[2]:http://www.securityfocus.com/rss/vulnerabilities.xml -[3]:http://www.snort.org/ diff --git a/translated/tech/20140617 Make Ubuntu 14.04 Look Like Mac With Zukimac Theme.md b/translated/tech/20140617 Make Ubuntu 14.04 Look Like Mac With Zukimac Theme.md new file mode 100644 index 0000000000..9e3765b52e --- /dev/null +++ b/translated/tech/20140617 Make Ubuntu 14.04 Look Like Mac With Zukimac Theme.md @@ -0,0 +1,51 @@ +Zukimac 主题使 Ubuntu 14.04 桌面变成 Mac 桌面 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/06/Make_Ubuntu_Look_Like_Mac_OS.jpeg) + +虽然 Ubuntu Unity 本身已经是一款很漂亮的桌面了,但世界各地还是有很人被 Mac OS X 的外观所震撼。如果您恰好是其中之一,为了获得 OS X 的主题,是不需要换掉 Ubuntu 的,相反,您可以对它来个美化改造,**使 Ubuntu 14.04 看起来就像 Mac OS X**。 + +### 让 Ubuntu 14.04 看起来像 Mac OS X ### + +要使 Ubuntu 美化成 Mac 的样子,我们得使用 Zukimac 主题。 + +- 从后面的链接获得 Zukimac 主题包:[下载 Zukimac Theme for Ubuntu 14.04][1] +- 解压下载的 Zip 包,解压后会出现 Zukimac 和 Zukimac-ml 两个目录文件。把这些目录拷贝到您的 home 目录下的 .themes 文件夹中。进入 Home 目录中,按下快捷键 Ctrl+H 可以显示所有隐藏的文件,如果没有 .themes 文件夹,需要创建一个。 +- 使用 [Unity Tweak Tool 来改变主题][2]. + +就这些操作。Zukimac 提供了一些基本的 Mac OS 系统的外观和视窗感觉。下面是带有默认的 OS X MaVeric 壁纸的外观。 + +![Make Ubuntu 14.04 look like Mac OS X](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/06/Ubuntu_MAC_OS_Looks.jpeg) + +### Ubuntu 14.04 中获得 Mac 感觉更多的调整### + +通常,您可以**安装像 Plank 或 Docky 这样的 dock 启动面板**。在 Ubuntu 14.04 中要安装 Plank 可以使用下面的命令: + + sudo add-apt-repository ppa:ricotz/docky + sudo apt-get update + sudo apt-get install plank + +安装完 dock 启动面板后,您也可以安装 **Synapse indicator 来代替模拟 Mac 中的 Spotlight**。使用来自于 Noobslabs 的 PPA 源来安装 Synapse indicator,如下示: + + sudo add-apt-repository ppa:noobslab/apps + sudo apt-get update + sudo apt-get install indicator-synapse + +不想安装上面的两软件的话,您也可以安装 **Slingscold launcher,用来代替模拟 Mac OS X 的启动面板**。在 Ubuntu 14.04 中,使用上面提到的 Noobslabs 的 PPA 源来安装 Slingscold 启动面板,如下示: + + sudo add-apt-repository ppa:noobslab/apps + sudo apt-get update + sudo apt-get install slingscold + +老实说,我是个狂热的 Ubuntu 迷,我喜欢 Ubuntu 默认的 Unity 主题样式外观。此外,还有很多[关于 Ubuntu 14.04 的漂亮图标主题样式][3] 可用来美化默认的外观。但正如我上面提到的仍有很多用户喜欢 Mac OS X 的主题样式,我希望这篇文章能帮助到他们,使其能把 Ubuntu 14.4 装扮成 Mac OS X 的样式。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/ubuntu-1404-mac-zukimac-theme/ + +译者:[runningwater](https://github.com/runningwater) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://gnome-look.org/content/show.php/Zukimac?content=165450 +[2]:http://itsfoss.com/how-to-install-themes-in-ubuntu-13-10/ +[3]:http://itsfoss.com/best-icon-themes-ubuntu-1404/ \ No newline at end of file diff --git a/sources/tech/20140620 11 Advance MySQL Database 'Interview Questions and Answers' for Linux Users.md b/translated/tech/20140620 11 Advance MySQL Database 'Interview Questions and Answers' for Linux Users.md similarity index 53% rename from sources/tech/20140620 11 Advance MySQL Database 'Interview Questions and Answers' for Linux Users.md rename to translated/tech/20140620 11 Advance MySQL Database 'Interview Questions and Answers' for Linux Users.md index 9cfdd6f10e..9b95a5e4b2 100644 --- a/sources/tech/20140620 11 Advance MySQL Database 'Interview Questions and Answers' for Linux Users.md +++ b/translated/tech/20140620 11 Advance MySQL Database 'Interview Questions and Answers' for Linux Users.md @@ -1,18 +1,15 @@ -11 Advance MySQL Database “Interview Questions and Answers” for Linux Users +给linux用户的11个高级MySQL数据库面试问题和答案 ================================================================================ -We have already published two MySQL articles, well appreciated by Tecmint Community. This is the third article on MySQL Interview series and sixteen in the the Interview Genre Column. +我们已经发表了两篇MySQL的文章,非常感谢Tecmint社区的大力支持.这是MySQL面试系列的第三篇文章,并且在面试专栏中排第16. +- [15个基本的MySQL面试问题][1] +- [给中级人员的10个MySQL面试问题][1] -- [15 Basic MySQL Interview Questions][1] -- [10 MySQL Database Interview Questions for Intermediates][1] -注:上面这两篇文章我们都翻译过,可以适当修改成我们的链接 +![11个MySQL面试问题](http://www.tecmint.com/wp-content/uploads/2014/06/MySQL-Interview-Questions.jpeg) -![11 MySQL Interview Questions](http://www.tecmint.com/wp-content/uploads/2014/06/MySQL-Interview-Questions.jpeg) +感谢你们这一路上对我们的支持.这篇文章主要针对MySQL的实用性,讲面试方面的问题. -We have reached here all because of yours support and we seek the same in future form your end. Here in this article we will be concentrating on the practical aspect of MySQL, the question relevant for Interview aspect. - -### 1. Using SELECT statement find the version of the server you are running and print the name of the current database? ### - -**Ans**: The below MySQL command will show server version and currently selected Database. +### 1. 如何使用SELECT语句找到你正在运行的服务器的版本并打印出当前数据库的名称? ### +**Ans**:下面的语句的结果会显示服务器的版本和当前的数据库名称 mysql> SELECT VERSION(), DATABASE(); @@ -23,7 +20,7 @@ We have reached here all because of yours support and we seek the same in future +-------------------------+------------+ 1 row in set (0.06 sec) -In the Database Column it is showing **NULL** value because we have not selected any database. So, select database as shown in the following command. +在Database一栏中显示**NULL**是因为我们当前没有选择任何数据库.因此,使用下面的语句先选择一个数据库,就能看到相应的结果. mysql> use Tecmint; @@ -43,9 +40,9 @@ In the Database Column it is showing **NULL** value because we have not selected +-------------------------+------------+ 1 row in set (0.00 sec) -### 2. USE NOT Operator (!) to select all the users except ‘SAM’ from a table say ‘Tecmint’ ### +### 2. 使用非运算符(!)从表"Tecmint"中列出除了user等于"SAM"的所有记录 -**Ans**: The below statement will show all the columns of all the users from table ‘**Tecmint**‘ except the user ‘**SAM**‘. +**Ans**:使用下面的语句 mysql> SELECT * FROM Tecmint WHERE user !=SAM; @@ -56,13 +53,13 @@ In the Database Column it is showing **NULL** value because we have not selected | 2001-05-15 08:50:57 | TIM | venus | phil | venus | 978 | +---------------------+---------+---------+---------+---------+-------+ -### 3. Is it possible to implement ‘AND’ with NOT (!) Operator. ### +### 3. 是否能够使用非运算符(!)来实现'AND'运算 -**Ans**: The AND operator is used when we use (=) and the operator OR is used when we use (!=). An example of (=) with AND Operator. +**Ans**: 我们使用’=’号和OR运算符或者'!='和AND运算符,下面是'='和AND运算符的例子 mysql> SELECT * FROM mail WHERE user = SAM AND root = phil -An Example of (!=) with OR Operator. +'!='和OR运算符的例子 mysql> SELECT * FROM mail WHERE user != SAM OR root != phil @@ -72,15 +69,15 @@ An Example of (!=) with OR Operator. | 2001-05-14 14:42:21 | Anthony | venus | barb | venus | 98151 | +---------------------+---------+---------+---------+---------+-------+ -- = : means Equal to -- != : Not Equal to -- ! : represents NOT Operator +- = : 等于 +- != : 不等于 +- ! : 非运算符 -The AND & OR are treated as joining operators in MySQL. +AND和OR在MySQL中被看作加入运算符 -### 4. What IFNULL() statement is used for in MySQL? ### +### 4. IFNULL()语句在MySQL中有什么作用? ### -**Ans**: The Query in MySQL can be written precisely using **IFNULL()** statement. The IFNULL() statement test its first argument and returns if it’s not NULL, or returns its second argument, otherwise. +**Ans**: **IFNULL**语句的使用使得MySQL中的查询更加精确。IFNULL()语句先测试它的的一个参数,若不为空就返回该参数的值,否则返回第二个参数的值 mysql> SELECT name, IFNULL(id,'Unknown') AS 'id' FROM taxpayer; @@ -93,11 +90,11 @@ The AND & OR are treated as joining operators in MySQL. | bill | 475-83 | +---------+---------+ -### 5. You want to see only certain rows from a result set from the beginning or end of a result set. How will you do it? ### +### 5. 如果你只想知道从一个结果集的开头或者结尾开始的特定条数的行记录改如何实现? -**Ans**: We need to use **LIMIT** clause along with ORDER BY to achieve the above described scenario. +**Ans**: 我们可以用**LIMIT**和**ORDER BY**从句。 -#### Show 1 Record #### +#### 显示一行记录 #### mysql> SELECT * FROM name LIMIT 1; @@ -107,7 +104,7 @@ The AND & OR are treated as joining operators in MySQL. | 1 | Fred | 1970-04-13 | black | lutefisk,fadge,pizza | 0 | +----+------+------------+-------+----------------------+------+ -#### Show 5 Record #### +#### 显示5行记录 #### mysql> SELECT * FROM profile LIMIT 5; @@ -121,7 +118,7 @@ The AND & OR are treated as joining operators in MySQL. | 5 | Sean | 1963-07-04 | blue | burrito,curry | 5 | +----+------+------------+-------+-----------------------+------+ ----------- +#### 显示按照ORDER BY排序后的第一条记录 #### mysql> SELECT * FROM profile ORDER BY birth LIMIT 1; @@ -131,20 +128,20 @@ The AND & OR are treated as joining operators in MySQL. | 9 | Dick | 1952-08-20 | green | lutefisk,fadge | 0 | +----+------+------------+-------+----------------+------+ -### 6. Oracle Vs MySQL. Which one and Why? ### +### 6. Oracle 和 MySQL该如何选择? ### -**Ans**: Well both has its advantages and disadvantages. As a matter of time I prefer MySQL. +**Ans**: 它们都有各自的优点和缺点。 -#### Reason for Selection MySQL Over oracle #### +#### 选择MySQL而不选orcale的原因 #### -- Mysql is FOSS. -- MySQL is portable. -- MYSQL supports both GUI as well as Command Prompt. -- MySQL Administration is supported over Query Browser. +- 开源 +- 轻便快捷 +- 有命令行和图形界面 +- 能通过查询器进行数据库的管理 -### 7. How will you get current date in MySQL? ### +### 7. MySQL中如何得到当前日期? ### -**Ans**: Getting current date in MySQL is as simple as executing the below SELECT Statement. +**Ans**: 使用CURRENT_DATE()函数 mysql> SELECT CURRENT_DATE(); @@ -154,26 +151,25 @@ The AND & OR are treated as joining operators in MySQL. | 2014-06-17 | +----------------+ -### 8. How will you export tables as an XML file in MySQL? ### +### 8. MySQL中如何将表导出为XML文件? ### -**Ans**: We use ‘-e‘ (export) option to export MySQL table or the whole database into an XML file. With large tables we may need to implement it manually but for small tables, applications like phpMyAdmin can do the job. -A native command of MySQL can do it. +**Ans**: 使用'-e'(export)参数来把MySQL表或整个数据库导出到XML文件。当处理大型表的时候或许我们需要手动导出,但是只是导出小文件的话可以直接使用想phpMyAdmin这样的工具。 mysql -u USER_NAME –xml -e 'SELECT * FROM table_name' > table_name.xml -Where USER_NAME is username of Database, table_name is the table we are exporting to XML and table_name.xml is the xml file where data is stored. +上面的例子中USER_NAME是数据库的用户名,table_name是待导出为xml文件的表名,table_name.xml是存放数据的xml文件 -### 9. What is MySQL_pconnect? And how it differs from MySQL_connect? ### +### 9. MySQL_pconnect是什么? 它和MySQL_connect有什么区别? ### -**Ans**: MySQL_pconnect() opens a connection that is persistent to the MySQL Database which simply means that the database is not opened every-time the page loads and hence we can not use MySQL_close() to close a persistent connection. +**Ans**: MySQL_pconnect()打开一个永久的数据库连接,这意味着数据库不是在每次页面加载的时候被打开,因此我们不能使用MySQL_close()来关闭一个永久的连接 -A brief difference between MySQL_pconnect and MySQL_connect are. +MySQL_pconnect和MySQL_connect有一定的差别 -Unlike MySQL_pconnect, MySQL_connect – Opens the Database every-time the page is loaded which can be closed any-time using statement MySQL_close(). +和MySQL_pconnect不同,MySQL_connect在每次页面被加载的时候打开,并且可以使用MySQL_close()语句来关闭连接 -### 10. You need to show all the indexes defined in a table say ‘user’ of Database say ‘mysql’. How will you achieve this? ### +### 10. 如何查看一个名为'mysql'的数据库中'user'表中的所有索引? ### -**Ans**: The following command will show all the indexes of a table ‘user’. +**Ans**: 可以使用下面的语句 mysql> show index from user; +-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ @@ -184,13 +180,13 @@ Unlike MySQL_pconnect, MySQL_connect – Opens the Database every-time the page +-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ 2 rows in set (0.00 sec) -### 11. What are CSV tables? ### +### 11. 什么是CSV表? ### -**Ans**: CSV stands for Comma-Separated Values aka Character-Separated Values. CSV table stores data in plain text and tabular format. It typically contains one record per line. +**Ans**: CSV是逗号分隔值的缩写,也称为字符分隔值。CSV表中存放纯文本和表格数据。 -Each record is separated by specific delimiters (Comma, Semi-colon, …) where each record has same sequence of field. CSV tables are most widely used to store phone contacts to Import and Export and can be used to store any sort of plain text data. +每一条记录使用具体的分隔符隔开(如逗号,分号,...),CSV表广泛的用来存放易于导入和导出的电话联系人,能够用来存放任何数量的纯文本。 -That’s all for now. I’ll be here again with another Interesting article, you people will love to read. Till then stay tuned and connected to Tecmint and Don’t forget to provide us with your valuable feedback in the comment section below. +以上就是这次要将的内容。我还会带来其他的有趣的文章,向往你们喜欢。连接到Tecmint继续关注我们,不要忘了在评论栏中留下你们的宝贵意见。 -------------------------------------------------------------------------------- @@ -201,4 +197,4 @@ via: http://www.tecmint.com/mysql-advance-interview-questions/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [1]:http://www.tecmint.com/basic-mysql-interview-questions-for-database-administrators/ -[2]:http://www.tecmint.com/10-mysql-database-interview-questions-for-beginners-and-intermediates/ \ No newline at end of file +[2]:http://www.tecmint.com/10-mysql-database-interview-questions-for-beginners-and-intermediates/ diff --git a/translated/tech/20140620 Tips to Push Your Git Skills to the Next Level.md b/translated/tech/20140620 Tips to Push Your Git Skills to the Next Level.md new file mode 100644 index 0000000000..2c50740802 --- /dev/null +++ b/translated/tech/20140620 Tips to Push Your Git Skills to the Next Level.md @@ -0,0 +1,190 @@ +CNprober 翻译完成... 619913541 + +10招让你的Git技能提升一个台阶 +================================================================================ + +之前我们发了一些教程让你熟悉[Git基础][1]和[在团队合作环境中使用Git][2].我们讨论的这些Git命令足够让一个开发者在Git的世界里生存下去。在这篇教程里,我们试着探索如何高效地管理你的时间以及如何充分利用Git提供的特性。 + +> 注意:这里介绍的命令中有的包含方括号(例如:`git add -p [file_name]`)。在这些例子中,你应该用你自己的数字,标识符等替代方括号里的内容,并且去掉方括号。 + +### 1. Git自动补全 ### + +如果你在命令行环境中运行Git命令,每次都手动地逐个输入命令是一件很无聊的事。为此,你可以花几分钟时间配置一下Git命令的自动补全功能。 + +在*nix系统运行下列命令下载自动补全脚本: + + cd ~ + curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash + +然后,添加下面的行到你的~/.bash_profile文件: + + if [ -f ~/.git-completion.bash ]; then + . ~/.git-completion.bash + fi + +尽管我之前已经提到过,但我还是想再强调一下:如果你想使用完整的Git特性,你绝bi应该切换到命令行环境。 + +### 2. 在Git中忽略文件 ### + +你是不是对出现在你Git库里面的编译生成文件(比如`.pyc`)感到很无语?或者你是不是很厌恶不小心将他们添加到了Git?直接看这里,这里有一个方法可以让你告诉Git忽略所有这些文件和目录。只需要创建一个名字为`.gitignore`的文件,里面列出你不想要Git跟踪的文件和目录。可以用感叹号(!)列出例外情况。 + + *.pyc + *.exe + my_db_config/ + + !main.pyc + +### 3. 谁动了我的代码? ### + +当事情出了乱子时立马责怪别人这是人类的天性。如果你的服务器程序不能正常工作了,要找出罪魁祸首是非常简单的--只需要执行`git blame`。这个命令告诉你文件里的每一行的作者是谁,最后改动那一行的提交,以及提交的时间戳。 + + git blame [file_name] + +![git blame demonstration](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946443git-ninja-01.png) + +在下面的截图里,你可以看到在一个更大的库里这个命令的输出是什么样的: + +![git blame on the ATutor repository](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946441git-ninja-02.png) + +### 4. 查看库的历史 ### + +在之前的教程里,我们已经看过了如何使用`git log`命令。不管怎样,有3个选项你应该知道。 + +- **--oneline** - 压缩每次的提交信息,只保留一个缩减的Hash值和说明文字,然后把这些都展示在一行里。 +- **--graph** - 这个选项将在左边画出一个文字界面的提交历史图。如果你只有一个分支,用这个选项查看历史时是没什么意义的。 +- **--all** - 显示所有分支历史。 + +这是这3个选项合起来使用的效果: + +![Use of git log with all, graph and oneline](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946444git-ninja-03.png) + +### 5. 不要丢失对某个提交的跟踪 ### + +假设你提交了一些不需要的东西,然后你进行了hard重置回到之前的状态。后来,你发现在这个过程中你丢失了其他一些重要的信息,你想要把这些信息找回来,或者至少可以查看一下这些信息。这就需要`git reflog`帮忙。 + +简单的`git log`只能告诉你最近的提交,这个提交的父提交,父提交的父提交,等等。但是`git reflog`是一个HEAD指向的提交的列表。记住,这个列表依赖于你自己的操作环境,它不是库的一部分,也不包含在push或者merge中。 + +如果执行`git log`命令,可以看到提交历史,这是我的库的一部分: + +![Project history](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946446git-ninja-04.png) + +但是,`git reflog`命令显示了一个被我用hard重置丢掉的提交(`b1b0ee9`-`HEAD@{4}`). + +![Git reflog](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946447git-ninja-05.png) + +### 6. 暂存文件的一部分更改以便进行一次提交 ### + +通常依据特性来提交是一个好的实践方法,意思是说,每一个提交都只添加一个特性或者修复一个bug。想一下如果你一次修复了两个bug或者添加了两个特性但是都还没有提交该怎么办。这种场景下,你可以将他们一起提交。但是有一个更好的办法:单独暂存这些文件,然后分开提交。 + +让我们假设你对一个文件做了多个更改,然后想让这些更改分开提交。这时,我们用带`-p`的添加命令。 + + git add -p [file_name] + +我们来试试这种用法。我添加了3个新行到`file_name`,但是我只想让第1行和第3行出现在我的提交里。让我们看看`git diff`的输出是什么样的。 + +![Changes in repo](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946449git-ninja-06.png) + +然后,我们看看带`-p`选项的`add`命令会发生什么。 + +![Running add with -p](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946450git-ninja-07.png) + +似乎Git认为所有的更改都是同一个目的的一部分,所以把他们分组到同一个块里。这时,你可以: + +- 输入 y 暂存块 +- 输入 n 不暂存块 +- 输入 e 手动编辑块 +- 输入 d 退出或者跳转到下一个文件 +- 输入 s 分割块 + +在我们这个例子中,我们想把这个块分割成更小的部分,然后选择其中一些忽略另外一些。 + +![Adding all hunks](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946452git-ninja-08.png) + +如你所见,我们已经添加了第1和第3行,忽略了第2行。你可以看到库的状态并且进行一次提交。 + +![Repository after selectively adding a file](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946454git-ninja-09.png) + +### 7. 合并多个提交 ### + +为了进行核查或者发起一个合并请求(这经常发生在开源项目里),对代码进行了修改提交。但在最后代码被接受之前,你也许会被要求修改你的代码。于是你修改代码,但是下一次核查的时候又一次被要求进行修改。不知不觉中,你就已经有了好几个提交。理论上你应该用rebase命令把他们合并起来。 + + git rebase -i HEAD~[number_of_commits] + +如果你想合并最后的两次提交,你应该运行下面的命令。 + + git rebase -i HEAD~2 + +一旦你运行这个命令,你将进入一个交互式界面,它将询问你想要合并哪些提交。你`pick`(拣选)最近的提交然后`squash`(合并)旧的提交。 + +![Git squash interactive](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946455git-ninja-10.png) + +接着你被要求提供一个对新提交的说明。这个过程会重写你的提交历史。 + +![Adding a commit message](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946457git-ninja-11.png) + +### 8. 储藏没有提交的更改 ### + +假设你正在修复一个bug或者添加一个特性,突然你被要求展示一下你的工作成果。你现在的工作还没有完成,不够进行一次提交。这时,`git stash`命令可以用来急救一下。Stash命令跟踪你所有的更改,然后把他们储藏起来以便以后使用。命令如下- + + git stash + +可以多次储藏更改,查看储藏列表,你可以运行下面的命令: + + git stash list + +![Stash list](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946458git-ninja-12.png) + +如果你想取消储藏,覆盖当前的更改,你可以通过下面的命令使用储藏: + + git stash apply + +在最后的这个截图里,你可以看到每个储藏都有一个标识符,是一个唯一的数字(尽管在这里我们只有一个储藏)。如果你想使用某个储藏,你在apply命令后面加上这个唯一的标识符: + + git stash apply stash@{2} + +![After un-stashing changes](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946461git-ninja-13.png) + +### 9. 检查丢失的提交 ### + +尽管`reflog`是一种检查丢失提交的方法,大型的库里却不太实用。这个时候,应该用`fsck`(文件系统检查)命令。 + + git fsck --lost-found + +![Git fsck results](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946463git-ninja-14.png) + +这里你可以看到一个丢失的提交。你可以通过`git show [commit_hash]` 查看提交的更改或者通过运行`git merge [commit_hash]`命令进行恢复。 + +`git fsck`跟`reflog`命令相比有一个优点。假设你删除了一个远程分支,然后clone了这个库。用`fsck`命令你可以找到并且恢复这个删除的远程分支。 + +### 10. 最佳选择 ### + +之前我已经存记下了那些最优雅的Git命令。但是目前为止,`cherry-pick`命令是我最喜欢的Git命令,因为它直白的名字和实用的功能! + +最简单的情况下,`cherry-pick`从另一个分支里选出单独的一个提交,然后合并到当前分支。如果你正并行工作在两个或者更多的分支上,你也许会发现一个存在于所有分支上的bug。如果你解决了一个分支上的这个bug,你可以拣选这个对应的提交应用到其他分支上,而不会弄乱其他文件或者提交。 + +让我们来考虑一个可以使用这个命令的场景。我有两个分支,我想拣选`b20fd14: Cleaned junk`这个提交到另一个分支上。 + +![Before cherry pick](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946465git-ninja-15.png) + +我切换到想要应用这个拣选出来的提交的分支,然后运行下面的命令: + + git cherry-pick [commit_hash] + +![After cherry pick](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946467git-ninja-16.png) + +尽管这次我们很干净的用了`cherry-pick`命令,但你应该知道这个命令经常会引起冲突,所以请小心使用。 + +### 总结 ### + +到了这里,我们结束了这个能使你Git能力提升一个级别的列表。Git是最好的版本控制器,它能完成你能想象到的任何事情。所以,经常试着用Git挑战你自己。一不小心你就会学到很多新东西。 + +-------------------------------------------------------------------------------- + +via: http://www.sitepoint.com/10-tips-git-next-level/ + +译者:[love_daisy_love](https://github.com/CNprober) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.sitepoint.com/git-for-beginners/ +[2]:http://www.sitepoint.com/getting-started-git-team-environment/ diff --git a/translated/tech/20140623 Advanced Directory Navigations Tips and Tricks in Linux.md b/translated/tech/20140623 Advanced Directory Navigations Tips and Tricks in Linux.md new file mode 100644 index 0000000000..9eb2eb87fc --- /dev/null +++ b/translated/tech/20140623 Advanced Directory Navigations Tips and Tricks in Linux.md @@ -0,0 +1,94 @@ +Linux 高级目录导航技巧 +================================================================================ + +目录当行是命令行系统的基础概念.虽然不是什么难以理解的东西,但是知道一些技巧能够丰富你的经验并且提高工作效率.在这篇文章中,我们会讨论这些小技巧. + +### 我们已经知道的东西 ### + +在开始高级技巧之前,有一些必须知道的基本命令: + +- ‘pwd’显示当前目录 +- ‘cd’ 改变当前目录 +- ‘cd’ 跟两个点(cd ..)能返回父目录 +- ‘cd’ 跟着相对目录就能直接切换当相对目录下 +- ‘cd’ 跟着绝对目录就能切换到绝对目录下 + +### 高阶技巧 ### + +这节将介绍几个技巧方便你进行目录的切换 + +### 从任何地方回到home目录 ### + +虽然使用‘cd /home/’, 不是什么大麻烦, 但是有一种方法直接打‘cd’ 就能回到home目录. + +Here is an example : + + $ pwd + /usr/include/netipx + $ cd + $ pwd + /home/himanshu + +所以无论你在哪个目录下,都能这么干然后回到home目录. + +**注意**- 如果要切换到确定用户的目录下, 就使用 ‘cd ~user_name' + +### 用cd在目录间切换 - ### + +假设你的工作目录是这样的: + + $ pwd + /home/himanshu/practice + +如果你想切换到 **/usr/bin/X11**, 然后又想回到之前的目录. 你会怎么做? 最直接的 : + + $ cd /usr/bin/X11 + $ cd /home/himanshu/practice/ + +虽然这样行得通,但是要记住这些复杂的目录是个大困难.这种情况下使用 ‘cd -’ 命令就行. + +使用 ‘cd -’的第一步和上面的例子是一样的, 你可以 cd 到你想要切换到的下 , 但是回到之前的目录用 ‘cd -’就可以. + + $ cd /usr/bin/X11 + $ cd - + /home/himanshu/practice + $ pwd + /home/himanshu/practice + +如果你想回到最后访问的目录(在这个例子中是/usr/bin/X11),也使用'cd -'就可以.但是这个命令只会记住最后访问的目录,这是一个缺点. + +### 用 pushd 和 popd 来切换目录 ### + +![directory navigation](http://linoxide.com/wp-content/uploads/2014/06/pushd-popd.jpg) + + +如果你对'cd -'非常了解了的话,你会发现这个命令只能帮助你在两个目录之间移动,但是很多场景下需要在很多目录之间切换.比如你要从A切换到B再到C然后又想回到A. + +一般来说,你需要打出A的完整路劲,但是如果这个路径非常复杂,将是非常烦人的一件事,热别是你的切换非常频繁的话. + +一些场景下可以使用 ‘pushd’ 还有 ‘popd’ 命令. The ‘pushd’ 将一个目录存到内存中,‘popd’ 将目录从内存中去除,并且转换到那个目录下. + +例如 : + + $ pushd . + /usr/include/netipx /usr/include/netipx + $ cd /etc/hp/ + $ cd /home/himanshu/practice/ + $ cd /media/ + $ popd + /usr/include/netipx + $ pwd + /usr/include/netipx + +使用‘pushd’ 命令存储当前的工作目录 (用 .表示), 然后切换到各种各样的目录去. 为了返回之前的目录 ,只要使用 ‘popd’命令就行了. +使用 + +**注意**- 你也可以使用 ‘pushd’ 来切换到之前存储的目录, 但是不会像 ‘popd’ 一样去除这个目录. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-command/directory-navigations-tips-tricks/ + +译者:[ggaaooppeenngg](https://github.com/ggaaooppeenngg) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20140625 Betty--Translate English Phrases Into Linux Commands.md b/translated/tech/20140625 Betty--Translate English Phrases Into Linux Commands.md new file mode 100644 index 0000000000..f9b695fbbc --- /dev/null +++ b/translated/tech/20140625 Betty--Translate English Phrases Into Linux Commands.md @@ -0,0 +1,204 @@ +CNprober翻译完成。。。619913541 + +Betty:通过大白话执行Linux命令 +================================================================================ + +**Betty** 是一个将类英语短语翻译成Linux命令的开源工具。这个项目的主要目的是让大家可以通过输入自然语言来使用强大的Linux系统。让我们来看一下它是怎么工作的。 + +### 安装 ### + +Betty的安装非常简单直接。首先确认你已经安装了下面这些依赖包[译注,需要安装至少Ruby1.9以上版本]。 + +#### 对于基于Debian的系统:#### + + sudo apt-get install git curl ruby + +####对于基于RPM的系统:#### + + yum install git curl ruby + +现在git工具把Betty库clone到你自定义的任何路径。这里我克隆到我的home目录,**例如 /home/sk/**. + + git clone https://github.com/pickhardt/betty + +添加betty的别名到你的bashrc配置文件。 + + sudo nano ~/.bashrc + +将下列行添加到文件的末尾: + + alias betty="/home/sk/betty/main.rb" + +确保你已经正确地设置好了betty的路径。 + +好了,现在是时候和betty好好地玩耍了。 + +### 用法 ### + +你应该在英语短语之前加上单词“betty”。你也许已经知道,如果我们想知道在系统中我们的用户名,应该运行下面的命令: + + whoami + +输出是这样的: + + sk + +如你所见,我当前登录的用户名是 **sk**. 现在我也可以通过下面的betty命令获取相同的结果。 + + betty whats my username + +输出是这样的: + + Betty: Running whoami + sk + +真的好酷,是不是?Betty理解我输入的“whats my username”短语,然后运行“whoami”命令,最后输出结果。 + +让我们也来看其他命令。 + +如果你的输入不够准确,Betty也能以多种方式回应你。例如,我们运行下面的命令: + + betty whats my name + +Betty不确定她应该查找系统用户名还是用户全名。这种情况下,她会询问你多个问题来找到准确的结果。如你下面所见,Betty问我想要运行哪一条命令(whoami 还是 finger $(whoami) | sed 's/.*:*//;q')[译注,需要你的系统已经安装finger]。我只想知道我的用户名,所以我选择数字**1**。 + + Betty: Okay, I have multiple ways to respond. + Betty: Enter the number of the command you want me to run, or N (no) if you don't want me to run any. + [1] whoami + Gets your system username. + [2] finger $(whoami) | sed 's/.*: *//;q' + Gets your full name. + 1 + Betty: Running whoami + sk + +### 压缩和解压缩文件夹 ### + +如果你想要压缩一个文件或者文件夹,用下面的命令。例如,我想压缩我home目录下的“test”文件夹。 + + + betty compress test/ test.tar.gz + +输出是这样的: + + Betty: Running tar -czvf test.tar.gz test/ + test/ + test/home/ + test/home/sk/ + test/home/sk/test/ + test/home/sk/test/sample + +类似的,我们可以用下面的命令来解压缩一个归档文件。 + + betty uncompress test.tar.gz + +输出是这样的: + + Betty: Running mkdir test && tar -zxvf test.tar.gz -C test + test/ + test/home/ + test/home/sk/ + test/home/sk/test/ + test/home/sk/test/sample + +### 完整的Betty命令行列表 ### + +Betty工具有一些命令格式。如果你输入“what is my user name”而不是“whats my username”,它是不能识别的。所以,你只能输入Betty支持的英语短语。 + +下面给出一个Betty支持的完整的命令行列表。 + + Count: + betty how many words are in this directory + betty how many characters are in myfile.py + betty count lines in this folder + (Note that there's many ways to say more or less the same thing.) + + Config: + betty change your name to Joe + betty speak to me + betty stop speaking to me + + Datetime: + betty what time is it + betty what is todays date + betty what month is it + betty whats today + + Find: + betty find me all files that contain california + + Internet: + betty download http://www.mysite.com/something.tar.gz to something.tar.gz + betty uncompress something.tar.gz + betty unarchive something.tar.gz to somedir + (You can use unzip, unarchive, untar, uncompress, and expand interchangeably.) + betty compress /path/to/dir + + iTunes: + betty mute itunes + betty unmute itunes + betty pause the music + betty resume itunes + betty stop my music + betty next song + betty prev track + betty what song is playing + (Note that the words song, track, music, etc. are interchangeable) + + Fun: + betty go crazy + betty whats the meaning of life + ...and more that are left for you to discover! + + Map: + betty show me a map of mountain view + + Meta: + betty what version are you (or just betty version) + betty whats your github again + + Permissions: + betty give me permission to this directory + betty give anotheruser ownership of myfile.txt + + Process: + betty show me all processes by root containing grep + betty show me all my processes containing netbio + + Sizes: + betty show size for myfile.txt + + Spotify: + betty play spotify + betty pause spotify + betty next spotify + betty previous spotify + + User: + betty whats my username + betty whats my real name + betty whats my ip address + betty who else is logged in + betty whats my version of ruby + + Web queries: + betty turn web on + betty please tell me what is the weather like in London + +对Linux初级使用者来说,Betty似乎是一个非常nice的工具。希望这个工具对你也会非常有用。 + +Cheers! + +源代码: + +- [Betty Homepage][1] + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/betty-translate-english-phrases-linux-commands/ + +译者:[love_daisy_love](https://github.com/CNprober) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://github.com/pickhardt/betty \ No newline at end of file diff --git a/translated/tech/20140630 How to access popular search engines from the command line on Linux.md b/translated/tech/20140630 How to access popular search engines from the command line on Linux.md new file mode 100644 index 0000000000..5e7fe1b8d4 --- /dev/null +++ b/translated/tech/20140630 How to access popular search engines from the command line on Linux.md @@ -0,0 +1,100 @@ +主流搜索引擎闯入Linux命令行世界 +================================================================================ +为什么会有人要从终端搜索互联网上的东西?我不清楚,这里头可能有许多的原因。但是,因为没人要求答案总比没人知道答案少令人失望一点。这里,列出了一些流行的搜索引擎的命令行工具,可以让你们通过Linux终端来访问它们。 + +### 1. Google ### +让我们从一个巨头开始吧:Bing!好吧,只是开个玩笑,事实上应该是Google。坦白讲,你根本不需要使用命令行工具来进行Google搜索。只需要简简单单的一个命令: + + $ xdg-open https://www.google.com/search?q="[query]" + + +它会打开网页浏览器,并转到合适的搜索页面。然而,如果你想要的是从终端窗口查看搜索结果,而不是打开什么网页浏览器,那么我推荐你使用[cli-google][1]。它是一个超级老古董了(最后一次更新是在2009年),但我喜欢它。这是一个简单而直接的应用,它会忠实地干好它应该干的事。 + +安装完cli-google后,你就可以开始用它来搜索了,它的输出是那样的五彩斑斓。你也可以调整搜索结果的数量和你想要的语言,你只需要在终端中敲入: + + $ google + +就可以看到所有的选项了。 + +![](https://farm6.staticflickr.com/5491/14330385480_91b0e138ee_z.jpg) + +### 2. YouTube ### +关于Google,有太多的东西要放进列表来。我会尽量简明扼要,但绝不会放过该有的。对于许多人而言,YouTube是他们快速查找相关内容视频的首选。要在终端中完成此事,我则钟情于[mps-youtube][2]。这个软件可以让你在终端中搜索、下载视频,创建播放列表,以及查看关于视频的评论。安装完mps-youtube后,你可以使用下面的命令来启动: + + $ mpsyt + +然后,输入 h 来查看选项。要查看简明用法,你可以像下面这样: + + /[query] + +来搜索你想知道的一切,然后输入视频的编号来听听它的声音,或者输入: + + i [video-number] + +来看看相关信息,也可以输入: + + d [video-number] + +来下载它。如果你觉得光听还不过瘾,这里还有更好玩的: + + set player mplayer + set show_video True + +现在,你可以在另外一个窗口里头用mplayer来播放视频了。 + +![](https://farm3.staticflickr.com/2925/14517040865_1d54ccce3b_z.jpg) + +### 3. 维基百科 ### +与Google一样,对于维基百科,我也喜欢一个古老的脚本,它干的不赖:[cliWiki][3]。安装完后,赶紧运行一下看看: + + $ cliwiki + +然后,你就可以输入你想要搜索的内容了。如果有直接匹配的条目,终端中就会显示相关页面了。哈,输出内容可真够长的,建议你还是用less命令来看吧。当然,这不是最高效的方法,但你的母的只是想要查看与关键词相关的文本,那这就是你想要的。 + +![](https://farm3.staticflickr.com/2903/14330600657_065d26cdf2_z.jpg) + +### 4. 海盗湾 ### +现在,让我们聊聊龌龊的东西。网上有很多意想不到的(也许你不觉得)工具,可以帮助你在命令行下查找海盗湾上的种子。而在这其中,[pirate-get][4]是我的最爱。它里面蕴藏了大量的选项,你可以通过下面的命令来发现它们: + + $ pirate-get -h + +但是还是简单一些吧: + + $ pirate-get --color -c [category] [query] + +以上命令会返回与查询内容相关的特定搜索类目中的结果,输出结果也是彩色的!那里头,程序会提示你输入你想要的结果的编号,输入后就可以从磁链上下载种子了。简单又容易,仅限于没有版权的资料哦! + +![](https://farm4.staticflickr.com/3923/14330448479_ae503561e6_z.jpg) + +### 5. Twitter ### +Twitter是迎合潮流的一个很好的搜索引擎。我们已经在[如何在命令行中访问Twitter][5]一文中介绍了它的用法,但是我个人更喜欢[TTYtter][6]。该工具及其强大,它应该有它自身的一席之地,而不再仅仅用于简单搜索了。但在这里,我只想把它当作搜索引擎使用。安装并配置完后,你就可以登陆进去,并使用下面的命令来搜索了: + + /search [query] + +界面在视觉上有点粗糙,但是你很快会习惯的。注意,这里头只能用普通的文字,也可以用哈希标记。 + +![](https://farm6.staticflickr.com/5077/14537153013_cc32a98b08_z.jpg) + +最后来小结一下吧,这里列出了我认为人们使用最多5大搜索引擎,这些搜索引擎都可以通过命令行来访问。这里Google图像和Google地图可能缺席了,但我想这些可能不能很好适应控制台环境吧。我也想要寻找一个音乐搜索引擎,但是没有找到对于本列表“有价值的”。就像你可能已经注意到的那样,列表中的工具在功能和选项上是良莠不齐的:其中一些很简单,而另外一些则功能很复杂。但不管怎么说,最后它们都还是完成了它们的任务。 + +列表中错失了哪些搜索引擎?你还知道哪些没有提到过的工具呢?请在文章评论中告诉我们吧。 + +---------- + +#### Adrien Brochard #### + +我是一位来自法国的Linux爱好者。在尝试了多个发行版后,我最后认可了Archlinux。然而,我一直在试着通过积累一些知识和技巧来改善我的系统。 +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/2014/06/access-popular-search-engines-command-line-linux.html + +译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://github.com/henux/cli-google +[2]:https://github.com/np1/mps-youtube +[3]:https://github.com/AnirudhBhat/cliWiki.py +[4]:https://github.com/vikstrous/pirate-get +[5]:http://xmodulo.com/2013/12/access-twitter-command-line-linux.html +[6]:http://www.floodgap.com/software/ttytter/ diff --git a/translated/tech/20140701 How To Add Multiple Timezones In Ubuntu 14.04 [Quick Tip].md b/translated/tech/20140701 How To Add Multiple Timezones In Ubuntu 14.04 [Quick Tip].md new file mode 100644 index 0000000000..7315301b06 --- /dev/null +++ b/translated/tech/20140701 How To Add Multiple Timezones In Ubuntu 14.04 [Quick Tip].md @@ -0,0 +1,42 @@ +如何在Ubuntu 14.04中添加多时区时间 [小技巧] +================================================================================ +如果你需要和多时区时间打交道的话,你一定希望你的电脑时钟可以显示多个时区的时间。作为一个移居国外的人,我需要关注法国和印度的时间。在Ubuntu系统中,你可以进行简易的设置来添加多时区时间。 + +在这次的使用技巧中,我们会了解到 **如何在Ubuntu 14.04系统中添加多时区时间**。 + +### 在Ubuntu 14.04系统中添加多时区时间 ### + +打开系统设置(按下标有微软徽标的按键,在Dash中搜索“系统设置”),进入”时间&日期“选项。 + +接下来,进入**时钟**标签页,找到**其他时区时间**选项,然后点击**选择地区**按钮。 + +![Add multiple timezones in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/06/Timezone_Ubuntu.jpeg) + +在新打开的窗口中,你可以**输入一个地区**,之后相应的结果会在下面显示出来。选择你想添加的地区,然后**点击下面的加号标志(+)**来添加。 + +![Adding timezone in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/06/Add_Timezone_Ubuntu.png) + +完成了这些工作之后,你就可以在系统时钟处看到其他地区的时间了。 + +![multiple timezone displayed in Ubuntu 14.04](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/06/Multiple_Timezones_display_Ubuntu.png) + +好好的感受Ubuntu多时区时钟给你带来的便捷吧。:) + +---------- + +![](http://0.gravatar.com/avatar/20749c268f5d3e4d2c785499eb6a17c0?s=80&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&r=G) + +#### 关于 Abhishek #### + +我叫Abhishek Prakash,是It's F.O.S.S的创始人。我获得了通信系统工程硕士学位。我是一个狂野的Linux爱好者和开源痴迷者。我在使用Ubuntu系统并且希望和大家分享知识和经验。出了Linux,我还很喜欢经典侦探悬疑电影。我是阿加莎-克里斯蒂的超级粉丝。你可以在[Google Plus][g]上添加我到你的好友圈,也可以[在twitter上关注 @abhishek_pc][t]。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/add-multiple-timezones-ubuntu-1404/ + +译者:[JonathanKang](https://github.com/JonathanKang) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[g]:https://plus.google.com/u/0/110180944531110746460 +[t]:https://twitter.com/abhishek_pc diff --git a/translated/tech/20140702 How to check MySQL storage engine type on Linux.md b/translated/tech/20140702 How to check MySQL storage engine type on Linux.md new file mode 100644 index 0000000000..565d0965b1 --- /dev/null +++ b/translated/tech/20140702 How to check MySQL storage engine type on Linux.md @@ -0,0 +1,41 @@ +如何在Linux上检查MySQL的存储引擎类型 +================================================================================ +> **提问**: 我想要知道我的MySQL数据库是MyISAM还是Innodb类型。我该如何检查MySQL数据库表的类型? + +MySQl主要使用两种存储引擎:**MyISAM and Innodb**。MyISAM是非事务的,因此拥有读取更快,然而InnoDB完全支持细颗粒的事务锁定(比如:commit/rollback)。当你创建一张新的MySQL表时,你要选择它的类型(也就是存储引擎)。如果没有选择,你就会使用与预设置的默认引擎。 + +如果你想要知道已经存在的MySQL数据表的类型,这里有几种方法达到。 + +### 方法一 ### + +如果你可以访问phpMyAdmin,你可以从phpMyAdmin找出默认的数据库类型。从phpMyAdmin中选中数据库来查看它的表列表。在“Type”一列的下面,你会看到每个表的数据表类型。 + +![](https://farm4.staticflickr.com/3871/14526575875_c1da3d9c7a_z.jpg) + +### 方法二 ### + +如果你可以直接登录MySQL服务器,另外一种鉴别存储引擎的方法是登录MySQL服务器后运行下面的MySQL命令: + + mysql> SELECT ENGINE FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'my_database' AND TABLE_NAME = 'my_table'; + +上面的命令会显示在'my_database'数据库中'my_table'表的引擎类型。 + +### 方法三 ### + +还有一种检查引擎的方法是使用mysqlshow,是一种命令行下的显示数据库信息的工具。mysqlshow在[MySQL 客户端安装包][1]中有。要使用mysqlshow,你需要提供MySQL服务器登录凭据。 + +下面的命令会显示特定的数据库信息。在“Engine”一列下面,你可以看到每个表使用的引擎。 + + $ mysqlshow -u -p -i + +![](https://farm4.staticflickr.com/3845/14340200549_8fbe7ea7b5_z.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/check-mysql-storage-engine-type-linux.html + +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://xmodulo.com/2013/06/how-to-install-mysql-server-and-client-on-linux.html \ No newline at end of file diff --git a/translated/tech/20140702 How to create sosreport in linux (RHEL 5.X or RHEL 6.X).md b/translated/tech/20140702 How to create sosreport in linux (RHEL 5.X or RHEL 6.X).md new file mode 100644 index 0000000000..795dd0e31b --- /dev/null +++ b/translated/tech/20140702 How to create sosreport in linux (RHEL 5.X or RHEL 6.X).md @@ -0,0 +1,43 @@ +如何在linux中创建sosreport(RHEL 5.X / RHEL 6.X) +================================================================================ +**Sosreport**是linux中的一个命令**RHEL / CentOS**),它会收集**系统配置**和你linux机器上如正在运行的内核版本、加载的模块和系统和服务配置文件之类的诊断信息。这个命令同样可以运行外部的程序来收集更多的信息,并存储这些输出到一个结论文档中。 + +Sosreport在你需要获得redhat的技术支持时需要它。Redhat的支持工程师会要求你服务器上的sosreport来用于故障排除。 + +To run sosreport , **sos** package should be installed. Sos package is part of default installation in most of linux. If for any reason this package is no installed , then use below yum command to install **sos package** : +要运行sosreport,需要安装**sos** 包。Sos包是大多是linux的默认安装包中的一部分。如果有任何原因没有安装,那么运行下面的yum命令来安装**sos 包** : + + # yum install sos + +### 生成报告 ### + +打开终端输入sosreport命令: + + # sosreport + +这条命令正常情况下会在**几分钟**里完成。根据本地配置,在某些情况下,某些选项可能需要更长的时间才能完成。一旦完成,sosreport将在**/ tmp目录**目录中生成压缩文件。不同版本使用不同的压缩方案(** gz,bz2,或xz**)。该文件应提供给红帽的支持代表(在开放的情况下通常作为附件)。 + +**注意**:sosreport需要root权限才能运行。 + +### sosreport命令中不同的选项: ### + +sosreport命令有一个**模块化结构**,并允许用户启用和禁用模块,并通过在命令行指定模块。要**列出可用的模块**(插件),请使用以下命令: + + # sosreport -l + +要禁用一个模块,用逗号隔开的列表传给-n/–skip-plugins选项。比如要kvmand 、amd这两个模块: + + # sosreport -n kvm,amd + +各个模块可以通过-k选项提供额外的选项。例如,在Red Hat Enterprise Linux 5中安装的sos rpm模块默认收集“rpm -Va”的输出。因为这是个耗时行为,因此可以通过下面的命令禁用: + + + # sosreport -k rpm.rpmva=off + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/how-to-create-sosreport-in-linux/ + +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/translated/tech/20140702 How to install Raspberry Pi camera board.md b/translated/tech/20140702 How to install Raspberry Pi camera board.md new file mode 100644 index 0000000000..3ce4315ad5 --- /dev/null +++ b/translated/tech/20140702 How to install Raspberry Pi camera board.md @@ -0,0 +1,105 @@ +如何安装树莓派摄像头模块 +============================================================================== +[树莓派摄像头模块(Pi Cam)][1]发售于2013年5月。在首发时,Pi Cam配备了500万像素的传感器,通过排线链接树莓派上的CSI接口。第二次发布时,Pi Cam改名为[Pi NoIR][2]并配备了相同的传感器,不同之处在于第二版摄像头模块没有红外线过滤装置。因此使用第二版的摄像头模块可以观测到近红外线的波长(700 - 1000 nm),如同一个安全监控摄像机一样,当然实现红外线的感应牺牲了传感器的显色性。 + +本文将会展示**如何在[树莓派][3]上安装摄像头模块**。我们会使用第一版摄像头模块来演示。在安装完摄像头模块之后,你将会使用三个应用来访问这个模块:raspistill, raspiyuv 和raspivid。其中前两个应用用来捕捉图像,第三个应用来捕捉视频。raspistill 工具会生成标准的图片文件例如 .jpg 图像,但是 raspiyuv 可以通过摄像头生成未处理的 raw 图像文件。 + +### 安装树莓派摄像头模块 ### + +按照以下指示来安装树莓派摄像头模块: + +1. 找到 CSI 接口(CSI接口在以太网接口旁边),掀起深色胶带。 + +2. 拉起 CSI 接口挡板。 + +3. 将摄像头模块贴在透镜上的塑料保护膜撕掉。确保黄色部分的PCB(有字的一面)是安装完美的。 + +4. 将排线插入CSI接口。记住,有蓝色胶带的一面应该面向以太网接口方向。在检查排线安装好了之后,将挡板拉下。 + +![](https://farm3.staticflickr.com/2938/14529915452_0910b2e13f_z.jpg) + +好了,现在你的 Pi Cam 已经准备就绪来拍摄相片以及视频了。 + +### 在树莓派上启用摄像头模块 ### + +在安装完摄像头模块之后,确认你已经升级了树莓派系统并应用了最新的固件。输入以下命令来更新: + + $ sudo apt-get update + $ sudo apt-get upgrade + +运行树莓派配置工具来激活摄像头模块: + + $ sudo raspi-config + +移动光标至菜单中的 "Enable Camera",确认启用。完成之后重启树莓派。 + +![](https://farm4.staticflickr.com/3837/14530918915_e68ca0beef_z.jpg) + +![](https://farm3.staticflickr.com/2922/14344284230_6cabbe2522_z.jpg) + +![](https://farm3.staticflickr.com/2923/14529915362_7a437a53cb_z.jpg) + +安装完摄像头模块后的完成照: + +![](https://farm3.staticflickr.com/2924/14551046653_1c37e077fd_z.jpg) + +### 通过摄像头模块拍照 ### + +在重启完树莓派后,我们就可以使用它了。输入以下命令通过摄像头模块拍摄照片: + + $ raspistill -o keychain.jpg -t 2000 + +这句命令会在执行 2000ms 之后捕捉图像。然后保存为 keychain.jpg。下面是一张由 下面是一张由 Pi Cam 拍摄的钥匙链。 + +![](https://farm4.staticflickr.com/3845/14530919095_ea0f37045a_z.jpg) + +raspivid 工具用法差不多,从命令行运行 raspivid 工具。下面这句命令会按照默认配置(5秒,分辨率1920x1080,比特率 17Mbps)拍摄一段视频。 + + $ raspivid -o mykeychain.h264 + +如果你想改变拍摄时长,只要通过 "-t" 选项来设置长度就行了。 + + $ raspivid -o mykeychain.h264 -t 10000 + +使用 "-w" 和 "-h" 选项将分辨率降为 1280x720... + + $ raspivid -o mykeychain.h264 -t 10000 -w 1280 -h 720 + +raspivid 的输出是一段未压缩的 H.264 视频流,而且这段视频没有声音。因此这段视频需要转换在能被通常的视频播放器所播放。使用 gpac 包中所带有的 MP4Box 应用。 + +在 Raspbian 上安装 gpac,输入命令: + + $ sudo apt-get install -y gpac + +然后将这段 raw 的 H.264 格式的视频流转换为30帧每秒的 .mp4 格式视频: + + $ MP4Box -fps 30 -add keychain.h264 keychain.mp4 + +视频长度为10秒,默认分辨率以及比特率。下面是一段通过 Pi Camera 拍摄的一段实例视频。 + +注:youtube视频地址 + + + +如果想要看到 raspistill, raspiyuv 和 raspivid 的完整命令行选项,直接运行以上命令(不加选项)就行了。 + + +---------------- + +### [Kristophorus Hadiono][a] ### + +我是一个 Linux 爱好者。我在日常生活中使用 Linux,甚至在我给学生们教学的时候。我的梦想是成为一名优秀的作家。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/2014/07/install-raspberry-pi-camera-board.html + +译者:[ThomazL](https://github.com/ThomazL) 校对:[校对者id](https://github.com/校对者id) + +本文由 [lctt](https://github.com/lctt/translateproject) 原创翻译,[linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://xmodulo.com/go/picam +[2]:http://xmodulo.com/go/pinoir +[3]:http://xmodulo.com/go/raspberrypi +[a]:http://hadiono.org/blog + diff --git a/translated/tech/20140703 How to find and kill misbehaving MySQL queries.md b/translated/tech/20140703 How to find and kill misbehaving MySQL queries.md new file mode 100644 index 0000000000..0d49954923 --- /dev/null +++ b/translated/tech/20140703 How to find and kill misbehaving MySQL queries.md @@ -0,0 +1,62 @@ +怎样去查找并杀掉非法的MySQL查询 +================================================================================ +有时,相关数据库系统的复杂性可能被压倒.幸运地,这种复杂性是一种优势,与 MySQL工具一起管理查询. 在本教程中, 我将向你们展示 **怎样去查找并杀掉任何非法的MySQL查询**. + +为了浏览当前正在运行的查询, 登陆到MySQL终端,然后运行‘show processlist’命令: + + mysql> show processlist; + + +--------+--------+-----------------+---------+---------+-------+-------+------------------+-----------+---------------+-----------+ + | Id | User | Host | db | Command | Time | State | Info | Rows_sent | Rows_examined | Rows_read | + +--------+--------+-----------------+---------+---------+-------+-------+------------------+-----------+---------------+-----------+ + | 78233 | root | 127.0.0.1:37527 | mysql | Sleep | 16474 | | NULL | 6 | 6 | 6 | + | 84546 | root | 127.0.0.1:48593 | mysql | Sleep | 13237 | | NULL | 2 | 2 | 2 | + | 107083 | root | 127.0.0.1:56451 | mysql | Sleep | 15488 | | NULL | 1 | 121 | 121 | + | 131455 | root | 127.0.0.1:48550 | NULL | Query | 0 | NULL | show processlist | 0 | 0 | 0 | + +--------+--------+-----------------+---------+---------+-------+-------+------------------+-----------+---------------+-----------+ + 4 rows in set (0.03 sec) + +首先 你应该查看'Time'项, 这里记录了进程执行 "doing the thing it's doing" 操作的秒数. ‘command’项处于‘Sleep’ +状态的进程正在等待查询, 因此,它并没有消耗任何资源. 对于其他任何进程而言,‘Time’超过一定的秒数表明出现问题. + +在这种情况下,只能通过运行‘show processlist’命令来查询.如果我们有一个糟糕的写查询,让我们来看看情况如何: + + mysql> show processlist; + + +--------+--------+-----------------+-----------+---------+-------+--------------+----------------------------------+-----------+---------------+-----------+ + | Id | User | Host | db | Command | Time | State | Info | Rows_sent | Rows_examined | Rows_read | + +--------+--------+-----------------+-----------+---------+-------+--------------+----------------------------------+-----------+---------------+-----------+ + | 78233 | root | 127.0.0.1:37527 | example | Sleep | 18046 | | NULL | 6 | 6 | 6 | + | 84546 | root | 127.0.0.1:48593 | example | Sleep | 14809 | | NULL | 2 | 2 | 2 | + | 107083 | root | 127.0.0.1:56451 | example | Sleep | 17060 | | NULL | 1 | 121 | 121 | + | 132033 | root | 127.0.0.1:54642 | example | Query | 27 | Sending data | select max(subtotal) from orders | 0 | 0 | 0 | + | 133933 | root | 127.0.0.1:48679 | NULL | Query | 0 | NULL | show processlist | 0 | 0 | 0 | + | 134122 | root | 127.0.0.1:49264 | example | Sleep | 0 | | NULL | 0 | 0 | 0 | + +--------+--------+-----------------+-----------+---------+-------+--------------+----------------------------------+-----------+---------------+-----------+ + 6 rows in set (0.00 sec) + +啊哈!现在我们看到这里的查询几乎运行了30s. 如果我们不想让它继续运行,可以使用它的'Id'去执行kill命令: + + mysql> kill 132033; + Query OK, 0 rows affected (0.00 sec) + mysql> + +(注意 由于我们没有改变任何数据,MySQL总是报告0行被影响.) + +明智的使用kill命令能够清除积压的查询.记住,但那不是一种永久的方法 - 如果这些查询来自你的应用,你需要去重写它们,或者将继续看到相同的问题. + +### 另请参阅 ### + +关于不同‘Command’的MySQL文档: + +- [https://dev.mysql.com/doc/refman/5.7/en/thread-commands.html][1] + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/2014/07/find-kill-misbehaving-mysql-queries.html + +译者:[hunanchenxingyu](https://github.com/hunanchenxingyu) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://dev.mysql.com/doc/refman/5.7/en/thread-commands.html \ No newline at end of file diff --git a/translated/tech/20140709 Command Line Tuesdays--Part Four.md b/translated/tech/20140709 Command Line Tuesdays--Part Four.md new file mode 100644 index 0000000000..5362df3738 --- /dev/null +++ b/translated/tech/20140709 Command Line Tuesdays--Part Four.md @@ -0,0 +1,78 @@ +#命令行星期二-第四部分# +-------------------------------------------------------- + +大家好。新的一周,新的冒险! + +今天,我们将会学习使用四个相当简单的命令去操作文件。好,废话少说,我们开始吧。 + +在开始学习这些命令之前,我们先稍微说些题外话,讲讲“通配符”的用处。 + +###通配符### + +使用图形工具区复制、粘贴、新建目录等操作也许很容易,但是若想完成一些更复杂的任务,例如仅仅将一个目录下的所有.html文件复制到另一个目录中、或者只复制在某个目录中不存在的文件,这时命令行也许会比较方便。我们回到通配符的学习中,通配符是shell的基本功能,它是一个由一些特殊字符组成的集合,它让你可以用一些简单的规则来选择出某些文件。(通配符可以出现在文件名中,用于指定文件名的字符个数和字母的大/小写等规则)。 +如下表(点击放大): + +![](https://news.opensuse.org/wp-content/uploads/2014/07/Screenshot-08.-07.-2014-125946.png) + +下面是mr Shotts给出的一些实例,如下表:(点击放大) + +![](https://news.opensuse.org/wp-content/uploads/2014/07/Screenshot-08.-07.-2014-125959.png) + +如果你使用一个包含文件名参数的命令,你就可以使用通配符。 + +###cp### +cp是一个用于复制文件或者目录的命令,它的用法相当的简单。进入到你想复制的文件所在的目录,然后使用如下命令 + +`cp file1 file2` -复制一个文件 + +或者 + +`cp file1 file2 ... directory` -从当前工作目录复制多个文件到指定的目录。 + +下表是mr Shotts给出的cp命令的一些选项: + +![](https://news.opensuse.org/wp-content/uploads/2014/07/Screenshot-08.-07.-2014-134248.png) + +###mv### +mv是今天的第二个命令,我们可以使用mv来重命名一个文件或目录,或者移动一个文件或目录。我们可以这样使用mv命令。 + +`mv filename1 filename2` -若想将文件filename1重命名为filename2。 + +或者 + +`mv file directory` -若想将一个文件移动到某个目录。 + +下表是一些mv命令的实例 + +![](https://news.opensuse.org/wp-content/uploads/2014/07/Screenshot-08.-07.-2014-133515.png) + +###rm### +rm命令是用于删除文件或目录,它的用法比较直接,如下: + +`rm file` + +或者 + +`rm -r driectory` + +这里也有一个包含rm其他选项的表 + +![](https://news.opensuse.org/wp-content/uploads/2014/07/Screenshot-08.-07.-2014-133529.png) + +但是,使用rm命令时要小心点。因为并没有撤销删除的选项,因此使用rm命令式要格外的小心,避免对你的系统造成不必要的破坏。 + +###mkdir### +mkdir是用于创建目录.它是今天最简单的一个命令: + +`mkdir directory` + +看,目录成功创建了! + +这是本周的内容,下周二再见,致以最真诚的问候! + +------------------------------------------------------------------------- +via: https://news.opensuse.org/2014/07/08/command-line-tuesdays-part-four/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20140709 How To Disable Overlay Scrollbars in Ubuntu 14.04.md b/translated/tech/20140709 How To Disable Overlay Scrollbars in Ubuntu 14.04.md new file mode 100644 index 0000000000..8a3fefca01 --- /dev/null +++ b/translated/tech/20140709 How To Disable Overlay Scrollbars in Ubuntu 14.04.md @@ -0,0 +1,44 @@ +如何在Ubuntu14.04中禁用叠加滚动条【小贴士】 +================================================================================ +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/04/Ubuntu-14.042-790x493.jpeg) + +Hello 伙计们, + +这是一个如何在Ubuntu中禁用叠加滚动条的小贴士。注意,在本文中不是删除叠加功能,相反,你将启用或禁用它。 + +### 禁用 ### + +打开终端并执行以下命令 + + gsettings set com.canonical.desktop.interface scrollbar-mode normal + +更改后会立即生效: + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/Unity_Overlay_off.png) + +### 启用 ### + + gsettings reset com.canonical.desktop.interface scrollbar-mode + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/Unity_overlay_on.png) + +Enjoy! + +---------- + +![](http://0.gravatar.com/avatar/25c00329fd45ff820497f9c8c2d79dd3?s=70&d=monsterid&r=G) + +[Enock Seth Nyamador][1] + +我穿着--[0-0]--(比基尼?), 一个开源的瘾君子。一个发展中的非洲geek。我是一个菜鸟开发者和一个有追求的摄影师。想提供给我什么或者是小贴士,请随时与我联系。我随时准备开发和照片。干杯! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/disable-overlay-scrollbars-ubuntu-14-04-quick-tip/ + +译者:[Vito](https://github.com/vito-L) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.unixmen.com/author/seth/ + diff --git a/translated/tech/20140709 How to set up two-factor authentication for SSH login on Linux.md b/translated/tech/20140709 How to set up two-factor authentication for SSH login on Linux.md new file mode 100644 index 0000000000..ac11963fbd --- /dev/null +++ b/translated/tech/20140709 How to set up two-factor authentication for SSH login on Linux.md @@ -0,0 +1,88 @@ +如何为Linux系统中的SSH添加双重认证 +================================================================================ +近来很多知名企业都出现了密码泄露,业内对多重认证的呼声也越来越高。在这种多重认证的系统中,用户需要通过两种不同的认证程序:提供他们知道的信息(如 用户名/密码),再借助其他工具提供用户所不知道的信息(如 用手机生成的一次性密码)。这种组合方式常叫做双因子认证或者两阶段验证。 +为了鼓励广泛采用双因子认证的方式,Google公司发布了[Google Authenticator][1],一款开源的,可基于开放规则(如 HMAP/基于时间)生成一次性密码的软件。这是一款跨平台软件,可运行在Linux, [Android][2], [iOS][3]。Google公司同时也支持插件式鉴别模块PAM(pluggable authentication module),使其能和其他也适用PAM进行验证的工具(如OpenSSH)协同工作。 +在本教程中,我们将叙述集成OpenSSH和Google提供的认证器实现**如何为SSH服务设置双因子认证**。我将使用一款[Android][4]设备来生成一次性密码,本教程中需要两样兵器:(1)一台运行着OpenSSH服务的Linux终端,(2)一台安卓设备。 +### 在Linux系统中安装Google Authenticator ### + +第一步需要在运行着OpenSSH服务的Linux主机上安装Google认证器。按照[安装指南] [5]的步骤安装Google认证器及其PAM模块。 +当Google认证器安装好后,你需要在Linux主机上创建验证密钥,并且在安卓设备上注册,注意这项配置操作是一次性的。我们将详细叙述如何完成这些操作: +### 生成验证密钥 ### + +在Linux主机上运行Google认证器 + $ google-authenticator + +你将看到一个QR码,它使用图形保存了我们数字形态的密钥。一会我们要用到它在安卓设备上完成配置。 +![](https://farm4.staticflickr.com/3843/14573264401_d3f5a2f247_z.jpg) +![](https://farm4.staticflickr.com/3848/14390010599_18dfc23d76_z.jpg) + +Google认证器会问一些问题,如果你不确定,就回答"Yes"。这个应急备用验证码(图中 emergency scratch codes)可以在你丢失被绑定的安卓设备的情况下恢复访问,并且设备也不再生成一次性密码。所以最好将应急备用验证码妥善保存。 +### 在安卓设备上运行Google认证器 ### + +我们需要在安卓设备上安装[Google Authenticator app][6]才能完成双因子认证,到Google Play下载并安装一个。在安卓设备上运行Google认证器,找到下图所示中的配置菜单。 +![](https://farm6.staticflickr.com/5574/14554094476_bfc070d242_z.jpg) + +你可以选择"Scan a barcode" 或者"Enter provided key"选项。"Scan a barcode"允许你扫描QR码来完成密钥的输入,在此可能需要先安装扫描软件[Barcode Scanner app][7]。如果选择"Enter provided key"选项,你可以使用键盘输入验证密钥,如下图所示: +![](https://farm6.staticflickr.com/5535/14596723603_d510dbe48d_z.jpg) + +无论采用上述两种选项的任何方式,一旦成功,你将看到注册成功提示和一次性密码,如下图所示: +![](https://farm6.staticflickr.com/5586/14390009579_5ba109bf5b_z.jpg) + +### 为SSH服务器用Google认证器 ### + +最终我们需要修改两个文件来完成集成Google认证器和OpenSSH服务这临门一脚。 +首先,修改PAM配置文件,命令和需添加的内容如下: + $ sudo vi /etc/pam.d/sshd + +---------- + + auth required pam_google_authenticator.so + +然后打开SSH配置文件,找到参数ChallengeResponseAuthentication,并启用它。 + $ sudo vi /etc/ssh/sshd_config + +---------- + +ChallengeResponseAuthentication yes + + +最后,重启SSH服务。 +在 Ubuntu, Debian, Linux Mint: + + $ sudo service ssh restart + +在Fedora: + + $ sudo systemctl restart sshd + +在CentOS 或 RHEL: + + $ sudo service sshd restart + +### 验证双因子认证 ### + +在绑定的安卓设备上运行Google认证器,获得一个一次性验证码,该验证码30秒内有效,一旦过期,将重新生成一个新的验证码。 +![](https://farm3.staticflickr.com/2937/14389989618_d9355dcbb2_z.jpg) + +现在和往常一样,使用SSH登录终端 + $ ssh user@ssh_server + +当提示你输入验证码的时候,输入我们刚获得的验证码。验证成功后,再输入SSH的登录密码。 +![](https://farm3.staticflickr.com/2938/14389952480_93351f12a4_z.jpg) + +双因子认证通过在用户密码前新增一层来有效的保护我们脆弱的用户密码。你可以使用Google认证器来保护我们其他的密码,如Google账户, WordPress.com, Dropbox.com, Outlook.com等等。是否使用这项技术,取决于我们自己,但采用双因子认证已经是行业的大趋势了。 +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/2014/07/two-factor-authentication-ssh-login-linux.html + +译者:[nd0104](https://github.com/nd0104) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://code.google.com/p/google-authenticator/ +[2]:https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2 +[3]:https://itunes.apple.com/us/app/google-authenticator/id388497605 +[4]:http://xmodulo.com/go/android_guide +[5]:http://ask.xmodulo.com/install-google-authenticator-linux.html +[6]:https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2 +[7]:https://play.google.com/store/apps/details?id=com.google.zxing.client.android diff --git a/translated/tech/20140711 How To Enable Tab Complete Heroku Commands In Oh-My-Zsh.md b/translated/tech/20140711 How To Enable Tab Complete Heroku Commands In Oh-My-Zsh.md new file mode 100644 index 0000000000..b2cf8281aa --- /dev/null +++ b/translated/tech/20140711 How To Enable Tab Complete Heroku Commands In Oh-My-Zsh.md @@ -0,0 +1,50 @@ +如何在Oh-My-Zsh中启用Heroku命令tab按键补全功能 +================================================================================ +**Heroku**客户端是创建和管理Heroku应用的命令行界面工具。 + +需求: + +- Heroku toolbelt +- Oh-My-Zsh ([如何安装][1]) + +本文不是讲关于hereku的知识,也不是讲关于heroku的使用细节,而是仅仅展示给用户他们怎样可以使用oh-my-zsh来方便地敲写命令。此外你还应该安装[heroku toolbelt][2]来进行本文的相应的操作。对于Ubuntu和Debian发行版,你可以通过运行下面的命令来安装: + + wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh + +打开终端,用你在[这里]创建的用户登陆heroku: + + heroku登陆 + 输入您的Heroku认证。 + 邮箱: enockseth@unixmen.com + 密码 (您的输入会被隐藏): + 认证成功。 + +这显示heroku正在运行。 + +使用你喜欢的文本编辑器打开**.zshrc**: + + vim .zshrc + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/zsh_git.png) + +git是唯一默认启用的插件。 + +在下图显示的插件选择区添加**heroku**: + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/zsh_heroku.png) + +重启终端,输入**heroku**,按下tab键,到此就搞定啦: + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/heroku_tab_complete.png) + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/enable-tab-complete-heroku-commands-oh-zsh/ + +译者:[JonathanKang](https://github.com/JonathanKang) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.unixmen.com/install-oh-zsh-ubuntu-arch-linux-fedora/ +[2]:https://toolbelt.heroku.com/ +[3]:https://www.heroku.com/ diff --git a/translated/tech/20140711 Linux Basics--How To Find Size of Directory Commands.md b/translated/tech/20140711 Linux Basics--How To Find Size of Directory Commands.md new file mode 100644 index 0000000000..6bbaa3cccf --- /dev/null +++ b/translated/tech/20140711 Linux Basics--How To Find Size of Directory Commands.md @@ -0,0 +1,65 @@ +@@ -1,63 +0,0 @@ +Linux基础,如何在命令行中查看目录的大小 +===================================================================== +这是写给Liunx新用户的一系列文章中的第一篇,在这系列文章我将会写一些对新用户来说非常好用的**Linux基础命令**。 + +**注意**:本文的目标读者是仅有小量甚至是没有任何Linux命令行使用经验的读者。 + +>作为一个Linux的新用户,我怎样可以在命令行终端中查看某个目录的属性? + +###要求### + +唯一的要求是**du**命令行工具。du基本上是所有Linux发行版本默认提供的工具。用以下的命令来检查你的系统中是否可以使用du命令: + + man du + +**du** 命令用于输出文件的空间使用情况。 + +###使用du### + +不带任何参数的运行du命令会显示当前工作目录以及其子目录的文件名和所占用的空间大小(以字节为单位)。 + + du + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/du-overview.png) + +使用**-h**参数以对用户友好的方式输出文件大小,即分别以**K, M**和**G**来表示**Kb,Mb**和**Gb** + + du -h + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/du-h.png) + +若想查看某个特定目录的文件大小,则在du命令中指定要查看的目录名,如下: + + du -h Mapmaker + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/du-h-mapmaker.png) + +使用 **-c** 参数来查看目录所占用磁盘空间的总大小 + + du -ch + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/du-ch.png) + +使用 **-s** 参数只输出指定目录占用空间的大小 + + du -sh Mapmaker Sandbox + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/du-ch.png) + +使用 man du 查看du命令更多参数的用法 + + man du + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/man-du.png) + +知道du命令更多的用法?请分享给我和其他人。 + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/linux-basics-find-size-directory-commands/ + +译者:[cvsher](https://github.com/cvsher) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + diff --git a/translated/tech/20140711 ncdu--NCurses Disk Usage Analyzer.md b/translated/tech/20140711 ncdu--NCurses Disk Usage Analyzer.md new file mode 100644 index 0000000000..ccddaf1b1c --- /dev/null +++ b/translated/tech/20140711 ncdu--NCurses Disk Usage Analyzer.md @@ -0,0 +1,80 @@ +ncdu – 基于Ncurses库的磁盘使用分析器 +================================================================================ +[Ncdu][1] (NCurses Disk Usage) 是一个基于Ncurses库的du命令浏览器. 它通过众所周知的[du][2]命令,为用户提供一个快速且容易被使用的接口. 它显示磁盘使用的百分比且允许你通过ncurses库去浏览目录. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/ncdu-about.png) + +### 安装 ### + +ncdu已经被移植到大多数linux发行版本,可从官方资源库中安装. + +Arch / Manajaro and Derivatives: + + sudo pacman -S ncdu + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/ncdu.png) + +Ubuntu / Debian / Linux Minut and Derivatives: + + sudo apt-get install ncdu + +Fedora and Derivatives: + + sudo yum install ncdu + +在[这里][3]检查其他的发行版本. + +### 使用 ncdu ### + +Keys: + + +- up, k — Move cursor up +- down, j – Move cursor down +- right/enter — Open selected directory +- left, <, h — Open parent directory +- n — Sort by name (ascending/descending) +- s — Sort by size (ascending/descending) +- C – Sort by items (ascending/descending) +- d – Delete selected file or directory +- t — Toggle dirs before files when sorting +- g – Show percentage and/or graph + +为使用ncdu,请打开终端并且运行 + + ncdu + +开始扫描目录. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/ncdu-scanning.png) + +当扫描完成后,你能够很容易的查看文件/目录的大小. + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/done-scanning.png) + +确认删除文件: + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/07/ncdu-delete-confirm.png) + +在[这里][4] 阅读ncdu命令手册或运行: + + man ncdu + +**荣誉**: 有两位读者**BasketCase**和**Sama Vim**在阅读[Linux Basics: How To Find Size of Directory Commands][5]之后 向我们推荐Ncdu工具. +注:上面这个链接已经做成原文 + +Enjoy! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/ncdu-ncurses-disk-usage-analyzer/ + +译者:[hunanchenxingyu](https://github.com/hunanchenxingyu) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://dev.yorhel.nl/ncdu +[2]:http://www.unixmen.com/linux-basics-find-size-directory-commands/ +[3]:http://dev.yorhel.nl/ncdu +[4]:http://dev.yorhel.nl/ncdu/man +[5]:http://www.unixmen.com/linux-basics-find-size-directory-commands/ \ No newline at end of file diff --git a/translated/tech/20140714 Set Default Browser on Debian or Ubuntu Using Terminal.md b/translated/tech/20140714 Set Default Browser on Debian or Ubuntu Using Terminal.md new file mode 100644 index 0000000000..bd25bbb2b8 --- /dev/null +++ b/translated/tech/20140714 Set Default Browser on Debian or Ubuntu Using Terminal.md @@ -0,0 +1,26 @@ +利用终端(Terminal)在Debian/Ubuntu中设置默认浏览器 +================================================================================ +嘿,伙计们 + +在这篇文章中,我们将使用终端设置默认浏览器 + +虽然,可以很方便地使用浏览器主界面来设置为默认浏览器,但是有时,你需要远程做到这一点 + +要做到这一点,你只需简简单单的打开终端,然后执行下述的命令: +``` +sudo update-alternatives --config x-www-browser +``` +之后输入你想设置为默认的浏览器的号码,你就完成了! + +真个过程截图如下: + +![图片1](https://camo.githubusercontent.com/7eae55f5fac41634017c1fb5a8bd9cb634a86dc4/687474703a2f2f3138303031363938382e722e63646e37372e6e65742f77702d636f6e74656e742f75706c6f6164732f323031342f30372f6368616e67655f64656661756c745f62726f777365725f66726f6d5f7465726d696e616c5f64656269616e5f656e6f636b2e706e67) + +你成功了吗? + +--- +via: http://www.unixmen.com/quick-tip-set-default-browser-debianubuntu-using-terminal/ + +译者:译者ID 校对:校对者ID + +本文由 LCTT 原创翻译,Linux中国 荣誉推出