This commit is contained in:
l3b2w1 2013-12-05 11:23:59 +08:00
commit 3325a31aa8
25 changed files with 795 additions and 826 deletions

View File

@ -1,15 +1,14 @@
13 Linux Cat命令管理(显示,排序,建立)文件实例
13个Cat命令管理(显示,排序,建立)文件实例
================================================================================
![](http://linoxide.com/wp-content/uploads/2013/11/linux-cat-command.png)
Linux系统中许多配置文件Logs文件甚至shell脚本都使用文本文件格式因此,Linux系统存在着多种文本编辑器但当你仅仅想要查看一下它们里的内容时可使用cat命令
在Linux系统中大多数配置文件、日志文件甚至shell脚本都使用文本文件格式因此Linux系统存在着多种文本编辑器但当你仅仅想要查看一下这些文件的内容时可使用一个简单的命令-cat
cat手册里这样描述
> cat命令读取文件内容并输出到标准设备上面
cat是一条linux内置命令. 几乎所有linux发行版都内置.接下来请跟随我来一起使用它.
cat是一条linux内置命令. 几乎所有linux发行版都内置译注或者说我从未听说过不内置cat命令的发行版。接下来让我们开始学习如何使用.
### 1. 显示文件内容 ###
@ -20,10 +19,9 @@ cat是一条linux内置命令. 几乎所有linux发行版都内置.接下来请
CentOS release 5.10 (Final)
Kernel \r on an \m
### 2. 在行首显示行号 ###
当在读取内容很多的配置文件时,加上-n参数可实现在行首显示行号。
### 2. 同时显示行号 ###
当在读取内容很多的配置文件时,如果同时显示行号将会使操作变简单,加上-n参数可以实现.
# cat -n /etc/ntp.conf
@ -38,9 +36,9 @@ cat是一条linux内置命令. 几乎所有linux发行版都内置.接下来请
9 restrict 127.0.0.1
10 restrict -6 ::1
### 3. 在行首显示非空行号 ###
### 3. 在非空格行首显示行号 ###
类似于-n参数-b也在行首显示行号.但它显示的行号为非空行行号
类似于-n参数-b也可以显示行号。区别在于-b只在非空行前显示行号。
#cat -b /etc/ntp.conf
@ -57,18 +55,18 @@ cat是一条linux内置命令. 几乎所有linux发行版都内置.接下来请
### 4. 显示tab制表符 ###
当你想要显示文本中的tab制表位时. 可使用-T参数. 它会在输入结果中标识为 **^I** .
当你想要显示文本中的tab制表位时. 可使用-T参数. 它会在输入结果中标识为 **\^I** .
# cat -T /etc/hosts
# Do not remove the following line, or various programs
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1^I^Ilocalhost.localdomain localhost
::1^I^Ilocalhost6.localdomain6 localhost6
### 5. 显示换行符 ###
-E参数在每行结尾标识 **$** .如下所示 :
-E参数在每行结尾使用 **$** 表示换行符。如下所示 :
# cat -E /etc/hosts
@ -88,21 +86,24 @@ cat是一条linux内置命令. 几乎所有linux发行版都内置.接下来请
127.0.0.1^I^Ilocalhost.localdomain localhost$
::1^I^Ilocalhost6.localdomain6 localhost6$
### 7. 每页满屏显示 ###
### 7. 屏显示 ###
当文件内容超过一屏显示范围时,可结合cat命令与其它命令满屏显示.使用管道符 ( | ).
当文件内容显示超过了你的屏幕大小, 可结合cat命令与其它命令分屏显示。使用管道符 ( | )来连接。
# cat /proc/meminfo | less
# cat /proc/meminfo | more
在less与more显示结果的区别在于less参数可pageup及pagedown上下翻滚.而more仅能使用空格向下翻屏.
在less与more显示结果的区别在于less参数可pageup及pagedown上下翻滚。而more仅能使用空格向下翻屏。
### 8. 同时查看2个文件中的内容 ###
位于/root文件夹里有两人文件取名linux及desktop每个文件含有以下内容 :
位于/root文件夹里有两个文件取名linux及desktop每个文件含有以下内容 :
**Linux** : ubuntu, centos, redhat, mint and slackware
**Desktop** : gnome kde, xfce, enlightment, and cinnamon
当你想同时查看两文件中的内容时,可按如下方法 :
# cat /root/linux /root/desktop
@ -120,7 +121,7 @@ cat是一条linux内置命令. 几乎所有linux发行版都内置.接下来请
### 9. 排序显示 ###
类似. 你也可结合 **sort**管道符对内容进行排序显示. 举例 :
类似. 你也可以结合cat命令与其它命令来进行自定义输出. 如结合 **sort** ,通过管道符对内容进行排序显示。举例 :
# cat /root/linux | sort
@ -132,7 +133,7 @@ cat是一条linux内置命令. 几乎所有linux发行版都内置.接下来请
### 10. 输入重定向 ###
你也可将显示结果输出重定向到屏幕或另一个文件. 只需要使用 > 符号即可输出生成到另一个文件.
你也可将显示结果输出重定向到屏幕或另一个文件。 只需要使用 > 符号(大于号)即可输出生成到另一个文件。
# cat /root/linux > /root/linuxdistro
@ -140,7 +141,7 @@ cat是一条linux内置命令. 几乎所有linux发行版都内置.接下来请
### 11. 新建文件 ###
Linux下有多种方法新建文件. 其中使用cat就是方法之一.
Linux下有多种方法新建文件其中使用cat就是方法之一.
# cat > operating_system
@ -149,17 +150,18 @@ Linux下有多种方法新建文件. 其中使用cat就是方法之一.
Windows
MacOS
当你打入cat > operating_system,它会生成一个operating_system的文件. 然后下面会显示空行. 此时你可输入内容.比如我们输入Unix, Linux, Windows and MacOS. 输入完成后, **按Ctrl-D**存盘退出cat. 此时你会发现当前文件夹下会生成一个包含你刚才输入内容的叫 **operating_system**的文件.
当你输入cat > operating_system它会生成一个operating_system的文件。然后下面会显示空行。此时你可输入内容。比如我们输入Unix, Linux, Windows 和 MacOS 输入完成后,按**Ctrl-D**存盘退出cat。此时你会发现当前文件夹下会生成一个包含你刚才输入内容的叫 **operating_system**的文件
### 12.向文件中追加内容 ###
当你两次使用 >符时, 会将第一个文件中的内容追加到第二个文件的末尾. 举例 :
当你使用两个 > 符时, 会将第一个文件中的内容追加到第二个文件的末尾 举例 :
# cat /root/linux >> /root/desktop
# cat /root/desktop
它会将 /root/linux的内容追加到/root/desktop文件的末尾
它会将 /root/linux的内容追加到/root/desktop文件的末尾。
第二个文件的内容将会变成这样:
gnome
@ -175,11 +177,11 @@ Linux下有多种方法新建文件. 其中使用cat就是方法之一.
### 13. 重定向输入 ###
你可使用 **<**命令将文件输入到cat中 .
你可使用 **<**命令(小于号)将文件输入到cat中.
# cat < /root/linux
上面命令表示 /root/linux中的内容作为cat的输入. 屏幕上显示如下 :
上面命令表示 /root/linux中的内容作为cat的输入屏幕上显示如下 :
ubuntu
centos
@ -207,6 +209,6 @@ Linux下有多种方法新建文件. 其中使用cat就是方法之一.
via: http://linoxide.com/linux-command/13-cat-command-examples/
译者:[hongchuntang](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
译者:[hongchuntang](https://github.com/译者ID) 校对:[Caroline](https://github.com/carolinewuyan)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,154 @@
如何使用Reaver破解Wi-Fi网络的WPA密码
================================================================================
![](http://img.gawkerassets.com/img/17pw3mgej3x93jpg/ku-xlarge.jpg)
Wi-Fi网络能够让我们便利地访问因特网但同时我们又不希望隔壁抠门猥琐男总是蹭我们的网所以自然要给WiFi加个密码对吧于是好消息是也许你已经看过我的另一篇文章“[如何轻易破解WEP密码][1]”所以你使用了更稳固的WPA安全协议。
但坏消息是,现在有一款自由开源新工具——[Reaver][2]已经挖掘出了无线路由器的一个漏洞由此能够破解绝大多数路由器上的密码。今天我就来一步步介绍如何使用Reaver破解WPA/WPA2密码。最后我会给出相应的防范对策。
文章的第一部分是使用Reaver破解WPA的详细步骤读者可以看视频也可以跟着下面的文字一起做。然后我会解释Reaver的工作原理。最后介绍如何防范Reaver攻击。
[http://www.youtube.com/embed/z1c1OIMbmb0?wmode=transparent&rel=0&autohide=1&showinfo=0&enablejsapi=1][3]
在正式开始之前,我还是要不厌其烦强调一下:知识就是力量,但是拥有力量不代表着可以为所欲为、触犯法律。同样,骑白马的不一定是王子,会开锁的也不一定是小偷。本文只是关于某些技术的实验与验证,只适用于学习。你知道的越多,就能够越好的保护自己。
###准备工作###
首先无需成为一名网络专家学会使用复杂的命令行工具你只需要准备一张空白DVD、一台能连接WiFi的电脑并腾出几个小时时间这就是我们基本需要的东西。要安装Reaver可以有很多方法但是这里我们建议你按照下面的指南来做
![](http://img.gawkerassets.com/img/194pra0777vwyjpg/ku-xlarge.jpg)
- [**The BackTrack 5 Live DVD**][4]。BackTrack是一款支持自启动的Linux发行版上面集成了大量的网络测试工具。虽然这对于安装、配置Reaver并不是必需的一个条件但是对于大多数用户却是最简单一个方法。从[BackTrack的下载页面传送门][5]下载Live DVD然后刻盘。这里你也可以下载镜像然后使用VMware安装如果你不知道VMware是啥那就还是刻盘吧。如图所示下载的时候下拉菜单选择BackTrack 5 R3版本、Gnome环境、根据你的CPU选择32或64位系统如果这里不确定是32还是64为了保险起见请选择32位下载类型选择ISO然后就可以点击下载了。
- **配有DVD光驱、支持WiFi的电脑**。BackTrack支持大多数的笔记本无线网卡这一点对于大多数读者应该没什么问题。同时你的电脑需要有一个DVD光驱这样才能从BackTrack光盘启动。我的测试环境是一台用了6年的MacBook Pro。
- **附近要有采用WPA加密的WiFi网络**。没WiFi网你破解谁去 =。= ……一会我会在“Reaver的工作原理部分”介绍WiFi防护设置是如何产生安全漏洞、WPA破解是如何成为可能的。
- **最后,你还需要一点点的耐心**。这是整个实验的最后一步使用Reaver破解WPA密码并不难它采用的是暴力破解因此你的电脑将会测试大量不同的密码组合来尝试破解路由器直到最终找到正确的密码。我测试的时候Reaver花了大概两个半小时破解了我的WiFi密码。[Reaver的主页][6]上介绍一般这个时间在4到10个小时之间视具体情况而定。
###让我们开始吧###
此时你应该已经把BackTrack的DVD光盘刻录好了笔记本也应该已经准备就绪。
####第1步启动BackTrack####
要启动BackTrack只需将DVD放入光驱电脑从光盘启动。如果不知道如何使用live CD或DVD启动请自行Google。启动过程中BackTrack会让你选择启动模式选择默认的“BackTrack Text - Default Boot Text Mode”然后回车。
最终BackTrack会来到一个命令行界面键入`startx`回车BackTrack就会进入它的图形界面。
####第2步安装Reaver####
文章更新Reaver在R3版中已经预装如果你安装的是BT5的R3版这一步骤可以忽略直接跳到第3步。
Reaver已经加入了BackTrack的最新版软件包只是还没有集成到live DVD里所以在本文最初撰写的时候你还需要手动安装Reaver。要安装Reaver首先设置电脑联网。
1.点击Applications > Internet > Wicd Network Manager
2.选择你的网络并点击Connect如果需要的话键入密码点击OK然后再次点击Connect。
连上网以后安装Reaver。点击菜单栏里的终端按钮或者依次点击 Applications > Accessories > Terminal。在终端界面键入以下命令
apt-get update
更新完成之后,键入:
apt-get install reaver
如果一切顺利Reaver现在应该已经安装好了。如果你刚才的下载安装操作使用的是WiFi上网那么在继续下面的操作之前请先断开网络连接并假装不知道WiFi密码 =。= 接下来我们要准备破解它~
####第3步搜集设备信息准备破解####
在使用Reaver之前你需要获取你无线网卡的接口名称、路由的BSSIDBSSID是一个由字母和数字组成的序列用于作为路由器的唯一标识、以及确保你的无线网卡处于监控模式。具体参见以下步骤。
**找到无线网卡:**在终端里,键入:
iwconfig
回车。此时你应该看到无线设备的相关信息。一般,名字叫做`wlan0`,但如果你的机子不止一个无线网卡,或者使用的是不常见的网络设备,名字可能会有所不同。
![](http://img.gawkerassets.com/img/194prsh4oyo2mjpg/ku-xlarge.jpg)
**将无线网卡设置为监控模式**:假设你的无线网卡接口名称为`wlan0`,执行下列命令,将无线网卡设置为监控模式:
airmon-ng start wlan0
这一命令将会输出监控模式接口的名称,如下图中箭头所示,一般情况下,都叫做`mon0`。
![](http://img.gawkerassets.com/img/194prrjkz8yorjpg/ku-xlarge.jpg)
**找到你打算破解的路由器的BSSID**最后你需要获取路由器的唯一标识以便Reaver指向要破解的目标。执行以下命令
airodump-ng wlan0
(注意:如果`airodump-ng wlan0`命令执行失败,可以尝试对监控接口执行,例如`airodump-ng mon0`
此时,你将看到屏幕上列出周围一定范围内的无线网络,如下图所示:
![](http://img.gawkerassets.com/img/194prtyebc284jpg/ku-xlarge.jpg)
当看到你想要破解的网络时按下Ctrl+C停止列表刷新然后复制该网络的BSSID图中左侧字母、数字和分号组成的序列。从ENC这一列可以看出该网络是WPA或WPA2协议。如果为WEP协议可以参考我的[前一篇文章——WEP密码破解指南][7]
现在手里有了BSSID和监控接口的名称万事俱备只欠破解了。
####第4步使用Reaver破解无线网络的WPA密码####
在终端中执行下列命令用你实际获取到的BSSID替换命令中的 `bssid`
reaver -i moninterface -b bssid -vv
例如,如果你和我一样,监控接口都叫做 `mon0`并且你要破解的路由器BSSID是`8D:AE:9D:65:1F:B2`,那么命令应该是下面这个样子:
reaver -i mon0 -b 8D:AE:9D:65:1F:B2 -vv
最后回车接下来就是喝喝茶、发发呆等待Reaver魔法的发生。Reaver将会通过暴力破解尝试一系列PIN码这将会持续一段时间在我的测试中Reaver花了2个半小时破解网络得出正确密码。正如前文中提到过的Reaver的文档号称这个时间一般在4到10个小时之间因此根据实际情况不同这个时间也会有所变化。当Reaver的破解完成时它看起来是下图中这个样子
![](http://img.gawkerassets.com/img/18qpo7omnvkbejpg/ku-medium.jpg)
**一些要强调的事实**Reaver在我的测试中工作良好但是并非所有的路由器都能顺利破解后文会具体介绍。并且你要破解的路由器需要有一个相对较强的信号否则Reaver很难正常工作可能会出现其他一些意想不到的问题。整个过程中Reaver可能有时会出现超时、PIN码死循环等问题。一般我都不管它们只是保持电脑尽量靠近路由器Reaver最终会自行处理这些问题。
除此以外你可以在Reaver运行的任意时候按下Ctrl+C中断工作。这样会退出程序但是Reaver下次启动的时候会自动恢复继续之前的工作前提是只要你没有关闭或重启电脑如果你直接在live DVD里运行关闭之前的工作都会丢失
###Reaver的工作原理###
你已经学会了使用Reaver现在让我们简单了解一下Reaver的工作原理。它利用了WiFi保护设置WiFi Protected Setup - 下文中简称为WPS的一个弱点WPS是许多路由器上都有的一个功能可以为用户提供简单的配置过程它与设备中硬编码保存的一个PIN码绑定在一起。Reaver利用的就是PIN码的一个缺陷最终的结果就是只要有足够的时间它就能破解WPA或WPA2的密码。
关于这个缺陷的具体细节,参看[Sean Gallagher's excellent post on Ars Technica][8]。
###如何防范Reaver攻击###
该缺陷存在于WPS的实现过程中因此如果能够关闭WPSWiFi就是安全的或者更好的情况是你的路由器天生就木有这一功能。但不幸的是正如Gallagher[在Ars的文章中所指出的][9]即使在路由器设置中人为关掉了WPSReaver仍然能够破解其密码。
> 在一次电话通话中Craig Heffner说道很多路由器即使关闭WPS都无法有效防范攻击。他和同事一起测试过所有的Linksys和Cisco Valet无线路由器都是如此。“在所有的Linksys路由器上你甚至无法手动关闭WPS”他说尽管Web界面中有关闭WPS配置的按钮但是“它仍然会自动打开极易受到攻击”。
因此方法一失败。也许你可以亲自尝试把你的路由器WPS关闭然后测试一下Reaver是否还能成功破解。
你也可以在路由器中设置一下MAC地址过滤只允许指定的白名单设备连接你的网络但是有经验的黑客还是能够检测出设备的白名单MAC地址并使用MAC地址仿冒你的计算机。
方法二:失败!那到底该怎么办?
我的建议是,我曾经在我的路由器上安装了开源路由固件[DD-WRT][10]成功防御了Reaver攻击。因为[DD-WRT天生就是不支持WPS的][11]因此这成为了又一个我热爱自由软件的原因。如果你也对DD-WRT感兴趣可以看一下这里的[设备支持列表][12]看是否支持你的路由器设备。除了安全上的升级DD-WRT还可以[监控网络行为][13][设置网络驱动器][14][拦截广告][15][增强WiFi信号范围][16]等,它完全可以[让你60美刀的路由器发挥出600美刀路由器的水平][17]
--------------------------------------------------------------------------------
via: http://lifehacker.com/5873407/how-to-crack-a-wi+fi-networks-wpa-password-with-reaver
译者:[Mr小眼儿](http://blog.csdn.net/tinyeyeser) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://lifehacker.com/5305094/how-to-crack-a-wi+fi-networks-wep-password-with-backtrack
[2]:http://code.google.com/p/reaver-wps/
[3]:http://www.youtube.com/embed/z1c1OIMbmb0?wmode=transparent&rel=0&autohide=1&showinfo=0&enablejsapi=1
[4]:http://www.backtrack-linux.org/downloads/
[5]:http://www.backtrack-linux.org/downloads/
[6]:http://code.google.com/p/reaver-wps/
[7]:http://lifehacker.com/5305094/how-to-crack-a-wi+fi-networks-wep-password-with-backtrack
[8]:http://arstechnica.com/business/news/2011/12/researchers-publish-open-source-tool-for-hacking-wifi-protected-setup.ars
[9]:http://arstechnica.com/business/news/2012/01/hands-on-hacking-wifi-protected-setup-with-reaver.ars
[10]:http://dd-wrt.com/
[11]:http://code.google.com/p/reaver-wps/issues/detail?id=44
[12]:http://dd-wrt.com/wiki/index.php/Supported_Devices
[13]:http://lifehacker.com/5821773/how-to-monitor-your-internet-usage-so-you-dont-exceed-your-data-cap
[14]:http://lifehacker.com/5756233/get-more-out-of-your-dd+wrt-router-with-an-external-drive?tag=ddwrt
[15]:http://lifehacker.com/5680670/turn-your-dd+wrt-enabled-router-into-a-whole-house-ad-blocker?tag=ddwrt
[16]:http://lifehacker.com/5563196/turn-your-old-router-into-a-range+boosting-wi+fi-repeater?tag=ddwrt
[17]:http://lifehacker.com/178132/hack-attack-turn-your-60-router-into-a-600-router

View File

@ -34,12 +34,14 @@ Linux Uptime 命令,让你知道你的系统运行了多久
第三部分的信息是显示已登陆用户的数量。在图1中显示的是**1 user** 即当前登录用户数量。当多个用户在同时登陆系统时uptime 命令将告诉你用户的数量。
### 平均负载量 ###
### 平均负载量 ###
最后一个信息是系统的平均负载量。回到图1你看到这样带两位小数的数字**0.25, 0.25, 0.19**可以换算成百分比即0.25和0.19分别代表着25%和19%。0.25, 0.25, 0.19分别代表着过去1分钟、5分钟、15分钟系统的平均负载量。负载量越低意味着你的系统性能越好。
这就是**uptime** 命令的日常使用指导,如果想获取更详细的信息,请通过输入**man uptime** 进入uptime 命令的manual 页面来查看。
你的机器已经运行多久了贴出你的uptime给大家看看吧。
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-command/linux-uptime-command/

View File

@ -1,215 +0,0 @@
10 basic examples of Linux ps command
================================================================================
### Linux ps command ###
The ps command on linux is one of the most basic commands for viewing the processes running on the system. It provides a snapshot of the current processes along with detailed information like user id, cpu usage, memory usage, command name etc. It does not display data in real time like top or htop commands. But even though being simpler in features and output it is still an essential process management/monitoring tool that every linux newbie should know about and learn well.
In this post we are going to revise the basics of using the ps command to check the processes and filter and sort them in different ways to suit better.
### Note on syntax ###
The ps command comes with an unusual set of 2 syntax styles. That is BSD and UNIX both. New users are often confused with and mis-interpret the two styles. So here is some basic info to get it clear before moving on.
> Note : "ps aux" is not the same as "ps -aux". For example "-u" is used to show process of that user. But "u" means show detailed information.
BSD style - The options in bsd style syntax are not preceded with a dash.
ps aux
UNIX/LINUX style - The options in linux style syntax are preceded by a dash as usual.
ps -ef
It is okay to mix both the syntax styles on linux systems. For example "ps ax -f".
But in this post we shall mostly focus on the unix style syntax.
### How to use ps command ###
#### 1. Display all processes ####
The following command will give a full list of processes
$ ps ax
$ ps -ef
Pipe the output to "less" to make it scrollable.
Use the "u" option or "-f" option to display detailed information about the processes
$ ps aux
$ ps -ef -f
> Why is the USER column not displaying my username, but showing others like root, www-data etc ?
For all usernames (including yours) if the length is greater than 8 characters then ps will fall back to show only the UID instead of username.
#### 2. Display process by user ####
To filter the processes by the owning user use the "-u" option followed by the username. Multiple usernames can be provided separated by a comma.
$ ps -f -u www-data
UID PID PPID C STIME TTY TIME CMD
www-data 1329 1328 0 09:32 ? 00:00:00 nginx: worker process
www-data 1330 1328 0 09:32 ? 00:00:00 nginx: worker process
www-data 1332 1328 0 09:32 ? 00:00:00 nginx: worker process
www-data 1377 1372 0 09:32 ? 00:00:00 php-fpm: pool a.localhost
www-data 1378 1372 0 09:32 ? 00:00:00 php-fpm: pool a.localhost
www-data 4524 2359 0 10:03 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 4527 2359 0 10:03 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 4528 2359 0 10:03 ? 00:00:00 /usr/sbin/apache2 -k start
#### 3. Show process by name or process id ####
To search the processes by their name or command use the "-C" option followed by the search term.
$ ps -C apache2
PID TTY TIME CMD
2359 ? 00:00:00 apache2
4524 ? 00:00:00 apache2
4525 ? 00:00:00 apache2
...
To display processes by process id, use the "-p" option and provides the process ids separated by comma.
$ ps -f -p 3150,7298,6544
The "-C" must be provided with the exact process name and it cannot actually search with a partial name or wildcard. To search the process list more flexibly, the usual grep command has to be used
$ ps -ef | grep apache
#### 4. Sort process by cpu or memory usage ####
System administrators often want to find out processes that are consuming lots of memory or CPU. The sort option will sort the process list based on a particular field or parameter.
Multiple fields can be specified with the "--sort" option separated by a comma. Additionally the fields can be prefixed with a "-" or "+" symbol indicating descending or ascending sort respectively. There are lots of parameters on which the process list can be sorted. Check the man page for the complete list.
$ ps aux --sort=-pcpu,+pmem
Display the top 5 processes consuming most of the cpu.
$ ps aux --sort=-pcpu | head -5
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 2.6 0.7 51396 7644 ? Ss 02:02 0:03 /usr/lib/systemd/systemd --switched-root --system --deserialize 23
root 1249 2.6 3.0 355800 30896 tty1 Rsl+ 02:02 0:02 /usr/bin/X -background none :0 vt01 -nolisten tcp
root 508 2.4 1.6 248488 16776 ? Ss 02:02 0:03 /usr/bin/python /usr/sbin/firewalld --nofork
silver 1525 2.1 2.3 448568 24392 ? S 02:03 0:01 /usr/bin/python /usr/share/system-config-printer/applet.py
#### 5. Display process hierarchy in a tree style ####
Many processes are actually forked out of some parent process, and knowing this parent child relationship is often helpful. The '--forest' option will construct an ascii art style tree view of the process hierarchy.
The following command will search for processes by the name apache2 and construct a tree and display detailed information.
$ ps -f --forest -C apache2
UID PID PPID C STIME TTY TIME CMD
root 2359 1 0 09:32 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 4524 2359 0 10:03 ? 00:00:00 \_ /usr/sbin/apache2 -k start
www-data 4525 2359 0 10:03 ? 00:00:00 \_ /usr/sbin/apache2 -k start
www-data 4526 2359 0 10:03 ? 00:00:00 \_ /usr/sbin/apache2 -k start
www-data 4527 2359 0 10:03 ? 00:00:00 \_ /usr/sbin/apache2 -k start
www-data 4528 2359 0 10:03 ? 00:00:00 \_ /usr/sbin/apache2 -k start
> Try not to use any sorting with the tree style display, as they both effect the order of display in different ways.
#### 6. Display child processes of a parent process ####
Here is an example of finding all forked apache processes.
$ ps -o pid,uname,comm -C apache2
PID USER COMMAND
2359 root apache2
4524 www-data apache2
4525 www-data apache2
4526 www-data apache2
4527 www-data apache2
4528 www-data apache2
[term]
The first process that is owned by root is the main apache2 process and all other apache2 processes have been forked out of this main process. The next command lists all child apache2 processes using the pid of the main apache2 process
[term]
$ ps --ppid 2359
PID TTY TIME CMD
4524 ? 00:00:00 apache2
4525 ? 00:00:00 apache2
4526 ? 00:00:00 apache2
4527 ? 00:00:00 apache2
4528 ? 00:00:00 apache2
#### 7. Display threads of a process ####
The "-L" option will display the threads along with the processes. It can be used to display all threads of a particular process or all processes.
The following command shall display all the threads owned by the process with id 3150.
$ ps -p 3150 -L
#### 8. Change the columns to display ####
The ps command can be configured to show a selected list of columns only. There are a large number of columns to to show and the full list is available in the man pages.
The following command shows only the pid, username, cpu, memory and command columns.
$ ps -e -o pid,uname,pcpu,pmem,comm
It is possible to rename the column labels
$ ps -e -o pid,uname=USERNAME,pcpu=CPU_USAGE,pmem,comm
PID USERNAME CPU_USAGE %MEM COMMAND
1 root 0.0 0.0 init
2 root 0.0 0.0 kthreadd
3 root 0.0 0.0 ksoftirqd/0
4 root 0.0 0.0 kworker/0:0
5 root 0.0 0.0 kworker/0:0H
7 root 0.0 0.0 migration/0
8 root 0.0 0.0 rcu_bh
9 root 0.0 0.0 rcuob/0
10 root 0.0 0.0 rcuob/1
Quite flexible.
#### 9. Display elapsed time of processes ####
The elapsed time indicates, how long the process has been running for. The column for elapsed time is not shown by default, and has to be brought in using the "-o" option
$ ps -e -o pid,comm,etime
#### 10. Turn ps into an realtime process viewer ####
As usual, the watch command can be used to turn ps into a realtime process reporter. Simple example is like this
$ watch -n 1 'ps -e -o pid,uname,cmd,pmem,pcpu --sort=-pmem,-pcpu | head -15'
The output on my desktop is something like this.
Every 1.0s: ps -e -o pid,uname,cmd,pmem,pcpu --... Sun Dec 1 18:16:08 2013
PID USER CMD %MEM %CPU
3800 1000 /opt/google/chrome/chrome - 4.6 1.4
7492 1000 /opt/google/chrome/chrome - 2.7 1.4
3150 1000 /opt/google/chrome/chrome 2.7 2.5
3824 1000 /opt/google/chrome/chrome - 2.6 0.6
3936 1000 /opt/google/chrome/chrome - 2.4 1.6
2936 1000 /usr/bin/plasma-desktop 2.3 0.2
9666 1000 /opt/google/chrome/chrome - 2.1 0.8
3842 1000 /opt/google/chrome/chrome - 2.1 0.8
4739 1000 /opt/google/chrome/chrome - 1.8 1.0
3930 1000 /opt/google/chrome/chrome - 1.7 1.0
3911 1000 /opt/google/chrome/chrome - 1.6 0.6
3645 1000 /opt/google/chrome/chrome - 1.5 0.4
3677 1000 /opt/google/chrome/chrome - 1.5 0.4
3639 1000 /opt/google/chrome/chrome - 1.4 0.4
The output would be updated every 1 second to refresh the stats. However do not think that this is similar to top.
You would notice that the output of top/htop command changes much more frequently compared to the above ps command.
This is because the top output sorts on a value that is a mix of cpu usage and memory usage. But the above ps command sorts in a more simpler manner, taking 1 column at a time (like school maths). So it would not update rapidly like top.
--------------------------------------------------------------------------------
via: http://www.binarytides.com/linux-ps-command/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,4 +1,3 @@
[DONING]BY FingerLiu
10 basic examples of linux netstat command
================================================================================
### Netstat ###

View File

@ -1,4 +1,3 @@
occupied by rogetfan
Daily Ubuntu TipsChange The Language You Use In Ubuntu
================================================================================
Ubuntu, a modern and powerful operating system also allows you to use your desktop in dozens of other languages. By default, there are few language packs installed when you first setup Ubuntu. If you want Ubuntu to support more languages, you must install additional language packs. Not all languages are support, but most languages that are in used and written are supported. This brief tutorial is going to show you how to make this happen.

View File

@ -1,36 +0,0 @@
Vic020的 wc
Daily Ubuntu TipsLike GNOME Classic Menu? Get Classic Menu Indicator
================================================================================
Daily Ubuntu TipsLike GNOME Classic Menu? Get Classic Menu Indicator
For those who have been following Ubuntu OS from the beginner, theyve seen almost if not all the changes Ubuntu have gone through. There have been a lot of changes, especially on the desktop side. From the classic GNOME desktop environment to Unity, Ubuntu have completely been redesigned.
For some new users, all they know is the Unity desktop environment and just a few have heard of or seen the original GNOME desktop environment that powered Ubuntu previously. Ubuntu is completely different from what it used to be and some are having hard time coping with the way things have changed.
If youre an old timer who wish to get back GNOME Classic Menu in Ubuntu Unity, installing Classic Menu Indicator will do the trick. This nifty package get installed in the notification area of the top panel and brings back GNOME Classic Menu experience in Ubuntu.
Like the classic GNOME Menu, it includes all the applications and structure of the classic menu. Its easy to navigate and access applications for those who are used to it. For new users, its also easy to catch on.
This brief tutorial is going to show you how install this package in Ubuntu.
To get started, press **Ctrl Alt T** on your keyboard to open the terminal. When it opens, run the commands below to add its PPA archive.
sudo apt-add-repository ppa:diesch/testing
Next, run the commands below to install it.
sudo apt-get update && sudo apt-get install classicmenu-indicator
After installing it, go and launch the application from Unity Dash. Its called Classic Menu Indicator. When you launch it, it will automatically dock at the top panel as shown below.
![](http://www.liberiangeek.net/wp-content/uploads/2013/11/classic-menu-indicator.png)
Thats it, use it and enjoy!
--------------------------------------------------------------------------------
via: http://www.liberiangeek.net/2013/11/daily-ubuntu-tipslike-gnome-classic-menu-get-classic-menu-indicator/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,3 +1,4 @@
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.

View File

@ -1,142 +0,0 @@
How To Display And Set Hostname in Linux
================================================================================
![](http://linoxide.com/wp-content/uploads/2013/11/hostname-command-linux.jpg)
With more and more computer connected to the network, computer need to have an attribute to make it different to each other. Same as human in the real world, computer also hava an attribute which named hostname.
### What is hostname ###
From its manual page, hostname is used to display the systems DNS name and to display or set its hostname or NIS domain name. So hostname is related to DNS (Domain Name System) or NIS (Network Information System).
### How to display hostname ###
Hostname is a pre-installed command in every Linux distribution. You can display your machine hostname by typing hostname in your console. Heres a sample command and the output :
$ hostname
ubuntu
The above command will tell you that the computer name is **ubuntu**.
### How to set a hostname ###
Hostname is set when you install you Linux at the first time. There is a step in your installation procedure that your Linux will ask you to fill hostname information. However, **you can do it later** if you want.
To set it your hostname, you can use this command :
# hostname dev-machine
$ hostname
dev-machine
You **need to be root** user or equal to set / change your hostname machine. The # sign is indicated that you are a root user. The above command is telling your computer to set its hostname into **dev-machine**. If you dont receive any error message then your hostname is changed. Again, you check it using hostname command to see the result.
Setting hostname using hostname command **is not permanent**. When you reboot your computer, your setting will gone. **To make it permanent**, you must manually edit hostname configuration files.
**On Debian / Ubuntu based Linux**
You will find it in these folders, **/etc/hostname** and **/etc/hosts**.
Heres the content of each files.
**/etc/hostname**
# vi /etc/hostname
dev-machine
**/etc/hosts**
# vi /etc/hosts
127.0.0.1 localhost
127.0.0.1 dev-machine
You will found it **active immediately without restarting** your Linux.
**On RedHat / CentOS based Linux**
You will find it in these folders, **/etc/hosts** and and **/etc/sysconfig/networks**
Heres the content of each files.
**/etc/hosts**
127.0.0.1 localhost.localdomain localhost dev-machine
::localhost 127.0.0.1
/etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=dev-machine
### How to display dnsdomainname ###
From hostname definition above, hostname can also display a dnsname for your Linux. If hostname command will display your hostname, then dnsndomainname command will show your domain name. Lets see the sample.
$ dnsdomainname
bris.co.id
On this article, the result of dnsdomainname command is **bris.co.id**.
If you see the result is (**none**), then your machine **is not configured in FQDN** (Fully Qualified Domain Name). Dnsdomainname command will grab information from **/etc/hosts** file. You should configure it in FQDN format. Heres the sample :
**/etc/hosts**
127.0.0.1 localhost.localdomain localhost dev-machine
::localhost 127.0.0.1
192.168.0.104 dev-machine.bris.co.id dev-machine
To display it more detail, you can use parameter **-v**
$ dnsdomainname -v
gethostname()=dev-machine.bris.co.id
Resolving dev-machine.bris.co.id
Result: h_name=dev-machine.bris.co.id
Result: h_aliases=dev-machine
Result: h_addr_list=192.168.0.104
### How to display hostname with more detail information ###
Hostname command comes with some parameters and some aliases such as dnsdomainname command. Heres some parameter that may useful on day-to-day operation. The results of the commands below is based on **/etc/hosts** configuration above
**Display the IP Address**
$ hostname -i
192.168.0.104
**Display the domain**
$ hostname -d
bris.co.id
**Display the the short name**
$ hostname -s
dev-machine
*This command will produce the same result with only typing hostname*
**Display with FQDN format**
$ hostname -f
dev-machine.bris.co.id
**Display with detail information**
All the parameters mentioned above can be **summarized** by the parameter **-v and -d**. Lets take a look the sample
$ hostname -v -d
gethostname()=dev-machine.bris.co.id
Resolving dev-machine.bris.co.id
Result: h_name=dev-machine.bris.co.id
Result: h_aliases=dev-machine
Result: h_addr_list=192.168.0.104
bris.co.id
Feel familiar? Yes, this result is the same with **dnsdomainname -v** command that also mentioned above.
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-command/display-set-hostname-linux/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,154 +0,0 @@
How to Crack a Wi-Fi Network's WPA Password with Reaver
================================================================================
![](http://img.gawkerassets.com/img/17pw3mgej3x93jpg/ku-xlarge.jpg)
Your Wi-Fi network is your conveniently wireless gateway to the internet, and since you're not keen on sharing your connection with any old hooligan who happens to be walking past your home, you secure your network with a password, right? Knowing, as you might, how [easy it is to crack a WEP password][1], you probably secure your network using the more bulletproof WPA security protocol.
Here's the bad news: A new, free, open-source tool called [Reaver][2] exploits a security hole in wireless routers and can crack most routers' current passwords with relative ease. Here's how to crack a WPA or WPA2 password, step by step, with Reaver—and how to protect your network against Reaver attacks.
In the first section of this post, I'll walk through the steps required to crack a WPA password using Reaver. You can follow along with either the video or the text below. After that, I'll explain how Reaver works, and what you can do to protect your network against Reaver attacks.
[http://www.youtube.com/embed/z1c1OIMbmb0?wmode=transparent&rel=0&autohide=1&showinfo=0&enablejsapi=1][3]
First, a quick note: As we remind often remind readers when we discuss topics that appear potentially malicious: Knowledge is power, but power doesn't mean you should be a jerk, or do anything illegal. Knowing how to pick a lock doesn't make you a thief. Consider this post educational, or a proof-of-concept intellectual exercise. The more you know, the better you can protect yourself.
### What You'll Need ###
You don't have to be a networking wizard to use Reaver, the command-line tool that does the heavy lifting, and if you've got a blank DVD, a computer with compatible Wi-Fi, and a few hours on your hands, you've got basically all you'll need. There are a number of ways you could set up Reaver, but here are the specific requirements for this guide:
![](http://img.gawkerassets.com/img/194pra0777vwyjpg/ku-xlarge.jpg)
- [**The BackTrack 5 Live DVD**][4]. BackTrack is a bootable Linux distribution that's filled to the brim with network testing tools, and while it's not strictly required to use Reaver, it's the easiest approach for most users. Download the Live DVD [from BackTrack's download page][5] and burn it to a DVD. You can alternately download a virtual machine image if you're using VMware, but if you don't know what VMware is, just stick with the Live DVD. As of this writing, that means you should select BackTrack 5 R3 from the Release drop-down, select Gnome, 32- or 64-bit depending on your CPU (if you don't know which you have, 32 is a safe bet), ISO for image, and then download the ISO.
- **A computer with Wi-Fi and a DVD drive**. BackTrack will work with the wireless card on most laptops, so chances are your laptop will work fine. However, BackTrack doesn't have a full compatibility list, so no guarantees. You'll also need a DVD drive, since that's how you'll boot into BackTrack. I used a six-year-old MacBook Pro.
- **A nearby WPA-secured Wi-Fi network**. Technically, it will need to be a network using WPA security with the WPS feature enabled. I'll explain in more detail in the "How Reaver Works" section how WPS creates the security hole that makes WPA cracking possible.
- **A little patience**. This is a 4-step process, and while it's not terribly difficult to crack a WPA password with Reaver, it's a brute-force attack, which means your computer will be testing a number of different combinations of cracks on your router before it finds the right one. When I tested it, Reaver took roughly 2.5 hours to successfully crack my password. The [Reaver home page][6] suggests it can take anywhere from 4-10 hours. Your mileage may vary.
### Let's Get Crackin' ###
At this point you should have BackTrack burned to a DVD, and you should have your laptop handy.
#### Step 1: Boot into BackTrack ####
To boot into BackTrack, just put the DVD in your drive and boot your machine from the disc. (Google around if you don't know anything about live CDs/DVDs and need help with this part.) During the boot process, BackTrack will prompt you to to choose the boot mode. Select "BackTrack Text - Default Boot Text Mode" and press Enter.
Eventually BackTrack will boot to a command line prompt. When you've reached the prompt, type `startx` and press Enter. BackTrack will boot into its graphical interface.
#### Step 2: Install Reaver ####
Update: This step is no longer necessary, as Reaver comes pre-installed on Backtrack 5 R3. Skip down to Step 3.
Reaver has been added to the bleeding edge version of BackTrack, but it's not yet incorporated with the live DVD, so as of this writing, you need to install Reaver before proceeding. (Eventually, Reaver will simply be incorporated with BackTrack by default.) To install Reaver, you'll first need to connect to a Wi-Fi network that you have the password to.
1. Click Applications > Internet > Wicd Network Manager
1. Select your network and click Connect, enter your password if necessary, click OK, and then click Connect a second time.
Now that you're online, let's install Reaver. Click the Terminal button in the menu bar (or click Applications > Accessories > Terminal). At the prompt, type:
apt-get update
And then, after the update completes:
apt-get install reaver
If all went well, Reaver should now be installed. It may seem a little lame that you need to connect to a network to do this, but it will remain installed until you reboot your computer. At this point, go ahead and disconnect from the network by opening Wicd Network Manager again and clicking Disconnect. (You may not strictly need to do this. I did just because it felt like I was somehow cheating if I were already connected to a network.)
#### Step 3: Gather Your Device Information, Prep Your Crackin' ####
In order to use Reaver, you need to get your wireless card's interface name, the BSSID of the router you're attempting to crack (the BSSID is a unique series of letters and numbers that identifies a router), and you need to make sure your wireless card is in monitor mode. So let's do all that.
**Find your wireless card:** Inside Terminal, type:
iwconfig
Press Enter. You should see a wireless device in the subsequent list. Most likely, it'll be named `wlan0`, but if you have more than one wireless card, or a more unusual networking setup, it may be named something different.
![](http://img.gawkerassets.com/img/194prsh4oyo2mjpg/ku-xlarge.jpg)
**Put your wireless card into monitor mode**: Assuming your wireless card's interface name is `wlan0`, execute the following command to put your wireless card into monitor mode:
airmon-ng start wlan0
This command will output the name of monitor mode interface, which you'll also want to make note of. Most likely, it'll be `mon0`, like in the screenshot below. Make note of that.
![](http://img.gawkerassets.com/img/194prrjkz8yorjpg/ku-xlarge.jpg)
**Find the BSSID of the router you want to crack**: Lastly, you need to get the unique identifier of the router you're attempting to crack so that you can point Reaver in the right direction. To do this, execute the following command:
airodump-ng wlan0
(Note: If `airodump-ng wlan0` doesn't work for you, you may want to try the monitor interface instead—e.g., `airodump-ng mon0`.)
You'll see a list of the wireless networks in range—it'll look something like the screenshot below:
![](http://img.gawkerassets.com/img/194prtyebc284jpg/ku-xlarge.jpg)
When you see the network you want, press Ctrl+C to stop the list from refreshing, then copy that network's BSSID (it's the series of letters, numbers, and colons on the far left). The network should have WPA or WPA2 listed under the ENC column. (If it's WEP, use our [previous guide to cracking WEP passwords][7].)
Now, with the BSSID and monitor interface name in hand, you've got everything you need to start up Reaver.
#### Step 4: Crack a Network's WPA Password with Reaver ####
Now execute the following command in the Terminal, replacing `bssid` and moninterface with the BSSID and monitor interface and you copied down above:
reaver -i moninterface -b bssid -vv
For example, if your monitor interface was `mon0` like mine, and your BSSID was `8D:AE:9D:65:1F:B2` (a BSSID I just made up), your command would look like:
reaver -i mon0 -b 8D:AE:9D:65:1F:B2 -vv
Press Enter, sit back, and let Reaver work its disturbing magic. Reaver will now try a series of PINs on the router in a brute force attack, one after another. This will take a while. In my successful test, Reaver took 2 hours and 30 minutes to crack the network and deliver me with the correct password. As mentioned above, the Reaver documentation says it can take between 4 and 10 hours, so it could take more or less time than I experienced, depending. When Reaver's cracking has completed, it'll look like this:
![](http://img.gawkerassets.com/img/18qpo7omnvkbejpg/ku-medium.jpg)
**A few important factors to consider**: Reaver worked exactly as advertised in my test, but it won't necessarily work on all routers (see more below). Also, the router you're cracking needs to have a relatively strong signal, so if you're hardly in range of a router, you'll likely experience problems, and Reaver may not work. Throughout the process, Reaver would sometimes experience a timeout, sometimes get locked in a loop trying the same PIN repeatedly, and so on. I just let it keep on running, and kept it close to the router, and eventually it worked its way through.
Also of note, you can also pause your progress at any time by pressing Ctrl+C while Reaver is running. This will quit the process, but Reaver will save any progress so that next time you run the command, you can pick up where you left off-as long as you don't shut down your computer (which, if you're running off a live DVD, will reset everything).
### How Reaver Works ###
Now that you've seen how to use Reaver, let's take a quick overview of how Reaver works. The tool takes advantage of a vulnerability in something called Wi-Fi Protected Setup, or WPS. It's a feature that exists on many routers, intended to provide an easy setup process, and it's tied to a PIN that's hard-coded into the device. Reaver exploits a flaw in these PINs; the result is that, with enough time, it can reveal your WPA or WPA2 password.
Read more details about the vulnerability at [Sean Gallagher's excellent post on Ars Technica][8].
### How to Protect Yourself Against Reaver Attacks ###
Since the vulnerability lies in the implementation of WPS, your network should be safe if you can simply turn off WPS (or, even better, if your router doesn't support it in the first place). Unfortunately, as Gallagher [points out as Ars][9], even with WPS manually turned off through his router's settings, Reaver was still able to crack his password.
> In a phone conversation, Craig Heffner said that the inability to shut this vulnerability down is widespread. He and others have found it to occur with every Linksys and Cisco Valet wireless access point they've tested. "On all of the Linksys routers, you cannot manually disable WPS," he said. While the Web interface has a radio button that allegedly turns off WPS configuration, "it's still on and still vulnerable.
So that's kind of a bummer. You may still want to try disabling WPS on your router if you can, and test it against Reaver to see if it helps.
You could also set up MAC address filtering on your router (which only allows specifically whitelisted devices to connect to your network), but a sufficiently savvy hacker could detect the MAC address of a whitelisted device and use MAC address spoofing to imitate that computer.
Double bummer. So what will work?
I have the open-source router firmware [DD-WRT][10] installed on my router and I was unable to use Reaver to crack its password. As it turns out, [DD-WRT does not support WPS][11], so there's yet another reason to love the free router-booster. If that's got you interested in DD-WRT, check their [supported devices list][12] to see if your router's supported. It's a good security upgrade, and DD-WRT can also do cool things like [monitor your internet usage][13], [set up a network hard drive][14], act as a [whole-house ad blocker][15], [boost the range of your Wi-Fi network][16], and more. It essentially [turns your $60 router into a $600 router][17].
--------------------------------------------------------------------------------
via: http://lifehacker.com/5873407/how-to-crack-a-wi+fi-networks-wpa-password-with-reaver
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://lifehacker.com/5305094/how-to-crack-a-wi+fi-networks-wep-password-with-backtrack
[2]:http://go.redirectingat.com/?id=33330X911647&site=lifehacker.com&xs=1&isjs=1&url=http%3A%2F%2Fcode.google.com%2Fp%2Freaver-wps%2F&xguid=&xcreo=0&sref=http%3A%2F%2Flifehacker.com%2F5873407%2Fhow-to-crack-a-wi%2Bfi-networks-wpa-password-with-reaver&pref=http%3A%2F%2Flifehacker.com%2F5953047%2Fhow-to-crack-wep-and-wpa-wi%2Bfi-passwords&xtz=-480&abp=1
[3]:http://www.youtube.com/embed/z1c1OIMbmb0?wmode=transparent&rel=0&autohide=1&showinfo=0&enablejsapi=1
[4]:http://go.redirectingat.com/?id=33330X911647&site=lifehacker.com&xs=1&isjs=1&url=http%3A%2F%2Fwww.backtrack-linux.org%2Fdownloads%2F&xguid=&xcreo=0&sref=http%3A%2F%2Flifehacker.com%2F5873407%2Fhow-to-crack-a-wi%2Bfi-networks-wpa-password-with-reaver&pref=http%3A%2F%2Flifehacker.com%2F5953047%2Fhow-to-crack-wep-and-wpa-wi%2Bfi-passwords&xtz=-480&abp=1
[5]:http://go.redirectingat.com/?id=33330X911647&site=lifehacker.com&xs=1&isjs=1&url=http%3A%2F%2Fwww.backtrack-linux.org%2Fdownloads%2F&xguid=&xcreo=0&sref=http%3A%2F%2Flifehacker.com%2F5873407%2Fhow-to-crack-a-wi%2Bfi-networks-wpa-password-with-reaver&pref=http%3A%2F%2Flifehacker.com%2F5953047%2Fhow-to-crack-wep-and-wpa-wi%2Bfi-passwords&xtz=-480&abp=1
[6]:http://go.redirectingat.com/?id=33330X911647&site=lifehacker.com&xs=1&isjs=1&url=http%3A%2F%2Fcode.google.com%2Fp%2Freaver-wps%2F&xguid=&xcreo=0&sref=http%3A%2F%2Flifehacker.com%2F5873407%2Fhow-to-crack-a-wi%2Bfi-networks-wpa-password-with-reaver&pref=http%3A%2F%2Flifehacker.com%2F5953047%2Fhow-to-crack-wep-and-wpa-wi%2Bfi-passwords&xtz=-480&abp=1
[7]:http://lifehacker.com/5305094/how-to-crack-a-wi+fi-networks-wep-password-with-backtrack
[8]:http://go.redirectingat.com/?id=33330X911647&site=lifehacker.com&xs=1&isjs=1&url=http%3A%2F%2Farstechnica.com%2Fbusiness%2Fnews%2F2011%2F12%2Fresearchers-publish-open-source-tool-for-hacking-wifi-protected-setup.ars&xguid=&xcreo=0&sref=http%3A%2F%2Flifehacker.com%2F5873407%2Fhow-to-crack-a-wi%2Bfi-networks-wpa-password-with-reaver&pref=http%3A%2F%2Flifehacker.com%2F5953047%2Fhow-to-crack-wep-and-wpa-wi%2Bfi-passwords&xtz=-480&abp=1
[9]:http://go.redirectingat.com/?id=33330X911647&site=lifehacker.com&xs=1&isjs=1&url=http%3A%2F%2Farstechnica.com%2Fbusiness%2Fnews%2F2012%2F01%2Fhands-on-hacking-wifi-protected-setup-with-reaver.ars&xguid=&xcreo=0&sref=http%3A%2F%2Flifehacker.com%2F5873407%2Fhow-to-crack-a-wi%2Bfi-networks-wpa-password-with-reaver&pref=http%3A%2F%2Flifehacker.com%2F5953047%2Fhow-to-crack-wep-and-wpa-wi%2Bfi-passwords&xtz=-480&abp=1
[10]:http://go.redirectingat.com/?id=33330X911647&site=lifehacker.com&xs=1&isjs=1&url=http%3A%2F%2Fdd-wrt.com%2F&xguid=&xcreo=0&sref=http%3A%2F%2Flifehacker.com%2F5873407%2Fhow-to-crack-a-wi%2Bfi-networks-wpa-password-with-reaver&pref=http%3A%2F%2Flifehacker.com%2F5953047%2Fhow-to-crack-wep-and-wpa-wi%2Bfi-passwords&xtz=-480&abp=1
[11]:http://go.redirectingat.com/?id=33330X911647&site=lifehacker.com&xs=1&isjs=1&url=http%3A%2F%2Fcode.google.com%2Fp%2Freaver-wps%2Fissues%2Fdetail%3Fid%3D44&xguid=&xcreo=0&sref=http%3A%2F%2Flifehacker.com%2F5873407%2Fhow-to-crack-a-wi%2Bfi-networks-wpa-password-with-reaver&pref=http%3A%2F%2Flifehacker.com%2F5953047%2Fhow-to-crack-wep-and-wpa-wi%2Bfi-passwords&xtz=-480&abp=1
[12]:http://go.redirectingat.com/?id=33330X911647&site=lifehacker.com&xs=1&isjs=1&url=http%3A%2F%2Fdd-wrt.com%2Fwiki%2Findex.php%2FSupported_Devices&xguid=&xcreo=0&sref=http%3A%2F%2Flifehacker.com%2F5873407%2Fhow-to-crack-a-wi%2Bfi-networks-wpa-password-with-reaver&pref=http%3A%2F%2Flifehacker.com%2F5953047%2Fhow-to-crack-wep-and-wpa-wi%2Bfi-passwords&xtz=-480&abp=1
[13]:http://lifehacker.com/5821773/how-to-monitor-your-internet-usage-so-you-dont-exceed-your-data-cap
[14]:http://lifehacker.com/5756233/get-more-out-of-your-dd+wrt-router-with-an-external-drive?tag=ddwrt
[15]:http://lifehacker.com/5680670/turn-your-dd+wrt-enabled-router-into-a-whole-house-ad-blocker?tag=ddwrt
[16]:http://lifehacker.com/5563196/turn-your-old-router-into-a-range+boosting-wi+fi-repeater?tag=ddwrt
[17]:http://lifehacker.com/178132/hack-attack-turn-your-60-router-into-a-600-router

View File

@ -0,0 +1,46 @@
How to Repack Deb Files on Debian and Ubuntu
================================================================================
**The following tutorial will teach Ubuntu, Linux Mint and Debian GNU/Linux users how to easily unpack and repack a .deb file on their Debian-based Linux operating system.**
![](http://i1-news.softpedia-static.com/images/news2/How-to-Repack-Deb-Files-on-Debian-and-Ubuntu-404930-2.jpg)
Once in a while you reach a moment in life when, among other things, you want to modify a .deb file, to change something in it and repackage it back. But, only if you are truly into computing and hacking.
The following example is a true story, as it happen to me a while ago. A Linux developer created a Debian package (.deb) for a software, which Ive install on my Ubuntu powered computer with success.
Apparently, the software did not worked correctly, as it was always stuck when it tried to retrieve some files from a Git repository. So, I knew where the files where installed (in the /opt directory), Ive searched the code, found the issue and repair it in place. After that, the program was no longer stuck when it tried to retrieve the packages it needed.
So, long story short, I wanted to unpack the .deb file, replace the file Ive patched in it, and repackage it back so I can install it on other computers or give it to my friends. How do I do that?
After searching the Internet for an answer to my problem, Ive found a small blog called [ailoo.net][1] where it was explained like this:
mkdir -p extract/DEBIAN
dpkg-deb -x package.deb extract/
dpkg-deb -e package.deb extract/DEBIAN [...do something, e.g. edit the control file...]
mkdir build
dpkg-deb -b extract/ build/
These five commands will do the job like a charm. Let me explain them to you: the first one creates a folder called “extract” and a subfolder called “DEBIAN”; the second command will extract some files from your .deb package in the “extract” folder; the third command will extract the content of the .deb package in the “DEBIAN” subfolder, where you can modify/patch the files you want; the fourth command will create a folder called “build”; and the fifth command will repack the modified files into a new .deb package, which will be generated in the “build” folder.
Thats it! Just remember to stick with the commands above, and modify the files visually with a graphical text editor via your default file manager, after youve executed the third command. Do not hesitate to comment below if you run into problems during this tutorial.
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/How-to-Repack-Deb-Files-on-Debian-and-Ubuntu-404930.shtml
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://ailoo.net/2009/06/repack-a-deb-archive-with-dpkg-deb/
[2]:
[3]:
[4]:
[5]:
[6]:
[7]:
[8]:
[9]:
[10]:
[11]:
[12]:

View File

@ -1,4 +1,3 @@
(translating by runningwater)
Interview with Ding Zhou of 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
@ -89,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/) 荣誉推出
译者:[runningwater](https://github.com/runningwater) 校对:[校对者ID](https://github.com/校对者ID)
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
[1]:http://ubuntu-tweak.com/

View File

@ -1,4 +1,3 @@
(translating by flyingwitholdlady)
KDE vs GNOME: Settings, Apps, Widgets
=====================================

View File

@ -0,0 +1,29 @@
Linux Is the Only Way to Protect Against Potential Sound-Transmitted Malware
================================================================================
**A new type of malware that is using sound to transmit itself has been developed by scientists and it seems that the Linux systems are the only ones that can be protected against this kind of attacks.**
Scientists Michael Hanspach and Michael Goetz from Fraunhofer FKIE, Wachtberg, Germany, have developed a technique capable of infecting other computers with malware that transmits itself using just speakers and microphones.
“Covert channels can be used to circumvent system and network policies by establishing communications that have not been considered in the design of the computing system. We construct a covert channel between different computing systems that utilizes audio modulation/demodulation to exchange data between the computing systems over the air medium,” [reads the paper][1] that they published in the Journal of Communications.
This would prove a very powerful method of infecting computers, especially because they don't even have to be linked in a network. All that is needed for the method to work is proximity.
Another problem is that there is virtually no protection embedded in today's operating systems for such malware. The good news is that Linux users can make a few small modifications in order to gain that much needed protection.
The developers have explained that Linux systems can be programed, rather easily, to adapt to this new form of attacks.
“If audio input and output devices cannot be switched off, implementation of audio filtering options may be an alternative approach to counter maliciously triggered participation in covert networks. “
“In Linux-based operating systems, a software-defined audio filter can be implemented with ALSA (Advanced Linux Sound Architecture) in conjunction with the LADSPA (Linux Audio Developers Simple Plugin API),” the scientists say in the paper.
Sound-transmitted malware is something very new and it's no wonder that there is no protection against it, but it goes to show why Linux systems are considered safer.
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/Linux-Is-the-Only-Way-to-Protect-Against-Possible-Malware-Through-Sound-Attacks-405566.shtml
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.jocm.us/index.php?m=content&c=index&a=show&catid=124&id=600

View File

@ -1,86 +0,0 @@
l3b2w1 translating……
Linux chief: Open source is safer, and Linux is more secure than any other OS
================================================================================
In an interview with Linux Foundation executive director Jim Zemlin, VentureBeat got a birds-eye view of the future of the open-source operating system for 2014.
We also addressed the controversial issues of government spying and “backdoors” — those nefarious windows into our personal online lives that the public recently discovered in most of the services we use every day.
Zemlin gave us the skinny on how and why GNU/Linux remains the most secure option for concerned consumers — and why its becoming the OS of choice for powering cars, phones, TVs, and all kinds of emerging devices.
Heres our e-mail transcript in a bare-naked Q&A format.
----------
**VentureBeat: Security and privacy has been the hottest topic this year, bar none. Weve heard rumors that Linus [Torvalds, Linux creator] OKd a Linux backdoor for the government.**
**Zemlin**: If there were a backdoor in Linux, youd know it.
The whole world can see every line of code in Linux. This is one of the reasons Linux is more secure than other operating systems and why open-source software overall is a safer than closed software. The transparency of the code ensures its secure.
And for the record: He wasnt approached.
**VentureBeat: How committed is the foundation to preserving Linux users privacy and freedom from tracking/surveillance?**
**Zemlin**: As committed as we have always been. Its very difficult to insert something into the kernel that would violate privacy and freedom without thousands of developers noticing. The nature of Linux is that its self-policing.
**VentureBeat: Do you think theres any chance that this years privacy/security/surveillance issues has driven or will drive more consumers toward Linux?**
**Zemlin**: Around the world, I am hearing people say, “Using open source is a critical to ensure privacy.” So yes, I think that will drive more users people to Linux.
I also think more consumers are being driven toward Linux for a variety of reasons, in addition to the confidence and trust they have about privacy and security related to the platform. The transparency of the code and development process gives increasingly knowledgeable and aware consumers an option they feel good about.
[Video game publisher] Valve and [its work on SteamOS][1] is driving more consumers to Linux, as is the ongoing dominance of Android and other consumer devices that run Linux — from televisions to appliances, cars, and more.
**VentureBeat: Do you have any thoughts on the Ubuntu Edge for phones? Where do you see the market for Linux/Ubuntu phones going in 2014-2015?**
**Zemlin**: I like seeing potentially interesting new products go to market, especially when theyre Linux-based. It is hard to predict what product will produce a big hit in the phone market from year to year.
I dont think it is a stretch to predict phones based on Linux will dominate. Android, Tizen, Ubuntu, Firefox, and more show that Linux can drive innovation in the mobile market and create new experiences for consumers and market opportunities for developers and OEMs.
Whats exciting about the year ahead, and what Ill be watching, is how Linux and open source will help connect all of these devices, objects, and services together.
**VentureBeat: Whats the most exciting use case youve seen so far for Linux embedded in automobile systems?**
**Zemlin**: No question its the in-vehicle-infotainment systems being built by Cadillac, Tesla, Toyota, Jaguar, Land Rover, and others.
For example, the Tesla Model S, which won the Motor Trend Car of the Year [honor] in 2013, features a 17-inch flat-screen computer running a custom-built Linux OS. This is really, really cool stuff.
And the 2014 Motor Trend Car of the Year was just revealed — the Cadillac CTS sedan — and it also uses Linux for its in-vehicle-infotainment system. Car makers are able to innovate and differentiate with these systems using Linux.
The success of Linux here can be seen in the latest numbers from IHS Automotive, which reported this month that sales of automotive Linux are expected to rise to 53.7 million units in 2020, passing Microsoft and Blackberry QNX in the global automotive infotainment market.
The Linux Foundation does a lot of work in this area with its Automotive Grade Linux workgroup. By hosting a neutral, supportive environment among the Linux kernel community, other open-source communities, and the automotive industry, were able to help advance automotive Linux technologies among some of the worlds largest automakers including Nissan, Jaguar, Land Rover, Toyota, and more.
**VentureBeat: How is Linux growing beyond the hardcore developer market, especially with regard to consumers and gamers?**
**Zemlin**: This year has been a turning a point for Linux with gamers for sure. Valve, the gaming company behind the Steam web platform for Linux, builds and runs all of its source code and animation on Linux. Valves CEO Gabe Newell reported at LinuxCon this year that theyre running 198 games on Linux, and with the introduction of the Linux-based Steam, that number will only continue to go up. This is the beginning of a new trend for Linux and gaming.
Consumers use Linux every day. It is the software that runs our lives. Companies like Google, Facebook, and Twitter are built on Linux and open-source software. At our LinuxCon Europe conference in October, Twitters Chris Aniszczyk told the audience: “Twitter is of course all running on Linux. Why would you need anything else?”
Linux now powers the 1.3 million Android phones that are activated daily, and most of the nearly 600,000 new TVs sold every day. New appliances and cars are being built with Linux. Major transportation systems use the operating system. The superpopular [GoPro uses Linux and open source][2]. The examples are endless.
And Linux and open source will just keep reaching more into mainstream consumer life. Samsung uses the Linux kernel and Linux-based products throughout its product line, from TVs to phones to home appliances and more.
Stay tuned — youll see more coming that illustrates the growing role of Linux and open source software and collaborative development in everyday life.
**VentureBeat: What are the biggest opportunities for free and open-source software in 2014, in your opinion?**
**Zemlin**: Weve talked about gaming and consumer devices, but the enterprise continues to present even more opportunity for Linux. The rise of cloud computing is creating new challenges for developers and new opportunities for growth. Try to find a public cloud thats not running Linux.
The realization of years of promise in software defined networking will be one of the major stories of 2014. People dont appreciate how big software defined networking and network function virtualization will become. Think about it. Billions of dollars are spent on hardware based switches, routers, load balancers, firewalls, etc.; this is all being abstracted into software. More importantly it is being abstracted via open source software in the sweet spot for OSS which is at this infrastructure layer. I think youll see projects like OpenDaylight and others have a big breakout year in 2014.
Of course, this is all part of a broader trend towards collaborative development, which should be of interest to your readers. Id predict that in another decade nearly all of infrastructure software will be built collaboratively. Developers in 2014 need to learn how to build software collaboratively and how to work on and contribute to open source software projects. Their career opportunities will be endless if they understand the principles of collaborative development and open source software.
Its a thrilling time to be involved in Linux. Its become the de facto platform to go to for everything from smart watches to TVs to automobiles, you name it.
--------------------------------------------------------------------------------
via: http://venturebeat.com/2013/11/26/linux-chief-open-source-is-safer-and-linux-is-more-secure-than-any-other-os-exclusive/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://venturebeat.com/2013/09/23/steamos-valves-linux-based-operating-system-for-the-tv-and-living-room/
[2]:http://gopro.com/support/open-source

View File

@ -1,39 +0,0 @@
LinuxCon/CloudOpen Goose Chase Ends in Tie for Grand Prize
================================================================================
Hundreds of people raced to the finish in the first-ever LinuxCon/CloudOpen Goose Chase. From showing your cowsay to the coffee cup that fuels your Linux work, you - the community - showcased your competitive nature and passion for having fun. The competiton was fierce through the end, which resulted in a tie for Grand Prize for Round Two (round one wrapped up in October, and the [winners were announced][1] at LinuxCon and CloudOpen North America). Because there are two Grand Prize winners, we will not be awarding a First Prize.
The winners of Round Two are:
**Grand Prize: $500 Amazon Gift Card**
**Daniel German**, Canada
**Joao Paulo Rechi Vita**, Brazil
![](http://www.linux.com/images/stories/714/jprvita.jpg)
Joao works for the Nokia Institute of Technology. His latest Linux project was adding BlueZ 5 bluetooth support to PulseAudio on the Linux desktop. He's attended LinuxCon in Japan, North America and Europe this year.
"I participated in the Goose Chase at LinuxCon North America and found it really fun, so when I was showing the pictures to my girlfriend back home I found the {online} Goose Chase and decided to join it as well. And as I expected, {it} was a lot of fun again, specially because this time some of the missions needed quite a bit of creativity to be accomplished."
**Second Prize, $50 Amazon Gift Card**
**Madalina-Ioana Alexe**, Romania
Madalina-Ioana works for Intel Romania on Tizen and attended the Gluster Community Day this week at LinuxCon Europe.
"I found it is a fun game, which is still suitable for geeks. It was a nice and funny experience and I found out that there are even more geeks like me."
Congratulations to all our winners and thank you so much for participating in the Goose Chase!
![](http://www.linux.com/images/stories/714/mada.jpg)
--------------------------------------------------------------------------------
via: http://www.linux.com/news/featured-blogs/185-jennifer-cloer/745263-linuxconcloudopen-goose-chase-ends-in-tie-for-grand-prize/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.linux.com/news/featured-blogs/200-libby-clark/737969-announcing-goose-chase-contest-winners-more-prizes-for-linuxcon-europe

View File

@ -1,26 +0,0 @@
New Ubuntu 14.04 LTS Icon Theme Uses Origami Concept
================================================================================
![](http://i1-news.softpedia-static.com/images/news2/New-Ubuntu-14-04-LTS-Icon-Theme-Uses-Origami-Concept-403061-2.png)
**Ubuntu 14.04 LTS has a good chance of getting a new icon theme, but there's one very interesting concept integrated in the design, and that is an origami motif.**
When designers begin to make original artwork for operating systems, they usually start from scratch or they integrate the current trend in their work. Ubuntu designers have managed to produce something unique, that doesnt follow the overall trend, and which is inspired by art.
In the Ubuntu 14.04 icon theme presentation showed during the Ubuntu Developer Summit, visual designer James Matthieu explained that they used an origami concept to illustrate various components.
“The default file shape represent a sheet of paper using the origami effect to maintain consistency with the style of some of the application icon,” [said][1] James Matthieu during the presentation.
This is not the first time that a folded corner is used for folders or files, but if you look close enough the folding mark of the “paper” is also present in the final form.
We hope that the new icon theme will make it because it looks awesome. You can see more details about the new icon in [our original report][2].
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/New-Ubuntu-14-04-LTS-Icon-Theme-Uses-Origami-Concept-403061.shtml
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.youtube.com/watch?v=0AEvSIX41lk&feature=share
[2]:http://news.softpedia.com/news/Ubuntu-14-04-LTS-to-Get-Stunning-Icon-Theme-and-They-re-Not-Flat-402712.shtml

View File

@ -0,0 +1,61 @@
Open Source Is Here To Stay On IBM i
================================================================================
For years, open source software has been a bit of a redheaded stepchild in the button-down IBM midrange community. IBM i shops were hesitant to use it, and vendors were afraid to adopt it. But with so much of the computing world now running on open source, the aversion to open source has gradually melted away, and it has steadily crept into use among large corporations, and the IBM i world too.
It is tough to measure the adoption of open source software, which flows freely across networks by its very nature. Nobody requires you to register to use open source software, and there's no central clearinghouse of information about open source software.
However, recent surveys and audits point to greater adoption of open source across all industries. Open source software components are widely used in in the financial services industry, according to Julian Brook, associate director at SQS Software, which conducts software quality audits for financial software vendors. "I would say that, arguably, open source is used in every organization that is developing software, especially in the financial services world," Brook [told Out-Law.com recently][1].
Governmental agencies lead the way in use of open source software, according to [Black Duck Software][2]'s 2013 Future of Open Source survey. More than 35 percent of government representatives queried for the survey say they use open source, followed by medical (15.2 percent), media (13 percent), financial (8.8 percent), and retail (5.9 percent). You can view more of the survey at [Slideshare][3].
Increasingly, users are adopting open source software because they expect higher software quality and security with open source, according to surveys like those from Black Duck. That's very interesting, because for many years, open source software was largely avoided for those two very reasons.
These are opinion surveys, mind you. They're not necessarily reflections of actual reality. But it is clear than many of the shortcomings that people previously associated with open source software products are disappearing. And slowly but surely, this trend is bleeding over into the competitive world of IBM i software, too.
### Open Source Impacts On IBM i ###
The IBM i server is one of the last great bastions of proprietary technology in a world heading in the direction of open source. IBM does not share with the world the guts of the IBM i OS and the System Licensed Internal Code (SLIC) it runs on. You can take what access IBM provides developers to the machine, or you can leave it, but you can't get access to the internals.
What goes on above the OS and SLIC layers is another matter entirely. We're not seeing a big influx of open source software in the world of ERP and business applications. But in many other software categories, open source options are proliferating.
One IBM i proponent of open source software is [Raz-Lee][4]. The security software vendor, which relies on the open source [ClamAV][5] offering to power its IBM i-based anti-virus offering, called iSecurity Anti-Virus, says ClamAV had an update for an evolving security threat--the W32/Autorun.worm.aaeh Trojan Horse--months before its competitor had updated the signature library for its IBM i-based antivirus offering.
"It turns out that ClamAV has been handling this threat . . . as of about eight to nine months ago," Raz-Lee vice president of business development Eli Spitz wrote in an email to IT Jungle last month. "In fact, one of our technicians here at Raz-Lee actually added his own unofficial signature to ClamAV's database before ClamAV included their formal signature for this virus."
Another IBM i software vendor using open source tools is [Arpeggio Software][6] . The Atlanta, Georgia-based company uses lots of open source components in its various IBM i utilities, which aren't available under an open source license, but which Arpeggio gives away and then charges customers to get technical support, a common approach taken by commercial open source vendors.
Arpeggio's latest offering, called ARP-DROP, uses the open source OAuth authentication method to help secure communication channels between IBM i servers and [DropBox][7] service running on the Internet. It also uses the OpenSSH encryption technology with ARP-SFTP client for IBM i. Arpeggio's founders (who also founded Trailblazer Systems, now part of [Liaison Technologies][8]) acknowledge that IBM i professionals could adopt the same open source tools to write similar tools. But they argue that Arpeggio does it better, so why not adopt their free tools and save yourself the time?
In many cases, an IBM i shop's first conscious exposure to open source is the server side scripting language PHP. IBM and [Zend Technology][9] have worked for years to make PHP run well on IBM i, and Zend's entry-level PHP runtime is shipped along with every Power Systems server and IBM i license.
One of the most popular PHP applications that run on IBM i servers is [SugarCRM][10]. Representatives with the Cupertino, California, company recently said that it has nearly 1,000 customers running the CRM software on IBM i servers. This includes paid enterprise licenses along with free community edition licenses.
### Fighting Perceptions ###
Most IBM i shops are big users of IBM i software, whether they know it or not. Some of the biggest, most important IT infrastructure components come from open source, including the Apache Web server, the Linux OS, the Java and PHP programming languages, the MySQL database, and the Eclipse development environment.
There's no reason not to call open source "commercial grade" anymore, Raz-Lee's Spitz said. "A few weeks ago Sourcefire, the owners of ClamAV, was purchased by [Cisco Systems][11]. That's obviously a 'certification' by a large commercial organization for open source software. So open source anti-virus software seems to be valuable to a multi-national company."
While open source software is making inroads in the IBM i community, it still has a ways to go to match the momentum that open source enjoys in the IT market as a whole. "It seems that the IBM i community is often less involved with open source and is not exposed to its importance and prevalence in the current computing area," Spitz said. "In many cases, open source is the 'playground' of very large companies who join to create a better arena for us all."
As the corporations of the world gradually becomes amenable to open source, the IBM i community will have no choice but to follow.
--------------------------------------------------------------------------------
via: http://www.itjungle.com/tfh/tfh120213-story01.html
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.out-law.com/en/articles/2013/september/open-source-code-use-within-financial-services-organisations-visibility-only-50-at-best-says-software-quality-expert/
[2]:http://www.blackducksoftware.com/
[3]:http://www.slideshare.net/blackducksoftware/the-2013-future-of-open-source-survey-results
[4]:http://www.razlee.com/
[5]:http://www.clamav.net/
[6]:http://www.arpeggiosoftware.com/
[7]:http://www.dropbox.com/
[8]:http://www.liaison.com/
[9]:http://www.zend.com/
[10]:http://www.sugarcrm.com/
[11]:http://www.cisco.com/

View File

@ -0,0 +1,31 @@
Oracle Linux 6.5 Arrives with Unbreakable Enterprise Linux Kernel 3.8
================================================================================
**Oracle has announced a few days ago that its Oracle Linux operating system has reached version 6.5, bringing lots of new features, updated packages and several improvements over previus releases.**
![](http://i1-news.softpedia-static.com/images/news2/Oracle-Linux-6-5-Arrives-with-Unbreakable-Enterprise-Linux-Kernel-3-8-406093-2.jpg)
First of all, we should mention that Oracle Linux 6.5 is now powered by three separate kernels, the unbreakable enterprise kernel version 2.6.39-400.211.1.el6uek only for the x86 (32-bit) platform, the unbreakable enterprise kernel version 3.8.13-16.2.1.el6uek for both 64-bit and 32-bit architectures, and the Red Hat compatible kernel 2.6.32-431.el6 for x86 and x86_64.
Unbreakable Enterprise Kernel Release 3 (UEK R3) introduces major improvements over UEK R2, including integrated DTrace support, device mapper support, Btrfs quota groups, Btrfs send and receive subcommands, support for replacing devices without unmounting in Btrfs, EXT4 quotas, TCP controlled delay management, TCP connection repair, STCP and TCP early retransmit, TCP fast open, and TCP small queue algorithm.
The loop driver has been update to provide the same I/O functionality as the dm-nfs project, simply by extending the AIO interface to perform direct I/O. Moreover, the secure computing mode feature has been added, and the OpenFabrics Enterprise Distribution (OFED) 2.0 stack supports the following protocols: SRP (SCSI RDMA Protocol), iSER (iSCSI Extensions), RDS (Reliable Datagram Sockets), SDP (Sockets Direct Protocol), EoIB (Ethernet over InfiniBand), IPoIB (IP encapsulation over InfiniBand), and eIPoIB (Ethernet tunneling over InfiniBand).
The OFED (OpenFabrics Enterprise Distribution) 2.0 stack also supports the following RDS features: AS (Async Send), APM (Automatic Path Migration), QoS (Quality of Service), SRQ (Shared Request Queue), AB (Active Bonding), and NF (Netfilter).
Last but not least, paravirtualization support has been enabled for Oracle Linux guests on Windows Server 2008 R2 Hyper-V or Windows Server 2008 Hyper-V.
**Download Oracle Linux 6.5 right now:**
- [Oracle Enterprise Linux 6.5 (ISO) i386][1][iso] [3 GB]
- [Oracle Enterprise Linux 6.5 (ISO) amd64][2][iso] [3.60 GB]
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/Oracle-Linux-6-5-Arrives-with-Unbreakable-Enterprise-Linux-Kernel-3-8-406093.shtml
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://mirrors.dotsrc.org/oracle-linux/OL6/U5/i386/OracleLinux-R6-U5-Server-i386-dvd.iso
[2]:http://mirrors.dotsrc.org/oracle-linux/OL6/U5/x86_64/OracleLinux-R6-U5-Server-x86_64-dvd.iso

View File

@ -1,97 +0,0 @@
Personality Traits of the Best Software Developers
================================================================================
I come from the world of corporate software development. It may not be the most glamorous side of software (its nowhere near as interesting as [shrinkwrap startups][1] or those fancy-dancy [Web 2.0][2] companies that show up in your browser every time you mistype a domain name), but its stable, pays well, and has its own set of challenges that other types of software development know nothing about.
For example, when was the last time someone working on the next version of Halo spent three weeks trying to gather people from accounting, marketing, product management, and their call center in order to nail down requirements that would likely change in 2 months once theyve delivered the software?
Or when was the last time someone at [37Signals][3] sat through back to back weeks of [JAD sessions][4]?
In this world of corporate development Ive known a few phenomenal developers. Im talking about those A people whom you would quit your job for to go start a company. And the the more I looked at what makes them so good, the more I realized they all share a handful of personality traits. Well, not exactly a handful, more like four.
![](http://softwarebyrob.wpengine.netdna-cdn.com/images/chess_game.jpg)
### Pessimistic ###
Admiral Jim Stockdale was the highest ranking US military officer imprisoned in Vietnam. He was held in the “Hanoi Hilton” and repeatedly tortured over 8 years. Stockdale told Jim Collins, author of [Good to Great][5], “You must never confuse faith that you will prevail in the end, which you can never afford to lose, with the discipline to confront the most brutal facts of your current reality, whatever they might be.”
After his release, Stockdale became the first three-star officer in the history of the navy to wear both aviator wings and the Congressional Medal of Honor.
Stockdale was a pessimist in the short-term because he faced the brutal facts of his reality, but was an optimist in the long-term because of his confidence that he would prevail in the end.
No one anticipates a catastrophic system failure by looking on the bright side. The best developers I know are experts at finding points of failure. Youll often hear them quipping “What could possibly go wrong?” after someone makes a suggestion to handle a critical data transfer via nightly FTP over a dial-up connection. The best developers anticipate headaches that other developers never think of, and do everything within their power to avoid them.
On the flip side, great developers are optimistic, even downright confident, about their overall success. They know that by being a pessimist in the short-term, their long-term success is ensured. Just like Jim Stockdale, they realize that by confronting the brutal facts of their current reality they will prevail in the end.
### Angered By Sloppy Code ###
Paul Graham nailed it when [he said][6] “…people who are great at something are not so much convinced of their own greatness as mystified at why everyone else seems so incompetent.”
The worst nightmare for a great developer is to see someone elses software gasping for air while bringing the rest of the system to its knees. Its downright infuriating. And this isnt limited to code; it can be bad installation packages, sloppy deployments, or a misspelled column name.
![](http://softwarebyrob.wpengine.netdna-cdn.com/images/paris_sewers.jpg)
Due to the life and death nature of their products, NASA designs zero-defect software systems using a process that has nearly eliminated the possibility for human error. Theyve added layer after layer of checks and balances that have resulted from years of finding mistakes and figuring out the best way to eliminate them. NASA is the poster child for discovering the source of a mistake and modifying their process to eliminate the possibility of that mistake ever happening again. And it works. A quote from [this Fast Company article][7] on NASAs development process says
“What makes it remarkable is how well the software works. This software never crashes. It never needs to be re-booted. This software is bug-free. It is perfect, as perfect as human beings have achieved. Consider these stats: the last three versions of the program — each 420,000 lines long-had just one error each. The last 11 versions of this software had a total of 17 errors. Commercial programs of equivalent complexity would have 5,000 errors.”
Im not saying we have to develop to this standard, but NASA knows how to find and fix bugs, and the way they do it is to find the source of every problem.
Someone who fixes a problem but doesnt take the time to find out what caused it is doomed to never become an expert in their field. Experience is not years on the job, its learning to recognize a problem before it occurs, which can only be done by knowing what causes it in the first place.
Developers who dont take the time to find the source often create sloppy solutions. For hundreds of examples of sloppy solutions visit [The Daily WTF][8]. Here are a few Ive seen in my career:
- An assembly is deleted from a server each time its rebooted. You could create a custom script to re-copy that assembly to the server after each reboot, or find out why the assembly is being deleted in the first place.
- An image-manipulation script is hogging processor power for minutes at a time when it should run in under 10 seconds. You could make the script run at 2am when no one will notice, or you can take the time to step through the code and figure out where the real problem is.
- A shared XML file is being locked by a process, causing other processes to fail when they try to open it. You could make several copies of the XML file so each process has its own, or you could troubleshoot the file access code to find out why its locking the file.
- And on and on…
### Long Term Life Planners ###
This one was a little puzzling for the longest time, but I think Ive finally put it together.
![](http://softwarebyrob.wpengine.netdna-cdn.com/images/brown_guitar.jpg)
People who think many years down the road in their personal life have the gift to think down the road during development. Being able to see the impacts of present-day decisions is paramount to building great software. The best developers I know have stable family lives, save for retirement, own their own home, and eat an apple a day (ok, maybe not that last one). People who have spastic home-lives and live paycheck to paycheck can certainly be good developers, but what they lack in life they tend to lack in the office: the ability to be disciplined, and to develop and adhere to a long-term plan.
### Attention to Detail ###
Ive known smart developers who dont pay attention to detail. The result is misspelled database columns, uncommented code, projects that arent checked into source control, software thats not unit tested, unimplemented features, and so on. All of these can be easily dealt with if youre building a Google mash-up or a five page website. But in corporate development each of these screw-ups is a death knell.
So Ill say it very loud, but I promise Ill only say it once:
**I have never, ever, ever seen a great software developer who does not have amazing attention to detail.**
I worked with a programmer back in school who forced anyone working with him to indent using two spaces instead of tabs. If you gave him code that didnt use two spaces he would go through it line-by-line and replace your tabs with his spaces. While the value of tabs is not even a question, (Ive long-chided him for this anal behavior) his attention to such a small detail has served him well in his many years designing chips at Intel.
### So There You Have It ###
The next time youre interviewing a potential developer, determine if she has the four personality traits Ive listed above. Here are a few methods Ive found useful:
- Ask if theyre an optimist or a pessimist
- Ask about a time when they found the source of a problem
- Find out if they save for retirement (you can work this in during discussions of your companys retirement plan)
- Make an obvious misspelling in a short code sample and ask if they see anything wrong
We know from [Facts and Fallacies of Software Engineering][9] that the best programmers are up to [28 times better][10] than the worst programmers, making them the best bargains in software. Take these four traits and go find a bargain (or better yet, make yourself into one).
If you liked this article youll also like my article [Timeline and Risk: How to Piss off Your Software Developers][11].
--------------------------------------------------------------------------------
via: http://www.softwarebyrob.com/2006/08/20/personality-traits-of-the-best-software-developers/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.joelonsoftware.com/
[2]:http://www.econsultant.com/web2/
[3]:http://www.37signals.com/
[4]:http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci986072,00.html
[5]:http://www.amazon.com/gp/redirect.html?link_code=ur2&tag=softwarbyrob-20&camp=1789&creative=9325&location=%2Fgp%2Fproduct%2F0060794410%2Fsr%3D8-3%2Fqid%3D1155789849%2Fref%3Dpd_bbs_3%3Fie%3DUTF8
[6]:http://www.paulgraham.com/gh.html
[7]:http://www.fastcompany.com/online/06/writestuff.html
[8]:http://www.thedailywtf.com/
[9]:http://www.amazon.com/gp/redirect.html?link_code=ur2&tag=softwarbyrob-20&camp=1789&creative=9325&location=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fproduct%2F0321117425%2Fsr%3D8-1%2Fqid%3D1154642314%2Fref%3Dpd_bbs_1%3Fie%3DUTF8
[10]:http://safari.oreilly.com/0321117425/ch01lev1sec1
[11]:http://www.softwarebyrob.com/articles/Timeline_and_Risk_Piss_Off_Your_Software_Developers.aspx

View File

@ -1,3 +1,4 @@
Crowner's crown
Setup Apache 2.4 and Php FPM with mod proxy fcgi on Ubuntu 13.10
================================================================================
### mod_proxy_fcgi ###

View File

@ -0,0 +1,41 @@
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

@ -0,0 +1,216 @@
ps命令的10个例子
================================================================================
### Linux ps 命令 ###
linux的ps命令是一个浏览系统运行的进程的一个最基础的工具。它提供了一个当前进程的快照还带有一些具体的信息比如用户idcpu使用率内存使用命令名等它不会像top或者htop一样实时显示数据。即使他在功能和输出上更见但但是它仍是一个每个linux新人需要了解和学习的一个必要的进程管理/检测工具。
在本篇中我门会复习ps命令基本的用法:检测、过滤、以不同的方式排序进程来更好地适应。
### 语法说明 ###
ps命令有两种不同风格的语法规则。它们是BSD和UNIX。新人经常感到困惑并会误解这两种风格。因此在继续本篇之前有一些基本的信息要澄清。
> 注意: "ps aux"不等同于"ps -aux"。比如"-u"用于显示用户的进程,但是"u"意味着显示具体信息。
BSD 形式 - BSD形式的语法的选项前没有破折号。
ps aux
UNIX/LINUX 形式 - linux形式的语法的选项前有破折号。
ps -ef
在linux系统上混合这两种语法是可以的。比如 "ps ax -f"。但是本章中我们主要讨论unix形式语法。
### 如何使用ps命令 ###
#### 1. 显示所有进程 ####
下面的命令可以显示所有进程的列表。
$ ps ax
$ ps -ef
通过管道输出到"less"可以使它滚动。
使用"u"或者"-f"选项可以显示进程的具体信息。
$ ps aux
$ ps -ef -f
> 为什么USER列显示的不是我的用户名而是其他的像rootwww-data等等
对于所有的用户(包括你们的)如果长度大于8个字符那么ps只会显示你的UID而不是用户名。
#### 2. 显示用户进程 ####
使用"-u"选项后跟用户名来过滤所属用户的进程。多个用户名可以用逗号分隔。
$ ps -f -u www-data
UID PID PPID C STIME TTY TIME CMD
www-data 1329 1328 0 09:32 ? 00:00:00 nginx: worker process
www-data 1330 1328 0 09:32 ? 00:00:00 nginx: worker process
www-data 1332 1328 0 09:32 ? 00:00:00 nginx: worker process
www-data 1377 1372 0 09:32 ? 00:00:00 php-fpm: pool a.localhost
www-data 1378 1372 0 09:32 ? 00:00:00 php-fpm: pool a.localhost
www-data 4524 2359 0 10:03 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 4527 2359 0 10:03 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 4528 2359 0 10:03 ? 00:00:00 /usr/sbin/apache2 -k start
#### 3. 通过名字或者进程id显示进程 ####
通过"-C"选项后面加上名字或者命令来搜索进程。
$ ps -C apache2
PID TTY TIME CMD
2359 ? 00:00:00 apache2
4524 ? 00:00:00 apache2
4525 ? 00:00:00 apache2
...
要通过进程id显示进程就使用"-p"选项并且它还提供使用逗号来分割进程id。
$ ps -f -p 3150,7298,6544
"-C"必须提供精确的进程名并且它并不能通过部分名字或者通配符查找。为了更弹性地搜索进程列表通常使用grep命令。
$ ps -ef | grep apache
#### 4. 通过cpu或者内存使用排序进程 ####
系统管理员通常想要找出那些消耗最多内存或者CPU的进程。排序选项会基于特性的字段或者参数排序进程列表。
多个字段可以用'--sort'指定,并用逗号分割。除此之外,字段前面还可以跟上'-'或者'+'的前缀来相应地表示递减和递增排序。这里有很多的用于排序的选项。通过man页来获取完整的列表。
$ ps aux --sort=-pcpu,+pmem
显示前5名最耗cpu的进程。
$ ps aux --sort=-pcpu | head -5
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 2.6 0.7 51396 7644 ? Ss 02:02 0:03 /usr/lib/systemd/systemd --switched-root --system --deserialize 23
root 1249 2.6 3.0 355800 30896 tty1 Rsl+ 02:02 0:02 /usr/bin/X -background none :0 vt01 -nolisten tcp
root 508 2.4 1.6 248488 16776 ? Ss 02:02 0:03 /usr/bin/python /usr/sbin/firewalld --nofork
silver 1525 2.1 2.3 448568 24392 ? S 02:03 0:01 /usr/bin/python /usr/share/system-config-printer/applet.py
#### 5. 以树的形式显示进程层级 ####
许多进程实际上是从同一个父进程fork出来的并且了解父子关系通常是很有用的。"--forest" 选项会构造一个ascii艺术形式的进程层级视图。
下面的命令会用apache2的进程名来搜索并构造一个树来显示具体信息。
$ ps -f --forest -C apache2
UID PID PPID C STIME TTY TIME CMD
root 2359 1 0 09:32 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 4524 2359 0 10:03 ? 00:00:00 \_ /usr/sbin/apache2 -k start
www-data 4525 2359 0 10:03 ? 00:00:00 \_ /usr/sbin/apache2 -k start
www-data 4526 2359 0 10:03 ? 00:00:00 \_ /usr/sbin/apache2 -k start
www-data 4527 2359 0 10:03 ? 00:00:00 \_ /usr/sbin/apache2 -k start
www-data 4528 2359 0 10:03 ? 00:00:00 \_ /usr/sbin/apache2 -k start
> 尽量不要在排序中使用树状显示,因为两者都会以不同方式影响显示的顺序。
#### 6. 显示父进程的子进程 ####
下面一个是找出所有从apache进程fork出来的进程的例子。
$ ps -o pid,uname,comm -C apache2
PID USER COMMAND
2359 root apache2
4524 www-data apache2
4525 www-data apache2
4526 www-data apache2
4527 www-data apache2
4528 www-data apache2
[term]
第一个属于root的进程是apache2的主进程其他的apache进程都是从主进程fork出来的。下面的命令使用apache2主进程的pid列出了所有的apache2的子进程。
[term]
$ ps --ppid 2359
PID TTY TIME CMD
4524 ? 00:00:00 apache2
4525 ? 00:00:00 apache2
4526 ? 00:00:00 apache2
4527 ? 00:00:00 apache2
4528 ? 00:00:00 apache2
#### 7. 显示进程的线程 ####
"-L"选项会随着进程一起显示线程。它可用于显示所有特定进程或者所有进程的线程。
下面的命令会显示进程id为3150的进程的所有线程。
$ ps -p 3150 -L
#### 8. 改变显示的列 ####
ps命令可以被配置用来只显示被选中的列。很多列可以被用来显示并且完整的列表在man页中。
下面的命令会只显示pid、用户名、cpu、内存、命令列。
$ ps -e -o pid,uname,pcpu,pmem,comm
同样可以重命名列的名字。
$ ps -e -o pid,uname=USERNAME,pcpu=CPU_USAGE,pmem,comm
PID USERNAME CPU_USAGE %MEM COMMAND
1 root 0.0 0.0 init
2 root 0.0 0.0 kthreadd
3 root 0.0 0.0 ksoftirqd/0
4 root 0.0 0.0 kworker/0:0
5 root 0.0 0.0 kworker/0:0H
7 root 0.0 0.0 migration/0
8 root 0.0 0.0 rcu_bh
9 root 0.0 0.0 rcuob/0
10 root 0.0 0.0 rcuob/1
非常弹性化。
#### 9. 显示进程运行的时间 ####
运行的时间指的是,进程已经运行的时间。运行时间的列并没有默认显示,需要使用-o选项带入。
$ ps -e -o pid,comm,etime
#### 10. 将ps转换为实时进程查看器 ####
As usual, the watch command can be used to turn ps into a realtime process reporter. Simple example is like this
通常上watch命令可将ps命令变成实时进程查看器。像这个简单的命令
$ watch -n 1 'ps -e -o pid,uname,cmd,pmem,pcpu --sort=-pmem,-pcpu | head -15'
我桌面上的输出就像这样。
Every 1.0s: ps -e -o pid,uname,cmd,pmem,pcpu --... Sun Dec 1 18:16:08 2013
PID USER CMD %MEM %CPU
3800 1000 /opt/google/chrome/chrome - 4.6 1.4
7492 1000 /opt/google/chrome/chrome - 2.7 1.4
3150 1000 /opt/google/chrome/chrome 2.7 2.5
3824 1000 /opt/google/chrome/chrome - 2.6 0.6
3936 1000 /opt/google/chrome/chrome - 2.4 1.6
2936 1000 /usr/bin/plasma-desktop 2.3 0.2
9666 1000 /opt/google/chrome/chrome - 2.1 0.8
3842 1000 /opt/google/chrome/chrome - 2.1 0.8
4739 1000 /opt/google/chrome/chrome - 1.8 1.0
3930 1000 /opt/google/chrome/chrome - 1.7 1.0
3911 1000 /opt/google/chrome/chrome - 1.6 0.6
3645 1000 /opt/google/chrome/chrome - 1.5 0.4
3677 1000 /opt/google/chrome/chrome - 1.5 0.4
3639 1000 /opt/google/chrome/chrome - 1.4 0.4
输出会每秒刷新状态。但不要认为这和top相似。
你会发现top/htop命令的输出相比上面的ps命令刷新得更频繁。
这是因为top输出会cpu使用和内存使用值混合排序后的输出。但是上面的ps命令是一个更简单的行为的排序每次获取一列(像学校的数学)。因此它不会像top那样快速更新。
--------------------------------------------------------------------------------
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/) 荣誉推出

View File

@ -0,0 +1,34 @@
每日Ubuntu小技巧 - 更换菜单风格
================================================================================
每日Ubuntu小技巧 - 喜欢GNOME风格菜单?安装Class Menu Indicator吧
对于那些从初学者一直关注Ubuntu操作系统的人他们看见几乎所有的Ubuntu经历的改变。发生了许多的改变尤其是在桌面部分。从经典的GNOME桌面环境到UnityUbuntu已经完全地重新设计了。
对于那些新用户他们所知道的是Unity桌面环境和仅仅只是听说过或者见过在支持Ubuntu之前的原始的GNOME桌面环境。
如果你是一个老资格想要在Ubuntu的Unity回到GNOME风格的菜单安装Classic Menu Indicator 可以解决这个问题。这个俏皮的包被安装在顶部面板的通知区域在Ubuntu中带回了GNOME风格菜单体验。
像经典的GNOME菜单一样它包括所有的应用和经典菜单结构。对于曾经使用过它的人们是容易导航和开启应用。对于新用户它也是容易掌握。
接下来的简短指导将会告诉你如何在Ubuntu中安装这个包。
马上开始,在键盘上按下 **Ctrl Alt T** 打开终端。
打开完毕后运行下列命令加入它的PPA文件
sudo apt-add-repository ppa:diesch/testing
接来下,运行下列命令安装它。
sudo apt-get update && sudo apt-get install classicmenu-indicator
安装完成后在Unity Dash中启动。它叫Classic Menu Indicator.当你启动它的时候,它会自动的嵌入顶部面板,如下图。
![](http://www.liberiangeek.net/wp-content/uploads/2013/11/classic-menu-indicator.png)
就是这样,使用并享受吧!
--------------------------------------------------------------------------------
via: http://www.liberiangeek.net/2013/11/daily-ubuntu-tipslike-gnome-classic-menu-get-classic-menu-indicator/
译者:[Vic___](http://blog.csdn.net/Vic___) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,150 @@
Linux中如何显示和设置Hostname
================================================================================
![](http://linoxide.com/wp-content/uploads/2013/11/hostname-command-linux.jpg)
随着原来越多的计算机连接上网络计算机需要有一个属性来与其他计算机区别。如同在真实世界的人计算机也有自己属性叫hostname主机名称
### 什么是hostname ###
从它的操作手册来看hostname是用来显示系统的DNS名字以及为了显示和设置它的主机名或者NIS域名名字。所以hostname是依赖于DNSDomain Name System域名系统或者NISNetwork Information System网络信息系统
### 怎么显示hostname ###
hostname是为一个linux发行版的预安装命令。通过在控制台输入hostname可以显示你的机器的hostname。这里有一个有个简单的命令及其输出。
$ hostname
ubuntu
上面的命令将会告诉你,计算机的名字是**ubuntu** 。
### 如何设置hostname ###
Hostname当你在第一次安装你的Linux的时候已经设置好了。 就是在你安装你的Linux产品的那步时将会询问你去填入主机名信息。然而**你可以稍后填写它**如果你愿意。
为了设置你的hostname你可以使用下面的命令
# hostname dev-machine
$ hostname
dev-machine
你**需要使用root权限**或者同样的权限可以设置/改变你的hostname。#号提示你在使用root用户。上述命令告诉你的计算机设置你的hostname为**dev-machine**。如果你没有收到任何错误消息那么你的hostname已经改变了。再一次使用hostname命令检查看看结果。
使用hostname命令设置你的hostname**不是永久的**。当你重启你的计算机,你的设定将会取消。**为了永久改变**你必须手动地修改hostname配置文件。
**On Debian / Ubuntu based Linux**
**基于Linux 的 Debian / Ubuntu**
你可以在下列文件夹找到这个文件,
**/etc/hostname**
或者
**/etc/hosts**
下面是每一个文件的内容
**/etc/hostname**
# vi /etc/hostname
dev-machine
**/etc/hosts**
# vi /etc/hosts
127.0.0.1 localhost
127.0.0.1 dev-machine
你将会发现修改它会立即生效而不用重启你的linux。
**On RedHat / CentOS based Linux**
**基于Linux的 RedHat / CentOS**
你可以在下列文件夹找到这个文件,
**/etc/hosts**
或者
**/etc/sysconfig/networks**
下面是每一个文件的内容
**/etc/hosts**
127.0.0.1 localhost.localdomain localhost dev-machine
::localhost 127.0.0.1
/etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=dev-machine
### 怎么显示DNS域名 ###
来自上面的hostname的定义hostname也可以显示你的Linux的DNS名字。如果你的hostname命令会显示你的hostname那么dnsdomainname命令也就会显示你的域名。来看看这个简单的例子。
$ dnsdomainname
bris.co.id
在本篇文章dnsdomainname命令的结果是 **bris.co.id**
如果你看见结果是 (**none**),那么你的机器**没有配置完整合格的域名FQDNFully Qualified Domain Name**。Dnsdomainname命令摘取来自**/etc/hosts**文件的信息。你应该配置它为完整合格的域名格式。接下来一个简单的例子:
**/etc/hosts**
127.0.0.1 localhost.localdomain localhost dev-machine
::localhost 127.0.0.1
192.168.0.104 dev-machine.bris.co.id dev-machine
为了显示更多的细节,你可以使用参数**-v**
$ dnsdomainname -v
gethostname()=dev-machine.bris.co.id
Resolving dev-machine.bris.co.id
Result: h_name=dev-machine.bris.co.id
Result: h_aliases=dev-machine
Result: h_addr_list=192.168.0.104
### 如何显示hostname更多细节信息###
Hostname命令可以使用多个参数和一些别名如dnsdomainname命令。这里有一些参数是每日操作中有用的。下面这些命令的结果是基于**/etc/hosts**的上述配置。
**显示IP地址**
$ hostname -i
192.168.0.104
**显示域名**
$ hostname -d
bris.co.id
**显示短主机名**
$ hostname -s
dev-machine
* 这个命令将会产生与输入hostname同样的结果 *
**显示FQDN格式**
$ hostname -f
dev-machine.bris.co.id
**显示细节信息**
所有的参数包括上述信息,都可以通过使用参数**-v 和 -d** 来概括。让我们来看一个例子。
$ hostname -v -d
gethostname()=dev-machine.bris.co.id
Resolving dev-machine.bris.co.id
Result: h_name=dev-machine.bris.co.id
Result: h_aliases=dev-machine
Result: h_addr_list=192.168.0.104
bris.co.id
感到熟悉?是的,这个结果与**dnsdomainname -v**命令是相同的,同样包含上面的内容。
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-command/display-set-hostname-linux/
译者:[Vic___](http://blog.csdn.net/Vic___) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出