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/published/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 100% rename from published/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 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/published/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 100% rename from published/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 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/20140603 Write your first Linux Kernel module.md b/published/201406/20140603 Write your first Linux Kernel module.md similarity index 100% rename from published/20140603 Write your first Linux Kernel module.md rename to published/201406/20140603 Write your first Linux Kernel module.md 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/published/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 100% rename from published/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 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/20140607 How To Install iCup 2014 In Linux.md b/published/201406/20140607 How To Install iCup 2014 In Linux.md similarity index 100% rename from published/20140607 How To Install iCup 2014 In Linux.md rename to published/201406/20140607 How To Install iCup 2014 In Linux.md diff --git a/published/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 100% rename from published/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 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/published/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 100% rename from published/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 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/published/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 100% rename from published/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 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/published/20140610 Top 7 Desktop Environment For Linux.md b/published/201406/20140610 Top 7 Desktop Environment For Linux.md similarity index 100% rename from published/20140610 Top 7 Desktop Environment For Linux.md rename to published/201406/20140610 Top 7 Desktop Environment For Linux.md 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/published/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 100% rename from published/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 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/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/20140625 Canonical Debuts 'Orange Box' for Ubuntu OpenStack Cloud Demos.md b/sources/news/20140625 Canonical Debuts 'Orange Box' for Ubuntu OpenStack Cloud Demos.md deleted file mode 100644 index e64d0bd10d..0000000000 --- a/sources/news/20140625 Canonical Debuts 'Orange Box' for Ubuntu OpenStack Cloud Demos.md +++ /dev/null @@ -1,37 +0,0 @@ -Canonical Debuts 'Orange Box' for Ubuntu OpenStack Cloud Demos -================================================================================ -> The Orange Box, a portable server cluster that Canonical will use for Ubuntu-based OpenStack cloud demonstrations and training, is now available. - -![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2014/06/grayscale_7.jpg) - -Canonical's Orange Box, the portable server cluster that the company intends to use to showcase [OpenStack][1], [MAAS][2], [Juju][3] and other aspects of the Ubuntu Linux-based cloud, is out. Here's what it's all about. - -For starters, it's important to understand what the Orange Box is not: A revenue-generating hardware product from Canonical. The company has given no indication so far that it plans to sell these devices on a large scale—although if you truly want you can [buy one][4], for the equivalent of around $12,900, from [TranquilPC Limited][5], the company that has the contract for manufacturing them. - -Primarily, the Orange Box is a tool for convincing enterprises to invest in the Ubuntu-based cloud. It's a key part of the Ubuntu OpenStack strategy that Canonical founder Mark Shuttleworth [outlined last month][6], especially the OpenStack training program the company is offering, called [Jumpstart][7]. - -As part of Jumpstart, Canonical will loan an Orange Box to a participating organization so its employees can practice configuring OpenStack and related software on an Ubuntu cluster. Canonical staff also will provide consultation during the training period. - -But training purposes aside, the Orange Box [looks pretty cool][8]. And with 10 [Intel NUCs][9] inside—packing a collective punch of 160GB of RAM, 1,200GB of storage space and 10 i5 CPUs—the device fits quite a bit of computing power into a tiny space. - -Better still, the Orange Box comes preconfigured with software that provides a basis for launching Ubuntu-based cloud technologies. - -For Canonical, however, the real test will be making sure enterprises take advantage of the Orange Boxes that the company lends them not just to poke around an unusual hardware device, but to experience the Ubuntu cloud in a truly compelling way—compelling enough to convince IT decision-makers to ground the next-generation cloud infrastructure that they are building in Ubuntu. - --------------------------------------------------------------------------------- - -via: http://thevarguy.com/ubuntu/062314/canonical-debuts-orange-box-ubuntu-openstack-cloud-demos - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [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 \ No newline at end of file diff --git a/sources/news/20140625 Google Forks Open Source OpenSSL Web Security Code.md b/sources/news/20140625 Google Forks Open Source OpenSSL Web Security Code.md index 6094b99e87..ca2f033ab4 100644 --- a/sources/news/20140625 Google Forks Open Source OpenSSL Web Security Code.md +++ b/sources/news/20140625 Google Forks Open Source OpenSSL Web Security Code.md @@ -1,12 +1,13 @@ -Google Forks Open Source OpenSSL Web Security Code +2q1w2007翻译中 +谷歌分支了开源的 OpenSSL 网站安全代码 ================================================================================ -> Google's BoringSSL, a fork of the open source OpenSSL software for encrypting Web data, will spread the open source community's resources thinner. +> 谷的 BoringSSL, 一个开源用来加盟网站数据的的OpenSSL分支,将会向开源社区提交代码 ![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2014/06/grayscale6jpgcropdisplay.jpg) -In the wake of [Heartbleed][1], there may soon be as many variants of the open source OpenSSL software for encrypting Web traffic as there are Pokemon characters—or something like that. A few days ago, Google (GOOG) became the latest organization to announce its own OpenSSL spin, which it's calling BoringSSL. +因为[Heartbleed][1]暴露出的脆弱, 用来加密网页传输的开源OpenSSL的变种可能和口袋妖怪里的角色一样多。前两天, Google (GOOG) 成为了最早宣布自己的OpenSSL分支的组织,其分支叫做BoringSSL。 -Google developer Adam Langley announced BoringSSL—a name he described as "aspirational," presumably because Google hopes the new software will prove more drama-free than OpenSSL—in a [blog post][2] on June 20. +Google的开发者Adam Langley announced BoringSSL—a name he described as "aspirational," presumably because Google hopes the new software will prove more drama-free than OpenSSL—in a [blog post][2] on June 20. Google has made its own modifications to the OpenSSL code for some time for use in Chrome and other offerings, Langley said. But going forward, the company intends to fork OpenSSL entirely to create a separate solution, a change it hopes will simplify development on Google's end. diff --git a/sources/news/20140630 KDE Connect Adds Android File Sending, Touchpad Emulation.md b/sources/news/20140630 KDE Connect Adds Android File Sending, Touchpad Emulation.md new file mode 100644 index 0000000000..a477b6abef --- /dev/null +++ b/sources/news/20140630 KDE Connect Adds Android File Sending, Touchpad Emulation.md @@ -0,0 +1,51 @@ +KDE Connect Adds Android File Sending, Touchpad Emulation +================================================================================ +**A new version of KDE Connect for Android that adds a number of new features has been released.** + +![KDE Connect can now share files between desktop and mobile](http://www.omgubuntu.co.uk/wp-content/uploads/2014/06/kde-connect-share-feature.jpg) +KDE Connect can now share files between desktop and mobile + +KDE Connect for Android and the Plasma desktop now allow the touchscreen of a connected device to be used as a touchpad for your computer. + +This additional wireless input device will act just like a basic mouse, though doesn’t (yet) support multitouch features like two finger scrolling or right-clicking. + +Android’s share intent now supports KDE Connect, allowing you to send files from Android to your desktop and vice versa using a menu entry in the Dolphin file manager or by pushing files using a new command line option. + +Similar features for [iOS 8 and OS X Yosemite][1] and [Android ‘L’ and Chrome OS][2] are planned to debut this fall. + +The updated version also fixes a number of bugs and includes numerous improvements, including support for FreeBSD systems. + +Full Feature List: + +- Share files to/from Android and KDE +- Touchpad emulation +- Receive notifications from Android 4.3+ on desktop +- Shared clipboard supports copy and paste between phone and PC +- Multimedia remote control for select desktop media players (MPRIS) +- Battery status +- Wi-Fi connection sharing +- RSA Encryption + +### Download KDE Connect 0.7 ### + +The KDE Connect Android application is free to download from the Google Play and F-Droid stores. + +- [Download KDE Connect from Google Play][3] + +To make use of the newest features you will also need to install the latest version of KDE Connect (version 0.7) for Plasma. As of writing this is not yet available as a .deb installer or through a PPA. It can, however, be installed from source on Kubuntu 14.04 LTS and above by following the instructions [provided here][4]. + +- [Download KDE Connect 0.7 Source][5] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/06/kde-connect-android-notifications-linux-desktop + +译者:[译者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/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 \ No newline at end of file diff --git a/sources/news/20140630 New Linux Podcast App 'Vocal' Hits Beta, Ready for Testing.md b/sources/news/20140630 New Linux Podcast App 'Vocal' Hits Beta, Ready for Testing.md new file mode 100644 index 0000000000..7a5e397b9c --- /dev/null +++ b/sources/news/20140630 New Linux Podcast App 'Vocal' Hits Beta, Ready for Testing.md @@ -0,0 +1,33 @@ +New Linux Podcast App ‘Vocal’ Hits Beta, Ready for Testing +================================================================================ +**Back in April we found ourselves enamoured by a promising new [podcast app for Ubuntu called ‘Vocal‘][1]. Well, the app has since gone from being a stylish mockup to real working code — and you can help test it.** + +The project’s developer, Nathan Dyer, has made beta builds — still unstable and not feature complete — available for testing through a dedicated PPA for Ubuntu 14.04 LTS and 14.10. + +The kicker to this (rather sweet) news is that the beta builds of the app **can only be installed if you’re using the next-gen elementary desktop**. And since elementary do not provide official pre-beta development builds for users to test, that makes it a trite difficult. + +Not quite as difficult as trying it out on Unity, GNOME or KDE desktops, mind. If you’re an Ubuntu user wanting to kick the tires on Vocal you will first need to add an unstable elementary desktop PPA to your systems, something we strongly advise against doing. + +Dyer suggests interested users wait until the first beta of the next elementary version is made available. + +For now we can at least look at it: + +![Vocal Beta running on Elementary (Image: Dyer)](http://www.omgubuntu.co.uk/wp-content/uploads/2014/06/vocal-beta.png) +Vocal Beta running on Elementary (Image: Dyer) + +Since Vocal is open source there’s nothing to stop it being ported over to mainstream Linux desktop environments such as Unity. + +In the meantime to learn more visit [the developer’s blog][1], [check out the unstable PPA][2] or hit up [Vocal on Launchpad][3]. + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/06/linux-podcast-app-vocal-hits-preview-kicker + +译者:[译者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/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 \ No newline at end of file diff --git a/sources/news/20140701 Red Hat Delivers Cloud Certification Plan, and Teams with HP.md b/sources/news/20140701 Red Hat Delivers Cloud Certification Plan, and Teams with HP.md new file mode 100644 index 0000000000..d2bb05fb5a --- /dev/null +++ b/sources/news/20140701 Red Hat Delivers Cloud Certification Plan, and Teams with HP.md @@ -0,0 +1,34 @@ +Red Hat Delivers Cloud Certification Plan, and Teams with HP +================================================================================ +![](http://farm4.static.flickr.com/3108/3191608123_67e1da2b79_o.jpg) + +When Red Hat [announced][1] very solid quarterly earnings a few days ago, CEO Jim Whitehurst was quick to attribute part of the strong performance to his company's new focus on cloud computing. In discussing the enterprises that pay Red Hat for subcription support and services, he said: "These are some of the most sophisticated IT organizations in the world, and many continue to increase their purchases from Red Hat to modernize their IT infrastructure with cloud enabling technologies." + +[I've made the point before][2] that Red is pinning its future on cloud computing and OpenStack in particular. But for Red Hat to succeed with its OpenStack plans, it needs to be able to assure enterprise users that they are using tested and interoperable tools. With that in mind, the company has [announced][3] a new cloud management certification for Red Hat Enterprise Linux OpenStack Platform as part of the Red Hat OpenStack Cloud Infrastructure Partner Network. + +Red Hat has been working closely with cloud and network management solution providers, including iBMC and HP. As members of the Red Hat OpenStack Cloud Infrastructure Partner Network, these vendors are supporting Red Hat's platform certification process. + +Radhesh Balakrishnan, Red Hat's general manager of virtualization and OpenStack said, in a statement: + +> “As OpenStack is becoming a core element of the enterprise cloud strategy for many customers, Red Hat Enterprise Linux OpenStack Platform is architected and backed by the broadest partner ecosystem to be the preferred platform. The growth and maturity of the ecosystem reflects the evolution of the product moving from addressing infrastructure-centric alignment to help with early deployments to now be well-managed, to be part of enterprise hybrid cloud implementations.” + +Atul Garg, vice president and general manager of Cloud and Automation at HP added: + +> “We are excited to work with Red Hat to certify HP Cloud Service Automation and its solutions with Red Hat Enterprise Linux OpenStack Platform, to help our mutual customers build and manage private and hybrid cloud services. Our joint efforts are aimed at enabling customers to have choice and flexibility as they deploy cloud environments which can easily flex and adapt to business needs while supporting heterogeneity and leveraging existing investments in the datacenter.” + +As enterprises deploy OpenStack, they are increasingly concerned about being able to use existing infrastructure and management tools with their deployments. The expansion of Red Hat’s certification program to include cloud management solutions is intended to help enterprises who want to deploy Red Hat Enterprise Linux OpenStack Platform in a private cloud to feel confident in using their management solutions of choice. + +One other notable thing about the new certification program is that it deepens Red Hat's partnership with HP, which is also focused on OpenStack. It will be worth watching what else comes from that partnership, and, without a doubt, [the cloud is the new battleground for winning enterprise users][4]. + +-------------------------------------------------------------------------------- + +via: http://ostatic.com/blog/red-hat-delivers-cloud-certification-plan-and-teams-with-hp + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.zdnet.com/red-hat-beats-q1-earnings-targets-as-revenue-climbs-17-percent-7000030685/ +[2]:http://ostatic.com/blog/for-red-hat-the-cloud-beckons +[3]:http://www.marketwatch.com/story/red-hat-introduces-cloud-management-certification-for-red-hat-enterprise-linux-openstack-platform-2014-06-30 +[4]:http://ostatic.com/blog/the-cloud-is-the-new-battleground-for-winning-enterprise-users \ 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/20140610 The Best Linux Distribution for New Users.md b/sources/talk/20140610 The Best Linux Distribution for New Users.md index b504580b11..e9764674a8 100644 --- a/sources/talk/20140610 The Best Linux Distribution for New Users.md +++ b/sources/talk/20140610 The Best Linux Distribution for New Users.md @@ -1,4 +1,3 @@ -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. 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..bb30d87f14 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,3 @@ -[translating | sailing] 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 05d89ba210..0000000000 --- a/sources/talk/20140617 14 Apps To Boost Ubuntu.md +++ /dev/null @@ -1,81 +0,0 @@ - owen-carter translating -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 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/20140630 Ubuntu 14.04 LTS--Customizing Unity.md b/sources/talk/20140630 Ubuntu 14.04 LTS--Customizing Unity.md new file mode 100644 index 0000000000..80bb5b9492 --- /dev/null +++ b/sources/talk/20140630 Ubuntu 14.04 LTS--Customizing Unity.md @@ -0,0 +1,62 @@ +Ubuntu 14.04 LTS: Customizing Unity +================================================================================ +Although the Unity Desktop Manager has made HUGE performance and usability strides since the initial release in Ubuntu 11.10, some people are still put off by a number of the limitations in customizing the look and behavior of the window manager. We are going to take a look at how to customize Unity and bring back a sense of control to your desktop. + +### Unity Customizations Available ### + +In Ubuntu 14.04, Unity has several customizations that are available that were not previously. If you log into Unity, go the the “Settings” and choose “Display”, you will see the following screen: + +![Ubuntu 14.04 LTS Display and Unity Settings](https://linuxacademy.com/blog/wp-content/uploads/2014/06/unitysettings.png) +Ubuntu 14.04 LTS Display and Unity Settings + +Most of what you see is new since the Ubuntu 11.10 Unity introduction and several are new since just the latest version of Ubuntu 13.10. New since 13.10 are the ability to scale the menu and title bars. This is useful in very high resolution screens OR as a visual impairment option. Everything scales equally. + +Specific to Unity we can also turn on or off that “sticky edges” option. This is the somewhat annoying “pause” your mouse does on the edge of each screen of a multi-monitor setup. It stops the mouse momentarily at the edge, like it gets stuck. Finally, we have to option to turn that off. + +In the “Settings” screen still, choose the “Appearance” option to see the following: + +![Ubuntu 14.04 LTS Appearance and Unity Settings](https://linuxacademy.com/blog/wp-content/uploads/2014/06/unityappearance.png) +Ubuntu 14.04 LTS Appearance and Unity Settings + +Here we have one of the most requested options for the Unity Dock, the ability to change the Launcher size. Although it could be done in multiple ways in various versions of Ubuntu since 11.10, including it in the Appearance setting just makes it all official. I like that it allows you to change the icon size all the way down to 16 (even the tool we will talk about next only supports 24). + +### Unity Tweak Tool – Now Repo Strong! ### + +This tool has been around since the early days of Ubuntu 11.10 when Unity was first introduced, although you had to jump through a large number of hoops (and progressively smaller as the versions went on) to get it installed and it would be broken by Unity updates. + +Now however, it has officially been added to the default Ubuntu repositories and gets updated when Unity gets updated. There are a large number of customizations, so let’s get it installed: + + sudo apt-get install unity-tweak-tool + +After installation, start it up and you will see the following screen: + +![Ubuntu 14.04 LTS Official Unity Tweak Tool](https://linuxacademy.com/blog/wp-content/uploads/2014/06/unitytweaktool.png) +Ubuntu 14.04 LTS Official Unity Tweak Tool + +This tool encapsulates a large number of Unity Desktop customizations all in once convenient location. Most of these options can be had in the default Unity settings, at the command line or by editing sometimes hard to find configuration files. + +We can change the behavior of the dock, the panel, web applet integration, search within the Unity menu, etc. all within this one tool. Take the time to explore the options available to you – Unity Tweak Tool – learn it, live it, love it (at least if you use Unity). + +### Final Thoughts ### + +Ubuntu 14.04 LTS is shaping up more and more to be the Linux Desktop (sorry Canonical, you are still Linux) of choice for both the casual Linux user (is there such a thing) as well as the die hard professional. + +We now have more control than every over the Unity Desktop without resorting to tools, utilities or configuration file edits that may break with each subsequent Unity update. The desktop performance is pretty rock solid and, by adding some flavor with the Unity Tweak Tool, looks pretty cool as well! Drop us your thoughts or post links to your Unity Desktop set up in the comments below, we would be interested to see how you are using Ubuntu 14.04 LTS. + +---------- + +#### Terrence T. Cox #### + +Developer, Linux Advocate, Open Source Junkie. Been at this whole tech thing long enough to be considered 'very experienced' but not so long as to be bored of it. + +[Twitter][1] + +-------------------------------------------------------------------------------- + +via: https://linuxacademy.com/blog/linux/ubuntu-14-04-lts-customizing-unity/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://twitter.com/mourngrymtc/ \ 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/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 index 37d980bc8d..86870d7d55 100644 --- a/sources/tech/20140616 How to diskless boot a Linux machine.md +++ b/sources/tech/20140616 How to diskless boot a Linux machine.md @@ -1,5 +1,3 @@ -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. 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/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/20140623 Advanced Directory Navigations Tips and Tricks in Linux.md b/sources/tech/20140623 Advanced Directory Navigations Tips and Tricks in Linux.md deleted file mode 100644 index 2ed47c7dd6..0000000000 --- a/sources/tech/20140623 Advanced Directory Navigations Tips and Tricks in Linux.md +++ /dev/null @@ -1,91 +0,0 @@ -Advanced Directory Navigations Tips and Tricks in Linux -================================================================================ -Directory navigation is one of the most basic concepts when it comes to understanding any command line system. Although it’s not a very difficult thing to understand when it comes to Linux, there are certain tips and tricks that can enhance your experience, and help you do things faster. In this article, we will discuss some advanced directory navigation tips. - -### The Stuff We Already Know ### - -Before jumping on to the advanced concepts, here is the basics of directory navigation that the article expects its readers to know: - -- ‘pwd’ command is used to display the current working directory. -- ‘cd’ command is used to change the current working directory. -- ‘cd’ followed by space and followed by a couple of periods (cd ..) brings the control back to the parent directory -- ‘cd’ followed by just the name of a subdirectory changes to that subdirectory -- ‘cd’ followed by a complete path changes to that directory - -### Advanced Tips ### - -In this section we will discuss some directory navigation tips and tricks that will help you easily switch between directories. - -### Change to the home directory from anywhere ### - -Your home directory is an important directory, and everyone switches back and forth quite frequently. While typing ‘cd /home/’, isn’t a big deal, there is another way out which is not only easier but faster too. And that alternative is typing only ‘cd’. - -Here is an example : - - $ pwd - /usr/include/netipx - $ cd - $ pwd - /home/himanshu - -So you can see, no matter where the current control is, just type ‘cd’ command and you can immediately change to your home directory. - -**NOTE**- To change to the home directory of a particular user, just type ‘cd ~user_name' - -### Switch between directories using cd - ### - -Suppose your current working directory is this: - - $ pwd - /home/himanshu/practice - -and you want to switch to the directory **/usr/bin/X11**, and then switch back to the directory mentioned above. So what will you do? The most straight forward way is : - - $ cd /usr/bin/X11 - $ cd /home/himanshu/practice/ - -Although it seems a good way out, it really becomes tiring when the path to the directories is very long and complicated. In those cases, you can use the ‘cd -’ command. - -While using ‘cd -’ command, the first step will remain the same, i.e., you have to do a cd to the directory to you want to change to, but for coming back to the previous directory, just do a ‘cd -’, and that’s it. - - $ cd /usr/bin/X11 - $ cd - - /home/himanshu/practice - $ pwd - /home/himanshu/practice - -And if you want to again go back to the last directory, which in this case is /usr/bin/X11, run the ‘cd -’ command again. So you can see that using ‘cd -’ you can switch between directories easily. The only limitation is that it works with the last switched directories only. - -### Switch between directories using pushd and popd ### - -![directory navigation](http://linoxide.com/wp-content/uploads/2014/06/pushd-popd.jpg) - -If you closely analyse the ‘cd -’ trick, you’ll find that it helps switching between only the last two directories, but what if there is a situation in which you switch multiple directories, and then want to switch back to the first one. For example, if you switch from directory A to directory B, and then to directory C and directory D. Now, you want to change back to Directory A. - -As a general solution, you can type ‘cd’ followed by the path to directory A. But then again, if the path is long or complicated, the process can be time-consuming, especially when you have to switch between them frequently. - -In these kind of situations, you can use the ‘pushd’ and ‘popd’ commands. The ‘pushd’ command saves the path to a directory in memory, and the ‘popd’ command removes it, and switches back to it too. - -For example : - - $ pushd . - /usr/include/netipx /usr/include/netipx - $ cd /etc/hp/ - $ cd /home/himanshu/practice/ - $ cd /media/ - $ popd - /usr/include/netipx - $ pwd - /usr/include/netipx - -So you can see that I used ‘pushd’ command to save the path to current working directory (represented by .), and then changed multiple directories. To come back to the saved directory, I just executed the ‘popd’ command. - -**NOTE**- You can also use ‘pushd’ command to switch back to the saved directory, but that doesn’t remove it from the memory, like ‘popd’ does. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-command/directory-navigations-tips-tricks/ - -译者:[译者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/20140623 How to speed up directory navigation in a Linux terminal.md b/sources/tech/20140623 How to speed up directory navigation in a Linux terminal.md deleted file mode 100644 index 36aa1127a7..0000000000 --- a/sources/tech/20140623 How to speed up directory navigation in a Linux terminal.md +++ /dev/null @@ -1,88 +0,0 @@ -Translating by GOLinux -How to speed up directory navigation in a Linux terminal -================================================================================ -As useful as navigating through directories from the command line is, rarely anything has become as frustrating as repeating over and over "cd ls cd ls cd ls ..." If you are not a hundred percent sure of the name of the directory you want to go to next, you have to use ls. Then use cd to go where you want to. Hopefully, a lot of terminals and shell languages now propose a powerful auto-completion feature to cope with that problem. But it remains that you have to hit the tabulation key frenetically all the time. If you are as lazy as I am, you will be very interested in autojump. autojump is a command line utility that allows you to jump straight to your favorite directory, regardless of where you currently are. - -### Install autojump on Linux ### - -To install autojump on Ubuntu or Debian: - - $ sudo apt-get install autojump - -To install autojump on CentOS or Fedora, use yum command. On CentOS, you need to [enable EPEL repository][1] first. - - $ sudo yum install autojump - -To install autojump on Archlinux: - - $ sudo pacman -S autojump - -If you cannot find a package for your distribution, you can always compile from the sources on [GitHub][2]. - -### Basic Usage of autojump ### - -The way autojump works is simple: it records your current location every time you launch a command, and adds it in its database. That way, some directories will be added more than others, typically your most important ones, and their "weight" will then be greater. - -From there you can jump straight to them using the syntax: - - autojump [name or partial name of the directory] - -Notice that you do not need a full name as autojump will go through its database and return its most probable result. - -For example, assume that we are working in a directory structure such as the following. - -![](https://farm4.staticflickr.com/3921/14276240117_9f56b42fec_z.jpg) - -Then the command below will take you straight to /root/home/doc regardless of where you were. - - $ autojump do - -If you hate typing too, I recommend making an alias for autojump or using the default one. - - $ j [name or partial name of the directory] - -Another notable feature is that autojump supports both zsh shell and auto-completion. If you are not sure of where you are about to jump, just hit the tabulation key and you will see the full path. - -So keeping the same example, typing: - - $ autojump d - -and then hitting tab will return either /root/home/doc or /root/home/ddl. - -Finally for the advanced user, you can access the directory database and modify its content. It then becomes possible to manually add a directory to it via: - - $ autojump -a [directory] - -If you suddenly want to make it your favorite and most frequently used folder, you can artificially increase its weight by launching from within it the command - - $ autojump -i [weight] - -This will result in this directory being more likely to be selected to jump to. The opposite would be to decrease its weight with: - - $ autojump -d [weight] - -To keep track of all these changes, typing: - - $ autojump -s - -will display the statistics in the database, while: - - $ autojump --purge - -will remove from the database any directory that does not exist anymore. - -To conclude, autojump will be appreciated by all the command line power users. Whether you are ssh-ing into a server, or just like to do things the old fashion way, reducing your navigation time with fewer keystrokes is always a plus. If you are really into that kind of utilities, you should definitely look into [Fasd][3] too, which deserves a post in itself. - -What do you think of autojump? Do you use it regularly? Let us know in the comments. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/2014/06/speed-up-directory-navigation-linux-terminal.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]:https://github.com/joelthelion/autojump -[3]:https://github.com/clvv/fasd diff --git a/sources/tech/20140624 How to sync Microsoft OneDrive on Linux.md b/sources/tech/20140624 How to sync Microsoft OneDrive on Linux.md deleted file mode 100644 index 59b9f48e35..0000000000 --- a/sources/tech/20140624 How to sync Microsoft OneDrive on Linux.md +++ /dev/null @@ -1,80 +0,0 @@ -How to sync Microsoft OneDrive on Linux -================================================================================ -[OneDrive][1] (previously known as SkyDrive) is a popular cloud storage offering from Microsoft. Currently OneDrive offers 7GB free storage for every new signup. As you can imagine, OneDrive is well integrated with other Microsoft software products. Microsoft also offers a standalone OneDrive client which automatically backs up pictures and videos taken by a camera to OneDrive storage. But guess what. This client is available for all major PC/mobile platforms except Linux. "OneDrive on any device, any time"? Well, it is not there, yet. - -Don't get disappointed. The open-source community already has already come up with a solution for you. [onedrive-d][2] written by a Boilermaker in Lafayette can get the job done. Running as a monitoring daemon, onedrive-d can automatic sync a local folder with OneDrive cloud storage. - -In this tutorial, I will describe **how to sync Microsoft OneDrive on Linux by using onedrive-d**. - -### Install onedrive-d on Linux ### - -While onedrive-d was originally developed for Ubuntu/Debian, it now supports CentOS/Fedora/RHEL as well. - -Installation is as easy as typing the following. - - $ git clone https://github.com/xybu92/onedrive-d.git - $ cd onedrive-d - $ ./inst install - -### First-Time Configuration ### - -After installation, you need to go through one-time configuration which involves granting onedrive-d read/write access to your OneDrive account. - -First, create a local folder which will be used to sync against a remote OneDrive account. - - $ mkdir ~/onedrive - -Then run the following command to start the first-time configuration. - - $ onedrive-d - -It will pop up a onedrive-d's Settings window as shown below. In "Location" option, choose the local folder you created earlier. In "Authentication" option, you will see "You have not authenticated OneDrive-d yet" message. Now click on "Connect to OneDrive.com" box. - -![](https://farm4.staticflickr.com/3885/14470579955_1fb92e7cfe.jpg) - -It will pop up a new window asking you to sign in to OneDrive.com. - -![](https://farm4.staticflickr.com/3903/14467221981_3d74140f61_z.jpg) - -After logging in to OneDrive.com, you will be asked to grant access to onedrive-d. Choose "Yes". - -![](https://farm3.staticflickr.com/2925/14283963819_86cf52e1fd_z.jpg) - -Coming back to the Settings window, you will see that the previous status has changed to "You have connected to OneDrive.com". Click on "OK" to finish. - -![](https://farm4.staticflickr.com/3896/14284004048_3e718d1e30.jpg) - -### Sync a Local Folder with OneDrive ### - -There are two ways to sync a local folder with your OneDrive storage by using onedrive-d. - -One way is to **sync with OneDrive manually from the command line**. That is, whenever you want to sync a local folder against your OneDrive account, simply run: - - $ onedrive-d - -`onedrive-d` will then scan the content of both a local folder and a OneDrive account, and make the two in sync. This means either uploading newly added files in a local folder, or downloading newly found files from a remote OneDrive account. If you remove any file from a local folder, the corresponding file will automatically be deleted from a OneDrive account after sync. The same thing will happen in the reverse direction as well. - -Once sync is completed, you can kill the foreground-running onedrive-d process by pressing Ctrl+C. - -![](https://farm6.staticflickr.com/5509/14283967750_b9ebf1b05d_z.jpg) - -Another way is to run onedrive-d as an always-on daemon which launches automatically upon start. In that case, the background daemon will monitor both the local folder and OneDrive account, to keep them in sync. For that, simply add onedrive-d to the [auto-start program list][3] of your desktop. - -When onedrive-d daemon is running in the background, you will see OneDrive icon in the desktop status bar as shown below. Whenever sync update is triggered, you will see a desktop notification. - -![](https://farm4.staticflickr.com/3924/14290119448_3b1144db77.jpg) - -A word of caution: According to the author, onedrive-d is still under active development. It is not meant for any kind of production environment. If you encounter any bug, feel free to file a [bug report][4]. Your contribution will be appreciated by the author. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/2014/06/sync-microsoft-onedrive-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/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 \ No newline at end of file diff --git a/sources/tech/20140624 Open Source Multimedia Converter Curlew 0.1.22.3 Is Out.md b/sources/tech/20140624 Open Source Multimedia Converter Curlew 0.1.22.3 Is Out.md deleted file mode 100644 index 1255d562c4..0000000000 --- a/sources/tech/20140624 Open Source Multimedia Converter Curlew 0.1.22.3 Is Out.md +++ /dev/null @@ -1,38 +0,0 @@ -Open Source Multimedia Converter Curlew 0.1.22.3 Is Out -================================================================================ -![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, an easy to use, free, and open source multimedia converter for Linux, has reached version 0.1.22.3.** - -Curlew can be used to convert more than 100 different formats, show detailed file information, preview conversion, insert subtitles, and much more. - -According to the changelog, the last size and position is now remembered from one instance to another, a few missing dialog icons have been added, and the filesystem is now synced before suspending. - -The application has a number of dependencies: at least python version 2.7 (no more than 3.0), python-gobject 3.0, gir1.2-gtk 3.0, ffmpeg 0.8, libav-tools 0.8, mencoder, libavcodec-extra, xdg-utils, and mediainfo. - -The guys from noobslab.com also provide an easy way of installing the application with the help of a PPA. All you have to do is to enter a few commands in the terminal (you will need to be root in order to make it work): - - sudo add-apt-repository ppa:noobslab/apps - sudo apt-get update - sudo apt-get install curlew - -Check out the official [changelog][1] for a complete list of new features and updates. - -You can download the Curlew 0.1.22.3 source package: - -- [Ubuntu 14.04 DEB ALL][2][ubuntu_deb] [172 KB] -- [tar.gz][3][sources] [152 KB] - -Remember that this is a development version and it should NOT be installed on production machines. It is intended for testing purposes only. - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/Open-Source-Multimedia-Converter-Curlew-0-1-22-3-Is-Out-448028.shtml - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [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 \ No newline at end of file diff --git a/sources/tech/20140701 Command Line Tuesdays--Part Two.md b/sources/tech/20140701 Command Line Tuesdays--Part Two.md new file mode 100644 index 0000000000..5f54ac0703 --- /dev/null +++ b/sources/tech/20140701 Command Line Tuesdays--Part Two.md @@ -0,0 +1,68 @@ +Command Line Tuesdays – Part Two +================================================================================ +Heya geekos! + +Let’s refresh our memories. [Last week][1], we skimmed through some basic commands, learned what a shell is actually, and made a steady introduction into our CLI Tuesdays series. + +Today’s menu offers something else: navigation through the file system. + +Now, the best picture I managed to find on the www is from a site called [devopsbootcamp][2]. You can find their tutorials and the rest here. But anyway, here’s a very nice diagram of what a linux root filesystem looks like. + +![Filesys](http://devopsbootcamp.readthedocs.org/en/latest/_images/hierarchy.jpg) + +For example, as stated in the above picture, your user directory (where you usually store your movies, music, documents etc.) is located in the /home folder. /home folder is located under /. Then you have the /etc folder, where most of the files for configuration are located. Anyway, you can find the detailed description here, as we’ll not be getting into which folder is for what, until we start using and configuring them. Today is reserved for navigation only. And on that note, let’s get down to the first command of the day… + +### pwd ### + +pwd, or ‘print working directory’ is a very useful command if you think you are lost navigating through the folders. At any given moment, type pwd, and voila! What appears is a complete pathway you took to arrive to this folder. Those guys in The Cube could sure use it, losers. + +![Cube](http://bloody-disgusting.com/images/news/cube2review1.gif) +注:此图原文哪里看不到,看看能通过什么途径得到 + +Imagine yourselves walking from room to room inside a massive apartment, loosing your way. pwd is like the breadcrumb trail leading you to your starting point, so you don’t loose your way inside the folder maze! + +![pwd](http://redhat.activeventure.com/73/gettingstartedguide/figs/basics/pwd.png) + +### cd ### + +Now you know in which directory you’re situated thanks to your usage of the pwd command. Now you want to take the next step and move to another directory. Let’s say you have a folder/directory inside your home folder you want to relocate your top secret terminal operation to. For this, you use the ‘cd’ command. cd, or ‘change directory’, will change the location of wanted directory. How do you use it? Simple, type cd and the path to your folder. Let’s say, for example, you want to enter your Hello Kitty picture collection in your home folder. You type ‘cd /home/username/Hello\ Kitty’. + +As you see, we didn’t only use the space bar in the folder name. That’s because the terminal won’t recognize it. Whenever you want to navigate to a folder containing a space in it’s name, you **replace it with the backslash character, followed by space**. You can also, without using the backslash+space option, just put the **whole folder name into quotes**, f.ex. cd /home/username/”Hello Kitty”. + +![cd](http://blogote.com/wp-content/uploads/2010/06/terminal-cd-desktop.png) + +Try it out yourself. Navigate to a different directory using cd, and when there, type pwd to see if everything worked as it’s supposed to. + +### Mr. Shotts’ Shottcuts ### + +Mr. Shotts reminds us there are also some shortcuts available. + +If you type only cd, without the path following it, your terminal will change your working directory (whatever it may be) to your /home folder. + +The same, if you type cd `~user_name` it will lead you to the home folder of the specific user you stated. + +### Next Week ### + +Next week, we’ll head over to the next chapter – we’ll learn how to list files and directories, view text files and classify file’s contents so it will be a bit more work than we’re used to, but I hope you’ll have enough time. Command by command, and if you haven’t the time to do it yourself, we’ll learn the basics together in a matter of months! + +and remember… + +### …have a lot of fun! ### + +P.S.: Thanks to bwl’s comment, we fixed an error in the text regarding the space bar in directory names. + +P.P.S.: GreatEmerald also added some fresh information about file hierarchy. You can read it in [the comments][3]. + +Thanks for your input/corrections. + +-------------------------------------------------------------------------------- + +via: https://news.opensuse.org/2014/06/24/command-line-tuesdays-part-two/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://news.opensuse.org/2014/06/10/command-line-tuesdays-part-one/ +[2]:http://devopsbootcamp.readthedocs.org/ +[3]:https://news.opensuse.org/2014/06/24/command-line-tuesdays-part-two/comment-page-1/#comment-99186 \ 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/20140701 How To Add Multiple Timezones In Ubuntu 14.04 [Quick Tip].md b/sources/tech/20140701 How To Add Multiple Timezones In Ubuntu 14.04 [Quick Tip].md new file mode 100644 index 0000000000..32ffebe121 --- /dev/null +++ b/sources/tech/20140701 How To Add Multiple Timezones In Ubuntu 14.04 [Quick Tip].md @@ -0,0 +1,42 @@ +How To Add Multiple Timezones In Ubuntu 14.04 [Quick Tip] +================================================================================ +If you have to deal with multiple timezones on a regular basis, you would definitely appreciate if your desktop clock could show multiple timezones. As an expat, I have to keep the track of time in both France and India. In Ubuntu, you can easily change the settings to add multiple timezones. + +In this quick tip, we shall see **how to add additional timezone in Ubuntu 14.04**. + +### Add multiple timezones in Ubuntu 14.04 ### + +Go to System Settings (press Windows key and search for system settings in Unity Dash) and look for Time & Date. + +In here, go to **Clock** tab and check the **Time in other locations** box. After that click on **Choose locations** button. + +![Add multiple timezones in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/06/Timezone_Ubuntu.jpeg) + +It will open a box where you can **type a location** of your choice and a drop down will appear with matching locations. Choose the one you want and **click on the plus (+) sign** to add it. + +![Adding timezone in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/06/Add_Timezone_Ubuntu.png) + +Once you have done this, you can see various timezone added in the clock. + +![multiple timezone displayed in Ubuntu 14.04](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/06/Multiple_Timezones_display_Ubuntu.png) + +Enjoy Ubuntu across timezones :) + +---------- + +![](http://0.gravatar.com/avatar/20749c268f5d3e4d2c785499eb6a17c0?s=80&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&r=G) + +#### 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/add-multiple-timezones-ubuntu-1404/ + +译者:[译者ID](https://github.com/译者ID) 校对:[校对者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 \ No newline at end of file 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/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 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/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/20140623 How to speed up directory navigation in a Linux terminal.md b/translated/tech/20140623 How to speed up directory navigation in a Linux terminal.md new file mode 100644 index 0000000000..570ee173d0 --- /dev/null +++ b/translated/tech/20140623 How to speed up directory navigation in a Linux terminal.md @@ -0,0 +1,87 @@ +在Linux终端中加速目录导航 +================================================================================ +与在命令行中导航目录一样令人称道的是,很少有比一遍又一遍重复”cd ls cd ls cd ls……“更令人沮丧的事情了。如果你不是百分百确定你想要进入的下一个目录的名字,那么你不得不使用ls来确认,然后使用cd来进入你想要进的那一个。所幸的是,现在大量的终端和shell语言提供了强大的自动补全功能来处理该问题。但是,你仍然需要一直疯狂地敲击制表键来干这事。如果你和我一样懒惰,你就会对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的工作方式很简单:它会在你每次启动命令时记录你当前位置,并把它添加进它自身的数据库中。那样,某些目录比其它一些目录添加的次数多,这些目录一般就代表你最重要的目录,而它们的“weight”也会增大。 + +从那儿,你可以使用下面的语法来直接跳转到这些目录: + + autojump [name or partial name of the directory] + +注意,你不需要输入完整的名称,因为autojump会检索它的数据库,并返回最可能的结果。 + +例如,假定我们正在下面的目录结构中工作。 + +![](https://farm4.staticflickr.com/3921/14276240117_9f56b42fec_z.jpg) + +那么下面的命令将直接让你跳到/root/home/doc下,不管你当前位置在哪里。 + + $ autojump do + +如果你也很讨厌打字,那么我推荐你为autojump起个别名,或者使用默认的别名。 + + $ j [name or partial name of the directory] + +另外一个引人注目的功能是,autojump支持 + +还是同样的例子,输入: + + $ autojump d + +然后敲击tab键,将会返回/root/home/doc或者/root/home/ddl。 + +最后,对于高级用户,你可以访问目录数据库,并修改它的内容。它使得使用下面的命令来手动添加一个目录成为可能: + + $ autojump -a [directory] + +如果你突然想要把它变成你的最爱和使用最频繁的文件夹,你可以通过命令的内部参数来手工增加它的weight + + $ autojump -i [weight] + +这将使得该目录更可能被选择跳转。相反的例子是使用内部参数来减少weight: + + $ autojump -d [weight] + +要跟踪所有这些改变,输入: + + $ 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) 校对:[校对者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]:https://github.com/joelthelion/autojump +[3]:https://github.com/clvv/fasd diff --git a/translated/tech/20140624 How to sync Microsoft OneDrive on Linux.md b/translated/tech/20140624 How to sync Microsoft OneDrive on Linux.md new file mode 100644 index 0000000000..7a6528348e --- /dev/null +++ b/translated/tech/20140624 How to sync Microsoft OneDrive on Linux.md @@ -0,0 +1,81 @@ +如何在Linux中同步微软 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) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [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/translated/tech/20140624 Open Source Multimedia Converter Curlew 0.1.22.3 Is Out.md b/translated/tech/20140624 Open Source Multimedia Converter Curlew 0.1.22.3 Is Out.md new file mode 100644 index 0000000000..6f7077377d --- /dev/null +++ b/translated/tech/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.0)、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) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [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/sources/tech/20140625 Betty--Translate English Phrases Into Linux Commands.md b/translated/tech/20140625 Betty--Translate English Phrases Into Linux Commands.md similarity index 56% rename from sources/tech/20140625 Betty--Translate English Phrases Into Linux Commands.md rename to translated/tech/20140625 Betty--Translate English Phrases Into Linux Commands.md index ba7ca167c6..f9b695fbbc 100644 --- a/sources/tech/20140625 Betty--Translate English Phrases Into Linux Commands.md +++ b/translated/tech/20140625 Betty--Translate English Phrases Into Linux Commands.md @@ -1,64 +1,67 @@ -Betty: Translate English Phrases Into Linux Commands +CNprober翻译完成。。。619913541 + +Betty:通过大白话执行Linux命令 ================================================================================ -**Betty** is an open source tool that translates English-like phrases into Linux commands. The main goal of this project is to use the Linux powered systems through natural language input. Let us see some examples how it works. -### Installation ### +**Betty** 是一个将类英语短语翻译成Linux命令的开源工具。这个项目的主要目的是让大家可以通过输入自然语言来使用强大的Linux系统。让我们来看一下它是怎么工作的。 -Betty installation is very simple and straight forward. Make sure you’ve installed the following prerequisites packages. +### 安装 ### -#### On Debian based systems: #### +Betty的安装非常简单直接。首先确认你已经安装了下面这些依赖包[译注,需要安装至少Ruby1.9以上版本]。 + +#### 对于基于Debian的系统:#### sudo apt-get install git curl ruby -On RPM based systems: +####对于基于RPM的系统:#### yum install git curl ruby -Now, git clone the Betty repository to any preferred location. I am going to clone the betty repo in my home directory **i.e /home/sk/**. +现在git工具把Betty库clone到你自定义的任何路径。这里我克隆到我的home目录,**例如 /home/sk/**. git clone https://github.com/pickhardt/betty -Add the betty alias in your bashrc file. +添加betty的别名到你的bashrc配置文件。 sudo nano ~/.bashrc -Add the following line at the end: +将下列行添加到文件的末尾: alias betty="/home/sk/betty/main.rb" -Make sure you’ve replaced the correct path of the betty directory. +确保你已经正确地设置好了betty的路径。 -It’s done. Now, it’s time to play with betty. +好了,现在是时候和betty好好地玩耍了。 -### Usage ### +### 用法 ### -You should include the word “betty” in-front of every English phrases. As you may know already, if we want to know the user name of our system, we run the following command: +你应该在英语短语之前加上单词“betty”。你也许已经知道,如果我们想知道在系统中我们的用户名,应该运行下面的命令: whoami -Sample output: +输出是这样的: sk -As you see above, my current user name is **sk**. Well, now we can get the same result using betty as shown below. +如你所见,我当前登录的用户名是 **sk**. 现在我也可以通过下面的betty命令获取相同的结果。 betty whats my username -Sample output: +输出是这样的: Betty: Running whoami sk -Cool, isn’t it? Yes. Betty understands the normal English phrase “whats my username” that I entered, and ran the command “whoami” automatically, and finally displayed the correct output. +真的好酷,是不是?Betty理解我输入的“whats my username”短语,然后运行“whoami”命令,最后输出结果。 -Let us see some other commands too. +让我们也来看其他命令。 -Betty will respond in multiple ways if you didn’t enter exactly what you’re looking for. For example, we run the following command: +如果你的输入不够准确,Betty也能以多种方式回应你。例如,我们运行下面的命令: betty whats my name -Betty isn’t sure whether she should find the system username or full name. In this case, she will ask you multiple questions to find the exact result. As you see below, Betty asks me which command(whoami or finger $(whoami) | sed ‘s/.*: *//;q’) should I want to execute. I just want it to display my username, so i chose number **1**. - +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 @@ -69,13 +72,14 @@ Betty isn’t sure whether she should find the system username or full name. In Betty: Running whoami sk -### Compress And Uncompress Folders ### +### 压缩和解压缩文件夹 ### + +如果你想要压缩一个文件或者文件夹,用下面的命令。例如,我想压缩我home目录下的“test”文件夹。 -If you want to compress a file or a folder, use the following command. For example, I want to compress a folder called “test” folder in my home directory. betty compress test/ test.tar.gz -Sample output: +输出是这样的: Betty: Running tar -czvf test.tar.gz test/ test/ @@ -84,11 +88,11 @@ Sample output: test/home/sk/test/ test/home/sk/test/sample -Similarly, we can use the following command to uncompress an archive file. +类似的,我们可以用下面的命令来解压缩一个归档文件。 betty uncompress test.tar.gz -Sample output: +输出是这样的: Betty: Running mkdir test && tar -zxvf test.tar.gz -C test test/ @@ -97,11 +101,11 @@ Sample output: test/home/sk/test/ test/home/sk/test/sample -### Complete list of Betty commands ### +### 完整的Betty命令行列表 ### -Betty tool has some command formats. It doesn’t understand if you put the command “what is my user name” instead of “whats my username”. So, you have to enter the correct English phrase that supported by Betty. +Betty工具有一些命令格式。如果你输入“what is my user name”而不是“whats my username”,它是不能识别的。所以,你只能输入Betty支持的英语短语。 -The complete list of supported commands are given below. +下面给出一个Betty支持的完整的命令行列表。 Count: betty how many words are in this directory @@ -181,11 +185,11 @@ The complete list of supported commands are given below. betty turn web on betty please tell me what is the weather like in London -Betty seems very nice tool to Linux novice users. Hope this tool will useful for you too. +对Linux初级使用者来说,Betty似乎是一个非常nice的工具。希望这个工具对你也会非常有用。 Cheers! -Source: +源代码: - [Betty Homepage][1] @@ -193,7 +197,7 @@ Source: via: http://www.unixmen.com/betty-translate-english-phrases-linux-commands/ -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) +译者:[love_daisy_love](https://github.com/CNprober) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/sources/tech/20140625 Create A '.deb Pacakge Repository' at Sourceforge.net Using 'Reprepro' Tool in Ubuntu.md b/translated/tech/20140625 Create A '.deb Pacakge Repository' at Sourceforge.net Using 'Reprepro' Tool in Ubuntu.md similarity index 58% rename from sources/tech/20140625 Create A '.deb Pacakge Repository' at Sourceforge.net Using 'Reprepro' Tool in Ubuntu.md rename to translated/tech/20140625 Create A '.deb Pacakge Repository' at Sourceforge.net Using 'Reprepro' Tool in Ubuntu.md index 4b3aab3993..9c33329655 100644 --- a/sources/tech/20140625 Create A '.deb Pacakge Repository' at Sourceforge.net Using 'Reprepro' Tool in Ubuntu.md +++ b/translated/tech/20140625 Create A '.deb Pacakge Repository' at Sourceforge.net Using 'Reprepro' Tool in Ubuntu.md @@ -1,22 +1,22 @@ -Create A “.deb Pacakge Repository” at Sourceforge.net Using “Reprepro” Tool in Ubuntu +在Ubuntu下使用“Reprepro”工具在Sourceforge.net中创建".deb"包仓库 ================================================================================ -**Reprepro** is a small command-line tool to create and manage **.deb** repositories easily, Today we’ll be showing how to create a Debian package repositories easily using reprepro and how to upload it to Sourceforge.net using **rsync** command. +**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) -### Step 1: Install Reprepro and Generate Key ### +### 步骤 1: 安装Reprepro并生成key ### -First, install all the necessary packages, using the following apt-get command. +首先,安装所有需要的包,使用下面的apt-get命令。 $ sudo apt-get install reprepro gnupg -Now you need to generate a gpg key using gnupg, to do this, apply this command. +现在你需要使用hnupg生成一个gpg key,这里使用下面的命令。 $ gpg --gen-key -It will ask you some questions, like the kind of the key you want, how long the key should be valid, if you don’t know what to answer, just click **Enter** for the default options (recommended). +它会询问你一些问题,比如你想要哪种key、key的有效期、如果你不知道如何回答,只需点击**Enter** 来选择默认选项(建议) -Of course, it will ask you for a username and a password, keep those in mind, because we will need them later. +当然,它会询问你用户名和密码,在脑海中记住这些,因为我们会在之后需要它。 gpg (GnuPG) 1.4.14; Copyright (C) 2013 Free Software Foundation, Inc. This is free software: you are free to change and redistribute it. @@ -71,11 +71,11 @@ Of course, it will ask you for a username and a password, keep those in mind, be uid Ravi Saive (tecmint) sub 2048R/7EF2F750 2014-06-24 -Now your key will be generated, to Check if so, run this command as a root privileges. +现在你的key已经生成了,要检查一下,用root权限运行这条命令。 $ sudo gpg --list-keys -#### Sample Output #### +#### 示例输出 #### /home/ravisaive/.gnupg/pubring.gpg ---------------------------------- @@ -83,9 +83,9 @@ Now your key will be generated, to Check if so, run this command as a root privi uid ravisaive (tecmint) sub 2048R/7EF2F750 2014-06-24 -### Step 2: Create a Package Repository and Export Key ### +### 步骤 2: 创建一个包仓库并导出key ### -We’ll start the work now to create the repository, first you have to create some folders, our repository will be in **/var/www/apt** directory, so let’s create some folders. +我们现在要开始创建仓库,首先你需要创建一些文件夹,我们的仓库会在**/var/www/apt**目录,让我们先创建这些目录。 $ sudo su # cd /var/www @@ -94,17 +94,17 @@ We’ll start the work now to create the repository, first you have to create so # mkdir -p ./apt/conf # mkdir -p ./apt/key -You have now to export the key you created to the repository folder, run. +你现在需要将key导出到仓库文件夹,运行: # gpg --armor --export username yourmail@mail.com >> /var/www/apt/key/deb.gpg.key -Note: Replace username with the username you entered in above step, and yourmail@mail.com with your email. +注意:用你之前步骤中输入的用户名代替username,用你的email代替yourmail@mail.com。 -We need to create a file called “**distributions**” inside **/var/www/apt/conf**. +我们需要在**/var/www/apt/conf**创建一个文件“**distributions**”。 # touch /var/www/apt/conf/distributions -Add these following lines to the distributions file and save the file. +加入下面这几行到distributions这个文件中并保存。 Origin: (yourname) Label: (name of repository) @@ -116,11 +116,11 @@ Add these following lines to the distributions file and save the file. Description: (Some information about the repository) SignWith: yes -Next, We’ll have to create the repository tree, to do this, run those commands. +接下来我们会创建仓库树,运行这些命令: # reprepro --ask-passphrase -Vb /var/www/apt export -#### Sample Output #### +#### 示例输出 #### Created directory "/var/www/apt/db" Exporting Trusty... @@ -135,16 +135,16 @@ Next, We’ll have to create the repository tree, to do this, run those commands Please enter passphrase: Successfully created '/var/www/apt/dists/Trusty/InRelease.new' -### Step 3: Add Packages to Newly Created Repository ### +### 步骤 3: 在新创建的仓库中加入包 ### -Now prepare your **.deb** packages to be added to the repository. Go to the **/var/www/apt** directory, you have to do this each time you want to add packages. +现在准备你的**.deb**包来加入到仓库中。进入 **/var/www/apt**目录,你每次要加包的时候都不得不这么做。 # cd /var/www/apt # reprepro --ask-passphrase -Vb . includedeb Trusty /home/ravisaive/packages.deb -**Note**: Replace **trusty** with the codename you entered for the repository in the distributions file, and replace **/home/username/package.deb** with the path to the package, you will be asked for the passphrase to enter. +**注意**:用你在distributions文件中输入的仓库代号来代替**trusty** ,并且用包的路径替换**/home/username/package.deb**,你会被要求输入密码。 -#### Sample Output #### +#### 示例输出#### /home/ravisaive/packages.deb : component guessed as 'universe' Created directory "./pool" @@ -159,42 +159,43 @@ Now prepare your **.deb** packages to be added to the repository. Go to the **/v Please enter passphrase: Successfully created './dists/Trusty/InRelease.new' -Your package is added to the repository, to remove it. +你的包已经加入了仓库,要移除它: # reprepro --ask-passphrase -Vb /var/www/apt remove trusty package.deb -And of course, you need to modify the command with your package name and the repository codename. +当然你需要用你的包名与仓库代号来修改命令。 -### Step 4: Upload Repository to Sourceforge.net ### +### 步骤 4: 上传仓库到Sourceforge.net ### -To upload the repository to **Sourceforge.net**, you need to have a running account there of course, and a running project, let’s assume that you want to upload the repository to **http://sourceforge.net/projects/myfoo/testrepository** where myfoo is your project name (UNIX name, not URL, not the Title), and testrepository is the folder where you want to upload the files into, We will do this using [rsync command][1]. +要上传仓库到**Sourceforge.net**,你当然需要一个活跃账号与一个活跃项目,让我假设你想要上传仓库到**http://sourceforge.net/projects/myfoo/testrepository**,这里的myfoo是项目名(UNIX名称,不是URL,不是标题),testrepository是你想要上传文件到这上面的目录,这里我们会使用[rsync 命令][1] # rsync -avP -e ssh /var/www/apt/ username@frs.sourceforge.net:/home/frs/project/myfoo/testrepository/ -**Note**: Replace username with your username on sourceforge.net and myfoo with your project UNIX-name and testrepository with the folder you want to store the files in. +**注意**:用你在sourceforge.net上的用户名代替username,用你的项目的UNIX类型名称代替myfoo,用你想要存储的文件夹代替testrepository。 -Now thats your repository is uploaded to **http://sourceforge.net/projects/myfoo/testrepository**, to add it to your installed system, first you have to import the repository key, it will be in **/var/www/apt/key/deb.gpg.key**, but that’s a local path and the users for your repository won’t be able to add it to their systems, thats why we’ll be importing the key from sourceforge.net. +现在你的仓库上传到了**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 - -You can add the repository easily now to your system, open **/etc/apt/sources.list** and add this line. +你现在可以非常轻松地把仓库加入到系统中了,打开**/etc/apt/sources.list**,并加入下面这行: deb http://sourceforge.net/projects/myfoo/testrepository/apt/key/deb.gpg.key trusty main -**Note**: Replace myfoo with your project UNIX-Name, trusty with your repository codename, testrepository with the folder you uploaded the files into, and main with repository components you added to the distributions file. -Next, run following to update the repositories list. +**Note**:用你的项目的UNIX类型名称代替myfoo,用你的仓库代码代替trusty,用你上传存储的文件夹代替testrepository,用你在distributionsj加入的仓库组件代替main。 + +接下来,运行下面的命令来更新仓库列表。 $ sudo apt-get update -**Congratulations**! Your repository is active! You can now install packages easily from it if you want. +**祝贺你**! 你的软件仓库已经激活了!你现在可以非常简单地在你需要的时候安装包了。 -------------------------------------------------------------------------------- via: http://www.tecmint.com/create-deb-pacakge-repository-in-ubuntu/ -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[1]:http://www.tecmint.com/rsync-local-remote-file-synchronization-commands/ \ No newline at end of file +[1]:http://www.tecmint.com/rsync-local-remote-file-synchronization-commands/ 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/