This commit is contained in:
runningwater 2014-06-24 08:45:11 +08:00
commit d242658aa5
52 changed files with 3844 additions and 1402 deletions

View File

@ -1,8 +1,8 @@
在Ubuntu 14.04 上使用Bacula和Webmin设置备份服务器
================================================================================
**Bacula**是一个开源网络备份解决方案,允许你在本地或者远程计算机组上备份或者还原数据。许多高级存储管理特性配置与安装是很容易的
**Bacula**是一个开源网络备份解决方案允许你在本地或者远程计算机组上备份或者还原数据。配置与安装很容易,并支持许多高级存储管理特性。
主机名是**server.unixmen.local**。现在让我们进入教程吧。
本教程中让我们来学习一下如何在Ubuntu 14.04服务器上安装和配置Bacula。我的机器的IP是**192.168.1.250/24**主机名是**server.unixmen.local**。现在让我们进入教程吧。
### 安装 Bacula ###
@ -34,7 +34,7 @@ Bacula默认使用Postfix MTA。安装过程中你会被要求配置Postfix
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0041.png)
输入服务器完整网域名称
输入服务器完整域名FQDN
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0051.png)
@ -46,7 +46,7 @@ Bacula默认使用Postfix MTA。安装过程中你会被要求配置Postfix
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0071.png)
设置bacula-director-mysql密码注册数据库。如果空白,会生成一个随机密码。
设置数据库的bacula-director-mysql用户的密码。如果留空不输入,会生成一个随机密码。
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0081.png)
@ -88,7 +88,7 @@ Bacula有很多配置文件需要我们配置。
}
[...]
滚动到“list of files to be backed up”字段并设置备份的目录。本篇教程中我希望备份“**/home/sk**”目录。所以我这个目录包含进了“File”参数中。
滚动到“list of files to be backed up”字段并设置备份的目录。本篇教程中我希望备份“**/home/sk**”目录。所以我这个目录包含进了“File”参数中。
[...]
@ -121,9 +121,9 @@ Bacula有很多配置文件需要我们配置。
保存并关闭文件。
**更新 Bacula 存储守护进程设置:**
**更新 Bacula 存储守护进程设置**
编辑 **/etc/bacula/bacula-sd.conf**,
编辑 **/etc/bacula/bacula-sd.conf**
sudo vi /etc/bacula/bacula-sd.conf
@ -163,7 +163,6 @@ Bacula有很多配置文件需要我们配置。
使用下面的命令在Ubuntu 14.04上安装Webmin。
- [在 Ubuntu 14.04 LTS上安装Webmin][1]
注:此链接文章在另一篇里,如果也翻译发布了,那么可以更改这个链接地址
现在使用URL https://ip-address:10000进入Webmin界面。在左边的窗格中进入系统标签并点击模块配置链接。如果在系统下没有找到它在未使用模块一栏中查找。
@ -183,8 +182,8 @@ Bacula有很多配置文件需要我们配置。
via: http://www.unixmen.com/setup-backup-server-using-bacula-webmin-ubuntu-14-04/
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.unixmen.com/install-webmin-ubuntu-14-04/
[1]:http://linux.cn/article-3113-1.html

View File

@ -1,10 +1,10 @@
使用`Nginx和Apache`安装RainLoop Webmail(一个网页邮件客户端)
在Arch上使用Nginx/Apache安装RainLoop Webmail
================================================================================
Rainloop是一个使用PHP编写的开源免费的网页邮件客户端。他支持包括Google,Yahoo,OutLook在内的主流的邮件服务器当然他也支持你自己的本地邮件服务器。他主要的表现看起来像使用IMAP和SMTP协议的MUA(邮件客户端)
Rainloop是一个使用PHP编写的开源免费的网页邮件客户端。他支持包括Google、Yahoo、OutLook在内的主流的邮件服务器当然他也支持你自己的本地邮件服务器。它看起来大致就像使用IMAP和SMTP协议的MUA(邮件客户端)一样
#### RainLoop 示例 ####
可以看一下作者编写的安装文档: [http://demo.rainloop.net/][1].
可以看一下RainLoop作者安装的演示页面 [http://demo.rainloop.net/][1]。
![在Arch Linux上安装RainLoop](http://www.tecmint.com/wp-content/uploads/2014/05/Install-RainLoop-in-Arch-Linux.jpg)
在Arch Linux上安装RainLoop
@ -17,24 +17,28 @@ If you also need references on installing Rainloop on **Debian** and **Red Hat**
如果你还是需要一篇在**Debian** 和 **Red Hat** 安装 RainLoop Webmail 的教程,你可以看这篇文章:
- [Install RainLoop Webmail on Debian and Red Hat based Systems][2]
- [在 Debian 和 RedHat 系的 Linux 上安装 RainLoop Webmail][2]
以及在 **Ubuntu** 服务器中安装 RainLoop Webmail 的教程,你可以看这篇文章:
- [如何在 Ubuntu server 中设置 RainLoop Webmail][8]
### 系统要求 ###
#### 对 Nginx ####
- [Install LEMP (Nginx, PHP, MySQL with MariaDB engine and PhpMyAdmin) in Arch Linux][3]
- [Create Virtual Hosts in Nginx Web Server][4]
- [在 Arch Linux 上安装 LEMP (Nginx, PHP, MySQL/MariaDB 和 PhpMyAdmin)][3]
- [在 Nginx 上创建虚拟主机][4]
#### 对 Apache ####
- [Install LAMP (Linux, Apache, MySQL/MariaDB, and PHP/PhpMyAdmin) in Arch Linux][5]
- [在 Arch Linux 上安装 LAMP (Linux, Apache, MySQL/MariaDB 和 PHP/PhpMyAdmin)][5]
### Step 1:为 Nginx 或者 Apache 提供虚拟Host###
### Step 1:在 Nginx 或者 Apache 上创建虚拟主机###
**1.** 假设你已经配置您的服务器(**Nginx**或**Apache**如上面介绍的链接描述的,你需要做的第一件事是在Hosts文件里创建一个指向**的Arch Linux*系统的IP。
**1.** 假设你已经如上面介绍的链接所述,配置好了您的服务器(**Nginx**或**Apache**你需要做的第一件事是在Hosts文件里创建一个原始解析记录,以指向**的Arch Linux**系统的IP。
与Linux系统修改 **/etc/hosts** 文件并且在你得localhost下添加 Rainloop virtual 域。如下:
于Linux系统修改 **/etc/hosts** 文件并且在你的localhost条目之下添加 Rainloop 的虚拟域。如下:
127.0.0.1 localhost.localdomain localhost rainloop.lan
192.168.1.33 rainloop.lan
@ -42,11 +46,11 @@ If you also need references on installing Rainloop on **Debian** and **Red Hat**
![Add Domain Host Entry](http://www.tecmint.com/wp-content/uploads/2014/05/Install-RainLoop-in-Arch-Linux-01.jpg)
添加域信息
对于Windows系统则修改 **C:\Windows\System32\drivers\etc\hosts** 并且将接下来的内容添加到你的文件里:
如果是Windows系统则修改 **C:\Windows\System32\drivers\etc\hosts** 并且将接下来的内容添加到你的文件里:
192.168.1.33 rainloop.lan
**2.** After you verify local domain using **ping** command, create the necessary **Virtual Hosts** and **SSL** configurations for **Apache** or **Nginx**.
**2.** 使用 **ping** 命令确认本地的 Rainloop 域名创建成功之后,然后在 **Apache****Nginx** 中创建所需的 **虚拟主机****SSL** 配置。
#### Nginx 虚拟主机 ####
@ -141,10 +145,10 @@ If you also need references on installing Rainloop on **Debian** and **Red Hat**
$ sudo nginx_gen_ssl.sh
![Generate Certificate and Keys](http://www.tecmint.com/wp-content/uploads/2014/05/Install-RainLoop-in-Arch-Linux-04.jpg\)
![Generate Certificate and Keys](http://www.tecmint.com/wp-content/uploads/2014/05/Install-RainLoop-in-Arch-Linux-04.jpg)
生成证书和密钥
生成证书和SSL密钥后创建Rainloop**根**网络服务器的文件路径Rainloop PHP文件所在的位置然后启用虚拟主机并重新启动Nginx的守护进程应用配置。
生成证书和SSL密钥后创建Rainloop Web服务器**根**的文件路径Rainloop PHP文件所在的位置然后启用虚拟主机并重新启动Nginx的守护进程应用配置。
$ sudo mkdir -p /srv/www/rainloop
$ sudo n2ensite rainloop
@ -232,7 +236,7 @@ If you also need references on installing Rainloop on **Debian** and **Red Hat**
输入组织信息
After the Certificate and SSL keys are created, add Rainloop **DocumentRoot** path, then enable Virtual Hosts and restart Apache daemon to apply configurations.
在证书和密钥建立之后,添加RainLoop **DocumentRoot**目录之后激活虚拟主机并且重启Apache应用设置。
在证书和密钥建立之后,创建 RainLoop 的 **DocumentRoot** 所指向的目录之后激活虚拟主机并且重启Apache应用设置。
$ sudo mkdir -p /srv/www/rainloop
$ sudo a2ensite rainloop
@ -244,11 +248,11 @@ After the Certificate and SSL keys are created, add Rainloop **DocumentRoot** pa
### Step 2: 添加必要的PHP支持 ###
**3.** 无论您使用的是**Apache**或**Nginx**Web服务器您需要激活**php.ini**文件下中的PHP扩展包括新的服务器**DocumentRoot**目录
**3.** 无论您使用的是**Apache**或**Nginx**Web服务器您需要激活**php.ini**文件下中的PHP扩展并将新服务器的**DocumentRoot**目录放到 open_basedir 配置中
$ sudo nano /etc/php/php.ini
找到并且取消如下的PHP扩展的注释
找到并且取消如下的PHP扩展的注释LCTT译注即启用这些模块
extension=iconv.so
extension=imap.so
@ -258,12 +262,11 @@ After the Certificate and SSL keys are created, add Rainloop **DocumentRoot** pa
extension=openssl.so ( enables IMAPS and SMTP SSL protocols on mail servers)
extension=pdo_mysql.so
open_basedir语句应该看起来和这个一样。
open_basedir语句应该看起来类似如下:
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/etc/webapps/:/srv/www/
**4.** After the **php.ini** file was modified restart your server than check **phpinfo** file to see if **SSL** protocols are enabled.
**4.** 在修改好**php.ini**之后,重启你得服务器,然后检查 **phpinfo** 文件,去看看**SSL**协议是否已经激活。
**4.** 在修改好**php.ini**之后,重启你的服务器,然后检查 **phpinfo()** 输出,去看看**SSL**协议是否已经激活。
----------对于 Apache Web 服务器----------
$ sudo systemctl restart httpd
@ -275,22 +278,22 @@ open_basedir语句应该看起来和这个一样。
$ sudo systemctl restart php-fpm
![Check PHP Information](http://www.tecmint.com/wp-content/uploads/2014/05/Install-RainLoop-in-Arch-Linux-10.png)
Check PHP Information
查看 PHP 信息
### Step 3: 下载和安装 RainLoop Webmail ###
**5.**现在是时候从官方网站下载并解压缩Rainloop应用到文档根目录,但是需要首先安装**wget的**和**unzip**程序。
**5.**现在可以从官方网站下载Rainloop应用并解压缩到文档根目录了,但是需要首先安装**wget的**和**unzip**程序LCTT译注如果你已经有了可以忽略此步
$ sudo pacman -S unzip wget
**6.** 使用**wget**命令或通过使用浏览器导航到[http://rainloop.net/downloads/] [6]下载最新的源码包Rainloop zip归档
**6.** 使用**wget**命令或通过使用浏览器访问[http://rainloop.net/downloads/] [6]下载最新的源码包Rainloop 压缩包
$ wget http://repository.rainloop.net/v1/rainloop-latest.zip
![Download RainLoop Package](http://www.tecmint.com/wp-content/uploads/2014/05/Install-RainLoop-in-Arch-Linux-11.png)
下载 RainLoop 包
**7.** 下载过程完成后解压Rainloop归档到虚拟主机文档根目录路径( **/srv/www/rainloop/** )。
**7.** 下载过程完成后解压Rainloop压缩包到虚拟主机文档根目录路径( **/srv/www/rainloop/** )。
$ sudo unzip rainloop-latest.zip -d /srv/www/rainloop/
@ -309,7 +312,7 @@ Check PHP Information
**9.** Rainloop应用程序可以通过两种方式进行配置使用浏览器或者系统shell。如果要在终端配置就打开和编辑位于**/ srv/www/rainloop/data/_data_da047852f16d2bc7352b24240a2f1599/_default_/configs/**的application.ini**文件。
**10.** 若要从浏览器访问管理界面使用下面的URL地址** https://rainloop.lan/?admin**,然后提供默认的应用程序用户名密码。
**10.** 若要从浏览器访问管理界面使用下面的URL地址** https://rainloop.lan/?admin**,然后提供输入默认的应用程序用户名密码,如下:
User= admin
Password= 12345
@ -317,7 +320,7 @@ Check PHP Information
![Rainloop Web Interface](http://www.tecmint.com/wp-content/uploads/2014/05/Install-RainLoop-in-Arch-Linux-14.png)
Rainloop Web 界面
**11.** 首次登录后,你将被警告更改默认密码,所以我劝你做这一点。
**11.** 首次登录后,你会被警示需要更改默认密码,所以我劝你做这一点。
![Change Default Password](http://www.tecmint.com/wp-content/uploads/2014/05/Install-RainLoop-in-Arch-Linux-15.png)
修改默认 Password
@ -325,7 +328,7 @@ Rainloop Web 界面
![Set New Admin Password](http://www.tecmint.com/wp-content/uploads/2014/05/Install-RainLoop-in-Arch-Linux-16.png)
设置新的 Admin Password
**12.** 如果您要启用**Contact**就登录到MySQL数据库并创建上有一个特权用户和一个新的数据库然后提供**Contacts**字段的数据库凭据
**12.** 如果您要启用**Contact**联系人功能就登录到MySQL数据库并创建一个新的数据库及其用户然后提供在**Contacts**字段里面输入数据库信息
mysql -u root -p
create database if not exists rainloop;
@ -338,9 +341,9 @@ Rainloop Web 界面
在 RainLoop 中激活联系人
![Enter Contact Database Details](http://www.tecmint.com/wp-content/uploads/2014/05/Install-RainLoop-in-Arch-Linux-18.png)
添加联系人数据
添加联系人数据库配置
**13.** 默认情况下Rainloop提供** Gmail****Yahoo**和**Outlook**的邮件服务器的配置文件,但是你如果愿意,你也可以添加其他的邮件服务器域。
**13.** 默认情况下Rainloop提供** Gmail****Yahoo**和**Outlook**的邮件服务器的配置文件,但是你如果愿意,你也可以添加其他的邮件服务器域。
![Default Mail Domains](http://www.tecmint.com/wp-content/uploads/2014/05/Install-RainLoop-in-Arch-Linux-19.png)
默认 Mail 域
@ -348,26 +351,26 @@ Rainloop Web 界面
![Add New Domain](http://www.tecmint.com/wp-content/uploads/2014/05/Install-RainLoop-in-Arch-Linux-20.png)
添加新域
**14.** 登录你的邮件服务器,浏览** https://rainloop.lan**,并提供您的域名服务器验证信息。
**14.** 登录你的邮件服务器,访问** https://rainloop.lan**,并提供您的域名服务器验证信息。
![Login to Mail Domain](http://www.tecmint.com/wp-content/uploads/2014/05/Install-RainLoop-in-Arch-Linux-21.png)
登录到邮件页面
登录到Yahoo邮件页面
![Login to Gmail Domain](http://www.tecmint.com/wp-content/uploads/2014/05/Install-RainLoop-in-Arch-Linux-22.png)
登录Gmail
![RainLoop Email Interface](http://www.tecmint.com/wp-content/uploads/2014/05/Install-RainLoop-in-Arch-Linux-23.png)
RainLoop Email 界面
RainLoop 登录后的Email 界面
想要了解更多的文件,可以访问:[http://rainloop.net/docs/][7].
通过Rainloop你可以从浏览器中访问具有Internet连接的任何邮件服务器。唯一的缺憾就是在Arch Linux下使用Rainloop应用的人缺乏修改电子邮件帐户密码的poppassd插件包。
通过Rainloop你可以从浏览器中访问具有Internet连接的任何邮件服务器。唯一的缺憾就是在Arch Linux下使用Rainloop应用的话,少一个修改电子邮件帐户密码的poppassd插件包。
--------------------------------------------------------------------------------
via: http://www.tecmint.com/install-rainloop-webmail-in-arch-linux/
译者:[MikeCoder](https://github.com/MikeCoder) 校对:[校对者ID](https://github.com/校对者ID)
译者:[MikeCoder](https://github.com/MikeCoder) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
@ -377,4 +380,5 @@ via: http://www.tecmint.com/install-rainloop-webmail-in-arch-linux/
[4]:http://www.tecmint.com/create-virtual-hosts-using-nginx-on-arch-linux/
[5]:http://www.tecmint.com/install-lamp-in-arch-linux/
[6]:http://rainloop.net/downloads/
[7]:http://rainloop.net/docs/
[7]:http://rainloop.net/docs/
[8]:http://linux.cn/article-2794-1.html

View File

@ -0,0 +1,140 @@
如何在MacBook Pro Retina上安装Linux
================================================================================
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/linux-macbook-pro-retina-840x420.jpg?ec7b17)
MacBook Pros拥有非常强大的配置但是有些人想强上加强他们想用Linux系统。
不管您是想要更开放和个性化的操作系统又或者是您只想要使用某些在Linux特有的软件您都会想要在您的MacBook上安装Linux。 可惜的是MacBook Pro们可是一块块密不透风砖头让您想装其他系统又无从下手。尤其是Linux比在MacBook上装Windows还难。 Boot Camp对于Linux来说也没有什么用处。 虽然如此,但并不代表您完全不能做到,装机走起!
### 为什么要在MacBook Pro Retina上装Linux ###
买MacBook不就是为了OS X吗为何要装Linux 其实买MacBook的原因不仅仅只是因为它的操作系统 其极致的硬件性能,超长的电池寿命,以及抗操抗造都是购买它的原因。 这些这么好的硬件再加上一块能让您体验到HiDPI的清晰度Retina显示屏其不皆是买入的理由乎
但是如果您对OS X无爱又或者您真心想要使用Linux为何不将这自由、开源、小巧、个性化的Linux塞进您的高大上的硬件呢苹果可能有话要说了可谁在乎呢~
注:在本期教程我们将会使用[最流行的Linux发行版][1] - Ubuntu来作为我们这次安装的选择。您也可以用自己想用的的Linux发行版但相关的步骤会和本教程略有出入。 如果您把自己的系统玩坏了,我们将不承担任何责任。 本教程将教您如何 Linux 和 OS X 双系统启动另外只有在OS X才能升级固件所以我们建议您不要将OS X 删除。
但在我们开始之前请您用您喜欢的方法比如Time Machine 或 CrashPlan将您的电脑彻底备份以防万一。
### 下载 Ubuntu ###
首先您需要下载一份[Ubuntu桌面版安装镜像][2] 。 务必选择64位的桌面版虽然该镜像并不是为Mac提供的。该镜像在BIOS和EFI模式下都能启动而Mac的镜像却只能在BIOS启动。Mac是专门设计成这样的但是我们要使之以EFI模式下启动。
### 写到U盘USB ###
其次, 找个2GB以上的USB 我们将会用该USB作为Ubuntu的安装启动盘。 你可以按照 [Ubuntu官方指导的步骤][3] 或者 [使用专用的图形化工具][4] 来准备安装盘.
### 调整分区大小 ###
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_disk_utility.jpg?ec7b17)
当你完成上一步后你的Mac Book Pro就做好安装的准备了。 打开Disk Utility磁盘工具 点击左边选择你的硬盘, 选择Partitions分区标签页。 把Mac分区缩小到你喜欢的大小 - 我们将会用新创建的可用空间来安装Ubuntu。
### 启动Ubuntu镜像 ###
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_boot.jpg?ec7b17)
上述步骤完成后将U盘插入并重启Mac Book Pro。当关机之后屏幕一黑时请按住Option键alt直到你看到不同的启动选项。选择EFI选项如果有两个的话选择左边的哪一个来从USB启动Ubuntu.
当你看到“Try Ubuntu" 和 "Install Ubuntu" 两个选项的时候, 选择 "Try Ubuntu" 因为我们需要在安装完成之后重启之前弄一些其他的东西。
### 安装器 ###
当Ubuntu的桌面加载好之后一路向下走直到你看到分区的这一步。 如果你连接不上WiFi的话就代表你的Ubuntu还暂时不知道如何跟你这位高大上Mac做朋友 不过不用担心, 我们暂时还不需要网络, 在你迟些重启的时候会自动识别你的驱动。
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_installer_partitions.jpg?ec7b17)
到分区这个步骤之后, 选择 "Do Something else" 这个选项。 然后请确保那块大约128MB左右的分区已经被识别为EFI启动分区你可以点击它然后选择Option来确定一下 另外,那个分区应该是 /dev/sda1。下一步 你要在新建的空间里创建一个 ext4分区在其上挂载“/”路径。 如果你知道你自己在干嘛的话也可以创建几个不同的分区切记这不是Windows啊孩纸
在你开始下一步之前请确保你的安装引导程序boot loader是选择了 /dev/sda1GRUB也是装到该分区的。 然后按照平常一样该咋装咋装。
### 修改 EFI 引导 ###
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_efibootmgr.jpg?ec7b17)
当你的安装器装完Ubuntu之后不要按重启 我们还需要弄这么点东西才能使用GRUB。 请运行下列的指令:
sudo apt-get install efibootmgr
这个将会暂时地安装一个EFI boot的配置工具然后 运行:
sudo efibootmgr
这个将会显示出当前的启动设置, 你应该看到的是 "ubuntu" 和 "Boot0000*"当前的EFI设置是把系统指向 Boot0080*这样的话就会跳过GRUB然后直接跳入OS X所以我们要用以下指令来修复它
sudo efibootmgr -o 0,80
现在就可以重启了!
恭喜你啦~你的Ubuntu现在应该就可以用了哦不过下列的一些调整会让性能提升哦
### 坑爹地调整设置 ###
首先你需要改一下GRUB的设置这样你的SSD盘才不会偶尔死机 在Terminal输入
sudo nano /etc/default/grub
找到 **GRUB\_CMDLINE\_LINUX**那一行 把它改成 **GRUB\_CMDLINE\_LINUX="libata.force=noncq"** 。 按下CTRL + X保存然后按Y来确定保存。 接下来你要在Terminal输入
sudo nano /etc/grub.d/40_custom
打开一个新的文件,请使用真丶精准手指准确地一字一字输入:
menuentry "Mac OS X" {
exit
}
这将会让你boot到你安装好的Mac OS XGRUB的32-bit和64-bit项不能用。然后CTRL+X 和 Y 保存退出,然后输入:
sudo update-grub
最后必须要重启才能生效。
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_small_retina.jpg?ec7b17)
在极其高清的Retina显示屏上神马都这么小坑爹啊啊 去Setting -> Display 里把 Scaling Factor弄大一点吧不然妈妈又要担心你的近视眼了。
你也可能觉得在边边上改变窗口大小是一件极其困难的事情,坑爹啊啊? 去Terminal输入
sudo nano /usr/share/themes/Ambiance/metacity-1/metacity-theme-1.xml
然后在里面修改成下面的参数:
<distance name="left_width" value="4"/>
<distance name="right_width" value="4"/>
<distance name="bottom_height" value="4"/>
如果还是太小把上面的东西改成6吧
最后如果你觉得你的Linux把你那Retina鲜艳的颜色洗掉了请到你的OS X盘找到以下的文件
/Library/ColorSync/Profiles/Displays/Color LCD-xxxxxx.icc
xxxxxx只是一串随机的字符不过这路径应该只有一个文件。把他搬到你Ubuntu的Home folder 然后到 System Settings > Color 选择 Add New Profile 并选择你那刚弄过来的icc文件。
### 总结 ###
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_final.jpg?ec7b17)
恭喜你啦, 现在终于有一台属于你的Linux MacBook Pro Retina啦如果你想把你的Ubuntu弄得更手熟请按 [让你的Ubuntu 像家一样舒服][5] 尽情地修改配置吧! 该教程也可用于其他的Mac系统当然每种Mac都有不同的好处和坏处。 如果你用的是其他的Mac请翻一翻[这篇为Ubuntu写的文档][6]
另外你还可以看一下其他可以在Mac安装的[Linux 发行包][7]哦!
Image Credits: [K?rlis Dambr?ns][8] Via Flickr
--------------------------------------------------------------------------------
via: http://www.makeuseof.com/tag/install-linux-macbook-pro/
译者:[213edu](https://github.com/213edu) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.makeuseof.com/tag/windows-xp-users-switch-ubuntu-14-04-lts-trusty-tahr/
[2]:http://www.ubuntu.com/download/desktop/
[3]:http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx
[4]:http://www.makeuseof.com/tag/how-to-boot-a-linux-live-usb-stick-on-your-mac/
[5]:http://www.makeuseof.com/tag/11-tweaks-perform-ubuntu-installation/
[6]:https://help.ubuntu.com/community/MacBookPro
[7]:http://www.makeuseof.com/pages/best-linux-distributions
[8]:https://www.flickr.com/photos/janitors/10037346335

View File

@ -8,15 +8,15 @@ APP Grid:一个优秀的Ubuntu软件中心替代品
### App GridUbuntu软件中心替代品 ###
自从2011年的彻底改造后Ubuntu的旗舰应用商店的界面就没怎么变过。这并不是说它在此期间被完全忽略了12.04的开发周期中可以看到[在启动时间上的工作][1]已经做了一些
自从2011年的彻底改造后Ubuntu的旗舰应用商店的界面就没怎么变过。这并不是说它在此期间被完全忽略了在12.04的开发周期中可以看到已经做了一些[减少打开耗时的工作][1]
撇开那个不算,ol USC还是一如既往一篮子的潜力还没被开发。
撇开那个不算,Ubuntu软件中心还是一如既往还有许多潜在功能还没被开发。
App Grid的目标解决这些问题。从零开始,它要求更快的启动时间,更快的反应时间,而且“不感觉混乱,不让人失望”。
App Grid的目标解决这些问题。从零开始,它要求更快的启动时间,更快的反应时间,而且“不感觉混乱,不让人失望”。
在大部分这些方面App Grid取得了成功。它几乎可以立即打开而在界面上点击也确实反应迅速。“不感觉混乱”这一承诺或许有一点小小的争议。该应用有时候要你横向滚动而另外的时候又要你纵向滚动。也有人禁不住会想如果这个应用能把它的网格背景样式扔了可能看起来会显得更专业一些。
作为在Ubuntu上筛选应用程序的一个方式App Grid做出了极大的努力。它支持Ubuntu One上的订购、评级和评论作为Ubuntu默认应用商店的替代品它更好用。
作为在Ubuntu上筛选应用程序的一个方式App Grid做出了极大的努力。它支持Ubuntu One上的订购、评级和评论作为Ubuntu默认应用商店的替代品它更好用。
如果非要说点什么缺点的话,那就是它不是一个开源的应用程序,第一次运行时会显示以下免责声明:
@ -27,18 +27,19 @@ App Grid的目标时解决这些问题。从零开始它要求更快的启动
App Grid可运行在Ubuntu 12.04 LTS13.10以及14.04 LTS版本下。可以通过添加以下PPA软件源来安装
sudo add-apt-repository -y ppa:appgrid/stable
sudo apt-get update && sudo apt-get install app grid
sudo apt-get update && sudo apt-get install appgrid
或者,也可以[从项目网站][2]抓取一个.deb安装包来安装。
- [下载用于Ubuntu 14.04的App Grid安装包][3]
试试吧,试过后请到我们开的空间里来发表一下你的看法吧……
试试吧,试过后请发表一下你的看法吧……
--------------------------------------------------------------------------------
via: http://www.omgubuntu.co.uk/2014/05/appgrid-ubuntu-software-centre-alternative
译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID)
译者:[GOLinux](https://github.com/GOLinux) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,370 @@
黑客内核编写属于你的第一个Linux内核模块
================================================================================
> 曾经多少次想要在内核游荡?曾经多少次茫然不知方向?你不要再对着它迷惘,让我们指引你走向前方……
内核编程常常看起来像是黑魔法,而在亚瑟 C 克拉克的眼中它八成就是了。Linux内核和它的用户空间是大不相同的抛开漫不经心你必须小心翼翼因为你编程中的一个bug就会影响到整个系统。浮点运算做起来可不容易堆栈固定而狭小而你写的代码总是异步的因此你需要想想并发会导致什么。而除了所有这一切之外Linux内核只是一个很大的、很复杂的C程序它对每个人开放任何人都去读它、学习它并改进它而你也可以是其中之一。
学习内核编程的最简单的方式也许就是写个内核模块一段可以动态加载进内核的代码。模块所能做的事是有限的——例如他们不能在类似进程描述符这样的公共数据结构中增减字段LCTT译注可能会破坏整个内核及系统的功能。但是在其它方面他们是成熟的内核级的代码可以在需要时随时编译进内核这样就可以摒弃所有的限制了。完全可以在Linux源代码树以外来开发并编译一个模块这并不奇怪它称为树外开发如果你只是想稍微玩玩而并不想提交修改以包含到主线内核中去这样的方式是很方便的。
在本教程中,我们将开发一个简单的内核模块用以创建一个**/dev/reverse**设备。写入该设备的字符串将以相反字序的方式读回“Hello World”读成“World Hello”。这是一个很受欢迎的程序员面试难题当你利用自己的能力在内核级别实现这个功能时可以使你得到一些加分。在开始前有一句忠告你的模块中的一个bug就会导致系统崩溃虽然可能性不大但还是有可能的和数据丢失。在开始前请确保你已经将重要数据备份或者采用一种更好的方式在虚拟机中进行试验。
### 尽可能不要用root身份 ###
> 默认情况下,**/dev/reverse**只有root可以使用因此你只能使用**sudo**来运行你的测试程序。要解决该限制,可以创建一个包含以下内容的**/lib/udev/rules.d/99-reverse.rules**文件:
>
> SUBSYSTEM=="misc", KERNEL=="reverse", MODE="0666"
>
> 别忘了重新插入模块。让非root用户访问设备节点往往不是一个好主意但是在开发其间却是十分有用的。这并不是说以root身份运行二进制测试文件也不是个好主意。
#### 模块的构造 ####
由于大多数的Linux内核模块是用C写的除了底层的特定于体系结构的部分所以推荐你将你的模块以单一文件形式保存例如reverse.c。我们已经把完整的源代码放在GitHub上——这里我们将看其中的一些片段。开始时我们先要包含一些常见的文件头并用预定义的宏来描述模块
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Valentine Sinitsyn <valentine.sinitsyn@gmail.com>");
MODULE_DESCRIPTION("In-kernel phrase reverser");
这里一切都直接明了,除了**MODULE\_LICENSE()**它不仅仅是一个标记。内核坚定地支持GPL兼容代码因此如果你把许可证设置为其它非GPL兼容的“Proprietary”[专利]),某些特定的内核功能将在你的模块中不可用。
### 什么时候不该写内核模块 ###
> 内核编程很有趣,但是在现实项目中写(尤其是调试)内核代码要求特定的技巧。通常来讲,在没有其它方式可以解决你的问题时,你才应该在内核级别解决它。以下情形中,可能你在用户空间中解决它更好:
> - 你要开发一个USB驱动 —— 请查看[libusb][1]。
> - 你要开发一个文件系统 —— 试试[FUSE][2]。
> - 你在扩展Netfilter —— 那么[libnetfilter\_queue][3]对你有所帮助。
> 通常,内核里面代码的性能会更好,但是对于许多项目而言,这点性能丢失并不严重。
由于内核编程总是异步的,没有一个**main()**函数来让Linux顺序执行你的模块。取而代之的是你要为各种事件提供回调函数像这个
static int __init reverse_init(void)
{
printk(KERN_INFO "reverse device has been registered\n");
return 0;
}
static void __exit reverse_exit(void)
{
printk(KERN_INFO "reverse device has been unregistered\n");
}
module_init(reverse_init);
module_exit(reverse_exit);
这里,我们定义的函数被称为模块的插入和删除。只有第一个的插入函数是必要的。目前,它们只是打印消息到内核环缓冲区(可以在用户空间通过**dmesg**命令访问);**KERN\_INFO**是日志级别(注意,没有逗号)。**\_\_init**和**\_\_exit**是属性 —— 联结到函数或者变量的元数据片。属性在用户空间的C代码中是很罕见的但是内核中却很普遍。所有标记为**\_\_init**的会在初始化后释放内存以供重用还记得那条过去内核的那条“Freeing unused kernel memory…[释放未使用的内核内存……]”信息吗?)。**\_\_exit**表明,当代码被静态构建进内核时,该函数可以安全地优化了,不需要清理收尾。最后,**module\_init()**和**module\_exit()**这两个宏将**reverse\_init()**和**reverse_exit()**函数设置成为我们模块的生命周期回调函数。实际的函数名称并不重要,你可以称它们为**init()**和**exit()**,或者**start()**和**stop()**,你想叫什么就叫什么吧。他们都是静态声明,你在外部模块是看不到的。事实上,内核中的任何函数都是不可见的,除非明确地被导出。然而,在内核程序员中,给你的函数加上模块名前缀是约定俗成的。
这些都是些基本概念 - 让我们来做更多有趣的事情吧。模块可以接收参数,就像这样:
# modprobe foo bar=1
**modinfo**命令显示了模块接受的所有参数,而这些也可以在**/sys/module//parameters**下作为文件使用。我们的模块需要一个缓冲区来存储参数 —— 让我们把这大小设置为用户可配置。在**MODULE_DESCRIPTION()**下添加如下三行:
static unsigned long buffer_size = 8192;
module_param(buffer_size, ulong, (S_IRUSR | S_IRGRP | S_IROTH));
MODULE_PARM_DESC(buffer_size, "Internal buffer size");
这儿我们定义了一个变量来存储该值封装成一个参数并通过sysfs来让所有人可读。这个参数的描述最后一行出现在modinfo的输出中。
由于用户可以直接设置**buffer\_size**,我们需要在**reverse\_init()**来清除无效取值。你总该检查来自内核之外的数据 —— 如果你不这么做,你就是将自己置身于内核异常或安全漏洞之中。
static int __init reverse_init()
{
if (!buffer_size)
return -1;
printk(KERN_INFO
"reverse device has been registered, buffer size is %lu bytes\n",
buffer_size);
return 0;
}
来自模块初始化函数的非0返回值意味着模块执行失败。
### 导航 ###
> 但你开发模块时Linux内核就是你所需一切的源头。然而它相当大你可能在查找你所要的内容时会有困难。幸运的是在庞大的代码库面前有许多工具使这个过程变得简单。首先是Cscope —— 在终端中运行的一个比较经典的工具。你所要做的,就是在内核源代码的顶级目录中运行**make cscope && cscope**。Cscope和Vim以及Emacs整合得很好因此你可以在你最喜爱的编辑器中使用它。
> 如果基于终端的工具不是你的最爱,那么就访问[http://lxr.free-electrons.com][4]吧。它是一个基于web的内核导航工具即使它的功能没有Cscope来得多例如你不能方便地找到函数的用法但它仍然提供了足够多的快速查询功能。
现在是时候来编译模块了。你需要你正在运行的内核版本头文件(**linux-headers**,或者等同的软件包)和**build-essential**或者类似的包。接下来该创建一个标准的Makefile模板
obj-m += reverse.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
现在,调用**make**来构建你的第一个模块。如果你输入的都正确在当前目录内会找到reverse.ko文件。使用**sudo insmod reverse.ko**插入内核模块,然后运行如下命令:
$ dmesg | tail -1
[ 5905.042081] reverse device has been registered, buffer size is 8192 bytes
恭喜了!然而,目前这一行还只是假象而已 —— 还没有设备节点呢。让我们来搞定它。
#### 混杂设备 ####
在Linux中有一种特殊的字符设备类型叫做“混杂设备”或者简称为“misc”。它是专为单一接入点的小型设备驱动而设计的而这正是我们所需要的。所有混杂设备共享同一个主设备号10因此一个驱动(**drivers/char/misc.c**)就可以查看它们所有设备了,而这些设备用次设备号来区分。从其他意义来说,它们只是普通字符设备。
要为该设备注册一个次设备号(以及一个接入点),你需要声明**struct misc\_device**,填上所有字段(注意语法),然后使用指向该结构的指针作为参数来调用**misc\_register()**。为此,你也需要包含**linux/miscdevice.h**头文件:
static struct miscdevice reverse_misc_device = {
.minor = MISC_DYNAMIC_MINOR,
.name = "reverse",
.fops = &reverse_fops
};
static int __init reverse_init()
{
...
misc_register(&reverse_misc_device);
printk(KERN_INFO ...
}
这儿我们为名为“reverse”的设备请求一个第一个可用的动态的次设备号省略号表明我们之前已经见过的省略的代码。别忘了在模块卸下后注销掉该设备。
static void __exit reverse_exit(void)
{
misc_deregister(&reverse_misc_device);
...
}
fops字段存储了一个指针指向一个**file\_operations**结构在Linux/fs.h中声明而这正是我们模块的接入点。**reverse\_fops**定义如下:
static struct file_operations reverse_fops = {
.owner = THIS_MODULE,
.open = reverse_open,
...
.llseek = noop_llseek
};
另外,**reverse\_fops**包含了一系列回调函数(也称之为方法),当用户空间代码打开一个设备,读写或者关闭文件描述符时,就会执行。如果你要忽略这些回调,可以指定一个明确的回调函数来替代。这就是为什么我们将**llseek**设置为**noop\_llseek()**,(顾名思义)它什么都不干。这个默认实现改变了一个文件指针,而且我们现在并不需要我们的设备可以寻址(这是今天留给你们的家庭作业)。
#### 关闭和打开 ####
让我们来实现该方法。我们将给每个打开的文件描述符分配一个新的缓冲区并在它关闭时释放。这实际上并不安全如果一个用户空间应用程序泄漏了描述符也许是故意的它就会霸占RAM并导致系统不可用。在现实世界中你总得考虑到这些可能性。但在本教程中这种方法不要紧。
我们需要一个结构函数来描述缓冲区。内核提供了许多常规的数据结构链接列表双联的哈希表树等等之类。不过缓冲区常常从头设计。我们将调用我们的“struct buffer”
struct buffer {
char *data, *end, *read_ptr;
unsigned long size;
};
**data**是该缓冲区存储的一个指向字符串的指针,而**end**指向字符串结尾后的第一个字节。**read_ptr**是**read()**开始读取数据的地方。缓冲区的size是为了保证完整性而存储的 —— 目前,我们还没有使用该区域。你不能假设使用你结构体的用户会正确地初始化所有这些东西,所以最好在函数中封装缓冲区的分配和收回。它们通常命名为**buffer\_alloc()**和**buffer\_free()**。
static struct buffer *buffer_alloc(unsigned long size)
{
struct buffer *buf;
buf = kzalloc(sizeof(*buf), GFP_KERNEL);
if (unlikely(!buf))
goto out;
...
out:
return buf;
}
内核内存使用**kmalloc()**来分配,并使用**kfree()**来释放;**kzalloc()**的风格是将内存设置为全零。不同于标准的**malloc()**,它的内核对应部分收到的标志指定了第二个参数中请求的内存类型。这里,**GFP_KERNEL**是说我们需要一个普通的内核内存不是在DMA或高内存区中以及如果需要的话函数可以睡眠重新调度进程。**sizeof(*buf)**是一种常见的方式,它用来获取可通过指针访问的结构体的大小。
你应该随时检查**kmalloc()**的返回值访问NULL指针将导致内核异常。同时也需要注意**unlikely()**宏的使用。它(及其相对宏**likely()**)被广泛用于内核中,用于表明条件几乎总是真的(或假的)。它不会影响到控制流程,但是能帮助现代处理器通过分支预测技术来提升性能。
最后,注意**goto**语句。它们常常为认为是邪恶的但是Linux内核以及一些其它系统软件采用它们来实施集中式的函数退出。这样的结果是减少嵌套深度使代码更具可读性而且非常像更高级语言中的**try-catch**区块。
有了**buffer\_alloc()**和**buffer\_free()****open**和**close**方法就变得很简单了。
static int reverse_open(struct inode *inode, struct file *file)
{
int err = 0;
file->private_data = buffer_alloc(buffer_size);
...
return err;
}
**struct file**是一个标准的内核数据结构,用以存储打开的文件的信息,如当前文件位置(**file->f\_pos**)、标志(**file->f\_flags**),或者打开模式(**file->f\_mode**)等。另外一个字段**file->privatedata**用于关联文件到一些专有数据它的类型是void *,而且它在文件拥有者以外,对内核不透明。我们将一个缓冲区存储在那里。
如果缓冲区分配失败,我们通过返回否定值(**-ENOMEM**来为调用的用户空间代码标明。一个C库中调用的**open(2)**系统调用(如 **glibc**)将会检测这个并适当地设置**errno** 。
#### 学习如何读和写 ####
“read”和“write”方法是真正完成工作的地方。当数据写入到缓冲区时我们放弃之前的内容和反向地存储该字段不需要任何临时存储。**read**方法仅仅是从内核缓冲区复制数据到用户空间。但是如果缓冲区还没有数据,**revers\_eread()**会做什么呢?在用户空间中,**read()**调用会在有可用数据前阻塞它。在内核中你就必须等待。幸运的是有一项机制用于处理这种情况就是wait queues
想法很简单。如果当前进程需要等待某个事件,它的描述符(**struct task_struct**存储current信息被放进非可运行睡眠中状态并添加到一个队列中。然后**schedule()**就被调用来选择另一个进程运行。生成事件的代码通过使用队列将等待进程放回**TASK\_RUNNING**状态来唤醒它们。调度程序将在以后在某个地方选择它们之一。Linux有多种非可运行状态最值得注意的是**TASK\_INTERRUPTIBLE**(一个可以通过信号中断的睡眠)和**TASK\_KILLABLE**(一个可被杀死的睡眠中的进程)。所有这些都应该正确处理,并等待队列为你做这些事。
一个用以存储读取等待队列头的天然场所就是结构缓冲区,所以从为它添加**wait\_queue\_head_t read\_queue**字段开始。你也应该包含**linux/sched.h**头文件。可以使用DECLARE\_WAITQUEUE()宏来静态声明一个等待队列。在我们的情况下,需要动态初始化,因此添加下面这行到**buffer\_alloc()**
init_waitqueue_head(&buf->read_queue);
我们等待可用数据;或者等待**read\_ptr != end**条件成立。我们也想要让等待操作可以被中断通过Ctrl+C。因此“read”方法应该像这样开始
static ssize_t reverse_read(struct file *file, char __user * out,
size_t size, loff_t * off)
{
struct buffer *buf = file->private_data;
ssize_t result;
while (buf->read_ptr == buf->end) {
if (file->f_flags & O_NONBLOCK) {
result = -EAGAIN;
goto out;
}
if (wait_event_interruptible
(buf->read_queue, buf->read_ptr != buf->end)) {
result = -ERESTARTSYS;
goto out;
}
}
...
我们让它循环,直到有可用数据,如果没有则使用**wait\_event\_interruptible()**(它是一个宏,不是函数,这就是为什么要通过值的方式给队列传递)来等待。好吧,如果**wait\_event\_interruptible()**被中断它返回一个非0值这个值代表**-ERESTARTSYS**。这段代码意味着系统调用应该重新启动。**file->f\_flags**检查以非阻塞模式打开的文件数:如果没有数据,返回**-EAGAIN**。
我们不能使用**if()**来替代**while()**,因为可能有许多进程正等待数据。当**write**方法唤醒它们时,调度程序以不可预知的方式选择一个来运行,因此,在这段代码有机会执行的时候,缓冲区可能再次空出。现在,我们需要将数据从**buf->data** 复制到用户空间。**copy\_to\_user()**内核函数就干了此事:
size = min(size, (size_t) (buf->end - buf->read_ptr));
if (copy_to_user(out, buf->read_ptr, size)) {
result = -EFAULT;
goto out;
}
如果用户空间指针错误,那么调用可能会失败;如果发生了此事,我们就返回**-EFAULT**。记住,不要相信任何来自内核外的事物!
buf->read_ptr += size;
result = size;
out:
return result;
}
为了使数据在任意块可读,需要进行简单运算。该方法返回读入的字节数,或者一个错误代码。
写方法更简短。首先,我们检查缓冲区是否有足够的空间,然后我们使用**copy\_from\_userspace()**函数来获取数据。再然后**read\_ptr**和结束指针会被重置,并且反转存储缓冲区内容:
buf->end = buf->data + size;
buf->read_ptr = buf->data;
if (buf->end > buf->data)
reverse_phrase(buf->data, buf->end - 1);
这里, **reverse\_phrase()**干了所有吃力的工作。它依赖于**reverse\_word()**函数,该函数相当简短并且标记为内联。这是另外一个常见的优化;但是,你不能过度使用。因为过多的内联会导致内核映像徒然增大。
最后,我们需要唤醒**read\_queue**中等待数据的进程,就跟先前讲过的那样。**wake\_up\_interruptible()**就是用来干此事的:
wake_up_interruptible(&buf->read_queue);
耶!你现在已经有了一个内核模块,它至少已经编译成功了。现在,是时候来测试了。
### 调试内核代码 ###
> 或许,内核中最常见的调试方法就是打印。如果你愿意,你可以使用普通的**printk()** (假定使用**KERN\_DEBUG**日志等级。然而那儿还有更好的办法。如果你正在写一个设备驱动这个设备驱动有它自己的“struct device”可以使用**pr\_debug()**或者**dev\_dbg()**:它们支持动态调试(**dyndbg**)特性,并可以根据需要启用或者禁用(请查阅**Documentation/dynamic-debug-howto.txt**)。对于单纯的开发消息,使用**pr\_devel()**除非设置了DEBUG否则什么都不会做。要为我们的模块启用DEBUG请添加以下行到Makefile中
> CFLAGS_reverse.o := -DDEBUG
>
> 完了之后,使用**dmesg**来查看**pr_debug()**或**pr_devel()**生成的调试信息。
> 或者,你可以直接发送调试信息到控制台。要想这么干,你可以设置**console_loglevel**内核变量为8或者更大的值**echo 8 /proc/sys/kernel/printk**),或者在高日志等级,如**KERN_ERR**,来临时打印要查询的调试信息。很自然,在发布代码前,你应该移除这样的调试声明。
> 注意内核消息出现在控制台不要在Xterm这样的终端模拟器窗口中去查看这也是在内核开发时建议你不在X环境下进行的原因。
### 惊喜,惊喜! ###
编译模块,然后加载进内核:
$ make
$ sudo insmod reverse.ko buffer_size=2048
$ lsmod
reverse 2419 0
$ ls -l /dev/reverse
crw-rw-rw- 1 root root 10, 58 Feb 22 15:53 /dev/reverse
一切似乎就位。现在,要测试模块是否正常工作,我们将写一段小程序来翻转它的第一个命令行参数。**main()**(再三检查错误)可能看上去像这样:
int fd = open("/dev/reverse", O_RDWR);
write(fd, argv[1], strlen(argv[1]));
read(fd, argv[1], strlen(argv[1]));
printf("Read: %s\n", argv[1]);
像这样运行:
$ ./test 'A quick brown fox jumped over the lazy dog'
Read: dog lazy the over jumped fox brown quick A
它工作正常!玩得更逗一点:试试传递单个单词或者单个字母的短语,空的字符串或者是非英语字符串(如果你有这样的键盘布局设置),以及其它任何东西。
现在,让我们让事情变得更好玩一点。我们将创建两个进程,它们共享一个文件描述符(及其内核缓冲区)。其中一个会持续写入字符串到设备,而另一个将读取这些字符串。在下例中,我们使用了**fork(2)**系统调用而pthreads也很好用。我也省略打开和关闭设备的代码并在此检查代码错误又来了
char *phrase = "A quick brown fox jumped over the lazy dog";
if (fork())
/* Parent is the writer */
while (1)
write(fd, phrase, len);
else
/* child is the reader */
while (1) {
read(fd, buf, len);
printf("Read: %s\n", buf);
}
你希望这个程序会输出什么呢?下面就是在我的笔记本上得到的东西:
Read: dog lazy the over jumped fox brown quick A
Read: A kcicq brown fox jumped over the lazy dog
Read: A kciuq nworb xor jumped fox brown quick A
Read: A kciuq nworb xor jumped fox brown quick A
...
这里发生了什么呢?就像举行了一场比赛。我们认为**read**和**write**是原子操作,或者从头到尾一次执行一个指令。然而,内核确实无序并发的,随便就重新调度了**reverse\_phrase()**函数内部某个地方运行着的写入操作的内核部分。如果在写入操作结束前就调度了**read()**操作呢就会产生数据不完整的状态。这样的bug非常难以找到。但是怎样来处理这个问题呢
基本上,我们需要确保在写方法返回前没有**read**方法能被执行。如果你曾经编写过一个多线程的应用程序你可能见过同步原语如互斥锁或者信号。Linux也有这些但有些细微的差别。内核代码可以运行进程上下文用户空间代码的“代表”工作就像我们使用的方法和终端上下文例如一个IRQ处理线程。如果你已经在进程上下文中和并且你已经得到了所需的锁你只需要简单地睡眠和重试直到成功为止。在中断上下文时你不能处于休眠状态因此代码会在一个循环中运行直到锁可用。关联原语被称为自旋锁但在我们的环境中一个简单的互斥锁 —— 在特定时间内只有唯一一个进程能“占有”的对象 —— 就足够了。处于性能方面的考虑,现实的代码可能也会使用读-写信号。
锁总是保护某些数据在我们的环境中是一个“struct buffer”实例而且也常常会把它们嵌入到它们所保护的结构体中。因此我们添加一个互斥锁struct mutex lock到“struct buffer”中。我们也必须用**mutex\_init()**来初始化互斥锁;**buffer\_alloc**是用来处理这件事的好地方。使用互斥锁的代码也必须包含**linux/mutex.h**。
互斥锁很像交通信号灯 —— 要是司机不看它和不听它的,它就没什么用。因此,在对缓冲区做操作并在操作完成时释放它之前,我们需要更新**reverse\_read()**和**reverse\_write()**来获取互斥锁。让我们来看看**read**方法 —— **write**的工作原理相同:
static ssize_t reverse_read(struct file *file, char __user * out,
size_t size, loff_t * off)
{
struct buffer *buf = file->private_data;
ssize_t result;
if (mutex_lock_interruptible(&buf->lock)) {
result = -ERESTARTSYS;
goto out;
}
我们在函数一开始就获取锁。**mutex\_lock\_interruptible()**要么得到互斥锁然后返回,要么让进程睡眠,直到有可用的互斥锁。就像前面一样,**\_interruptible**后缀意味着睡眠可以由信号来中断。
while (buf->read_ptr == buf->end) {
mutex_unlock(&buf->lock);
/* ... wait_event_interruptible() here ... */
if (mutex_lock_interruptible(&buf->lock)) {
result = -ERESTARTSYS;
goto out;
}
}
下面是我们的“等待数据”循环。当获取互斥锁时,或者发生称之为“死锁”的情境时,不应该让进程睡眠。因此,如果没有数据,我们释放互斥锁并调用**wait\_event\_interruptible()**。当它返回时,我们重新获取互斥锁并像往常一样继续:
if (copy_to_user(out, buf->read_ptr, size)) {
result = -EFAULT;
goto out_unlock;
}
...
out_unlock:
mutex_unlock(&buf->lock);
out:
return result;
最后,当函数结束,或者在互斥锁被获取过程中发生错误时,互斥锁被解锁。重新编译模块(别忘了重新加载),然后再次进行测试。现在你应该没发现毁坏的数据了。
### 接下来是什么? ###
现在你已经尝试了一次内核黑客。我们刚刚为你揭开了这个话题的外衣里面还有更多东西供你探索。我们的第一个模块有意识地写得简单一点在从中学到的概念在更复杂的环境中也一样。并发、方法表、注册回调函数、使进程睡眠以及唤醒进程这些都是内核黑客们耳熟能详的东西而现在你已经看过了它们的运作。或许某天你的内核代码也将被加入到主线Linux源代码树中 —— 如果真这样,请联系我们!
--------------------------------------------------------------------------------
via: http://www.linuxvoice.com/be-a-kernel-hacker/
译者:[GOLinux](https://github.com/GOLinux) [disylee](https://github.com/disylee) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.libusb.org/
[2]:http://fuse.sf.net/
[3]:http://www.linuxvoice.com/be-a-kernel-hacker/www.netfilter.org/projects/libnetfilter_queue
[4]:http://lxr.free-electrons.com/

View File

@ -0,0 +1,135 @@
在linux桌面上观看2014年巴西世界杯比赛
================================================================================
足球是世界上受众最广和观众最多的运动现代足球起源于英国。足球运动员平均每场比赛要跑6个多英里。上届南非世界杯有近10亿的电视观众而今年的的观赛数量预计还要增加。
2014年第20界世界杯在巴西举行时间安排为从6月12号开始持续到7月13号共有32个国家参加这项赛事。
爱足球的小伙子们我们将要介绍一款可以提供最新的赛况以及你喜欢的球队的进球数信息的应用程序它叫做“icup 2014 Brazil”。下面让我们介绍它的特点用法和安装等。
![iCup 2014 Brazil](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014.jpeg)
*iCup 2014 Brazil*
### 什么是“icup 2014 Brazil” ###
“icup 2014 Brazil”简单的说是一个应用程序在linux桌面为你提供2014年世界杯的最新比赛赛况。
### “icup 2014 Brazil”的特点###
- 自适应的用户界面,比如自动缩放
- 迅速查看战绩
- 支持Facebook、twitter和Google+社交分享功能
- 支持Retina显示输出
- 实时跟踪比赛结果
- 包括32个国家的国歌小工具配合露天广场效果很不错
- 内置日历和时区工具,实时的显示当天数据,图像化展示最新的战况和得分
- 支持代理
### 平台和框架支持 ###
这款软件可以运行在Mac、windows和linux上特别提醒在Linux上它是为x86的CPU设计的虽然它也可以在x64的平台上安装不过我们需要做一下设置。
#### 在不同平台的技术规范 ####
- 实时结果,日历,数据分组,第二阶段整合,社交网络连接和多语言支持,这些支持全平台
- Retina显示支持这个不支持windows和linux仅支持Mac OS
- 详细的统计-支持linux。在windows和Mac需要捐赠才行
- 声音小工具-支持MAC和linuxwindows不确定
**重要**: 上面的特点都支持一些具体的特性除了linux外都不是免费提供的这是为了支付服务器和带宽费用。对于linux用户来说任何细节不需要关心高兴的用去吧。
### Linux下安装“icup 2014 Brazil” ###
首先去[“icup 2014 Brazil”官方下载页面][1]下载你电脑平台的软件版本
#### 32位下的安装步骤 ####
# cd Downloads/
# tar xvf iCup_2014_FREE-Brazil_1.1_linux.tar.bz2
# cd iCup\ 2014\ FREE\ -\ Brazil\ 1.1/
# chmod 755 iCup\ 2014\ FREE\ -\ Brazil
如上文所说这个应用程序只为X86架构设计为了在64位架构下安装32位的软件我们需要在系统上安装一些软件包**GTK+2**和**libstdc++.so.6**。
不只是这款软件一大堆Linux下的软件不支持64位架构例如**Skype**,我们也需要这样调整我们的系统来安装这些软件。
#### 在64位系统下 ####
安装**GTK+2**和**libstdc++so.6**用如下apt或者yum命令
$ sudo apt-get install libgtk2.0-0 libstdc++6 [在基于Debian系统上执行这个命令]
如果有报错的话,运行下面的命令来解决
$ sudo apt-get -f install
----------
# yum install gtk2 libstdc++ [在基于Redhat系统上执行这个命令]
需要的软件包安装完后就可以在64位系统下安装32位的软件了进入你的下载目录找到“**icup 2014 Brazil**”安装包然后执行下面的命令
# cd Downloads/
# tar xvf iCup_2014_FREE-Brazil_1.1_linux.tar.bz2
# cd iCup\ 2014\ FREE\ -\ Brazil\ 1.1/
# chmod 755 iCup\ 2014\ FREE\ -\ Brazil
然后,进入软件所在目录,双击可执行文件启动软件。下面的截屏图中看不到所有的信息,**因为本文写作时2014年世界杯现在还没开始呢开始后我们就能看到结果了**。
![iCup Brazil 2014](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-01-620x437.jpeg)
iCup Brazil 2014
无具体信息,世界杯尚未开始。
![Match Detailed Information](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-02-620x439.jpeg)
Match Detailed Information
分组和队伍
![Groups and Teams](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-03-620x439.jpeg)
Groups and Teams
第二阶段详细信息
![2nd stage Detailed Information](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-04-620x438.jpeg)
2nd stage Detailed Information
比赛细节,尚未完整
![Match Summary](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-05-620x440.jpeg)
Match Summary
集成语言切换和社交分享按钮
![Language Change](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-06-620x440.jpeg)
Language Change
Linux上捐赠是可选的你可以贡献你的心意。
![Donation](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-07-620x435.jpeg)
Donation
### 总结 ###
上面的这个软件有望成为足球粉丝的一大福利,赶快在线试用吧。
好了我马上又有一个有趣的文章了。请保持关注Tecmint.com。请在评论区对我们的工作给予反馈。
--------------------------------------------------------------------------------
via: http://www.tecmint.com/view-fifa-world-cup-matche-results/
译者:[jiajia9linuxer](https://github.com/jiajia9linuxer) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.e-link.it/icup/brazil2014/icup-brazil-2014-desktop-app.php

View File

@ -0,0 +1,33 @@
在Linux上用iCup追世界杯
================================================================================
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/icup2014-790x389.png)
Linux 极客们,
在本文简短的叙述中我将教您如何在Linux中安装一个非常棒的2014FIFA世界杯APP。这个应用叫iCup支持WindowsMac以及伟大的Linux。
我看足球比赛已经有很长的时间了所以我得在我的电脑上装个这样的应用来保持更新2014世界杯的最新情况。我可不想在我朋友们面前看起来像一无所知的笨货。iCup应用正好提供了每一场赛程、比分、球队教练组等信息。更有提供实时比赛更新给您提供 正在进行的比赛的最新数据。
### 支持以下功能: ###
- 30种语言支持完全本地化使用语言菜单选择
- 独家的灵活界面可随意调整窗口大小
- 可按日期或阶段检索比赛日历
- 可视化分组
- 支持自动转变比赛时间来适应本地时间和格式
- 一键化社交网络发表比赛评论支持FacebookGoogle+和Twitter
- 支持代理(支持基本认证和摘要认证方法)
我已经在Ubuntu12.04LTS上用过而且真的很好用!目前为止,这款软件还没有出错或者崩溃过。通过[官方网站][1]您可以下载到压缩包并且十分轻松地安装这个很棒的应用然后您可以解压到任何您喜欢的地方。解压完成后双击iCup 2014 FREE- Brazil运行。
iCup真心好用我希望您也能用其享受世界杯
--------------------------------------------------------------------------------
via: http://www.unixmen.com/install-icup-2014-linux/
译者:[Vic020](http://www.vicyu.net) 校对:[213edu](http://ryanhu.me/)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.e-link.it/icup/brazil2014/icup-brazil-2014-desktop-app.php

View File

@ -0,0 +1,40 @@
嵌入式多媒体中心 OpenELEC 4.0.4
================================================================================
![] (http://i1-news.softpedia-static.com/images/news2/OpenELEC-4-0-4-Is-Out-and-Based-on-XBMC-13-1-quot-Gotham-quot-445802-2.jpg)
**OpenELEC 4.0.4已经发布它是一个专门设计运行XBMC的嵌入式系统一个开放源代码的娱乐媒体中心。它构建 XBMC 13.1 基础之上。**
OpenELEC 开发商非常密切地跟着 XBMC 的产品开发周期,目前已经发布了他们的最新的 4.0.4 的版本。它基于 XBMC 13.1 "Gotham",并且开发者们做了一些自己的改动。
“此版本包括一些bug修正、安全修复和来自于 OpenELEC 4.0.3 的改进。除了通常的错误修正和软件包更新,我们已经使用最新的补丁文件升级 XBMC 至最新的 XBMC 13.1 (final)。这个版本包含了在 XBMC 13.0 发布之后的很多已知问题的修复(其中有些我们已包括 OpenELEC 4.0.0中)。”
“我们在popcornmix的帮助下发现并修复了一些和树莓派相关内核问题、 固件和 XBMC 代码中的问题,非常感谢他的帮助 OpenELEC 4.0.4 现在是一个稳定版本包含了OpenELEC 4.0系列的bug修正和安全漏洞修复 。”开发商的官方网站上如是写道。
OpenELEC 4.0.4 界面更加美观而且更新和修复了许多问题。例如e2fsprogs 已更新到版本 1.42.10、 bluez 已更新到版本 5.19、 fontconfig 版本更新到 2.11.1,也默认集成了 systemd 213 和修复了一些安全问题的gnutls 3.2.12,而且使用了一个新的 Linux 内核3.14.5。
此外DVB T2 已经添加了对 GeniaTech T220 / August T210 设备的支持由于其驱动程序尚不完善而允许禁用WOL、也添加了尚不完善的"e1000e"驱动,树莓派的支持补丁已更新。
如果你已经有一个旧版的 OpenELEC你可能需要考虑升级的系统而不是从头开始安装它。如果想顺利地完成安装至少应该是 3.2 版本。
如果您尝试从旧版本操作系统的更新,您可能发现一些插件和插件都不再工作。所以最明智的办法就是,在尝试升级之前备份你的系统。
以 XBMC 13.1 "Gotham" 版本为基,配有 Android 硬件解码、 许多树莓派和 Android 速度方面的改善,立体 3D 渲染,更好的触摸屏支持,改进了 UPnP 功能,很多的音频引擎的改进,更好地字幕搜索、 对开发者增加的如 Python 和 JSON RPC API等 FFmpeg 1.2,还有更多。
查阅官方 [公告] [1] 的更改和改进的完整列表。
### 下载最新的 OpenELEC 4.0.4 ###
- [OpenELEC 4.0.4 (tar.bz2) 64-bit][2][binary] [145 MB]
- [OpenELEC 4.0.4 (tar.bz2) 32-bit][3][binary] [142 MB]
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/OpenELEC-4-0-4-Is-Out-and-Based-on-XBMC-13-1-quot-Gotham-quot-445802.shtml
译者:[owen-carter](https://github.com/owen-carter) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://openelec.tv/news/22-releases/129-openelec-4-0-4-released
[2]:http://openelec.tv/get-openelec/download/viewdownload/8/339
[3]:http://openelec.tv/get-openelec/download/viewdownload/8/338

View File

@ -0,0 +1,32 @@
Linux防火墙发行版 IPFire 发布新版本
================================================================================
![](http://i1-news.softpedia-static.com/images/news2/IPFire-2-13-Core-78-Linux-Firewall-OS-Receives-OpenSSL-Fixes-445876-2.jpg)
**ipfire.org团队的 Michael Tremer 发布了 IPFire 2.13 Core 78 的最新稳定版本, 这是一个基于Linux的防火墙发行版本次发布已经包含了最新的OpenSSL补丁。**
IPFire 是一个模块化 Linux 发行版,它可以用为防火墙、 代理服务器或 VPN 网关。IPFire 开发人员的主要关注点之一就是安全,每一步修改都确保用户的安全。
开发者在其博客上说“在负责提供SSL/TLS协议和其他加密功能的openssl库中发现了几个安全漏洞。详细的细节可以在原始的 openssl 安全建议里面找到”
他们解释说所有计划为Core Update 78准备的更新被延迟提交到core Update 79。这意味着用户为其需要等更长时间。
OpenSSL 的开发人员发现了另一轮的 OpenSSL 的问题但问题很快被修复最新Linux发行版已包含此次修复。
开发者推荐 IPFire 的所有用户升级。更多的细节可以在[这里][1]发现.
下载IPFire 2.13 Core 78:
- [IPFire 2.15 Core 78 (ISO)][2][iso] [122 MB]
- [IPFire 3.0 Alpha 1 (ISO)][3][iso] [76 MB]
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/IPFire-2-13-Core-78-Linux-Firewall-OS-Receives-OpenSSL-Fixes-445876.shtml
译者:[2q1w2007](https://github.com/2q1w2007) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.ipfire.org/news/ipfire-2-15-core-update-78-released
[2]:http://downloads.ipfire.org/releases/ipfire-2.x/2.15-core78/ipfire-2.15.i586-full-core78.iso
[3]:http://www.rowie.at/ipfire/iso/ipfire-3.0-alpha1.i686.iso

View File

@ -0,0 +1,27 @@
开源SDN项目OpenDaylight添加新成员
================================================================================
[Linux基金会][1]的[OpenDaylight][2] 项目旨在促进开源的[软件定义网络][3] (SDN) 发展。 [Extreme Networks][4] (EXTR), [Flextronics][5]和[Oracle][6] (ORCL) 现在也加入了该项目。
三个公司6月5日正式加入OpenDaylight其成员数达到到39。该项目还有195位协作开发人员以建立一个开放源码的SDN平台。
新成员带来了在数据中心和云计算的设计和基础设施的专长。Extreme Networks是专业提供高性能网络解决方案的企业而Flextronics提供系统设计、生产和物流。Oracle有广泛的业务同时专注于各种领域的云计算和数据中心。
OpenDaylight 领导人很高兴该项目的会员增多并进一步走向创造一个以开放标准为中心和避免垄断的SDN生态系统。OpenDaylight执行主任Jacques Neela说"更多的声音意味着更多的讨论和更好的代码我们很高兴看到各种多样性的新成员加入来加宽探讨SDN和NFV的领域"。
OpenDaylight的第一款正式软件是在2013年4月发布的该软件在同年二月首次以Hydrogen的名字出现。
--------------------------------------------------------------------------------
via: http://thevarguy.com/open-source-application-software-companies/open-source-sdn-project-opendaylight-adds-new-members
译者:[2q1w2007](https://github.com/2q1w2007) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://linuxfoundation.org/
[2]:http://www.opendaylight.org/
[3]:http://thevarguy.com/sdn
[4]:http://www.extremenetworks.com/
[5]:http://www.flextronics.com/
[6]:http://oracle.com/
[7]:http://thevarguy.com/open-source-application-software-companies/020514/embargo-until-feb-4-1130-am-est-opendaylight-releases-fir

View File

@ -0,0 +1,39 @@
运行Unity 8的Ubuntu镜像已可下载测试
================================================================================
![ ](http://www.omgubuntu.co.uk/wp-content/uploads/2014/05/1.jpg)
*运行在平板上的Unity 8 *
**出乎意料默认使用Unity 8和Mir的Ubuntu 14.10 桌面版,[现已可下载了][1]**
根据[上个月的讨论][2]Ubuntu 14.10镜像计划提供单独的Unity 8桌面。 提供此镜像目的是给开发者和测试人员提供一个了解从传统界面到使用两种新技术的界面的变化的手段。
此镜像并不用于普通用户测试。这个版本会并将会是极不稳定而充满bug的在十月之前还会不断有变动。所有想要一个完美的、可用的或统一的的桌面的人都会失望因为这个Unity 8桌面版镜像现在用的是平板的UI。
### 工作进行中 ###
为Mir和Unity 8建立完备的窗口管理特性的工作正在进行中。同样的在桌面显卡完全兼容Mir之前硬件支持和用户体验之间还相距甚远而且还不支持虚拟机。
桌面Unity 8界面将开始融合平板UI用户会提出界面与原来相差太大的问题对此详见Ubuntu的创始人Mark Shuttleworth最近的视频的问答模块。
这是个好消息微软在桌面Windows8上强加了平板界面和为触摸屏设计的UI。结果被骂的不轻不得不总是进行"改进"——在你吐槽后才让步,来对付投诉。
### 下载Unity 8桌面版本 ###
按计划标准的Ubuntu 14.10预定在10月23日发行稳定版其继续基于 X.OrgCompiz和Unity 7。而运行在Mir的Unity8则预计在2016年4月的下一个 LTS之前成为新的的默认桌面。
此版本还不具有可用性下方链接的镜像只是为了协助开发人员测试和完善并不能让你穿越体验到未来的Ubuntu。
- [下载下一代Ubuntu14.10 (.iso)][3]
--------------------------------------------------------------------------------
via:http://www.omgubuntu.co.uk/2014/06/unity-8-daily-build-images-go-live
译者:[2q1w2007](https://github.com/2q1w2007) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://blueprints.launchpad.net/ubuntu/+spec/client-1410-unity8-desktop-iso
[2]:http://www.omgubuntu.co.uk/2014/05/ubuntu-unity-8-desktop-flavour-discussed
[3]:http://cdimage.ubuntu.com/ubuntu-desktop-next/daily-live/current/

View File

@ -2,27 +2,27 @@
================================================================================
![](http://i1-news.softpedia-static.com/images/news2/Ubuntu-for-Phones-Activated-on-10-000-Devices-446824-2.jpg)
**科能公司(Canonical)日前宣布手机版Ubuntu操作系统在第10,000台设备上被激活这为公司奠定了一个重要的里程碑。**
**Canonical公司日前宣布手机版Ubuntu操作系统在第10,000台设备上被激活这是一个重要的里程碑。**
手机版Ubuntu项目于2013年初公布开发团队之后就一直在上面工作。他们花了一些时间才拿出一个可用的版本之后在这个基础上不断地改善。
这个10,000台里程碑之所以重要是因为公司本身并没有销售任何装载这款操作系统的设备。到目前为止只有Nexus用户,手机或平板,才可以安装它。这对于一个只提供下载的操作系统来说意义重大。
这个10,000台里程碑之所以重要是因为公司本身并没有销售任何装载这款操作系统的设备。到目前为止只有Nexus用户(手机或平板)才可以安装它。这对于一个只提供下载的操作系统来说意义重大。
“Ubuntu手机(平板)用户需要在他们的设备上登录Ubuntu One账号才可以下载或更新应用。这就让我们可以为用户提供许多从Android或iOS借鉴过来的功能例如在新手机上或是手机重置之后自动重新安装所有应用或是浏览商城网站很快发布时可以选择直接安装应用到设备上。”
“Ubuntu手机/平板用户需要在他们的设备上登录Ubuntu One账号才可以下载或更新应用。这就让我们可以为用户提供许多从Android或iOS借鉴过来的功能例如在新手机上或是手机重置之后自动重新安装所有应用或是浏览商城网站很快发布时可以选择直接安装应用到设备上。”
“这个功能的另外一个效果是它可以让我们知道有多少唯一的Ubuntu One账号登陆过商城来下载应用而这个数字在本周突破了10,000的记录。”科能公司的Michal Hall[说][1]。
目前用户不需要在Nexus设备上删除Android因为可以支持双启动而且还有好几种方式。而预装Ubuntu系统的设备将在今年晚些时候出货希望赶在假日旺季之前社区成员已经有非常高的热情了。
科能公司还建立了一套Ubuntu SDK来帮助开发者为这个新操作系统开发应用而且已经有很多从其他平台移植的原生应用了。它们还没做好但是离正式发布还有几个月还有大量时间来准备足够数量的原生应用不仅仅是替代的网页应用。
Canonical公司还建立了一套Ubuntu SDK来帮助开发者为这个新操作系统开发应用而且已经有很多从其他平台移植的原生应用了。它们还没做好但是离正式发布还有几个月还有大量时间来准备足够数量的原生应用不仅仅是替代的网页应用。
如果你有Nexus 4手机或是Nexus 7平板你现在就可以在上面安装Ubuntu。细节上仍然还有些粗糙但是你会发现你已经熟悉的设备变得大不一样请多花点时间然后你会喜欢它的。
如果你有Nexus 4手机或是Nexus 7平板你现在就可以在上面安装Ubuntu。细节上仍然还有些粗糙但是你会发现你已经熟悉的设备变得大不一样,请多花点时间,然后你会喜欢它的。
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/Ubuntu-for-Phones-Activated-on-10-000-Devices-446824.shtml
译者:[zpl1025](https://github.com/zpl1025) 校对:[校对者ID](https://github.com/校对者ID)
译者:[zpl1025](https://github.com/zpl1025) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,31 @@
用笔记本模式工具1.65来延长电池续航能力
================================================================================
![](http://i1-news.softpedia-static.com/images/news2/Improve-Battery-Life-with-Laptop-Mode-Tools-1-65-447397-2.jpg)
笔记本模式工具是一个Liunx电源管理工具包它可以让用户以多种方式延长笔记本电池续航能力现在它已经升级到1.65。
笔记本模式工具的发布的版本曾经很少而且间隔很长,但开发者在最新的版本中做了一些很有意思的改变,虽然此次更新与以前不同。
根据更新日志grep找不到$device/uevent的错误已得到修复、 sysfs/enabled已被"ip link down"所取代、 添加了对iwlwifi的支持运行时电源管理框架现在更健壮并且usb-autosuspend模块已被去除。
此外,当笔记本电脑恢复时,笔记本模式工具将强制以初始化模式运行,最新版本已添加英特尔 PState 驱动程序的模块,并已实现挂起/休眠接口。
用户不须更改自动设置。更改自动设置可能会导致更多的问题,但通常看来他们总是会去动它。此外,要注意到每个功能究竟是做什么的,否则你可能会搞出更多问题。
看官方[公告][1]来了解更多细节。
现在就下载用笔记本模式工具1.65:
- [http://samwel.tk/laptop_mode/packages][2]
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/Improve-Battery-Life-with-Laptop-Mode-Tools-1-65-447397.shtml
译者:[2q1w2007](https://github.com/2q1w2007) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://launchpad.net/laptop-mode-tools/+announcement/12779
[2]:http://samwel.tk/laptop_mode/packages

View File

@ -0,0 +1,31 @@
红帽携手eNovance共进OpenStack市场
================================================================================
![](http://farm4.static.flickr.com/3108/3191608123_67e1da2b79_o.jpg)
正在OpenStack峰会于亚特兰大举办的同时红帽确认了数项与OpenStack相关的项目。其中一项是红帽正与开源云计算市场的领导者eNovance进行[合作][1] 。双方将推动网络功能虚拟化Network Functions Virtualization及将电信功能融入OpenStack中。红帽[宣布][2]将以七千万欧元或九千五百万美金的现金和股票投资eNovance。
eNovance 是OpenStack市场上重要的角色 特别以其和电信公司的合作而为人所知。eNovance帮助服务提供商和大型私企搭建部署云基础架构快速且成本低廉。这也将为红帽开创新的产品线。
IDC 分析员 Laura DuBois 和 Ashish Nadkarni 在2014春季OpenStack 峰会上指出 “像eNovance这样的集成商将继续助力云服务提供商和企业建立OpenStack云。OpenStack的前景开起来十分光明。"
eNovance 是OpenStack十大上游贡献者之一, 也是OpenStack 基金唯一的欧洲金牌合作商。 该公司在全球有超过150家客户包括 Alcatel-Lucent、 AXA,、 Cisco、 Cloudwatt 和 Ericsson. 在巴黎、蒙特利尔、班加罗尔、印度,都设有办公室。
2013年红帽和 eNovance 第一次展开[合作][3] 为其共同客户提供OpenStack 部署和集成服务。该服务基于Red Hat Enterprise Linux OpenStack 平台。 今年五月的OpenStack峰会上, 两家公司宣布了[进一步的合作][4] ,推动网络功能虚拟(NFV) 和电信在OpenStack上的创新意在提供业界最完整、电信级的 通讯服务基于Linux、内核级虚拟机 (KVM)和 OpenStack。
eNovance的联合创始人、首席执行官Raphaël Ferreira 在声明中说:
> “和红帽一样eNovance也认为部署和集成OpenStack已成趋势这是企业市场上的变革力量。 我们非常高兴能成为红帽的一部分。红帽不仅仅提供一流的OpenStack发行版本也和我们一样坚信 最好以连续、无缝的方式部署、集成OpenStack。”
--------------------------------------------------------------------------------
via: http://ostatic.com/blog/red-hat-to-acquire-enovance-focus-together-on-openstack
译者:[tengpeng](https://github.com/tengpeng) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.redhat.com/about/news/press-archive/2014/5/red-hat-and-enovance-to-deliver-carrier-grade-openstack
[2]:http://www.marketwatch.com/story/red-hat-to-acquire-enovance-a-leader-in-openstack-integration-services-2014-06-18
[3]:http://cts.businesswire.com/ct/CT?id=smartlink&url=http%3A%2F%2Fwww.redhat.com%2Fabout%2Fnews%2Fpress-archive%2F2013%2F11%2Fred-hat-and-enovance-partner-to-accelerate-adoption-of-red-hat-enterprise-linux-openstack-platform&esheet=50888828&newsitemid=20140618005543&lan=en-US&anchor=first+partnered+in+2013&index=1&md5=1721061ca22652d2a4413085db70361b
[4]:http://cts.businesswire.com/ct/CT?id=smartlink&ppppppppt-pt-lopppppppppptpt-lpt-pt-locapt-pt-ptptppptppppt-ptptptppp

View File

@ -0,0 +1,34 @@
X 窗口系统已经30岁了
================================================================================
X.org基金会很自豪地宣布一个特别的日子30年前1984年六月19日Bob Scheifler发布了X窗口系统。
有关X窗口系统的介绍参见 [https://en.wikipedia.org/wiki/X11#Introduction][1]
在这30年中X作为UNIX桌面无处不在。在今天数以百万计的用户使用着桌面环境如GNOMEKDEXfceUnityEnlightenment等等而这些都使用X作为其底层技术。
X的开发者们做出了巨大的突破把X从原本为VAX VS100 CPU编写的一个程序发展成为在今天可在笔记本电脑上进行3D渲染的图形用户界面。事实上X的出现早于图形处理单元GPU概念的出现甚至是比推广这项技术公司——于1999上市的Nvidia更早。
![](http://static.cnbetacdn.com/newsimg/2014/0620/77_1403265316.png_600x600.png)
尽管X已经服务了很长时间但是X仍将做出改进并继续陪伴我们。
请不要感到惊奇, X的出现早于:
- Linux, FreeBSD, NetBSD, OpenBSD, Solaris, Microsoft Windows
- POSIX, C89, C99, C++, Java
- 互联网
- GPL 和 FSF
X是第一个主要的开源软件项目比Free Software 和 Open Source Software更早。和我们一起庆祝吧因为没有X桌面就不会是今天这个样子。
- X.Org 品牌总监
--------------------------------------------------------------------------------
via: http://comments.gmane.org/gmane.comp.freedesktop.xorg.announce/2177
译者:[2q1w2007](https://github.com/2q1w2007) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://en.wikipedia.org/wiki/X11#Introduction

View File

@ -0,0 +1,69 @@
使用DNSCrypt来加密您与OpenDNS之间的通信
================================================================================
**正如SSL能将HTTP通信变为加密过的HTTPS通信DNSCrypt, 物如其名, 是一款能加密您电脑与OpenDNS之间的通信的小神器。**
DNSCrypt刚问世的时候官方公布它只是一款Mac才能用的工具但根据最近一篇由OpenDNS发的[文章][1]表明虽然还没有用户界面但其实当Mac版DNSCrypt推出的时候源码已经放到了Github上了 Linux的用户也可以安装以及使用哦
### 为神马要使用 DNSCrypt? ###
**DNSCrypt可以加密您电脑与OpenDNS服务器的所有通信加密可以防止中间人攻击信息窥觑DNS劫持。更能防止网络供应商对某些网站的封锁。**
这是世界上第一款加密DNS通信的工具虽然TOR可以加密DNS的请求但毕竟它们只是在出口节点加密而已。
> 这款工具并不需要对域名或其工作方式做任何的改变它只是提供了个该工具的用户与机房里的DNS服务器之间的加密方式而已。
您可以在[GitHub][3]的[OpenSND DNSCrypt][2]页面阅读更多的相关信息。
### 如何在Linux使用DNSCrypt ###
首先下载安装[Download DNSCrypt][4] 然后在Terminal里输入这个命令:
sudo /usr/sbin/dnscrypt-proxy --daemonize
![](http://4.bp.blogspot.com/-WLefdXHIzwg/Tz45kGKAZdI/AAAAAAAAH0k/KLBnWJom6-g/s1600/edit-network.png)
然后把您的DNS服务器调成"127.0.0.1" - 在GNOME界面下的话只要到Network Connections网络连接选项然后选择"Edit"并在"DNS servers"输入"127.0.0.1"就好了。如果您用的是DHCP的话请选择Automatic (DHCP) addresses only" 这样的话才能输入DNS服务器。然后只要重连网络便可。
您可以访问这条[链接][5]来测试您连接到了OpenDNS了没。
如果您想设置开机启动DNSCrypt可以自建一个init的脚本如果您用的是Ubuntu可以参考下面的。
**Arch Linux的用户可以通过[AUR][6]来安装DNSCrypt-proxy** 内含rc.d脚本
### Ubuntu下的DNSCrypt ###
如果您想在Ubuntu设置开机启动您可以使用这个[Upstart脚本][7]。
注: 在Ubuntu 12.04版在127.0.0.1有个本地的DNS cache 服务器dnsmasq在跑所以已经把改脚本改成让DNSCrypt使用127.0.0.2了, 所以按照上面的教程应该把127.0.0.1换成127.0.0.2了。
要安装此脚本请使用以下的指令(要首先解压下下来的压缩文件):
sudo cp dnscrypt.conf /etc/init/
sudo ln -s /lib/init/upstart-job /etc/init.d/dnscrypt
然后用这个指令来启动:
sudo start dnscrypt
现在DNSCrypt就应该是开机自启了如果您想停止的话可以使用
sudo stop dnscrypt
[下载DNSCrypt][8] (.deb、 .rpm以及源码都可供下载哦)
--------------------------------------------------------------------------------
via: http://www.webupd8.org/2012/02/encrypt-dns-traffic-in-linux-with.html
译者:[213edu](https://github.com/213edu) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://blog.opendns.com/2012/02/16/tales-from-the-dnscrypt-linux-rising/
[2]:http://www.opendns.com/technology/dnscrypt/
[3]:https://github.com/opendns/dnscrypt-proxy
[4]:http://download.dnscrypt.org/dnscrypt-proxy/
[5]:http://www.opendns.com/welcome
[6]:http://aur.archlinux.org/packages.php?ID=54702
[7]:http://webupd8.googlecode.com/files/dnscrypt-0.2.tar.gz
[8]:https://github.com/opendns/dnscrypt-proxy/downloads

View File

@ -0,0 +1,19 @@
[小白技巧]在Ubuntu 14.04中如何从Unity启动器上移除盘符图标
=======================================================
一个读者发来的问题在Ubuntu 14.04系统中我如何从Unity启动器上移除这些盘符图标我从来不使用它然而它占用着启动器的位置。
默认情况下无论你挂载与否系统上所有分区的盘符图标都会显示在Unity启动器上。事实上它可能会使 Unity 启动器的位置变得拥挤。刚刚接触 Ubuntu 的小白可能对如何将这些盘符移去感觉比较困扰,但是实际上这很容易。
要从Ubuntu 14.04系统的Untiy启动器上永久地移除盘符图标右键点击盘符然后选择"Unlock from Launcher"即可。
![Remove drive cons from Ubuntu 14.04 unity launcher](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/06/Remove_Drive_Icons_Ubuntu_Unity.jpeg)
就这样。你不需要做更多操作了。即使分区被挂载在Unity启动器上你再也看不到盘符图标了。我希望这能帮到你。如果你有任何问题可以随时问我。
--------------------------------------------------------------------------------
via: http://itsfoss.com/remove-drive-icons-from-unity-launcher-in-ubuntu/
译者:[lousam](https://github.com/lousam) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,9 +1,9 @@
如何使用GNOME-Pie桌面环境启动应用程序
Linux桌面上的小饼饼让启动应用分外不同
================================================================================
最近你能听到很多关于Ubuntu新的Unity界面的抱怨。我记得当Unity开始兴起的时候我正好离开Archlinux。然而Unity间接地导致了一个后果随着人们对它不满意人们开始关注其他的桌面环境和Linux发行版。如果你的系统支持Unity没有人会反对安装他
最近你能听到很多关于Ubuntu新的Unity界面的抱怨。我记得当Unity开始兴起的时候我正好离开Archlinux。然而Unity间接地导致了一个后果随着人们对它不满意人们开始关注其他的桌面环境和Linux发行版。如果你的系统支持Unity没有人会反对将它弄得更顺眼些
所以今天我向你推荐一个绝对原创的程序启动器: Gnome-Pie。你们可能会认为他的灵感来自魔兽世界插件"OPie"。因为他们有着相似的概念: 键盘快捷方式可以打开圆形"菜单",您可以从中选择一个应用程序或命令来启动。这种设计背后的主要思想是用户不必记住命令,但需要记住他的方向和操作。它是圆形的事实从指针使每个应用程序在相同的距离。再加上我们得到如此多自定义组合: 可以通过快捷键,极大的提高效率并且最大限度地实现了人机工程学。
所以今天我向你推荐一个绝对原创的程序启动器: Gnome-Pie。你们可能会认为他的灵感来自魔兽世界插件"OPie"。因为他们有着相似的概念: 键盘快捷方式可以打开圆形"菜单",您可以从中选择一个应用程序或命令来启动。这种设计背后的主要思想是用户不必记住命令,但需要记住他的方向和操作。它的饼形设计让指针可以用同样的距离启动每个应用程序。再加上我们还有如此多自定义组合键,极大的提高效率并且最大限度地实现了人机工程学。
### 安装Gnome-Pie ###
@ -17,53 +17,53 @@
$ sudo yum install gnome-pie
对于Archlinux, 你可以在[AUR][1]找到他.
对于Archlinux, 你可以在[AUR][1]找到它。
### Gnome-Pie的基本用法 ###
默认的Gnome-Pie有一个比较可靠的初始配置。首先你可以使用Ctrl + Alt + a呼唤出他的控制界面将显示你的系统的基本应用程序。
默认的Gnome-Pie有一个比较可靠的初始配置。首先你可以使用 **Ctrl + Alt + a** 调出,它将显示你的系统的基本应用程序。
![](https://farm3.staticflickr.com/2917/14040269128_6dc6544c14_z.jpg)
接下来, 按下Ctrl+Alt+b, 他将显示你得文件管理器的书签。
接下来 按下 **Ctrl+Alt+b** 调出第二个圆,这将显示你的文件管理器的书签。
![](https://farm3.staticflickr.com/2903/14040269088_8de29edd18.jpg)
第三个,也许是最有用的,它会显示你的应用程序菜单,按下 Ctrl + Alt + 空格可调用
第三个,也许是最有用的,它会显示你的应用程序菜单,按下 **Ctrl + Alt + 空格** 可调出
![](https://farm3.staticflickr.com/2903/14040345657_071f40b22f_z.jpg)
第四,你可以完全控制音乐播放器。快捷键是 Ctrl + Alt + m
第四个,仅用于控制音乐播放器。你可以猜到,快捷键是 **Ctrl + Alt + m**
![](https://farm3.staticflickr.com/2925/14226915065_8b0e3841c6_o.png)
第五,你可以是快速访问到重新启动、 关机和注销命令 (Ctrl + Alt + qq 为退出,我猜得)。
第五个,你可以快速访问重新启动、 关机和注销命令 (**Ctrl + Alt + q**我猜q是代表退出吧)。
![](https://farm3.staticflickr.com/2931/14040303600_5b3a517335_o.png)
最后你可以用Pie来控制窗口可以最小化、 规模、 关闭, 等等. 并且,快捷键是Ctrl+Alt+w.
最后,第六个,你可以用Pie来控制窗口可以最小化、 规模、 关闭, 等等. 并且,快捷键是 **Ctrl+Alt+w**
![](https://farm3.staticflickr.com/2904/14226699514_42d364a4d4_o.png)
虽然我发现这种默认设置已经是相当令人满意,几乎和预置的启动器一样好。然而,如果让我鸡蛋里找骨头,我会说一些快捷方式很难用一只手执行。大多数情况是,我们用两只手打开菜单,然后再回到鼠标以选择该选项。太不爽了。
然而,我们在 Linuxer谁会在乎默认设置自定义才是王道。Gnome-Pie将为你提供优良的服务。通过配置你可以编辑现有的Pie,改变程序图标设计自己的Pie改变主题甚至将另外一个Pie菜单作为一个子菜单。
然而,我们在 Linux谁会在乎默认设置自定义才是王道。Gnome-Pie将为你提供优良的服务。通过配置你可以编辑现有的Pie改变程序图标设计自己的Pie改变主题甚至将另外一个Pie菜单作为一个子菜单。
[![](https://farm6.staticflickr.com/5508/14247093043_1fe1188709_z.jpg)][2]
你甚至可以编辑他来启动 URL、 你可以自由的设置热键开启这一功能,惟一的缺憾可能是他缺少Widgets。
你甚至可以编辑它来访问 URL、 自由设置热键、运行你自己的命令。惟一的缺憾可能是它缺少Widgets。
![](https://farm3.staticflickr.com/2927/14040264609_b7aa66f078_z.jpg)
总之相较于传统的基于文本的启动器Gnome-Pie是一个相当有吸引力的可视化应用程序。我很喜欢他的自定义键盘和鼠标组合键让我想起了我在War3或者LOL中的神级操作。如果玩家通过这种方法,它可以为你带来方便和高效。我甚至建议你可以将它放在桌面上,来节省你的空间。我甚至敢说它可以替代Gnome。
总之相较于传统的基于文本的启动器Gnome-Pie是一个相当有吸引力的可视化应用程序。我很喜欢他的自定义键盘和鼠标组合键让我想起了我在War3或者LOL中的神级操作。如果玩家使用这种操作方式,它可以为你带来方便和高效。如果你想节约桌面空间,我甚至建议你不要将预置的启动器放到桌面上。总之,我甚至敢说它可以替代Gnome。
你觉得怎么样你在所有相信世界上有这么好的东西吗或者说随着新的Gnome shell出现Gnome-Pie开始失去竞争欢迎评论。
你觉得怎么样你在所有相信世界上有这么好的东西吗或者说随着新的Gnome shell出现Gnome-Pie开始失去竞争?欢迎评论。
--------------------------------------------------------------------------------
via: http://xmodulo.com/2014/05/launch-applications-differently-gnome-pie-linux-desktop.html
译者:[MikeCoder](https://github.com/MikeCoder) 校对:[校对者ID](https://github.com/校对者ID)
译者:[MikeCoder](https://github.com/MikeCoder) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,32 +0,0 @@
IPFire 2.13 Core 78 Linux Firewall OS Receives OpenSSL Fixes
================================================================================
![](http://i1-news.softpedia-static.com/images/news2/IPFire-2-13-Core-78-Linux-Firewall-OS-Receives-OpenSSL-Fixes-445876-2.jpg)
**Michael Tremer, a developer for the ipfire.org team, has announced that IPFire 2.13 Core 78, a new stable build of the popular Linux-based firewall distribution, has been released to implement the latest OpenSSL fixes.**
IPFire is a modular Linux distribution, which means that it can be deployed as a firewall, a proxy server, or a VPN gateway. One of the main concerns of the IPFire developers is security, and every step has been taken to ensure users complete security.
“There have been several vulnerabilities discovered in the openssl library which is responsible for implementing the SSL/TLS protocol and other cryptographic tasks. All details about these can be found in the original openssl security advisory,” said the devs on their blog.
They have also explained that all the changes that they planned and built for Core Update 78 have been postponed to Core Update 79. This means that users will have to wait a little longer for a more consistent update.
OpenSSL developers have found another round of OpenSSL problems, but they have been fixed quickly and now the Linux distributions are including it in the latest versions.
The developers recommend all users of IPFire to upgrade their distributions. More details can be found on the official [website][1].
Download IPFire 2.13 Core 78:
- [IPFire 2.15 Core 78 (ISO)][2][iso] [122 MB]
- [IPFire 3.0 Alpha 1 (ISO)][3][iso] [76 MB]
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/IPFire-2-13-Core-78-Linux-Firewall-OS-Receives-OpenSSL-Fixes-445876.shtml
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.ipfire.org/news/ipfire-2-15-core-update-78-released
[2]:http://downloads.ipfire.org/releases/ipfire-2.x/2.15-core78/ipfire-2.15.i586-full-core78.iso
[3]:http://www.rowie.at/ipfire/iso/ipfire-3.0-alpha1.i686.iso

View File

@ -0,0 +1,41 @@
Red Hat Revenues Power Forward in 2015
================================================================================
Red Hat reported its first quarter fiscal 2015 revenues on June 18, showing continued demand and momentum for its Linux and open-source technologies. Red Hat has been particularly busy of late, acquiring a pair of companies and launching its Red Hat Enterprise Linux 7 (RHEL) flagship platform.
For the quarter, Red Hat reported revenue of $424 million, which is a 17 percent year-over-year gain.
![](http://www.serverwatch.com/imagesvr_ce/7990/icon-redhatlinux-r.jpg)
"The main driver of our total revenue growth was subscription revenue of $372 million," Red Hat CFO Charlie Peters said during his company's earnings call. "Subscription revenue was up 18 percent year-over-year and it's important to point out that this renewable revenue stream now constitutes 88 percent of total revenue."
Looking forward, Red Hat provided second quarter guidance for approximately $432 million to $436 million in revenue.
One of the key metrics for growth that Red Hat provides is its top 30 deals during a given quarter. Peters noted that for the first time, all of the top 30 deals were valued at over $1 million.
"We also had a Q1 record with four deals that were in excess of $5 million and one that was greater than $10 million," Peters said. "Cross-selling was strong with 65 percent of these deals including one or more components from our group of applications development and emerging technologies offerings."
At the core of Red Hat's product portfolio is the Red Hat Enterprise Linux platform, which hit a major milestone last week with the debut of RHEL 7.
"RHEL 7 is significant because it was designed to meet both modern data center and next generation IT requirements for cloud, Linux containers and Big Data," Red Hat CEO Jim Whitehurst said during the earnings call. "As the worlds of physical, virtual and cloud systems converge Red Hat Enterprise Linux 7 delivers a true foundation for open hybrid cloud that will serve as the backbone for future application architectures."
### Acquisitions and Cloud Provide Opportunities for Further Growth ###
Red Hat has also been busy acquiring a pair of companies that further expand the company's ability to grow. In April, Red Hat acquired Inktank, the lead commercial sponsor behind the Ceph open-source storage filesystem. And on June 18, Red Hat announced the acquisition of OpenStack services vendor eNovance.
"With eNovance as a part of the Red Hat consulting team, we can enhance our consulting resources to be able to reach more customers with world-class OpenStack technologies and implementation services," Whitehurst said.
While cloud remains a growth opportunity for Red Hat, Whitehurst sees growth also coming from continuing to take market share away from other server operating system platforms. In particular, Whitehurst noted that there is still a continued move from mainframe and Unix to Linux.
"I was just on the phone today with a massive European customer that is literally just ready to start on the journey right now," Whitehurst said. "We continue to believe we're taking share from Windows especially with net new workloads."
Another driver of growth for Red Hat is the maturity and expansion of its sales force.
"We definitely have more boots on the street because we have been hiring consistently," Whitehurst said. "But I think our sales guys are more experienced, they are better trained, their confidence level is high and their enthusiasm is high."
--------------------------------------------------------------------------------
via: http://www.serverwatch.com/server-news/red-hat-revenues-power-forward-in-2015.html
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,64 +0,0 @@
10 Linux Platforms Meant For Embedded Systems
==========================================
Linux has a wide variety of uses. The platform is used by many for simple home use, while it is also the chosen platform for programmers and hackers. In addition, Linux is widely used in embedded systems and there are distributions that are tailored specifically to such systems. Here are 10 Linux platforms that can work great on embedded systems!
![](http://www.efytimes.com/admin/useradmin/photo/UJVP24130PM532014.jpeg)
### 1. [Ampro Embedded Linux][1] ###
This is a free and open source reduced footprint operating system that has been derived from Ubuntu packages.
### 2. [BlueCat Linux from Lynx][2] ###
This Linux-based distribution is a part of the Lynx suite and is meant for embedded systems.
### 3. [CacheGuard OS][3] ###
CacheGuard OS is an integrated Security solution based on a custom-hardened version of Linux built from scratch and specially designed to manage Web traffic.
### 4. [Darma NAS OS][4] ###
This distribution has an SSL-based encrypted client server and a Java-based graphical user interface.
### 5. [DIET-PC][5] ###
This is an open source thin client software kitset that allows users to build network appliances.
### 6. [ELinOS][6] ###
This distribution provides a number of technologies for users working on embedded systems. It is a pretty popular Linux platform for these systems.
### 7. [eLux][7] ###
This one has a pretty simple and easy-to-use interface and offers the unique situation where neither the client nor the administrator needs to have any knowledge in Linux.
### 8. [eLux NG][8] ###
This one adds new models to the list of supported processors for eLux.
### 9. [Embedded Coyote Linux][9] ###
This Firewall and VPN server-based on Coyote Linux has been the platform of choice for many.
### 10. [Embedded Debian Project][10] ###
This project aims to make the Debian GNU/Linux the first choice for embedded systems.
--------------------------------------------------------------------------------
via: http://www.efytimes.com/e1/fullnews.asp?edid=137612
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.ampro.com/company/News/04_08_08_Ampro_Reveals_Ubuntu_Embedded_Linux.htm
[2]:http://www.lynuxworks.com/embedded-linux/embedded-linux-virtualization.php
[3]:http://www.cacheguard.com/cacheguard-os.html
[4]:http://nas.darma.com/
[5]:http://www.dietpc.org/
[6]:http://www.sysgo.com/products/elinos-embedded-linux/
[7]:http://www.myelux.com/index.htm?Unicon_Session=32bf53f198c94ba2ac2ce1ea45211754
[8]:http://www.myelux.com/eluxng.htm
[9]:http://www.myelux.com/eluxng.htm
[10]:http://www.emdebian.org/

View File

@ -1,82 +0,0 @@
jiajia translating...
Has Microsoft really changed its attitude toward open source?
================================================================================
> **In today's open source roundup: Microsoft may or may not have a new attitude toward open source. Plus: Android versus Windows, and Cinnamon versus Unity in Ubuntu 14.04**
Microsoft became infamous for its very negative early remarks about open source software. But restructuring at the company may be giving it a more positive attitude toward open source. CNet reports on changes in Microsoft's perceptions and behavior when it comes to open source software.
> According to [CNet][1]:
>
> But Microsoft's feud with open source has been sputtering for quite some time, and the senior managers who led the anti-open source charge are gone from the scene -- or at least no longer in positions of authority. Open source is now routinely used by corporations around the world, and the company's sniffy put-downs only fed into the perception of Microsoft as out of touch.
>
> Some of that new thinking reflects the change at the top of the corporate pyramid, with Satya Nadella replacing Ballmer as CEO in early February. Since taking over, Nadella has talked up his vision of a Microsoft whose future isn't shackled to its Windows past.
>
> [More at CNet][2]
>
> ![](http://www.itworld.com/sites/default/files/microsoft-open-source-communist_1.jpg)
>
> Microsoft and Communist Open Source
> Image credit: [Curako's Blog][3]
Okay, I hate to be a Negative Ned here, but I'm firmly in the "trust but verify" camp when it comes to Microsoft and open source. Yes, a new CEO and other changes may be helping Microsoft to adjust to living in an open source world. But change never comes easy or fast in such a large organization, so I think the jury is still out on whether or not Microsoft has really changed for the better when it comes to open source software.
Also, I've never forgotten the company's "embrace, extend, extinguish" strategy that they used in the past to destroy competitive software products. That alone is reason enough to keep a wary eye on Microsoft's involvement with any open source project. Perhaps the company really has changed, but maybe it hasn't. I think it bears watching for at least another few years to see if enduring change has really set in or not.
### Android versus Windows ###
ZDNet has an article that covers the top end-user Linux distributions. It notes that Windows still rules the desktop for now, but Android may eventually be the big kahuna among end-user operating systems by the end of this year.
> According to [ZDNet][4]:
>
> If smartphones and tablet sales continue to grow as expected, Android tablet vendors continue to erode Apple's market share, and PCs continue their decline, Android may end up being the top end-user operating system by the end of 2014—regardless of what happens with the proposed Android PCs.
>
> Taken as a whole, Android clearly rules the Linux end-user space. No, you may not think of it as a desktop yet —although AMD and Intel would both like you to change your mind about that — but Android is on its way to being the top end-user operating system of all.
>
> [More at ZDNet][4]
>
> ![](http://www.itworld.com/sites/default/files/android-devices-versus-windows-pcs.jpg)
> Image credit: [ZDNet][4]
The numbers mentioned in the article aren't really a surprise, given the mobile revolution that's happened over the last ten years. The desktop just isn't as important as it used to be, and Microsoft just never really mattered in mobile devices. Even now, as they struggle desperately for traction in tablets and phones, Microsoft is still mostly irrelevant in the mobile devices market.
Google has wreaked absolute havoc on Microsoft's efforts in mobile and is now beginning to be a threat to Microsoft in the desktop market. Between Chrome OS and Android, Google has been battering Microsoft on a number of fronts. If you look at Amazon's list of [top selling desktops][5] and [top selling laptops][6], you see plenty of Chrome OS computers and even some Android PCs. So people are actually buying alternatives to Windows computers and aren't bothered in the least by it.
### Cinnamon versus Unity in Ubuntu 14.04 ###
Tech Republic takes a look at whether or not Cinnamon is a viable replacement for Unity in Ubuntu 14.04. The article includes instructions on how to install Cinnamon in Ubuntu 14.04.
> According to [Tech Republic][7]:
>
> If you want a performance-centric desktop that doesn't toss aside feature and customization, Cinnamon is for you. Cinnamon is a straight-forward desktop interface that pretty much anyone can use -- from your IT staff to your grandmother. It really is that easy to use. Cinnamon doesn't surprise you, it doesn't trick you, but it also (in my opinion) doesn't wow you. But that's not what Cinnamon is about. This take on the desktop is all about functionality -- on a standard level. It doesn't break rules, push envelopes, or have new tricks up its sleeve.
>
> Cinnamon is a fairly pedestrian desktop that takes the bits and pieces of what's worked well over the years and cobbles them together into one, well-designed piece. So, if you're okay with using a desktop that looks and feels a bit long in the tooth (but one that functions very, very well), Cinnamon is for you. If you lean towards the bleeding edge of design and prefer a more modern look and feel, Cinnamon will most likely disappoint.
>
> [More at Tech Republic][7]
>
> ![](http://www.itworld.com/sites/default/files/cinnamon-versus-unity-in-ubuntu-1404.jpg)
>
> Image credit: [Tech Republic][7]
I'll have to weigh in on the side of Cinnamon here. While Unity has its pluses, I have never really been able to warm up to it. Cinnamon is closer to a more traditional desktop interface and that seems to work the best for me.
But as always, beauty is in the eye of the beholder. The great thing about Linux is that it offers so many different choices. So you really can't go wrong with Unity or Cinnamon, just use whichever one you like best.
What's your take on all this? Tell me in the comments below.
The opinions expressed by the author do not necessarily reflect the views of ITworld.
--------------------------------------------------------------------------------
via: http://www.itworld.com/open-source/421894/has-microsoft-really-changed-its-attitude-toward-open-source
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.cnet.com/news/dead-and-buried-microsofts-holy-war-on-open-source-software/
[2]:http://www.cnet.com/news/dead-and-buried-microsofts-holy-war-on-open-source-software/
[3]:http://curako.wordpress.com/2010/12/06/the-uneasy-alliance-free-software-vs-open-source/
[4]:http://www.zdnet.com/the-five-most-popular-end-user-linux-distributions-7000030058/http://www.zdnet.com/the-five-most-popular-end-user-linux-distributions-7000030058/
[5]:http://www.amazon.com/Best-Sellers-Electronics-Desktop-Computers/zgbs/electronics/565098/?_encoding=UTF8&camp=1789&creative=390957&linkCode=ur2&tag=fnh-20&linkId=REWXUPB7SQXPDSOL
[6]:http://www.amazon.com/Best-Sellers-Computers-Accessories-Laptop/zgbs/pc/565108/?_encoding=UTF8&camp=1789&creative=390957&linkCode=ur2&tag=fnh-20&linkId=POG3J2CFBHDWBAVL
[7]:http://www.techrepublic.com/article/is-cinnamon-a-worthy-replacement-for-ubuntu-unity/

View File

@ -0,0 +1,592 @@
110 Fun Open Source Games and Apps
================================================================================
Once again, we're celebrating the arrival of summer with a list of some of the best open source games available. We've updated [last year's list][1] with some new arrivals, as well as getting rid of some of the older games that are no longer under active development. You'll find arcade, board, casual, puzzle, educational, first-person shooter, music, racing, role-playing, adventure, simulator and strategy games, as a well as a few apps that aren't really games but are still a lot of fun.
This year, more open source games than ever before are now available for mobile devices, primarily Android devices. Hopefully, this trend will continue in coming years.
Please note that this list is not a ranking. The apps are arranged in categories and listed alphabetically within each category.
If you would like to suggest a game for next year's version of the list, feel free to make note in the comments section below.
### Arcade Games ###
#### 1. [Andy's Super Great Park][2] ####
Retrieve balloons while avoiding obstacles as you ride a roller coaster. Comes with 25 main levels, plus 18 more levels you can unlock by getting a high score. Operating System: Windows, Linux, Android.
#### 2. [Armagetron Advanced][3] ####
A 3D Tron clone, this game challenges you to guide your light cycle so that opponents run into a wall before you do. It supports single-player or networked games with up to 16 players. Operating System: Windows, Linux, OS X, Android.
#### 3. [BZFlag][4] ####
Also known as "Battle Zone Capture the Flag," BZFlag is a popular online tank game. In development since 1992, it features 3D graphics, multiple game modes and competitive multi-player matches. Operating System: Windows, Linux, OS X.
#### 4. [Chromium B.S.U.][5] ####
Don't let the name fool you—it has nothing to do with the Chromium browser. It's a fast-paced, top-scrolling shooter where the difficulty is set so that games will last less than fifteen minutes. Operating System: Windows, Linux.
#### 5. [The Legend of Edgar][6] ####
Legend of Edgar is an old-school platform game where the hero must overcome obstacles and enemies in order to accomplish his quest. It includes lots of different weapons and large levels. Operating System: Windows, Linux, OS X.
#### 6. [JVGS][7] ####
Instead of highly detailed graphics, JVGS takes a minimalist approach where stick figures cross a landscape that looks like it was hand-drawn in pencil. The main character in this highly unusual game is a poet who is losing his memories. Operating System: Windows, Linux, OS X.
#### 7. [No Gravity][8] ####
This space-based arcade shooter takes players to the year 8002 where they must complete a variety of missions. Related, but not free, games are also available for Android and iOS. Operating System: Windows, Linux, OS X.
#### 8. [Open Sonic][9] ####
Based on the Sonic the Hedgehog games, Open Sonic offers cooperative gameplay where the user can control three characters at once. Only two levels are available in the original game, but several fans have built mods that offer additional play. Operating System: Windows, Linux, OS X.
#### 9. [Powermanga][10] ####
Similar to the old arcade game Galaga, Powermanga is a 2D, top-scrolling space shooter. It's got more than 41 levels, and it can run on older hardware. Operating System: Linux.
#### 10. [Scorched3D][11] ####
Scorched3D is a modern take on the DOS game Scorched Earth, and it's noteworthy for its excellent graphics. You can play in single-player mode or connect to one of the many online servers for multi-player action. Operating System: Windows, Linux, OS X.
#### 11. [Sonic Robo Blast 2][12] ####
Another Sonic-inspired platform game, SRB2 is a 3D platform game built using the Doom engine. It includes three different playable characters and more than twenty levels. Operating System: Linux.
#### 12. [SuperTux][13] ####
SuperTux is a lot like the old Mario Bros. games, but with Tux the Linux penguin as the hero. It's a 2D side-scrolling platform game with nine different bad guys and 26 levels to play. Operating System: Windows, Linux, OS X.
#### 13. [Those Funny Funguloids][14] ####
This one-of-a-kind game challenges players to collect mushrooms in space. The website proclaims, "Never before has collecting mushrooms been this mildly entertaining. At least not in outer space. It's more of a lifestyle than a game, really." Operating System: Windows, Linux.
#### 14. [Teeworlds][15] ####
This online game describes itself as a "retro multiplayer shooter." It's a side-scrolling 2D game with support for up to 16 players and several different game modes. Operating System: Windows, Linux, OS X.
#### 15. [XMoto][16] ####
In this game, you ride a motorbike through a side-scrolling landscape while collecting strawberries and avoiding the spiky "wreckers." It's harder than it looks! Operating System: Windows, Linux, OS X.
#### 16. [Yo Frankie!][17] ####
Created with the Blender open source 3D animation tool, Yo Frankie! features characters from the open source movie Peach. Players must guide Frankie, a sugar glider, or Momo, a monkey, over, around and through the obstacles in a highly detailed 3D environment. Operating System: Windows, Linux, OS X.
### Board Games ###
#### 17. [Domination][18] ####
Java-based Domination brings the board game Risk to your PC or Android device. The latest version lets you play against your Google+ friends through the Google Play Game Services Real-time Multiplayer feature. Operating System: Windows, Linux, OS X, Android.
#### 18. [GNU Backgammon][19] ####
This "world-class" backgammon engine gets better every time you play against it, and it can analyze your play to help you get better. The interface is very nice with customizable graphics. Operating System: Windows, Linux, OS X.
#### 19. [Scrabble 3D][20] ####
With this variation of Scrabble you can choose your own board—the classic version, Superscrabble, 3D Scrabble or your own custom board. Play against the AI or connect to an online server for multi-player games. Operating System: Windows, Linux, OS X.
#### 20. [PokerTH][21] ####
This high-quality Texas Hold 'Em app features an excellent, customizable interface. To play online and see how you rank against other players, register online at Poker-Heroes.com. Operating System: Windows, Linux, OS X, Android.
#### 21. [PySolFC][22] ####
Did you know there were more than 1,000 variations of Solitaire? This huge collection features "games that use the 52 card International Pattern deck, games for the 78 card Tarock deck, eight and ten suit Ganjifa games, Hanafuda games, Matrix games, Mahjongg games, and games for an original hexadecimal-based deck." Operating System: Windows, Linux, OS X.
### Casual and Puzzle Games ###
#### 22. [2048][23] ####
In this simple but addictive puzzle game, the player moves blocks around to combine like numbers. You win when you hit 2048. Operating System: Online, iOS, Android.
#### 23. [Billiards][24] ####
Billiards aims to be realistic enough to let you practice cue sports when you don't have a table available. It has a good-looking 3D interface, but also runs in 2D for systems without a good graphics processor. Operating System: Linux.
#### 24. [Cube Trains][25] ####
Lay tracks to connect tunnels and bridges while maneuvering around obstacles. You can play the many built-in levels or create one of your own. Operating System: Windows, Linux, OS X.
#### 25. [Enigma][26] ####
Similar to the old Oxyd and Rock'n'Roll games, Enigma challenges users to find identical stones amid mazes, traps, laser beams and other obstacles. With more than 1,000 levels, this is one puzzle game that will keep you occupied for a long, long time. Operating System: Windows, Linux, OS X.
#### 26. [Fish Fillets NG][27] ####
In this puzzle game, players must try to find a safe way out of each of the 70 levels. Along the way, fish and other underwater residents offer humorous commentary on the user's progress. Operating System: Windows, Linux, OS X.
#### 27. [Frozen Bubble][28] ####
One of the oldest bubble shooter games around, Frozen Bubble features Tux the Linux Penguin and more than 100 levels for single-players. You can also play against two to five other players via a LAN or the Internet. Operating System: Windows, Linux.
#### 28. [GnomeGames][29] ####
This collection includes fifteen different casual games that you can play in five minutes or less. It includes Sudoku, a minesweeper game, Mahjong, a version of Reversi and more. Operating System: Linux.
#### 29. [I Have No Tomatoes][30] ####
How many tomatoes can you smash in ten minutes? This "extreme leisure time activity" comes from the same team as Those Funny Funguloids. Operating System: Windows, Linux.
#### 30. [KDE Games][31] ####
This is the collection of casual games for the KDE desktop. It includes a solitaire variation, a version of breakout, a golf game, a version of Risk, a minesweeper, sudoku and more. Operating System: Windows, Linux.
#### 31. [Neverball][32] ####
In this game, players must tilt the floor to guide a ball through an obstacle course. The game includes lots of levels or you can design your own. Operating System: Windows, Linux, OS X.
#### 32. [Pingus][33] ####
Did you spend hours playing Lemmings back in the 90s? If so, Pingus is for you. It's a remake of Lemmings (with penguins instead of lemmings) with 77 different levels. Operating System: Windows, Linux, OS X.
#### 33. [Pushover][34] ####
This puzzle game features ants who can push over dominoes arranged in various patterns. The player must get all the dominoes to fall and send the special trigger through the exit in order to get to the next level. Operating System: Windows.
#### 34. [Zaz][35] ####
Another bubble shooter, Zaz challenges you to hit balls as they travel along a preset path. The twist is that your shooter is also traveling along a path, making things just a little more difficult. Operating System: Windows, Linux.
### Educational Games ###
#### 35. [ChildsPlay][36] ####
Designed for those age five and under, ChildsPlay helps teach sounds, letters, numbers and basic keyboard skills. It also includes some games like memory, pong and pacman. Operating System: Windows, Linux, OS X.
#### 36. [GBrainy][37] ####
Exercise your mind with GBrainy's logic, word, math and memory games. It's fun and educational for players of all ages. Operating System: Windows, Linux.
#### 37. [GCompris][38] ####
Made for children ages 2 to 10, GCompris includes more than 100 different activities, most of them educational. It includes math, geography, science, reading, keyboarding and art games, plus chess, sudoku, memory and much more. Operating System: Windows, Linux.
#### 38. [TuxMath][39] ####
Solve arithmetic problems quickly before the incoming comets kill the penguins. This simple game reinforces math facts for elementary age students. Operating System: Windows, Linux, OS X.
### First-Person Shooter Games ###
#### 39. [Alien Arena][40] ####
Built "for fraggers by fraggers," Alien Arena is an intense deathmatch shooter with a retro sci-fi theme. Many different sites offer hosted servers for online games, and there are also plenty of fan sites with playing tips and more. Operating System: Linux, Windows, OS X.
#### 40. [AssaultCube][41] ####
Because of its light weight, AssaultCube can run on older hardware, despite its very good realistic graphics. It supports single-player or multi-player games and includes 26 different maps and 12 different game modes. Operating System: Linux, Windows, OS X.
#### 41. [Classic Nexuiz][42] ####
Downloaded more than 6 million times, Nexuiz is one of the most popular open source shooter games. A few years ago, a new closed-source version of the game was created, but you can still download the classic version from the link above or from SourceForge. Operating System: Windows, Linux, OS X.
#### 42. [OpenArena][43] ####
This multi-player game is a clone of Quake III Arena and features 13 different weapons, 51 arenas, 18 player characters and 12 types of games. The project's owners warn, "Due to violent and occasional racy content, it's unsuitable for children under the age of 17." Operating System: Windows, Linux, OS X.
#### 43. [Red Eclipse][44] ####
This casual first-person shooter has received excellent reviews. Features include Parkour, impulse boosts, dashing, several game modes and a built-in level editor. Operating System: Windows, Linux, OS X.
#### 44. [Tremulous][45] ####
This award-winning game mixes elements of a real-time strategy game with a first-person shooter. Users can choose to play as aliens or humans, always with the goal of eliminating the other team. Operating System: Windows, Linux, OS X, XBox.
#### 45. [TrueCombat][46] ####
TrueCombat claims to be "perhaps the best free tactical-realism shooter. EVER." It's a modern world combat simulator with two opposing teams. Note that in order to use it, you will also need Wolfenstein: Enemy Terriroty (see below). Operating System: Windows, Linux, OS X
#### 46. [Unvanquished][47] ####
Forked from Tremulous, Unvanquished pits "technologically advanced humans against hordes of highly adaptable aliens." It's under very active development with a new release every month. Operating System: Windows, Linux, OS X
#### 47. [Warsow][48] ####
The self-proclaimed "most fast-paced sport on the Web," Warsow is a cartoonish shooter featuring "Rocketlauncher-wielding pigs and lasergun-carrying cyberpunks." Unlike most shooters, it doesn't have a lot of blood and guts, and the emphasis is on movement. Operating System: Windows, Linux, OS X.
#### 48. [Wolfenstein: Enemy Terriorty][49] ####
Although there are several proprietary Wolfenstein games, this one is open source. It's a World War II-era game that pits the Axis against the Allies. Operating System: Windows, Linux, OS X
#### 49. [World of Padman][50] ####
Based on the Quake engine, this shooter is very cartoonish with little gore. Quite a few online servers are available, or you can play offline. Operating System: Windows, Linux.
#### 50. [Xonotic][51] ####
Xonotic was forked from the classic version of Nexuiz. It has more than 22 different maps, 16 weapons and lots of different gameplay modes. Operating System: Windows, Linux, OS X.
#### 51. [Zero Ballistics][52] ####
Part first-person shooter, part tank game, Zero Ballistics is set in a picturesque mountain environment and has more than 81 different tank setups available. Play deathmatch, team deathmatch or the unique beaconstrike game mode. Operating System: Windows, Linux, OS X.
### Music Games ###
#### 52. [Frets on Fire][53] ####
Frets on Fire is a lot like Guitar Hero, and it can even play Guitar Hero songs (though other songs are available as well). No worries if you don't have a guitar controller—you can also play with the keyboard. Operating System: Windows, Linux, OS X.
#### 53. [StepMania][54] ####
This is a free version of Dance Dance Revolution, which challenges users to stay in rhythm to the beat of the music. You can use dance pads (if you have them) to play, or you can just use the keyboard. Operating System: Windows, Linux/Unix, OS X, XBox.
#### 54. [Ultrastar Deluxe][55] ####
If karaoke is your thing, you'll love Ultrastar Deluxe. For this game, you must sing along to the music on pitch and in the correct rhythm. It comes with more than 10,000 songs included. Operating System: Windows, Linux, OS X.
### Racing Games ###
#### 55. [Extreme Tux Racer][56] ####
Tux Racer is a much-loved older game that features Tux the Linux penguin sliding down a mountain on his belly. Extreme Tux Racer updates the classic game for today's players. Operating System: Windows, Linux, OS X.
#### 56. [Speed Dreams][57] ####
This fork of the TORCS auto-racing game (see below) features an updated UI and many new cars and tracks. As in TORCS, the visuals are excellent. Operating System: Windows, Linux.
#### 57. [SuperTuxKart][58] ####
This cartoonish racer features Tux the Linux Penguin and friends driving go karts. Guide them around the tracks, while avoiding a horde of silly obstacles. Operating System: Windows, Linux, OS X.
#### 58. [TORCS][59] ####
Short for "The Open Racing Care Simulator," TORCS is an outstanding realistic racing game with a large fan base. Race alone or against friends on one of the many tracks available. Operating System: Windows, Linux, OS X.
#### 59. [Ultimate Stunts][60] ####
Inspired by the classic DOS game Stunts, Ultimate Stunts requires players to guide vehicles across broken bridges, jumps, loops, corkscrews and other obstacles. It allows offers the option of designing your own track with even more crazy stunts. Operating System: Windows, Linux, OS X.
#### 60. [VDrift][61] ####
As much a simulator as a racing game, VDrift introduces players to world of drift racing with a realistic physics engine. It includes more than 45 cars, more than 45 tracks, and support for a wide variety of controllers. Operating System: Windows, Linux, OS X.
### Role-Playing and Adventure Games ###
#### 61. [Crossfire][62] ####
Sometimes described as a cross between NetHack and Gauntlet, Crossfire is an arcade adventure game with very old-school graphics. It has more than 3,000 different maps featuring more than 150 different monsters. Operating System: Windows, Linux, OS X.
#### 62. [Epic Inventor][63] ####
Epic Inventor describes itself as a "side-scrolling action RPG." It's similar to Minecraft with simple, pixelated graphics and open-ended play. Operating System: Windows, Linux.
#### 63. [Excalibur: Morganna's Revenge][64] ####
This time-traveling epic puts you in the role of a futuristic space marine who must travel back to the time of King Arthur and Camelot. The graphics aren't anything special (think Minecraft), but the storyline and gameplay are good. Operating System: Windows, Linux, OS X.
#### 64. [Flare][65] ####
Inspired by Diablo, this role-playing game places the emphasis on combat. It's still an alpha release but is playable. Operating System: Windows, Linux, OS X.
#### 65. [Lips of Suna][66] ####
For adults only, this "tongue-in-cheek action RPG" features "violence, crude humor, nudity and other themes you can rarely see in other games anymore." It offers lots of action and a constantly changing landscape. Operating System: Windows, Linux.
#### 66. [The Mana World][67] ####
This is a massively multiplayer online role-playing game (MMORPG) that isn't so massive. (At the time of writing there were 31 people playing.) Still, it's a good attempt to create an ever-expanding world full of monsters, quests and mini-games. Operating System: Windows, Linux, OS X.
#### 67. [NetHack][68]注:此链接原文有错误,和上面的链接地址一样了 ####
One of the classics, NetHack is an intricate dungeon crawler with extremely simple graphics. It's been called one of the 100 best video games of all time. Operating System: Windows, Linux, Classic Mac.
#### 68. [PlaneShift][69] ####
Set in the fantasy realm of Yliakum, this unique online role-playing game features ten different races and a well-developed world with its own economy, government, religion and rules. It's playable but still in the early stages of development. Operating System: Windows, Linux, OS X.
#### 69. [Ryzom][70] ####
One of the better open source MMORPGs, award-winning Ryzom is set on the treelike planet of Atys, where several different races of beings interact and sometimes come into conflict. You can play for free, but those who choose to subscribe get some special benefits. Operating System: Windows, Linux, OS X.
#### 70. [Stendhal][71] ####
This online role-playing game aims to be more friendly than most. The website explains, "You may be asked to help protect land, feed the hungry, heal the sick, make someone happy, solve a puzzle or simply lend a hand." Operating System: Windows, Linux, OS X.
#### 71. [Summoning Wars][72] ####
Up to eight people can play this fantasy role-playing game at once. There's a trailer for the game at Youtube that lets you see it in action. Operating System: Windows, Linux, OS X.
### Simulator Games ###
#### 72. [FlightGear][73] ####
Extremely realistic, FlightGear is a top-notch flight simulator that rivals proprietary software. It includes accurate terrain for the entire world and lifelike models of 20,000 airports and numerous aircraft. Operating System: Windows, Linux, OS X, others.
#### 73. [Golems][74] ####
With this physics simulator you can build almost anything you want and see how it would act in the real world. It's great for learning about basic machines, building robots, and inventing contraptions of all kinds. Operating System: Windows, Linux, OS X.
#### 74. [LinCity NG][75] ####
Based on the original SimCity game, LinCity NG challenges players to build a sustainable metropolis with a thriving economy. Note that because it is based on older code, the graphics are similar to old DOS games. Operating System: Windows, Linux, OS X.
#### 75. [Micropolis/OLPC SimCity][76] ####
Another SimCity imitator, Micropolis is a Java-based city simulator. It also features fairly old-school graphics rather than the 3D look of newer SimCity games. Operating System: Windows, Linux, OS X.
#### 76. [Minetest][77] ####
Extremely similar to Minecraft, Minetest is set in an infinite world of basic building blocks. Players can explore, mine or craft new objects as they see fit. Operating System: Windows, Linux, OS X.
#### 77. [Pioneer][78] ####
Pioneer describes itself as "a game of lonely space adventure." It transports players to an open-ended world where they decide what to do and where to go. Operating System: Windows, Linux, OS X.
#### 78. [Oolite][79] ####
Based on Elite, Oolite is a space simulator where you can trade with other spacefarers or become embroiled in combat. It's been around for quite a while, and many expansions are available. Operating System: Windows, Linux, OS X.
#### 79. [OpenCity][80] ####
This 3D city simulator does not aim to be a SimCity clone, but does offer a similar style of play. It's fairly basic but is playable. Operating System: Windows, Linux, OS X.
#### 80. [OpenTTD][81] ####
Based on Transport Tycoon Deluxe, OpenTTD invites players to build a transportation empire. It supports up to 255 players at once and improves on the original TTD in many ways. Operating System: Windows, Linux, OS X.
#### 81. [Rigs of Rods][82] ####
This vehicle simulator with a unique soft-body physics engine enjoys a very active and enthusiastic fan base. Use it to create land, sea or air vehicles and drive or fly them around the country. Operating System: Windows, Linux, OS X.
#### 82. [Simutrans][83] ####
This transportation simulator offers the option of connecting to online games hosted throughout the world. Use buses, trucks, trains, trams, ships, airplanes, monorails, maglevs or other vehicles to move people and goods where they need to go. Operating System: Windows, Linux, OS X.
#### 83. [Vega Strike][84] ####
This is another space simulator that lets you trade and fight throughout the galaxy. You choose whether to fly a trade route, accept a bounty-hunting mission, turn pirate or just explore the vastness of space. Operating System: Windows, Linux, OS X.
### Strategy Games ###
#### 84. [0 A.D.][85] ####
Now in its 16th alpha release, 0 A.D. is an award-winning civilization-building game that strives for historical accuracy. Choose to play as the Carthaginians, Celts, Greeks, Iberians, Mauryans, Persians or Romans. Operating System: Linux, Windows, OS X.
#### 85. [Advanced Strategic Command][86] ####
This turn-based strategy game is based on the Battle Isle series. Players battle on a grid-like landscape in single- or multi-player games. Operating System: Windows, Linux.
#### 86. [Battle for Wesnoth][87] ####
This turn-based tactical strategy game puts players in a mythic world where they fight to reclaim the throne. Orcs, elves, necromancers and hundreds of other familiar high fantasy characters populate a large environment. Supports both single- and multi-player games. Operating System: Linux, Windows, OS X, iOS.
#### 87. [BosWars][88] ####
This futuristic real time strategy game requires players to build up energy stores and an economy in order to support military battles. Play against the computer opponent or connect over a LAN for multi-player games. Operating System: Windows, Linux, BSD, OS X.
#### 88. [CommanderStalin][89] ####
This variation of BosWars is set in Stalin's Soviet Union. Be prepared for the inevitable Nazi attack! Operating System: Windows, Linux.
#### 89. [FreeCol][90] ####
Inspired by the games Colonization and Civilization, FreeCol is a turn-based civilization-building strategy game. You start in the New World in 1492 and win by creating an independent country with free speech. Operating System: Windows, Linux, OS X.
#### 90. [FreeCiv][91] ####
Also inspired by Civilization, this turn-based strategy game starts in the stone age and ends in the space age. It includes 50 playable units and 541 nations and comes with several playable scenarios. Operating System: Windows, Linux, OS X.
#### 91. [FreeOrion][92] ####
While it isn't a clone or remake, FreeOrion is loosely based on the Master of Orion games. It's a turn-based strategy game set in space. Operating System: Windows, Linux, OS X.
#### 92. [Glest][93] ####
The forces of Tech battle the forces of Magic in this real-time strategy game. While it's still available for download, most Linux distributions now include the fork Megaglest (see below) instead of this older project. Operating System: Windows, Linux.
#### 93. [Globulation 2][94] ####
This real-time civilization-building strategy game aims to reduce the need for micro-management and allow players to focus on strategy. Single- or multi-player games and a level editor are available. Operating System: Windows, Linux.
#### 94. [Hedgewars][95] ####
One of the more lighthearted strategy games around, Hedgewars features "the antics of pink hedgehogs with attitude as they battle from the depths of hell to the depths of space." Features 31 environments, 48 set maps, infinite randomly generated maps, 55 weapons, 280 costumes and support for up to 8 players at once. Operating System: Windows, Linux, OS X, iOS.
#### 95. [Kernel Panic][96] ####
Set in a digital landscape, Kernel Panic is a real-time strategy game with Tron-like graphics. All the resources are free, so players don't need to worry about building an economy—only about fighting against the other hackers on the network. Operating System: Linux, Windows
#### 96. [Liquid War][97] ####
Way back in 2002, Liquid War was named the "most original Linux Game," and it's still worth a look. Control a liquid army as you try to consume your enemies. Operating System: Windows, Linux, OS X.
#### 97. [MegaGlest][98] ####
This fork of Glest adds five new teams to the original Tech and Magic: Egypt, Indians, Norsemen, Persian or Romans. It offers 17 different map types, both single- and multi-player games, and tutorials for new players. Operating System: Windows, Linux.
#### 98. [Pax Brittanica][99] ####
Up to four players can battle at once using the same keyboard on this submarine strategy game. The controls are easy to learn (you only use one button), but the gameplay can be very intense. Operating System: Windows, Linux, OS X.
#### 99. [Spring: 1944][100] ####
This World War II strategy game offers realistic units and strengths. Choose to play as the U.S., Germany, the U.S.S.R. or Great Britain. Operating System: Linux.
#### 100. [UFO: Alien Invasion][101] ####
Seventy years in the future, a secret organization struggles to defend earth from vicious alien invaders. Play as the humans or the aliens in single-player or multi-player combat. Operating System: Windows, Linux, OS X.
#### 101. [Unknown Horizons][102] ####
In this civilization-building strategy game, the emphasis is on building a strong economy. You start with a handful of settlers and resources on an isolated archipelago and work to build a thriving city. Operating System: Windows, Linux, OS X.
#### 102. [Warzone 2100][103] ####
Can you rebuild Earth after nuclear devastation? This game offers an unusually large tech tree and single- or multi-player games. Operating System: Windows, Linux, OS X.
#### 103. [Widelands][104] ####
Inspired by Settlers II, Widelands is another real-time strategy game that challenges players to build a civilization. It features three tribes—Barbarians, Imperials, and Atlanteans—and unlike most civilization games, the player doesn't tell each unit what to do but instead gives orders and delegates, more like a real ruler. Operating System: Windows, Linux, OS X.
#### 104. [Zero-K][105] ####
In this fast-moving real-time strategy game, robot armies fight a never-ending battle. Key features include more than 100 different units, a streamlined economy system, a realistic physics engine, terraforming and more. Operating System: Windows, Linux.
#### 105. [Zombies][106] ####
Can you kill all the zombies before they kill you? This turn-based game offers addictive gameplay and settings that allow the player to determine the level of gore. Operating System: OS X.
### Fun Non-Games ###
#### 106. [Celestia][107] ####
Perfect for budding astronomers and wanna-be astronauts, Celestia allows you to see the sky as it would appear at any point in time from any point in the known universe. Take a quick trip to Jupiter or plot your starwatching for the evening. Operating System: Windows, Linux, OS X.
#### 107. [Electric Sheep][108] ####
Inspired by the Philip K. Dick novel Do Androids Dream of Electric Sheep? this screensaver connects your system to thousands of others to create abstract designs and patterns. Vote for your favorite patterns to see them reappear more often. Operating System: Windows, Linux, OS X, Android, iOS.
#### 108. [LCARS 24][109] ####
If you've got an old PC around the house (and who doesn't), why not turn it into a Star Trek-themed conversation piece. With this app, you get an alarm clock and file manager with graphics that look like they came right off the Enterprise. Operating System: Windows, DOS.
#### 109. [Stellarium][110] ####
Turn your PC into a planetarium. Stellarium can display the night skies from any point on earth at any time, and it's used by many planetariums to power their displays. Operating System: Windows, Linux, OS X.
#### 110. [Tux Paint][111] ####
Tux Paint makes it easy for pre-schoolers to create their own "drawings" on the computer. It features an interface with big buttons, fun sound effects and friendly characters. Operating System: Windows, Linux, OS X.
--------------------------------------------------------------------------------
via: http://www.datamation.com/open-source/110-fun-open-source-games-and-apps-1.html
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.datamation.com/open-source/101-most-fun-open-source-games-and-apps-1.html
[2]:http://www.stuff-o-matic.com/asgp/
[3]:http://armagetronad.org/index.php
[4]:http://bzflag.org/
[5]:http://chromium-bsu.sourceforge.net/
[6]:http://www.parallelrealities.co.uk/p/legend-of-edgar.html
[7]:http://www.penguspy.com/jvgs/
[8]:http://www.nogravitythegame.com/classic/
[9]:http://opensnc.sourceforge.net/home/index.php
[10]:http://linux.tlk.fr/games/Powermanga/
[11]:http://www.scorched3d.co.uk/
[12]:http://www.srb2.org/
[13]:http://supertux.lethargik.org/
[14]:http://funguloids.sourceforge.net/
[15]:http://www.teeworlds.com/
[16]:http://xmoto.tuxfamily.org/
[17]:http://www.yofrankie.org/
[18]:http://domination.sourceforge.net/
[19]:http://sourceforge.net/apps/mediawiki/scrabble/index.php?title=Main_Page
[20]:http://sourceforge.net/apps/mediawiki/scrabble/index.php?title=Main_Page
[21]:http://www.pokerth.net/
[22]:http://pysolfc.sourceforge.net/
[23]:http://gabrielecirulli.github.io/2048/
[24]:http://www.nongnu.org/billiards/
[25]:http://cubetrains.com/
[26]:http://www.nongnu.org/enigma/
[27]:http://fillets.sourceforge.net/
[28]:http://www.frozen-bubble.org/
[29]:http://live.gnome.org/GnomeGames
[30]:http://tomatoes.sourceforge.net/about.html
[31]:http://games.kde.org/
[32]:http://neverball.org/
[33]:http://pingus.seul.org/welcome.html
[34]:http://pushover.sourceforge.net/
[35]:http://zaz.sourceforge.net/
[36]:http://www.schoolsplay.org/
[37]:https://live.gnome.org/gbrainy
[38]:http://gcompris.net/index-en.html
[39]:http://tux4kids.alioth.debian.org/tuxmath/index.php
[40]:http://icculus.org/alienarena/rpa/
[41]:http://assault.cubers.net/
[42]:http://www.alientrap.org/games/nexuiz
[43]:http://openarena.ws/smfnews.php
[44]:http://www.redeclipse.net/
[45]:http://tremulous.net/
[46]:http://www.truecombatelite.com/
[47]:http://www.unvanquished.net/
[48]:http://www.warsow.net/
[49]:http://www.splashdamage.com/wolfet
[50]:http://worldofpadman.net/website/news
[51]:http://www.xonotic.org/
[52]:http://www.zeroballistics.com/
[53]:http://www.stepmania.com/
[54]:http://www.stepmania.com/
[55]:http://www.ultrastardeluxe.org/
[56]:http://sourceforge.net/projects/extremetuxracer/
[57]:http://www.speed-dreams.org/
[58]:http://supertuxkart.sourceforge.net/
[59]:http://torcs.sourceforge.net/
[60]:http://www.ultimatestunts.nl/
[61]:http://vdrift.net/
[62]:http://crossfire.real-time.com/intro/index.html
[63]:http://www.epicinventor.com/
[64]:http://excaliburworld.com/emr/emr3/index.html
[65]:http://flarerpg.org/media/
[66]:http://lipsofsuna.org/
[67]:http://themanaworld.org/
[68]:http://themanaworld.org/
[69]:http://www.planeshift.it/about.html
[70]:http://www.ryzom.com/en/
[71]:http://stendhalgame.org/
[72]:http://sumwars.org/wiki/Main_Page
[73]:http://www.flightgear.org/
[74]:http://www.golemgame.com/
[75]:http://lincity.sourceforge.net/
[76]:https://code.google.com/p/micropolis/
[77]:http://minetest.net/
[78]:http://pioneerspacesim.net/
[79]:http://www.oolite.org/
[80]:http://www.opencity.info/
[81]:http://www.openttd.org/en/
[82]:http://www.rigsofrods.com/content/
[83]:http://www.simutrans.com/
[84]:http://vegastrike.sourceforge.net/
[85]:http://play0ad.com/
[86]:http://www.asc-hq.org/
[87]:http://www.wesnoth.org/
[88]:http://www.boswars.org/
[89]:http://commanderstalin.sourceforge.net/
[90]:http://www.freecol.org/
[91]:http://freeciv.wikia.com/wiki/Main_Page
[92]:http://freeorion.org/index.php/Main_Page
[93]:http://glest.org/en/index.php
[94]:http://globulation2.org/wiki/Main_Page
[95]:http://www.hedgewars.org/
[96]:http://springrts.com/wiki/Kernel_Panic
[97]:http://www.ufoot.org/liquidwar/v5
[98]:http://glest.org/en/index.php
[99]:http://paxbritannica.henk.ca/
[100]:http://spring1944.net/
[101]:http://ufoai.org/wiki/News
[102]:http://www.unknown-horizons.org/
[103]:http://wz2100.net/
[104]:http://wl.widelands.org/
[105]:http://zero-k.info/
[106]:http://codenautics.com/zombies/
[107]:http://www.shatters.net/celestia/index.html
[108]:http://community.electricsheep.org/
[109]:http://lcars24.com/
[110]:http://stellarium.org/
[111]:http://tuxpaint.org/

View File

@ -0,0 +1,79 @@
Fire Phone Dynamic Perspective tracks eyes for 3D UI
================================================================================
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/fire-phone-dynamic-perspective-1-820x420.jpg)
3D on phones is back, and it's Amazon giving it a try this time with Dynamic Perspective on the new [Fire Phone][1]. Eschewing a "true" 3D display as we've seen before, the Fire Phone's system instead uses four front-facing cameras to track the user's eyes, and adjusts the on-screen UI so that the various layers shift around to give the impression of 3D.
A combination of physically tilting the phone and moving your head as you hold it can be used to navigate through the interface and apps. So, tilting the Fire Phone can scroll through the browser, rather than having to swipe around with a fingertip.
youtube视频链接地址[http://www.youtube.com/embed/iB75HJe8eiI][2]
Similarly, with a carousel of items in Amazon's store on the phone, tilting the handset left and right pans through the products.
youtube视频链接地址[http://www.youtube.com/embed/lwj0hlE8CJc][3]
In ebooks, the Kindle app can scroll through according to how you're holding it. The settings can be switched between adjusting speed depending on how extreme the tilt angle is, or locking it to a fixed rate if you'd rather have things be predictable.
### This is the Amazon Fire Phone ###
Maps, too, get Dynamic Perspective support. Moving the Fire Phone around can show what's "hiding" behind 3D buildings or on different layers. Tilting can also be used to open up menus, in games for motion control, and even to navigate between the now-playing and lyrics UIs in the Prime Music app.
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/P1010143-XL-600x337.jpg)
All that 3D didn't come easy, though. Based on the fact that every face is different, with variations in hair color, shape, whether they wear glasses, and other factors, Amazon had to put Dynamic Perspective through some serious testing.
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/P1010006-XL-600x337.jpg)
In the companies labs, that involved a somewhat nightmarish rubber head on a stick, but then Amazon expanded that to use real-world data from thousands of photos of people. The use of four cameras means that, no matter what may be blocking the screen, the Fire Phone should be able to spot the user properly.
youtube视频链接地址[http://www.youtube.com/embed/X-wPOq27iXk][5]
Whether it'll all work as Bezos says, or be something owners quickly turn off, remains to be seen. We'll know more when we spend some hands-on time with the Fire Phone soon.
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/fire-phone-dynamic-perspective-1.jpg)
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/P1010143-XL.jpg)
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/P1010012-XL1.jpg)
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/P1010010-XL.jpg)
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/P1010007-XL.jpg)
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/P1010003-XL.jpg)
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/P1010153-XL.jpg)
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/P1010145-XL.jpg)
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/P1010019-XL.jpg)
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/P1010030-XL.jpg)
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/P1010022-XL.jpg)
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/P1010004-XL.jpg)
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/P1010010-XL-1.jpg)
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/P1010015-XL.jpg)
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/P1010014-XL.jpg)
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/P1010008-XL1.jpg)
![](http://cdn.slashgear.com/wp-content/uploads/2014/06/P1010006-XL.jpg)
--------------------------------------------------------------------------------
via: http://www.slashgear.com/fire-phone-dynamic-perspective-tracks-eyes-for-3d-ui-18334229/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.slashgear.com/tags/fire-phone
[2]:http://www.youtube.com/embed/iB75HJe8eiI
[3]:http://www.youtube.com/embed/lwj0hlE8CJc
[4]:http://www.slashgear.com/this-is-the-amazon-fire-phone-18334195/
[5]:http://www.youtube.com/embed/X-wPOq27iXk

View File

@ -0,0 +1,48 @@
Red Hat designs RHEL for a decade-long run
================================================================================
> The newly released RHEL 7 includes Docker containers and the new terabyte-scaled XFS file system
IDG News Service - Knowing how system administrators enjoy continuity, Red Hat has designed the latest release of its flagship Linux distribution to be run, with support, until 2024.
Red Hat Enterprise Linux 7 (RHEL 7), the completed version of which was shipped Tuesday, also features a number of new technologies that the company sees as instrumental for the next decade, including the Docker Linux Container system and the advanced XFS file system.
"XFS opens the door for a new class of business analytics, big data and data analytics," said Mark Coggin, Red Hat senior director of product marketing.
The last major update to RHEL, RHEL 6, was released in November 2010. Since then, server software has been used in an increasingly wide variety of operational scenarios, including providing the basis for bare metal servers, virtual machines, IaaS (infrastructure-as-a-service) and PaaS (platform-as-a-service) cloud packages.
Red Hat will support RHEL 7 with bug fixes and commercial support for up to 10 years. The company generally releases a major version of RHEL every three years.
In contrast, Canonical's Ubuntu LTS (long-term support) distributions are supported for five years. Suse Enterprise Linux [is also supported][1], in most aspects, for up to 10 years,
This is the first edition to include Docker, a container technology [that could act as a nimbler replacement][2] to full virtual machines used in cloud operations. Docker provides a way to package an application in a virtual container so that it can be run across different Linux servers.
Red Hat expects that containers will be widely deployed over the next few years as a way to package and run applications, thanks to their portable nature.
"Customers have told us they are looking for a lighter weight version of developing applications. The applications themselves don't need a full operating system or a virtual machine," Coggin said. The system calls are answered by the server's OS and the container includes only the necessary support libraries and the application. "We only put into that container what we need," he said.
Containers are also easier to maintain because users don't have to worry about updating or patching the full OS within a virtual machine, Coggin said.
Red Hat is also planning a special stripped-down release of RHEL, now code-named RHEL Atomic, which will be a distribution for just running containers. Containers that run on the regular RHEL can easily be transferred to RHEL Atomic, once that OS is available. They will also run on Red Hat OpenShift PaaS.
Red Hat is also supporting Docker through its switch in RHEL 7 to the systemd process manager, replacing Linux's long used init process manager. Systemd "gives the administrator a lot of additional flexibility in managing the underlying processes inside of RHEL. It also has a tie back to the container initiative and is very integral to the way the processes are stood up and managed in containers," Coggin said.
Red Hat has switched the default file system in RHEL 7 to XFS, which is able to keep track of up to 500TBs on a single partition. The previous default file system, ext4, was only able to support 50TBs. Ext4 is still available as an option, as well as another of other file systems such as GFS2 and Btrfs (under technology preview).
Red Hat has added greater interoperability with the Microsoft Windows environment. Organizations can now use Microsoft Active Directory to securely authenticate users on Red Hat systems. Tools are also included in RHEL 7 to offer Red Hat credentials for Windows servers.
"Customers have thousands of Windows servers and thousands of RHEL servers, and they to need ways to integrate the two," Coggin said.
The installation process has been sped up as well, thanks to an update to the Anaconda installer, which now allows administrators to preselect server configurations on the start of the installation process. The inclusion of the industry standard OpenLMI (Open Linux Management Infrastructure), which allows the administrator to manage services at a granular level through a standardized API (application programming interface).
"OpenLMI is another important way of improving stability and efficiency by helping to manage systems better," Coggin said.
--------------------------------------------------------------------------------
via: http://www.computerworld.com/s/article/9248988/Red_Hat_designs_RHEL_for_a_decade_long_run?taxonomyId=122
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://www.suse.com/support/policy.html
[2]:http://www.infoworld.com/d/virtualization/docker-all-geared-the-enterprise-244020

View File

@ -0,0 +1,99 @@
What will your business look like in 2030?
================================================================================
![](http://cdn1.tnwcdn.com/wp-content/blogs.dir/1/files/2014/06/business-man-roof-deck-798x310.jpg)
lya Pozin is a serial entrepreneur, writer, and investor. He is the founder of online video entertainment platform [Pluto.TV][1], social greeting card company [Open Me][2], and digital marketing agency [Ciplex][3].
The year is 2030, and youre walking into the front doors of your company. What will it look like, what functions will your employees be performing and how will you stack up against the competition?
You might not be considering the future, but remember that [25 years ago][4], only 15 percent of US households had a personal computer. While 73 percent of online adults currently have a social media account, social media barely existed 15 years ago.
Technology is always changing, and with it come disruptions to industries, companies and the employment marketplace. The future is closing in, but is your company ready?
### Why should you be worried? ###
In business, to stop moving forward means your company is stagnating; for many companies, stagnation equates to eventual death. Companies clinging to outmoded and outdated business practices eventually run into major problems. There are examples everywhere in the marketplace, from struggling BlackBerry phones to Kodak slowly shuttering its film business.
According to [futurist and TED talk speaker Thomas Frey][5], two billion jobs will disappear by 2030 thanks to shifting technologies and changing needs. You cant afford to be behind the pack when the future comes calling.
### What will 2030 look like? ###
![](http://cdn1.tnwcdn.com/wp-content/blogs.dir/1/files/2014/05/calendar.jpg)
Recently, the [Canadian Scholarship Trust][6], as part of its Inspired Minds campaign, [put together a list of the jobs][7] we might all be hiring for in 2030. These jobs range from “Company Culture Ambassador” to get this! “Nostalgist.”
Taking CSTs lead, I spoke to some entrepreneurs and innovators in different fields, from medicine to marketing, to see their predictions for how businesses will be run in the future. Hopping in our time travel machine, heres a glimpse at what 2030 might look like:
### Cloud-based ###
“Everything will be cloud-based with faster speeds,” said Marjorie Adams, [AQB][8] CEO and President. “The technologies coming out now will be better defined and connected. While innovation from the business side could be a lot slower-going than the consumer side, we will have a lot more data to understand real needs.”
### Automated ###
Google is already leading the way with the self-driving car, but automation might creep into other aspects of our lives in the future.
“Home automation will be very different in 2030,” said Andrew Thomas, co-founder of [SkyBell Technologies, Inc][9] .“Well all have brain-sensing headbands and glasses and well just think about locking the door or turning off the lights. Our fridge will email the store when were low on food and our self-driving cars will go pick up the groceries for us!”
### Human curated ###
As more and more options become available to consumers, well all become overwhelmed by choice. Human curation will come back into vogue for everything from music to online video.
Were already seeing the trend start now with [Apples acquisition][10] of human curated music service Beats. After all, do you really think apps are [smarter than you][11]?
### Socially-connected ###
If you cant watch the latest episode of Scandal or Game of Thrones, its common sense to stay off your Facebook and Twitter feeds.
“Imagine a media environment 15 years into the future where no object or entertainment venue is out of reach for second-screen integration with social media,” said Jared Feldman, CEO and founder of [Mashwork][12]. “Social platforms like Facebook and Twitter might as well be agnostic at this point in time since consumers will have aggregated all of their digital social life into consolidated user profiles designed to curate multiple feeds and allow for single-source user engagement.”
### Targeted ###
Already advertising is becoming more and more targeted to consumers needs thanks to big data and algorithms. Dont expect this trend to move backwards, at least according to [FlexOne][13] CEO Matthijs Keij.
“Advertisers will know more about you than you yourself. Which products you like, how to improve your personal and work life, and even how to be more healthy. Sounds a little like Huxleys Brave New World? Maybe…but consumers might actually like it.”
### How do your prepare? ###
![](http://cdn1.tnwcdn.com/wp-content/blogs.dir/1/files/2011/01/Crystal-Ball-12-27-09-iStock_000003107697XSmall.jpg)
Preparing for the future might seem impossible, but you dont need a crystal ball to keep abreast of changes. Its important to always keep up with trends and emerging technology, both in the economy in general and within your industry in particular.
Go to conferences, attend industry talks, and make time for industry trade shows. Pay attention to the new technology entering your sector, and dont turn your nose up at something new just because its different than the way things have always been.
Understand your customers and know what they need, because the future is looking more consumer-focused than ever before, even in segments like healthcare. “The paradigm is shifting to a more “consumer-centric” model,” said Robert Grajewski, CEO of [Edison Nation Medical][14]. “Healthcare as a whole will shift to this individual care focus.”
Companies that understand their core competencies and their consumer needs will have a leg up on the competition.
As more digital natives come of age and flock into the economy, some highly skilled fields will see consumers picking up additional skills.
“By 2030 virtually everyone will be a designer, equipped with knowledge of the hottest mega trends and ripe and ready to replace those who cant keep up with the latest software,” said Ashley Mady, CEO of [Brandberry][15].
“The best way to prepare for this inevitable shift in the design world is to focus on creative, big picture thinking over production, which will soon become a commodity. Designers should remain innovative by developing their own adaptable brands and technology that will grow alongside the quickly evolving world we live in.”
Finally, its important to be open, curious, and willing to pivot. New technologies are going to come along to improve, and sometimes complicate, your business. You need to be willing to embrace these new paradigms, or you risk your company becoming obsolete.
What do you think? How do you plan to prepare for the future? Share in the comments!
--------------------------------------------------------------------------------
via: http://thenextweb.com/entrepreneur/2014/06/18/will-business-look-like-2030/?utm_campaign=share%20button&utm_content=What%20will%20your%20business%20look%20like%20in%202030?&awesm=tnw.to_q3L0P&utm_source=copypaste&utm_medium=referral
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://pluto.tv/
[2]:http://www.openme.com/
[3]:http://www.ciplex.com/
[4]:http://www.cnbc.com/id/101611509
[5]:http://www.futuristspeaker.com/2012/02/2-billion-jobs-to-disappear-by-2030/
[6]:http://www.cst.org/
[7]:http://careers2030.cst.org/jobs/
[8]:http://www.aqb.com/
[9]:http://www.skybell.com/
[10]:http://thenextweb.com/apple/2014/05/28/apple-confirms-acquisition-beats/
[11]:http://thenextweb.com/apps/2013/10/19/i-let-apps-tell-me-how-to-live-for-a-day/
[12]:http://mashwork.com/
[13]:http://www.flxone.com/
[14]:http://www.edisonnationmedical.com/
[15]:http://www.brandberry.com/

View File

@ -0,0 +1,86 @@
How Many Languages Do Developers Need To Know?
================================================================================
![](http://readwrite.com/files/styles/1400_0/public/fields/code%20example%20Flickr%20Ruiwen%20Chua.jpg)
> Big companies like Apple, Facebook and Google are developing their own programming languages, forcing developers to adapt.
At its Worldwide Developer Conference last week, Apple announced its new programming language [Swift][1]. Its the latest in a rash of new languages developed by big tech companies, in some cases for specific use with their own platforms.
Apple has Swift for iOS developers; [Facebook has Hack][2], a language for back-end development. Google, meanwhile, has its own entries—the would-be Javascript replacement Dart and a new general programming language called Go.
This rash of new languages raises a number of issues for developers. Perhaps the most significant is one my colleague [Adriana Lee][3] raised after Apple's Swift announcement:
> (How many languages are devs supposed to learn?)
> — Adriana Lee (@adra_la) [June 2, 2014][4]
### A Computer-Language Babel ###
There are already [hundreds of programming languages][5] in existence, and more are popping into existence all the time. Many are designed for use in a relatively narrow range of applications, and large numbers never catch on beyond small groups of coders.
Similarly, big tech companies have been developing new languages for about as long as there have been big tech companies. The [seminal general-purpose language C][6] originated at AT&T Bell Labs in the early 1970s. Java, now the primary language for development of Android apps, was [born at Sun Microsystems][7] in the 1990s.
What's different these days is the extent to which companies embrace new languages to further their specific business objectives—a process that also has the effect of creating a dedicated base of developers who are effectively "locked in" to a company's particular platform. That sort of dual strategy dates back at least to Sun's introduction of Java, which the company promoted as a way to challenge Microsoft's dominance on the PC desktop. (Things didn't work out the way Sun planned, although Java eventually found a home in enterprise middleware systems before Google adopted it for Android.)
It's also clearly Apple's goal with Swift. Should it live up to the company's early hype, Swift seems likely to simplify iOS app development by filing the rough edges off Objective-C, the current lingua franca of iOS and Mac OS X developers. But it will also require those same developers to learn the ins and outs of a new language that they're unlikely to use anywhere else.
### Why Companies Roll Their Own ###
Which cuts against the ingrained "dont reinvent the wheel” philosophy that animates most developers. So why don't more companies just adopt already existing languages to new uses?
One answer is simply that companies build their own languages because they can. Designing a new language can be complex, but it's not particularly resource-intensive. What's hard is building support for it, both in terms of providing software resources (shared code libraries, APIs, compilers, documentation and so forth) and winning the hearts and minds of developers. Companies are uniquely positioned to do both.
There's also the fact that existing languages are often difficult to shoehorn into today's complex code frameworks. Take, for instance, [Facebook's decision to create Hack][8], a superset of the [scripting language PHP][9] that's commonly used in Web development.
Facebook's main goal with Hack—a common one these days—was to improve code reliability, in this case by enforcing data-type checking before a program is executed. Such checks ensure that a program won't, say, try to interpret an integer as a string of characters, an error that could yield unpredictable results if not caught. In Hack, those checks take place in advance so that programmers can identify such errors long before their code goes live.
According to Julien Verlaguet, a core developer on Facebooks Hack team, the company first looked for an an existing language that might allow for more efficient programming. But much of Facebook was already built on PHP, and the company has built up a substantial software infrastructure to support PHP and its offshoots. While it's possible to make PHP work with code written in a different language, it's not easy—nor is it fast.
“Lets say I try to rewrite our PHP codebase in Scala,” Verlaguet said. “Its a well designed, beautiful language, but its not at all compatible with PHP. Everytime I need to call to PHP from the Scala part of the code base, Ill lose performance speed. We would have liked to use an existing language but for us, it just wasnt an option.”
Instead, Facebook invented Hack, which has enough in common with PHP that it can share the company's existing infrastructure. The vast majority of the Facebook codebase has been migrated from PHP to Hack, said Verlaguet, but the company has open sourced the language in hopes that independent developers will find uses for it outside of Facebook.
“You can still use PHP,” he said. “But were hoping youll want to use Hack.”
### Who Holds The Power ###
Therein lies the balance of power between companies and developers. Companies can make their languages as specific as they like. But if developers dont want to use them, nobody is going to—outside, that is, of anyone who might harbor hopes of one day working at the company that invented the language.
Its not unusual for companies to make it easiest to develop in one language over another. For example, you would use Objective-C to develop iOS apps, but Java to develop Android apps. This has never been a major sticking point with developers because both Objective-C and Java are general purpose object-oriented languages. Theyre useful for a number of purposes.
Hack, Dart, Go, and Swift, however, so far have only proven useful for particular company-designated programming solutions, usually in tandem with that companys programming environment of choice. Granted, it may be too soon to judge. Hack, for example, can be used in several back-end implementations; its just so new that Facebook doesnt yet have any data that people want to use it that way.
Its not that developers arent capable of learning multiple languages. Most already do. Think of them like the Romance languages—if you know Spanish, itll be easier to learn French and so on than if you didnt already know one. Likewise, if you already know Java, itll be easier to learn Ruby or Perl. And if you know PHP, you basically already know Hack.
On the contrary, its more of a question of habit. If Java already solves your specific problems, you dont have any incentive to learn Ruby. And if you are happy coding iOS apps in Objective-C, youre not going to feel very tempted to pick up Swift.
To some developers, though, ecosystem-specific languages just make life harder for everybody. Freelance designer Jack Watson-Hamblin, for instance, told me that initiatives like Apple's Swift risk overburdening programmers and fragmenting the developer community:
> It's important for programmers to know multiple languages, but forcing them to keep up with new languages all the time doesn't make sense. If I'm making a simple cross-platform app, I don't want to have to know four languages to do it. I only want to use the single-purpose language if I really need to.
Watson-Hamblin argues that when companies each build their own language for their own needs, it slows down overall progress both by dividing the attention of coders and by enforcing a monolithic perspective on development within that language. "When companies are in charge of a language vs. an open-source community, it's like the difference between a corporation and a start-up," he said. Communities are more flexible and adaptive by definition.
Of course, Apple had [a lot of very good reasons to start from scratch][10] with Swift, just as Facebook did when it invented Hack. That doesn't mean it's not going to force change on developers—some of it doubtless unwelcome.
“As new languages are invented, it gets more hegemonic,” said Verlaguet. “It can be frustrating to have to keep up. But on the other hand, youre more likely to have a new language to fit your exact problem. Imagine the reverse—a world where programmers used the same language for everything. Itd be a language that could do everything poorly but nothing well.”
Lead image by [Flickr user Ruiwen Chua][11], CC 2.0
--------------------------------------------------------------------------------
via: http://readwrite.com/2014/06/17/apple-swift-facebook-hack-google-dart
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://developer.apple.com/swift/
[2]:http://readwrite.com/2014/03/20/facebook-new-programming-language-hack
[3]:http://readwrite.com/author/adriana-lee#awesm=~oGfPbJlSrFBamJ
[4]:https://twitter.com/adra_la/statuses/473537386266112000
[5]:http://en.wikipedia.org/wiki/List_of_programming_languages
[6]:http://en.wikipedia.org/wiki/C_(programming_language)
[7]:http://en.wikipedia.org/wiki/Java_(programming_language)
[8]:http://readwrite.com/2014/03/20/facebook-new-programming-language-hack
[9]:http://en.wikipedia.org/wiki/PHP
[10]:http://blog.erratasec.com/2014/06/why-it-had-to-be-swift.html#.U58BJI1dXtA
[11]:https://www.flickr.com/photos/ruiwen/3260095534

View File

@ -0,0 +1,120 @@
Linux Poetry Explains the Kernel, Line By Line
================================================================================
> Editor's Note: Feeling inspired? Send your Linux poem to [editors@linux.com][1] for your chance to win a free pass to [LinuxCon North America][2] in Chicago, Aug. 20-22. Be sure to include your name, contact information and a brief explanation of your poem. We'll draw one winner at random from all eligible entries each week through Aug. 1, 2014.
![Software developer Morgan Phillips is teaching herself how the Linux kernel works by writing poetry.](http://www.linux.com/images/stories/41373/Morgan-Phillips-2.jpg)
Software developer Morgan Phillips is teaching herself how the Linux kernel works by writing poetry.
Writing poems about the Linux kernel has been enlightening in more ways than one for software developer Morgan Phillips.
Over the past few months she's begun to teach herself how the Linux kernel works by studying text books, including [Understanding the Linux Kernel][3], Unix Network Programming, and The Unix Programming Environment. But instead of taking notes, she weaves the new terminology and ideas she learns into poetry about system architecture and programming concepts. (See some examples, below, and on her [Linux Poetry blog][4].)
It's a “pedagogical hack” she adopted in college and took up again a few years ago when she first landed a job as a data warehouse engineer at Facebook and needed to quickly learn Hadoop.
“I could remember bits and pieces of information but it was too rote, too rigid in my mind, so I started writing poems,” she said. “It forced me to wrap all of these bits of information into context and helped me learn things much more effectively.”
The Linux kernel's history, architecture, abundant terminology and complex concepts, are rich fodder for her poetry.
“I could probably write thousands of poems about just one subsystem in the kernel,” she said.
### Why learn Linux? ###
![Phillips publishes on her Linux Poetry blog.](http://www.linux.com/images/stories/41373/multiplexing-poem.png)
Phillips publishes on her Linux Poetry blog.
Phillips started her software career through a somewhat unconventional route as a physics major in a research laboratory. Instead of writing journal articles she was writing Python scripts to parse research project data on active galactic nuclei. She never learned the fundamentals of computer science (CS), but picked up the information on the job, as the need arose.
She soon got a job doing network security research for the Army Research Laboratory in Adelphi, Maryland, working with Linux. That was her first foray into the networking stack and the lower levels of the operating system.
Most recently she worked at Facebook until about six months ago when she moved from the Silicon Valley back to Nashville, near her home state of Kentucky, to work for a software startup that helps major record labels manage their business.
“I have all this experience but I suffer from a thing that almost every person who doesnt have an actual background in CS does: I have islands of knowledge with big gaps in between,” she said. “Every time I'd come across some concept, some data structure in the kernel, I'd have to go educate myself on it.”
A few weeks ago her frustration peaked. She was trying to do a form of message passing between web application processes and a web socket server she had written and found herself having to brush up on all the ways she could do interprocess communication.
“I was like, that's it. I'm going to start really learning everything I should have known starting at the bottom up with the Linux kernel,” she said. “So I bought some textbooks and started reading.”
![](http://www.linux.com/images/stories/41373/process-poem.png)
### What she's learned ###
Over the course of a few months of reading books and writing poems she's learned about how the virtual memory subsystem works. She's learned about the data structures that hold process information, about the virtual memory layout and how pages are mapped into memory, and about memory management.
“I hadn't thought about a lot of things, like that a system that's multiprocessing shouldnt bother with semaphores,” she said. “Spin locks are often more efficient.”
Writing poems has also given her insight into her own way of thinking about the world. In some small way she is communicating not just her knowledge of Linux systems, but also the way that she conceptualizes them.
“It's a deep look into my mind,” she said. “Poetry is the best way to share these abstract ideas and things that we can't possibly truly share with other people.”
Writing a Linux poem
The inspiration for her Linux poems starts with reading a textbook chapter. She hones the topics down to the key concepts that she wants to remember and what others might find interesting, as well as things she can “wrap a conceptual bubble around.”
A concept like demand paging is too broad to fit into a single poem, for example. “So I'm working my way down deeper in it,” she said. “Instead I'm looking at writing a poem about the actual data structure where process memory is laid out and then mapped into a page map.”
She hasn't had any formal training writing poetry, but writes the lines so that they are visually appealing and have a nice rhythm when they're read aloud.
In her poem, “The Reentrant Kernel,” Phillips writes about an important property in software that allows a function to be paused and restarted later with the same result. System calls need to have this reentrant property in order to make the scheduler run as efficiently as possible, Phillips explains. The poem also includes a program, written in C style pseudocode, to help illustrate the concept.
Phillips hopes her Linux poetry helps her increase her understanding enough to start contributing to the Linux kernel.
“I've been very intimidated for a long time by the idea of submitting a patch to the kernel, being a kernel hacker,” she said. “To me that's the pinnacle of success.
“My ultimate dream is that I can gain a good enough understanding of the kernel and C to submit a patch and have it accepted.”
The Reentrant Kernel
A reentrant function,
if interrupted,
will return a result,
which is not perturbed.
int global_int;
int is_not_reentrant(int x) {
int x = x;
return global_int + x; },
depends on a global variable,
which may change during execution.
int global_int;
int is_reentrant(int x) {
int saved = global_int;
return saved + x; },
mitigates external dependency,
it is reentrant, though not thread safe.
UNIX kernels are reentrant,
a process may be interrupted while in kernel mode,
so that, for instance, time is not wasted,
waiting on devices.
Process alpha requests to read from a device,
the kernel obliges,
CPU switches into kernel mode,
system call begins execution.
Process alpha is waiting for data,
it yields to the scheduler,
process beta writes to a file,
the device signals that data is available.
Context switches,
process alpha continues execution,
data is fetched,
CPU enters user mode.
注:上面代码内文本发布时请参考原文排版(第一行着重,全部居中)
--------------------------------------------------------------------------------
via: http://www.linux.com/news/featured-blogs/200-libby-clark/777473-linux-poetry-explains-the-kernel-line-by-line/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:editors@linux.com
[2]:http://events.linuxfoundation.org/events/linuxcon-north-america
[3]:http://shop.oreilly.com/product/9780596005658.do
[4]:http://www.linux-poetry.com/

View File

@ -0,0 +1,190 @@
9 ASCII Games You'll Want to Play Again and Again
================================================================================
Modern Graphics Processing Units (GPUs) offer exceptional gaming capabilities, and have contributed to the trend of astonishing leaps in graphics fidelity. There is not a year that has gone by without a game being released that makes significant advances in technical graphics wizardry. Computer graphics have been advancing at a staggering pace. At the current rate of progress, in the next 10 years it may not be possible to distinguish computer graphics from reality.
Personally, these developments do not overly interest me. I find little fascination playing games that focus so much on the visuals they neglect the essential elements. Too often the storyline and game play has been compromised for visual quality. Most of my favourite games are somewhat deficient in the graphics department. Gameplay is always king in my eyes.
Linux has an excellent library of free games many of which are released under an open source license. The vast majority of these games are aesthetically pleasing. Popular games often have full motion video, vector graphics, 3D graphics, realistic 3D rendering, animation, texturing, a physics engine, and much more. Early computer games did not have these graphic techniques. The earliest video games were text games or text-based games that used text characters rather than vector or bitmapped graphics.
Text-based games often receive little coverage in the Linux press. However, there are some real ASCII gems out there waiting to be explored which are immensely addictive and great fun to play.
The idiom 'don't judge a book by its cover' can be extended to 'don't judge a computer game by its graphics'. Whilst the games featured in this article have extremely basic graphics, they have many redeeming qualities beyond evoking fond memories of the early days of computer gaming.
There are no fancy graphics here, just great gameplay coupled with the urge of always having just one more play.
![](http://www.linuxlinks.com/portal/content2/png/UnNetHack.png)
![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-UnNetHack.png)
The first game in this roundup is UnNetHack, a fork of NetHack, originally based on the hugely popular roguelike game NetHack. NetHack was first released in 1987, and is considered by many gamers to be one of the best gaming experiences the computing world offers.
UnNetHack adds a number of enhancements to NetHack, such as additional monsters, more levels, a few new objects, additional dangers, more challenging gameplay, and most importantly more entertainment than vanilla NetHack. It offers a tutorial to help new players get started.
Be warned, UnNetHack is fiendishly addictive.
- Website: [sourceforge.net/apps/trac/unnethack][1]
- Authors: Patric Mueller
- License: Nethack General Public License
- Version Number: 5.1.0
----------
![](http://www.linuxlinks.com/portal/content2/png/VMSEmpire.png)
![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-vms-empire.png)
Empire is a simulation of a full-scale war between two emperors, the computer and you. Naturally, there is only room for one, so the object of the game is to destroy the other. The computer plays by the same rules that you do.
This game is the ancestor of all the multiplayer 4X simulations out there, including Civilization and Master of Orion. The classic game from the 1980s uses text mode graphical output, drawing your units, cities and the world in color. Commands are issued using the keyboard.
The world on which the game takes place is a square rectangle containing cities, land, and water. Cities are used to build armies, planes, and ships which can move across the world destroying enemy pieces, exploring, and capturing more cities. The objective of the game is to destroy all the enemy pieces, and capture all the cities.
The game starts by assigning you one city and the computer one city. Cities can produce new pieces. Every city that you own produces more pieces for you according to the cost of the desired piece. The typical play of the game is to issue the Automove command until you decide to do something special. During movement in each round, the player is prompted to move each piece that does not otherwise have an assigned function.
- Website: [www.catb.org/~esr/vms-empire][2]
- Authors: Chuck Simmons, Eric S. Raymond
- License: GNU GPL v2
- Version Number: 1.12
----------
![](http://www.linuxlinks.com/portal/content2/png/Intricacy.png)
![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Intricacy.png)
Intricacy is an addictive, open source, networked, video puzzle game. It is written in Haskell, using the Curses and SDL libraries.
Intricacy runs directly from the command-line, and provides a turn-based, abstract puzzle game where the players need to pick locks, simply by coordinating a couple of tools in order to manipulate the locks mechanism. Constructing and solving difficult puzzles within certain strict design constraints is both challenging and good fun.
The catch is that you will be able to pick locks that are designed by other players. It has multi-platform support, with binaries for both Linux and Windows.
- Website: [mbays.freeshell.org/intricacy][3]
- Authors: Chuck Simmons, Eric S. Raymond
- License: GNU GPL v3
- Version Number: 0.2.6.3
----------
![](http://www.linuxlinks.com/portal/content2/png/XorCurses.png)
![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-XorCurses.png)
XorCurses is a puzzle game set inside a series of mazes. It is a remake of XOR by Astral Software, a game published in 1987 and released on the popular home computers of the day including the Commodore 64, ZX Spectrum, Atari ST, and Amiga. XOR is a pure puzzle game with no random or arcade elements.
In some respects, XorCurses is a regression from the graphics of the old 8 bit computers as it uses even more simplistic graphics, with coloured ASCII characters instead of pixel based graphics.
XorCurses attempts to faithfully recreate that game for Linux, with particular attention placed on the behaviour of the objects within the original game.
The basic premise of Xor is to roam around a series of mazes collecting all of the blue masks and then finding the exit. You have two player-shields to aid you and you can use either one at any time and switch between them. The first few levels are easy to progress, but the rest are progressively harder to solve. A particularly challenging and difficult puzzle game that will keep you engaged for hours.
- Website: [www.jwm-art.net/dark.php?p=XorCurses][4]
- Authors: James W. Morris
- License: GNU GPL
- Version Number: 0.2.2
----------
![](http://www.linuxlinks.com/portal/content2/png/GoblinHack.png)
![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-GoblinHack.png)
Goblin Hack is an open source roguelike OpenGL-based smooth-scrolling ASCII graphics game. The game is inspired by the likes of NetHack, but faster with fewer keys.
Goblin Hack has a simple interface that appears to appeal to players of all ages, and fires their imagination in today's world of over-rendered games.
Players can choose one of several classes before being thrown into the first floor of a randomized, ongoing dungeon.
- Website: [goblinhack.sourceforge.net][5]
- Authors: Neil McGill
- License: GNU GPL v2
- Version Number: 1.18
----------
![](http://www.linuxlinks.com/portal/content2/png/CurseofWar.png)
![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-CurseofWar.png)
Curse of War is a fast-paced real time strategy game released under an open source license. It is implemented using C and ncurses. There is also an SDL version available.
The core game mechanics turns out to be quite close to WWI-WWII type of warfare, however, there is no explicit reference to any historical period.
Unlike most real time strategy games, in Curse of War players do not control units, but instead they concentrate on high-level strategic planning: Building infrastructure, securing resources, and moving armies.
A multiplayer mode is available. Computer opponents differ in personality, and it affects the way they fight.
- Website: [a-nikolaev.github.io/curseofwar][6]
- Authors: Alexey Nikolaev
- License: GNU GPL v3
- Version Number: 1.2.0
----------
![](http://www.linuxlinks.com/portal/content2/png/Brogue.png)
![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Brogue.png)
Brogue is an open source Roguelike game for Mac OS X, Windows, Linux, iOS and Android.
Brogue is a direct descendant of Rogue, a dungeon crawling video game first developed by Michael Toy and Glenn Wichman around 1980. Unlike other popular modern roguelikes, Brogue favors simplicity over complexity, while trying to ensure that the interactions between components are interesting and varied.
Your goal is to travel to the 26th subterranean floor of the dungeon, retrieve the Amulet of Yendor and return with it to the surface. For the truly skillful who desire further challenge, depths below 26 contain three lumenstones each, items which confer an increased score upon victory.
Brogue is a challenging game, but still great fun to play. Try not to be disheartened by the difficulty of the game; with some application, Brogue will become very addictive.
- Website: [sites.google.com/site/broguegame][7]
- Authors: Brian Walker
- License: GNU Affero GPL
- Version Number: 1.7.3
----------
![](http://www.linuxlinks.com/portal/content2/png/DiabloRL.png)
![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-DiabloRL.png)
DiabloRL is a roguelike "unmake" of the popular Blizzard game Diablo 1 classic RPG to a turn-based ASCII roguelike.
The game was created for the 7 Day Roguelike Competition, but has since been expanded with magic items, spells, more classes and levels, as well as fast travelling to known locations, and high scores.
DiabloRL gives you a choice of classes, the Warrior, Rogue, or Sorcerer. Each of these has different starting and maximum stats, as well as completely different play styles.
- Website: [diablo.chaosforge.org][8]
- Authors: Kornel Kisielewicz, Chris Johnson and Mel'nikova Anastasia
- License: GNU GPL
- Version Number: 0.5.0
----------
![](http://www.linuxlinks.com/portal/content2/png/CataclysmDarkDaysAhead.png)
![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Cataclysm.png)
Cataclysm is an open source post-apocalyptic roguelike, set in the countryside of fictional New England after a devastating plague of monsters and zombies. It is a continuation of Whale's original Cataclysm, which expands it with numerous new creatures, buildings, gameplay mechanics and many other features.
While some have described it as a "zombie game", there's far more to Cataclysm than that. Struggle to survive in a harsh, persistent, procedurally generated world. Scavenge the remnants of a dead civilization for for food, equipment, or, if you're lucky, a vehicle with a full tank of gas to get you the hell out of Dodge. Fight to defeat or escape from a wide variety of powerful monstrosities, from zombies to giant insects to killer robots and things far stranger and deadlier, and against the others like yourself, that want what you have...
Cataclysm is very different from most roguelikes in many ways. Rather than being set in a vertical, linear dungeon, it is set in an unbounded, 3D world. This means that exploration plays a much bigger role than in most roguelikes, and the game is much less linear. As the map is so huge, it is actually completely persistant between games. If you die, and start a new character, your new game will be set in the same game world as your last. Like in many roguelikes, you will be able to loot the dead bodies of previous characters; unlike most roguelikes, you will also be able to retrace their steps completely, and any dramatic changes made to the world will persist into your next game.
- Website: [en.cataclysmdda.com][9]
- Authors: Kevin Granade
- License: Creative Commons Attribution-ShareAlike 3.0 Unported License
- Version Number: 0.A
--------------------------------------------------------------------------------
via: http://www.linuxlinks.com/article/20140621060017503/9ASCIIGames.html
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://sourceforge.net/apps/trac/unnethack/
[2]:http://www.catb.org/~esr/vms-empire/
[3]:http://mbays.freeshell.org/intricacy/
[4]:http://www.jwm-art.net/dark.php?p=XorCurses
[5]:http://goblinhack.sourceforge.net/
[6]:http://a-nikolaev.github.io/curseofwar/
[7]:https://sites.google.com/site/broguegame/
[8]:http://diablo.chaosforge.org/
[9]:http://en.cataclysmdda.com/

View File

@ -1,144 +0,0 @@
Translating by CHINAANSHE
How To Install Linux On A MacBook Pro Retina
================================================================================
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/linux-macbook-pro-retina-840x420.jpg?ec7b17)
MacBook Pros come with some very nice hardware, but some people want more. Some people want Linux.
Whether youd like a more open and customizable operating system or simply need to dual-boot in order to access certain software, you might want Linux on your MacBook. The thing is, MacBook Pros are also pretty closed-down pieces of hardware that make installing other operating systems difficult Linux more so than Windows. Boot Camp wont help you with Linux, even though it doesnt mean its impossible. Heres how to do it.
### Why Install Linux On A MacBook Pro Retina? ###
The reasoning for installing Linux on a MacBook Pro might seem a bit strange at first isnt OS X one of the main reasons to get a Mac? That might be true, but another great reason to get a Mac is the hardware. They offer excellent performance, superb battery life, and long durability. For the ones with a Retina display, youre also wanting a HiDPI experience for ultra-crisp photos and text.
But if you dont like Mac OS X, or simply need to use Linux, you may want to put another operating system on that Mac hardware. Linux is lean, open, and highly customizable. Who says that you cant bring the two together in a happy marriage? Well, Apple might have a word to say about that, but you probably dont care anyways.
Note: For the purposes of this tutorial, well be using Ubuntu, the [most popular Linux distribution][1], as our preferred choice. Youre free to choose a different distribution, but you can then only follow these steps are generic guidelines and not exact instructions. We claim no responsibility for any damage that is done to your system. Additionally, this tutorial assumes that you want to dual-boot between Linux and Mac OS X. Its recommended to keep Mac OS X on the hard drive so that you can update the firmware if needed — something you cannot do in Linux.
Before we even start with the first step, make sure that your computer is backed up in case anything goes wrong. How you do this is up to you, so feel free to use Time Machine, CrashPlan, or whatever else you might prefer.
### Download Ubuntu ###
First, youll want to get a [copy of the Ubuntu desktop ISO image][2]. Be sure to choose the 64-bit desktop flavor, and not the image made for Macs. The regular image can boot up in BIOS and EFI modes, while the Mac image can only boot up in BIOS mode. This was done on purpose for some Macs, but we want to be able to boot it up in EFI mode.
### Write to USB Drive ###
Next, grab a USB flash drive that is at least 2GB large well use this to boot up the Ubuntu installer on. To make this drive you can follow [the official Ubuntu steps][3], or [use the dedicated GUI tool for the job][4].
### Resize Partitions ###
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_disk_utility.jpg?ec7b17)
nce youve done that, you can get your MacBook Pro ready for the installation. Open up the Disk Utility, click on your hard drive on the left side, and then choose the Partitions tab. Resize the Mac partition to whatever size youd like it to be — well use the newly created free space to install Ubuntu.
### Boot Up Ubuntu Image ###
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_boot.jpg?ec7b17)
After thats completed, plug in the USB flash drive you prepared and restart your MacBook Pro. Be sure to hold down the Options button from when the screen blanks out for a second to when you see a screen with various boot options. Choose the EFI option (the left one in case you see two of them) to boot up your Ubuntu USB flash drive.
When prompted to choose between “Try Ubuntu” and “Install Ubuntu”, choose “Try Ubuntu” because well need to perform a step after the installer completes but before you restart the system.
### Installer ###
Once the Ubuntu desktop loads, start the installer and go through it normally until you reach the partitioning step. If you cannot access WiFi, its because Ubuntu currently doesnt recognize your WiFi chipset. Dont worry we dont need to have Internet access right now, and itll detect the right driver to use whenever you boot up into your new installation later on.
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_installer_partitions.jpg?ec7b17)
Once you come to the partitioning step, choose to “Do something else”. Then, make sure that the small partition thats ~128MB large is recognized as an EFI boot partition (you can check by clicking on it and choosing Options; additionally, that should be /dev/sda1). Next, you can create an ext4 partition in the new space and have the path “/” be mounted to it. You can also create multiple partitions here if you prefer that and know what youre doing.
Before you continue to the next step, make sure that the bootloader installation location says /dev/sda1, as you want GRUB to be installed into that partition. Then, finish off the installation like normal.
### EFI Boot Fix ###
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_efibootmgr.jpg?ec7b17)
When the installer completes, dont restart just yet! We still need to do one more thing so that well be able to use GRUB. Run the following command:
sudo apt-get install efibootmgr
This will temporarily install a configuration tool for EFI boot setups. Next, run
sudo efibootmgr
This will print out the current boot configuration to your screen. In this, you should be able to see “ubuntu” and “Boot0000*”. Currently, the EFI system will point to Boot0080*, which skips GRUB and goes directly to Mac OS X. To fix this, run the command
sudo efibootmgr -o 0,80`
Now you can restart!
Congratulations! Your Ubuntu installation should now be working! However, there are a few tweaks that you can perform to have a better experience.
### Various Tweaks ###
First, youll need to make a quick change to a GRUB setting so that the SSD wont occasionally freeze. Type
sudo nano /etc/default/grub
in a terminal, and then find the line with **GRUB_CMDLINE_LINUX** and change it to **GRUB_CMDLINE_LINUX="libata.force=noncq"**. Hit CTRL+X to save, and Y then Enter to confirm. Then, youll want to type
sudo nano /etc/grub.d/40_custom
into the terminal, which will open up a new file. In it, type this exactly:
menuentry "Mac OS X" {
exit
}
This will allow you to boot into your Mac OS X installation (the 32-bit and 64-bit entries in GRUB do not work). Do the same thing to save and exit, then type in
sudo update-grub
for the changes to go into effect. Finally, restart your system for good measure.
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_small_retina.jpg?ec7b17)
As you can see, everything is ridiculously small on the Retina display. To fix this, System Settings > Display and change the scaling factor to something larger. On the Retina screen, everything will look extremely tiny and it will make your life much more difficult if you dont change it to something you like.
You may also find that its difficult to grab the edges of a window for resizing. This can also be changed. Type
sudo nano /usr/share/themes/Ambiance/metacity-1/metacity-theme-1.xml
into a terminal, and then change these values appropriately:
<distance name="left_width" value="4"/>
<distance name="right_width" value="4"/>
<distance name="bottom_height" value="4"/>
If thats not big enough, you can also change those values to “6″ instead.
Finally, if you experience any washed out colors, you can grab the display color profile from Mac OS X and use it in Ubuntu. Mount your Mac OS X drive and navigate to
/Library/ColorSync/Profiles/Displays/Color LCD-xxxxxx.icc
where xxxxxx is some random string (there should only be one file anyways, but this string gets randomized). Copy it into your Ubuntu home folder, and then go to System Settings > Color and choose Add New Profile and choose the profile you saved in your home folder.
### Conclusion ###
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_final.jpg?ec7b17)
Congratulations! You now have a great working Linux installation on your MacBook Pro Retina! Feel free to make additional tweaks to [make Ubuntu feel more like home][5]. Im sure that these instructions can be applied to other Mac systems, but each new release has its own pitfalls and advantages. If you use a different machine, its a good idea to look up some documentation first, such as [this][6] for Ubuntu.
Additionally, feel free to check out [other great Linux distros][7] that you can install to your Mac!
Have you installed Linux on a Mac? What problems did you encounter and how did you solve it? Let us know in the comments!
Image Credits: [K?rlis Dambr?ns][8] Via Flickr
--------------------------------------------------------------------------------
via: http://www.makeuseof.com/tag/install-linux-macbook-pro/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.makeuseof.com/tag/windows-xp-users-switch-ubuntu-14-04-lts-trusty-tahr/
[2]:http://www.ubuntu.com/download/desktop/
[3]:http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx
[4]:http://www.makeuseof.com/tag/how-to-boot-a-linux-live-usb-stick-on-your-mac/
[5]:http://www.makeuseof.com/tag/11-tweaks-perform-ubuntu-installation/
[6]:https://help.ubuntu.com/community/MacBookPro
[7]:http://www.makeuseof.com/pages/best-linux-distributions
[8]:https://www.flickr.com/photos/janitors/10037346335

View File

@ -1,127 +0,0 @@
jiajia translating...
Cup 2014 Brazil: Watch FIFA World Cup 2014 Competition in Your Linux Desktop
================================================================================
Football is the most played and most watched sports on Earth. The present form of football originated in Britain. Football players run an average of more than six miles during a single match. Over one billion fans watched last world cup football matches on Television. This figure is estimated to rise on an above note, this year.
Yeah! 2014 FIFA World Cup is going to start from 12th of June and will last on 13th of July. This will be the 20th FIFA World Cup, which is scheduled to be played in Brazil. A total of 32 countries are participating in this event.
For the fan-boys of football, here we are going to throw light on an application software called “icup 2014 Brazil”, which will update you with latest scores, keep tracks of the match score of your favourite team. Here in this article we will be discussing its features, usages, installation, etc.
![iCup 2014 Brazil](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014.jpeg)
iCup 2014 Brazil
### What is icup 2014 Brazil? ###
icup 2014 Brazil is an application which is capable of keeping a track of match results of the FIFA world cup 2014 into your Linux desktop, starting shortly.
### Features of icup 2014 Brazil ###
- Adaptive User Interface, i.e., auto-resize of user interface.
- Fast Access to Statistics.
- Social Network Sharing Enabled, which extends to Facebook, Twitter and Google+.
- Latest one is Retina display Support.
- Detailed data with time events and Statistics related to match and Team.
- Audio Kit which comprise of the National-Anthem of all the participating countries (32) in high quality effect along with the stadium background sound which makes the whole thing real.
- An inbuilt calendar with the support of time zone for better understanding of events in local time zone, grouping of data and statistics for real time comparison groupable by day or stage, Graphical 2nd stage table, Result and Scores of Teams in real time.
- Proxy support.
### Platforms and Architecture Supported ###
The application is designed to run on all major platforms including **Mac**, **Windows** and **Linux**. For the point of Linux, it is important to mention that the application is designed for **x86** processor only. However installing an **x86** application on **x86_64** architecture is possible. We have to tweak a little to make it work **x86_64** systems.
#### An insight of the Technical Specification on different Platforms ####
- Live Result, Calendar, Grouping of Data, 2nd stage Table, Social Network Linking and Multi-language support Available for all supported platform.
- Retina Display No support in Windows and Linux, however supported in Mac OS.
- Detailed Statistics Supported in Linux. Donation-ware for Windows and Mac.
- Audio Kit Supported in Mac and Linux. Unknown for Windows.
**Important**: As visible in the above specification, some of the features like detailed specification are not available on platform other than Linux, for free. It is just to support Server and Bandwidth cost. For a Linux user, nothing needs to be cared about as far as detailed statistics are concerned, a proud moment.
### Installing iCup 2014 Brazil in Linux ###
First go to official [iCup 2014 Brazil download][1] page and download application according to your platform and architecture.
#### On 32-Bit System ####
# cd Downloads/
# tar xvf iCup_2014_FREE-Brazil_1.1_linux.tar.bz2
# cd iCup\ 2014\ FREE\ -\ Brazil\ 1.1/
# chmod 755 iCup\ 2014\ FREE\ -\ Brazil
As I said above, this application is designed for x86 systems only. In order to Install a 32 bit application on 64 bit architecture, we need to prepare our system by installing some packages **GTK+2** and **libstdc++.so.6**.
Well not for this Application only, but there are a whole lot of application in Linux which is not supported in 64-bit e.g., **Skype**. We need to build our System to install those applications.
#### On 64-Bit Systems ####
Install **GTK+2** and **libstdc++so.6**, using apt or yum command as shown below.
$ sudo apt-get install libgtk2.0-0 libstdc++6 [on Debian based systems]
If you get any dependency error, run the following command to resolve those dependencies
$ sudo apt-get -f install
----------
# yum install gtk2 libstdc++ [on RedHat based systems]
Once all the required packages are installed. Now the System is capable of running 32 bit applications on 64-bit systems, now go the directory where youve downloaded **iCup 2014 Brazil** package and run the following commands to install it.
# cd Downloads/
# tar xvf iCup_2014_FREE-Brazil_1.1_linux.tar.bz2
# cd iCup\ 2014\ FREE\ -\ Brazil\ 1.1/
# chmod 755 iCup\ 2014\ FREE\ -\ Brazil
Next, move to the directory and double click the executable to start the application. In the below screen-shot you may not get the full information since the FIFA 2014 has not started till now. Although the glimpse of what we can get once the event starts.
![iCup Brazil 2014](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-01-620x437.jpeg)
iCup Brazil 2014
No detailed Information : World cup hasnt started Yet.
![Match Detailed Information](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-02-620x439.jpeg)
Match Detailed Information
Groups and Teams
![Groups and Teams](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-03-620x439.jpeg)
Groups and Teams
2nd stage Detailed Information
![2nd stage Detailed Information](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-04-620x438.jpeg)
2nd stage Detailed Information
Match Details. Seems incomplete now.
![Match Summary](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-05-620x440.jpeg)
Match Summary
Language Change window and Social share button Integrated.
![Language Change](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-06-620x440.jpeg)
Language Change
Donation is optional for Linux. You can always contribute.
![Donation](http://www.tecmint.com/wp-content/uploads/2014/06/Football-World-Cup-2014-07-620x435.jpeg)
Donation
### Conclusion ###
The above Application seems promising and may prove to be a boon for those Football fan-wall who can now remain connected.
Thats all for now. Ill be here again with another interesting article soon. In that mean keep connected to Tecmint.com. Dont forget to provide us with your valuable feedback in the comment section below.
--------------------------------------------------------------------------------
via: http://www.tecmint.com/view-fifa-world-cup-matche-results/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.e-link.it/icup/brazil2014/icup-brazil-2014-desktop-app.php

View File

@ -1,3 +1,6 @@
>>chenguang is translating it
How to Rescue a Non-booting GRUB 2 on Linux
================================================================================
![Figure 1: GRUB 2 menu with cool Apollo 17 background.](http://www.linux.com/images/stories/41373/grub-command-shell.jpg)
@ -125,4 +128,4 @@ via: http://www.linux.com/learn/tutorials/776643-how-to-rescue-a-non-booting-gru
[1]:http://www.linux.com/learn/tutorials/730440-using-the-new-guid-partition-table-in-linux-good-bye-ancient-mbr-
[2]:http://www.supergrubdisk.org/
[3]:https://www.gnu.org/software/grub/manual/grub.html
[3]:https://www.gnu.org/software/grub/manual/grub.html

View File

@ -1,301 +0,0 @@
20 things to do after installing Linux Mint 17 Qiana Cinnamon
================================================================================
### Linux Mint 17 Qiana Cinnamon ###
Linux Mint 17 has been [released][1] and is named Qiana. Mint is one of the best linux distros that targets desktop users with focus on usability and simplicity. It comes in various flavors with different desktop environments like Mate and Cinnamon and different base distros like Ubuntu or Debian.
In this post we are playing with the cinnamon edition of Linux Mint 17. More information about the Cinnamon edition (including download links) can be found at - [http://blog.linuxmint.com/?p=2626][2]
Download the correct iso (32bit or 64bit) for your system, burn to a dvd or write to a usb drive and boot in. Once you install completes, its time to charge up the system with some tweaks and essential apps to get the best performance and experience.
### 1. Update the system ###
The first thing to do always is to make the system up-to-date. Run the following commands in a terminal.
$ sudo apt-get update
$ sudo apt-get upgrade
Or use the Update Manager (mintUpdate) that can be found in Menu > Administration.
![linux mint 17 qiana](http://www.binarytides.com/blog/wp-content/uploads/2014/06/linux-mint-17-qiana.png)
### 2. Get old wallpapers ###
Every release of Linux Mint comes with a new set of nice wallpapers. But you can also install wallpapers from the previous versions.
$ sudo apt-get install mint-backgrounds-*
### 3. Get more browsers ###
Linux Mint 17 has firefox installed by default. You can get more browsers like Chromium and Google Chrome.
The chromium browser is available in the repositories.
$ sudo apt-get install chromium-browser
For Google Chrome visit google.com/chrome and download the deb files and install them using gdebi.
Or run the following commands
# 64 bit
$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
$ sudo gdebi google-chrome-stable_current_amd64.deb
# 32 bit
$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb
$ sudo gdebi google-chrome-stable_current_i386.deb
### 4. Install Flash Player ###
The adobe flash plugin package (adobe-flashplugin) is installed by default on Mint so should be able to play flash games and videos inside Firefox.
Google Chrome now uses the Pepper API based flash player which comes inbuilt with it, so you don't need to do anything for Chrome either.
For Chromium however, the Pepper based flash player is not included (being a non-free component) and has to be installed manually.
Install the following package to install the pepper flash player for Chromium. It will download the pepper flash player from Google Chrome browser and put it inside Chromium.
$ sudo apt-get install pepperflashplugin-nonfree
The above command should setup the flash player in Chromium. Incase it fails to download, redo the process with the following command
$ sudo dpkg-reconfigure pepperflashplugin-nonfree
### 5. Install multimedia codecs ###
The restricted extras package would install most of the essential codecs for playing formats like mp3. It would also install the microsoft fonts.
$ sudo apt-get install ubuntu-restricted-extras
To enable playback of encrypted dvds, install the following package.
$ sudo apt-get install libdvdread4
$ sudo /usr/share/doc/libdvdread4/install-css.sh
### 6. Install proprietory drivers ###
If you are having an nvidia or ati graphics card or broadcom wireless card, then install the proprietory drivers provided by the vendor. These drivers would get you the best hardware performance.
For installing nvidia drivers you can follow the previous post here
How to install the latest Nvidia drivers on Linux Mint
### 7. Install Dropbox ###
Linux mint repository already has the package for dropbox client, so you need not go elsewhere.
$ sudo apt-get install dropbox python-gpgme
If you still prefer to download dropbox from the official website then head straigh to [https://www.dropbox.com/install?os=lnx][4] and follow the instructions and download the deb installers for Ubuntu.
Copy is another cloud storage solution that has a native Linux client. Check it out at [copy.com][5]. It also has a [ppa repository][6].
### 8. Skype ###
Skype is available in the Ubuntu canonical partner repositories.
$ sudo apt-get install skype
### 9. Install rar and other archiving utilities ###
To be able to create rar archives from the context menu in file managers like Nemo, install the rar utility. Along with rar, install a few more packages to add support for other archive formats.
$ sudo apt-get install unace p7zip-rar sharutils rar arj lunzip lzip
### 10. Install a clipboard manager ###
Clipboard managers allow you to maintain and access history of items that you copied in the past using Ctrl+C for example. There are many clipboard managers for gnome like diodon, clipit, glipper, parcellite.
Diodon seemd to have some issues on the cinnamon desktop, that scrollers would appear as the history list grows. Clipit and Glipper worked very well. You can install either
$ sudo apt-get install glipper
# or
$ sudo apt-get install clipit
Then launch them from the Application menu and they should start everytime you login.
### 11. Tweak the desktop ###
#### 1. Fix the date format on the system tray ####
The time applet at the bottom right shows only the time. It can be made to show the date as well. Right click the date-time applet on the bottom right and click Configure
Check the box labelled "Use a custom date format" and fill in
%B %e, %I:%M %p
This would show the month name, date and time in 12 hour format with AM/PM
#### 2. Install Themes, Extensions, Applets, Desklets ####
Get some goodies for your desktop. You have desklets for the desktop area, applets for the panel, extensions for desktop effects and themes for the desktop design.
Go to system settings, click on the specific icon and you would see a list to select from. Click the "Get more online" tab to download more such goodies.
#### 3. Change Firefox search engine ####
You might notice that Firefox has the Yahoo search engine selected by default and the search engine list does not have Google in it. Click "Manage Search Engines" > Get more search engines. It will take you to [http://www.linuxmint.com/searchengines.php][7].
Scroll down to the section of commercial search engines and find the Google logo and click on it. Once you are on the next page, click on the search engine list again and this time you would see an option "Add Google". Click on it and Google search engine would be available.
### 12. Optimise font rendering ###
Linux mint uses the Dejavu Sans fonts by default, which look very ordinary. You can get far more good looking fonts using the Droid and Noto fonts. Following our previous tutorial for step by step instructions on how to do it.
[How to get gorgeous looking fonts on Linux Mint][8]
### 13. Guake dropdown terminal ###
Dropdown terminals allow you to access terminals at the press of a single key. Guake is one such dropdown terminal for gtk based desktops. Dropdown terminals show/hide upon request and keep running so you do not need to open the terminal from the menu or launcher.
This is a must have tool for terminal addicts
$ sudo apt-get install guake
Guake needs to be configured to start everytime on Logon. First find out the path to the guake command.
$ which guake
/usr/bin/guake
Now add it to the list of startup applications. Go to system settings > startup programs and click Add. Fill the dialog
> Name - Guake dropdown terminal
> Command - /usr/bin/guake
Click Add. Now Guake is in the list of running applications and would start automatically everytime.
### 14. Uget download manager ###
Uget is a simple and robust cross platform download manager and works very well on Linux. It lacks the ability to download files in multiple parts, but is still a very stable download manager.
$ sudo apt-get install uget
### 15. Deluge BitTorrent client ###
Linux Mint comes with Transmission which is a simple and efficient torrent client. If you are looking for a more featureful torrent client, than you can try out the deluge or vuze (formerly azureus), or qbittorrent.
$ sudo apt-get install deluge-torrent
### 16. Hardinfo - System information tool ###
Hardinfo is a very convenient gui tool that reports a whole lot of information about various hardware parts on your system. You can check information about processor, memory, storage device, network configuration, printers, usb devices, sound/video adapters etc all in one place. It also has features to test and measure the performance of your system
$ sudo apt-get install hardinfo
17. Install MATE desktop environment
Apart from Cinnamon the other popular desktop environment that comes with Linux Mint is the MATE (Maatay) desktop. Install it if you want to try it.
$ sudo apt-get install mint-meta-mate
Now you can select the MATE session at the login screen.
### 18. Make other partitions writable ###
If you have other ext partitions, to store and backup files for example, then you need to make them writable to avoid using root privileges every time.
First open the partition mount directory in a file manager using gksudo.
$ gksudo nemo
Navigate to the partition directory. Right click and go to Properties > Permissions tab
Give "Folder access" - create and delete files to owner, group and others
Give "File access - read and write to owner, group and others.
For Ntfs partitions you do not need to do this.
### 19. Install Conky ###
Conky is a lightweight system monitor that displays statistics about various system resources like cpu, memory, network etc on the desktop using graphical widgets. Its not a necessary thing, but gets you some eye candy for the desktop.
$ sudo apt-add-repository -y ppa:teejee2008/ppa
$ sudo apt-get update
$ sudo apt-get install conky-manager
Launch Conky Manager from the applications menu and add widgets to the desktop. Also check the option to start Conky on system startup.
### 20. Install some games ###
Linux does have some cool games that are quite entertaining and yet free. Note that some of these games like supertuxkart and 0ad require dedicated graphics processors for optimal performance.
# 0ad - strategy game like age of empires
$ aptitude search 0ad
# supertuxkart - car racing game
$ aptitude search supertuxkart
# openarena
$ aptitude search openarena
There are a lot more games in the repository that you can install. Alien arena, secret maryo chronicles, supertux, frozen bubbles etc.
### Cleanup ###
After everything, cleanup the system by removing unnecessary packages.
$ sudo apt-get autoremove
### Notes ###
#### Support for Java applets on Google Chrome/Chromium ####
The "icedtea-plugin" is already installed which enables firefox to play java applets.
However Chrome and Chromium no longer support NPAPI based plugins. So java applets would not work in those browsers till a Pepper api based java plugin is available. More information [here][9].
#### More applications ####
If you are looking for still more applications for your Mint box, then here a small list of more good apps. All of them can be installed from Software Manager.
Opera - Web browser
Gnome Encfs Manager - Manager files and folders encrypted with Encfs
Smplayer - Multimedia player
Rhythmbox, Clementine - Music players
Openshot, Kdenlive - Video editor
Audacity - Audio editor
Inkscape - Graphics and image editing
Gparted - Partition editor
Gufw - Firewall configuration tool
qBittorrent, Vuze - Torrent clients
Gwenview - Image viewing
Team viewer - remote desktop
Tv-maxe - view tv channels
Grub Customizer - Modify GRUB boot menu settings
Linrunner TLP - Power management tool. Useful to save power on laptops
Virtualbox - Virtualization
Kazam, recordMyDesktop - Desktop recording/screencasting
Bleachbit - Free disk space by deleting old/temporary files.
Cheese - Take pictures using webcam
Shutter - Screenshot tool with loads of features
So grab your favorite ones and enjoy Linux Mint !!
### Resources ###
Download latest Linux Mint
[http://www.linuxmint.com/download.php][10]
Community Tutorials
[http://community.linuxmint.com/tutorial][11]
Linux Mint forums
[http://forums.linuxmint.com/][12]
--------------------------------------------------------------------------------
via: http://www.binarytides.com/better-linux-mint-17-cinnamon/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://blog.linuxmint.com/?p=2626
[2]:http://blog.linuxmint.com/?p=2626
[3]:http://www.binarytides.com/install-nvidia-drivers-linux-mint-16/
[4]:http://www.dropbox.com/install?os=lnx
[5]:http://copy.com/?r=DSwtSd
[6]:http://launchpad.net/~paolorotolo/+archive/copy
[7]:http://www.linuxmint.com/searchengines.php
[8]:http://www.binarytides.com/optimize-fonts-linux-mint/
[9]:http://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1309508
[10]:http://www.linuxmint.com/download.php
[11]:http://community.linuxmint.com/tutorial
[12]:http://forums.linuxmint.com/

View File

@ -0,0 +1,203 @@
translating by johnhoow...
给linux用户的11个高级MySQL数据库面试问题和答案
================================================================================
我们已经发表了两篇MySQL的文章,非常感谢Tecmint社区的大力支持.这是MySQL面试系列的第三篇文章,并且在面试专栏中排第16.
- [15个基本的MySQL面试问题][1]
- [给中级人员的10个MySQL面试问题][1]
![11个MySQL面试问题](http://www.tecmint.com/wp-content/uploads/2014/06/MySQL-Interview-Questions.jpeg)
感谢你们这一路上对我们的支持.这篇文章主要针对MySQL的实用性,讲面试方面的问题.
### 1. 如何使用SELECT语句找到你正在运行的服务器的版本并打印出当前数据库的名称? ###
**答案**:下面的语句的结果会显示服务器的版本和当前的数据库名称
mysql> SELECT VERSION(), DATABASE();
+-------------------------+------------+
| VERSION() | DATABASE() |
+-------------------------+------------+
| 5.5.34-0ubuntu0.13.10.1 | NULL |
+-------------------------+------------+
1 row in set (0.06 sec)
在Database一栏中显示**NULL**是因为我们当前没有选择任何数据库.因此,使用下面的语句先选择一个数据库,就能看到相应的结果.
mysql> use Tecmint;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
----------
mysql> select VERSION(), DATABASE();
+-------------------------+------------+
| VERSION() | DATABASE() |
+-------------------------+------------+
| 5.5.34-0ubuntu0.13.10.1 | tecmint |
+-------------------------+------------+
1 row in set (0.00 sec)
### 2. 使用非运算符(!)从表"Tecmint"中列出除了user等于"SAM"的所有记录
**答案**:使用下面的语句
mysql> SELECT * FROM Tecmint WHERE user !=SAM;
+---------------------+---------+---------+---------+---------+-------+
| date | user | host | root | local | size |
+---------------------+---------+---------+---------+---------+-------+
| 2001-05-14 14:42:21 | Anthony | venus | barb | venus | 98151 |
| 2001-05-15 08:50:57 | TIM | venus | phil | venus | 978 |
+---------------------+---------+---------+---------+---------+-------+
### 3. 是否能够使用非运算符(!)来实现'AND'运算
**答案**: The AND operator is used when we use (=) and the operator OR is used when we use (!=). An example of (=) with AND Operator.
**答案**:
mysql> SELECT * FROM mail WHERE user = SAM AND root = phil
An Example of (!=) with OR Operator.
mysql> SELECT * FROM mail WHERE user != SAM OR root != phil
+---------------------+---------+---------+---------+---------+-------+
| date | user | host | root | local | size |
+---------------------+---------+---------+---------+---------+-------+
| 2001-05-14 14:42:21 | Anthony | venus | barb | venus | 98151 |
+---------------------+---------+---------+---------+---------+-------+
- = : means Equal to
- != : Not Equal to
- ! : represents NOT Operator
The AND & OR are treated as joining operators in MySQL.
### 4. What IFNULL() statement is used for in MySQL? ###
**Ans**: The Query in MySQL can be written precisely using **IFNULL()** statement. The IFNULL() statement test its first argument and returns if its not NULL, or returns its second argument, otherwise.
mysql> SELECT name, IFNULL(id,'Unknown') AS 'id' FROM taxpayer;
+---------+---------+
| name | id |
+---------+---------+
| bernina | 198-48 |
| bertha | Unknown |
| ben | Unknown |
| bill | 475-83 |
+---------+---------+
### 5. You want to see only certain rows from a result set from the beginning or end of a result set. How will you do it? ###
**Ans**: We need to use **LIMIT** clause along with ORDER BY to achieve the above described scenario.
#### Show 1 Record ####
mysql> SELECT * FROM name LIMIT 1;
+----+------+------------+-------+----------------------+------+
| id | name | birth | color | foods | cats |
+----+------+------------+-------+----------------------+------+
| 1 | Fred | 1970-04-13 | black | lutefisk,fadge,pizza | 0 |
+----+------+------------+-------+----------------------+------+
#### Show 5 Record ####
mysql> SELECT * FROM profile LIMIT 5;
+----+------+------------+-------+-----------------------+------+
| id | name | birth | color | foods | cats |
+----+------+------------+-------+-----------------------+------+
| 1 | Fred | 1970-04-13 | black | lutefisk,fadge,pizza | 0 |
| 2 | Mort | 1969-09-30 | white | burrito,curry,eggroll | 3 |
| 3 | Brit | 1957-12-01 | red | burrito,curry,pizza | 1 |
| 4 | Carl | 1973-11-02 | red | eggroll,pizza | 4 |
| 5 | Sean | 1963-07-04 | blue | burrito,curry | 5 |
+----+------+------------+-------+-----------------------+------+
----------
mysql> SELECT * FROM profile ORDER BY birth LIMIT 1;
+----+------+------------+-------+----------------+------+
| id | name | birth | color | foods | cats |
+----+------+------------+-------+----------------+------+
| 9 | Dick | 1952-08-20 | green | lutefisk,fadge | 0 |
+----+------+------------+-------+----------------+------+
### 6. Oracle Vs MySQL. Which one and Why? ###
**Ans**: Well both has its advantages and disadvantages. As a matter of time I prefer MySQL.
#### Reason for Selection MySQL Over oracle ####
- Mysql is FOSS.
- MySQL is portable.
- MYSQL supports both GUI as well as Command Prompt.
- MySQL Administration is supported over Query Browser.
### 7. How will you get current date in MySQL? ###
**Ans**: Getting current date in MySQL is as simple as executing the below SELECT Statement.
mysql> SELECT CURRENT_DATE();
+----------------+
| CURRENT_DATE() |
+----------------+
| 2014-06-17 |
+----------------+
### 8. How will you export tables as an XML file in MySQL? ###
**Ans**: We use -e (export) option to export MySQL table or the whole database into an XML file. With large tables we may need to implement it manually but for small tables, applications like phpMyAdmin can do the job.
A native command of MySQL can do it.
mysql -u USER_NAME xml -e 'SELECT * FROM table_name' > table_name.xml
Where USER_NAME is username of Database, table_name is the table we are exporting to XML and table_name.xml is the xml file where data is stored.
### 9. What is MySQL_pconnect? And how it differs from MySQL_connect? ###
**Ans**: MySQL_pconnect() opens a connection that is persistent to the MySQL Database which simply means that the database is not opened every-time the page loads and hence we can not use MySQL_close() to close a persistent connection.
A brief difference between MySQL_pconnect and MySQL_connect are.
Unlike MySQL_pconnect, MySQL_connect Opens the Database every-time the page is loaded which can be closed any-time using statement MySQL_close().
### 10. You need to show all the indexes defined in a table say user of Database say mysql. How will you achieve this? ###
**Ans**: The following command will show all the indexes of a table user.
mysql> show index from user;
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| user | 0 | PRIMARY | 1 | Host | A | NULL | NULL | NULL | | BTREE | | |
| user | 0 | PRIMARY | 2 | User | A | 4 | NULL | NULL | | BTREE | | |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
2 rows in set (0.00 sec)
### 11. What are CSV tables? ###
**Ans**: CSV stands for Comma-Separated Values aka Character-Separated Values. CSV table stores data in plain text and tabular format. It typically contains one record per line.
Each record is separated by specific delimiters (Comma, Semi-colon, …) where each record has same sequence of field. CSV tables are most widely used to store phone contacts to Import and Export and can be used to store any sort of plain text data.
Thats all for now. Ill be here again with another Interesting article, you people will love to read. Till then stay tuned and connected to Tecmint and Dont forget to provide us with your valuable feedback in the comment section below.
--------------------------------------------------------------------------------
via: http://www.tecmint.com/mysql-advance-interview-questions/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.tecmint.com/basic-mysql-interview-questions-for-database-administrators/
[2]:http://www.tecmint.com/10-mysql-database-interview-questions-for-beginners-and-intermediates/

View File

@ -0,0 +1,159 @@
[Translating] --213edu
How to enable testing and unstable repository on Debian
================================================================================
Testing/Unstable sources
The testing and unstable repositories of Debian provide with a higher version of software applications than what is present in the stable repository. Note that these names are actually aliases such that the stable repository points to the current Debian stable release and the Testing repository is what is going to be part of the next Debian stable release. So at the time of this post, Wheezy 7.x is the Stable release and Jessie is the Testing source which is going to be the next stable release.
At times, when you need to get a more recent version of a particular application, then the testing/unstable repository is a good option. I had the task of installing Apache 2.4.x onto a Debian wheezy system. But the repo had only 2.2.x and the testing repo had the required 2.4.x version. So the solution is to grab it from the testing repo.
Most of the time, when looking for newer versions of software applications, we would fiddle with the "Testing" repository only.
This post is going to show you how to setup the Testing and Unstable sources on a Debian system and how to install software from them, without breaking your existing system.
> Stable < Testing < Unstable
> Wheezy < Jessie < Sid
### 1. Setup the apt sources for testing/unstable repo ###
The first step is to add the testing/unstable sources to your sources.list file. The /etc/apt/sources.list file on a Debian wheezy system looks something like this by default.
$ cat /etc/apt/sources.list
----------
...
deb http://security.debian.org/ wheezy/updates main
deb http://http.us.debian.org/debian/ wheezy main
deb-src http://security.debian.org/ wheezy/updates main
...
Note down the url of the repository server - http://http.us.debian.org/debian/
This repository server is a mirror that is located nearest to you. It shall be different in your sources.list file. The same shall be used in the next steps
To add the testing and unstable sources you need to add something like this to your sources.list file
# Testing repository - main, contrib and non-free branches
deb http://http.us.debian.org/debian testing main non-free contrib
deb-src http://http.us.debian.org/debian testing main non-free contrib
# Testing security updates repository
deb http://security.debian.org/ testing/updates main contrib non-free
deb-src http://security.debian.org/ testing/updates main contrib non-free
# Unstable repo main, contrib and non-free branches, no security updates here
deb http://http.us.debian.org/debian unstable main non-free contrib
deb-src http://http.us.debian.org/debian unstable main non-free contrib
The format is
deb <respository server/mirror> <repository name> <sub branches of the repo>
Instead of testing/unstable the corresponding codenames jessie and sid can also be used
deb http://http.us.debian.org/debian jessie main non-free contrib
deb http://security.debian.org/ jessie/updates main contrib non-free
deb http://http.us.debian.org/debian sid main non-free contrib
### 2. Do some apt pinning - Important ! ###
> After adding the testing and unstable repos, if you update the system then all available updates for all installed applications would be installed right away, leading the system to an unpredictable state.
Therefore some rules have to be setup in order to restrict the package selection during regular updates/upgrades.
This is done through "apt pinning" where we tell the apt system to use only the stable system as always, but we may select to install a particular package from the testing or unstable repository if we wish to.
The apt pinning preferences can be configured into either of the following 2 files.
/etc/apt/preferences
OR
/etc/apt/preferences.d/my_preferences
Open either of the 2 locations (create one if it does not exist) and fill the following into the file
Package: *
Pin: release a=stable
Pin-Priority: 700
Package: *
Pin: release a=testing
Pin-Priority: 650
Package: *
Pin: release a=unstable
Pin-Priority: 600
Mentioned earlier, stable will point to your current debian version, testing to the next, and unstable would be further away in future. Main thing to note is the priority. The stable/current version has been given the highest priority which means that for regular tasks apt-get will install packages only from the current stable repository (wheezy in this case).
#### Update the package cache ####
After adding the new repository and specify the pinning rules, update the package cache.
$ sudo apt-get update
#### Confirm the apt policy ####
We must ensure that the pinning configuration is correct and that the priorities are met correctly. Check the effective apt policy with the apt-cache command
$ apt-cache policy apache2
apache2:
Installed: (none)
Candidate: 2.2.22-13
Version table:
2.4.7-1 0
600 http://http.us.debian.org/debian/ unstable/main amd64 Packages
2.4.6-3 0
650 http://http.us.debian.org/debian/ testing/main amd64 Packages
2.2.22-13 0
700 http://http.us.debian.org/debian/ wheezy/main amd64 Packages
The above output confirms that version 2.2.22 ( the wheezy main/stable ) repository is selected, its on highest priority.
### 3. Install apps from testing/unstable source ###
Now its time to pick a particular package out from the testing or unstable repo and install it. So lets say we want to install apache2 from testing source.
There are 2 ways to do it and each has a different effect.
#### Method 1 ####
# apt-get install apache2/testing
The above command will install the apache2 package from the testing source and install dependencies from stable source (or whatever the apt policy holds). This command fail in situations where the dependencies are outdated compared to what the installation package (apache2) needs.
#### Method 2 ####
# apt-get -t testing install apache2
The above command will install apache2 from testing source and install all dependencies from testing source as well. This should work better than the above command.
So to install newer version of any package, simply head towards the testing/unstable sources and enjoy. Note that the priority numbers are not just plain numbers, but have special meanings. Check the man page on apt preferences to learn more about them
$ man 5 apt_preferences
### Summary ###
Using the testing/unstable repository with pinning is an easy way to get newer versions of packages, but it is not recommended. If done wrong, it can mess up the system by pulling packages from different branches that may not be compatible.
A more recommended method to install updated packages is using the backports repository. It provides newer versions of selected packages from testing/unstable repo, but compiled for the current stable version. So on debian wheezy you can use wheezy-backports repository. Check out http://backports.debian.org/ for more information.
### Resources ###
- [https://wiki.debian.org/AptPreferences][1]
- [https://wiki.debian.org/DebianTesting][2]
- [https://www.debian.org/security/][3]
--------------------------------------------------------------------------------
via: http://www.binarytides.com/enable-testing-repo-debian/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://wiki.debian.org/AptPreferences
[2]:http://wiki.debian.org/DebianTesting
[3]:http://www.debian.org/security/

View File

@ -0,0 +1,190 @@
hyaocuk is translating
10 Tips to Push Your Git Skills to the Next Level
================================================================================
Recently we published a couple of tutorials to get you familiar with [Git basics][1] and [using Git in a team environment][2]. The commands that we discussed were about enough to help a developer survive in the Git world. In this post, we will try to explore how to manage your time effectively and make full use of the features that Git provides.
> Note: Some commands in this article include part of the command in square brackets (e.g. `git add -p [file_name]`). In those examples, you would insert the necessary number, identifier, etc. without the square brackets.
### 1. Git Auto Completion ###
If you run Git commands through the command line, its a tiresome task to type in the commands manually every single time. To help with this, you can enable auto completion of Git commands within a few minutes.
To get the script, run the following in a Unix system:
cd ~
curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
Next, add the following lines to your ~/.bash_profile file:
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
Although I have mentioned this earlier, I can not stress it enough: If you want to use the features of Git fully, you should definitely shift to the command line interface!
### 2. Ignoring Files in Git ###
Are you tired of compiled files (like `.pyc`) appearing in your Git repository? Or are you so fed up that you have added them to Git? Look no further, there is a way through which you can tell Git to ignore certain files and directories altogether. Simply create a file with the name `.gitignore` and list the files and directories that you dont want Git to track. You can make exceptions using the exclamation mark(!).
*.pyc
*.exe
my_db_config/
!main.pyc
### 3. Who Messed With My Code? ###
Its the natural instinct of human beings to blame others when something goes wrong. If your production server is broke, its very easy to find out the culprit — just do a `git blame`. This command shows you the author of every line in a file, the commit that saw the last change in that line, and the timestamp of the commit.
git blame [file_name]
![git blame demonstration](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946443git-ninja-01.png)
And in the screenshot below, you can see how this command would look on a bigger repository:
![git blame on the ATutor repository](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946441git-ninja-02.png)
### 4. Review History of the Repository ###
We had a look at the use of `git log` in a previous tutorial, however, there are three options that you should know about.
- **--oneline** Compresses the information shown beside each commit to a reduced commit hash and the commit message, all shown in a single line.
- **--graph** This option draws a text-based graphical representation of the history on the left hand side of the output. Its of no use if you are viewing the history for a single branch.
- **--all** Shows the history of all branches.
Heres what a combination of the options looks like:
![Use of git log with all, graph and oneline](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946444git-ninja-03.png)
### 5. Never Lose Track of a Commit ###
Lets say you committed something you didnt want to and ended up doing a hard reset to come back to your previous state. Later, you realize you lost some other information in the process and want to get it back, or at least view it. This is where `git reflog` can help.
A simple `git log` shows you the latest commit, its parent, its parents parent, and so on. However, `git reflog` is a list of commits that the head was pointed to. Remember that its local to your system; its not a part of your repository and not included in pushes or merges.
If I run `git log`, I get the commits that are a part of my repository:
![Project history](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946446git-ninja-04.png)
However, a `git reflog` shows a commit (`b1b0ee9` `HEAD@{4}`) that was lost when I did a hard reset:
![Git reflog](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946447git-ninja-05.png)
### 6. Staging Parts of a Changed File for a Commit ###
It is generally a good practice to make feature-based commits, that is, each commit must represent a feature or a bug fix. Consider what would happen if you fixed two bugs, or added multiple features without committing the changes. In such a situation situation, you could put the changes in a single commit. But there is a better way: Stage the files individually and commit them separately.
Lets say youve made multiple changes to a single file and want them to appear in separate commits. In that case, we add files by prefixing `-p` to our add commands.
git add -p [file_name]
Lets try to demonstrate the same. I have added three new lines to `file_name` and I want only the first and third lines to appear in my commit. Lets see what a `git diff` shows us.
![Changes in repo](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946449git-ninja-06.png)
And lets see what happes when we prefix a `-p` to our `add` command.
![Running add with -p](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946450git-ninja-07.png)
It seems that Git assumed that all the changes were a part of the same idea, thereby grouping it into a single hunk. You have the following options:
- Enter y to stage that hunk
- Enter n to not stage that hunk
- Enter e to manually edit the hunk
- Enter d to exit or go to the next file.
- Enter s to split the hunk.
In our case, we definitely want to split it into smaller parts to selectively add some and ignore the rest.
![Adding all hunks](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946452git-ninja-08.png)
As you can see, we have added the first and third lines and ignored the second. You can then view the status of the repository and make a commit.
![Repository after selectively adding a file](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946454git-ninja-09.png)
### 7. Squash Multiple Commits ###
When you submit your code for review and create a pull request (which happens often in open source projects), you might be asked to make a change to your code before its accepted. You make the change, only to be asked to change it yet again in the next review. Before you know it, you have a few extra commits. Ideally, you could squash them into one using the rebase command.
git rebase -i HEAD~[number_of_commits]
If you want to squash the last two commits, the command that you run is the following.
git rebase -i HEAD~2
On running this command, you are taken to an interactive interface listing the commits and asking you which ones to squash. Ideally, you `pick` the latest commit and `squash` the old ones.
![Git squash interactive](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946455git-ninja-10.png)
You are then asked to provide a commit message to the new commit. This process essentially re-writes your commit history.
![Adding a commit message](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946457git-ninja-11.png)
### 8. Stash Uncommitted Changes ###
Lets say you are working on a certain bug or a feature, and you are suddenly asked to demonstrate your work. Your current work is not complete enough to be committed, and you cant give a demonstration at this stage (without reverting the changes). In such a situation, `git stash` comes to the rescue. Stash essentially takes all your changes and stores them for further use. To stash your changes, you simply run the following-
git stash
To check the list of stashes, you can run the following:
git stash list
![Stash list](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946458git-ninja-12.png)
If you want to un-stash and recover the uncommitted changes, you apply the stash:
git stash apply
In the last screenshot, you can see that each stash has an indentifier, a unique number (although we have only one stash in this case). In case you want to apply only selective stashes, you add the specific identifier to the apply command:
git stash apply stash@{2}
![After un-stashing changes](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946461git-ninja-13.png)
### 9. Check for Lost Commits ###
Although `reflog` is one way of checking for lost commits, its not feasible in large repositories. That is when the `fsck` (file system check) command comes into play.
git fsck --lost-found
![Git fsck results](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946463git-ninja-14.png)
Here you can see a lost commit. You can check the changes in the commit by running git show [commit_hash] or recover it by running `git merge [commit_hash]`.
`git fsck` has an advantage over `reflog`. Lets say you deleted a remote branch and then cloned the repository. With `fsck` you can search for and recover the deleted remote branch.
### 10. Cherry Pick ###
I have saved the most elegant Git command for the last. The `cherry-pick` command is by far my favorite Git command, because of its literal meaning as well as its utility!
In the simplest of terms, `cherry-pick` is picking a single commit from a different branch and merging it with your current one. If you are working in a parallel fashion on two or more branches, you might notice a bug that is present in all branches. If you solve it in one, you can cherry pick the commit into the other branches, without messing with other files or commits.
Lets consider a scenario where we can apply this. I have two branches and I want to cherry-pick the commit `b20fd14: Cleaned junk` into another one.
![Before cherry pick](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946465git-ninja-15.png)
I switch to the branch into which I want to cherry-pick the commit, and run the following:
git cherry-pick [commit_hash]
![After cherry pick](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/06/1402946467git-ninja-16.png)
Although we had a clean `cherry-pick` this time, you should know that this command can often lead to conflicts, so use it with care.
### Conclusion ###
With this, we come to the end of our list of tips that I think can help you take your Git skills to a new level. Git is the best out there and it can accomplish anything you can imagine. Therefore, always try to challenge yourself with Git. Chances are, you will end up learning something new!
--------------------------------------------------------------------------------
via: http://www.sitepoint.com/10-tips-git-next-level/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.sitepoint.com/git-for-beginners/
[2]:http://www.sitepoint.com/getting-started-git-team-environment/

View File

@ -0,0 +1,91 @@
Advanced Directory Navigations Tips and Tricks in Linux
================================================================================
Directory navigation is one of the most basic concepts when it comes to understanding any command line system. Although its not a very difficult thing to understand when it comes to Linux, there are certain tips and tricks that can enhance your experience, and help you do things faster. In this article, we will discuss some advanced directory navigation tips.
### The Stuff We Already Know ###
Before jumping on to the advanced concepts, here is the basics of directory navigation that the article expects its readers to know:
- pwd command is used to display the current working directory.
- cd command is used to change the current working directory.
- cd followed by space and followed by a couple of periods (cd ..) brings the control back to the parent directory
- cd followed by just the name of a subdirectory changes to that subdirectory
- cd followed by a complete path changes to that directory
### Advanced Tips ###
In this section we will discuss some directory navigation tips and tricks that will help you easily switch between directories.
### Change to the home directory from anywhere ###
Your home directory is an important directory, and everyone switches back and forth quite frequently. While typing cd /home/<your-home-directory-name>, isnt a big deal, there is another way out which is not only easier but faster too. And that alternative is typing only cd.
Here is an example :
$ pwd
/usr/include/netipx
$ cd
$ pwd
/home/himanshu
So you can see, no matter where the current control is, just type cd command and you can immediately change to your home directory.
**NOTE**- To change to the home directory of a particular user, just type cd ~user_name'
### Switch between directories using cd - ###
Suppose your current working directory is this:
$ pwd
/home/himanshu/practice
and you want to switch to the directory **/usr/bin/X11**, and then switch back to the directory mentioned above. So what will you do? The most straight forward way is :
$ cd /usr/bin/X11
$ cd /home/himanshu/practice/
Although it seems a good way out, it really becomes tiring when the path to the directories is very long and complicated. In those cases, you can use the cd - command.
While using cd - command, the first step will remain the same, i.e., you have to do a cd <path> to the directory to you want to change to, but for coming back to the previous directory, just do a cd -, and thats it.
$ cd /usr/bin/X11
$ cd -
/home/himanshu/practice
$ pwd
/home/himanshu/practice
And if you want to again go back to the last directory, which in this case is /usr/bin/X11, run the cd - command again. So you can see that using cd - you can switch between directories easily. The only limitation is that it works with the last switched directories only.
### Switch between directories using pushd and popd ###
![directory navigation](http://linoxide.com/wp-content/uploads/2014/06/pushd-popd.jpg)
If you closely analyse the cd - trick, youll find that it helps switching between only the last two directories, but what if there is a situation in which you switch multiple directories, and then want to switch back to the first one. For example, if you switch from directory A to directory B, and then to directory C and directory D. Now, you want to change back to Directory A.
As a general solution, you can type cd followed by the path to directory A. But then again, if the path is long or complicated, the process can be time-consuming, especially when you have to switch between them frequently.
In these kind of situations, you can use the pushd and popd commands. The pushd command saves the path to a directory in memory, and the popd command removes it, and switches back to it too.
For example :
$ pushd .
/usr/include/netipx /usr/include/netipx
$ cd /etc/hp/
$ cd /home/himanshu/practice/
$ cd /media/
$ popd
/usr/include/netipx
$ pwd
/usr/include/netipx
So you can see that I used pushd command to save the path to current working directory (represented by .), and then changed multiple directories. To come back to the saved directory, I just executed the popd command.
**NOTE**- You can also use pushd command to switch back to the saved directory, but that doesnt remove it from the memory, like popd does.
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-command/directory-navigations-tips-tricks/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,136 @@
How to disable Ipv6 on Ubuntu, Linux Mint, Debian
================================================================================
### Ipv6 ###
Ipv6 is the next version of the addressing scheme Ipv4 that is currently being used to assign numerical address to domain names like google.com over the internet.
Ipv6 allows for more addresses than what Ipv4 supports. However it is not yet widely supported and its adoption is still in progress.
### Does your system support ipv6 ? ###
For Ipv6 to work for you, there are many things needed. First of all you need a system/OS that supports IPv6. Ubuntu Linux Mint and most modern distros do that. If you take a look at the output of ifconfig you can see ipv6 addresses assigned to the network interfaces
$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:1c:c0:f8:79:ee
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21c:c0ff:fef8:79ee/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:110880 errors:0 dropped:0 overruns:0 frame:0
TX packets:111960 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:62289395 (62.2 MB) TX bytes:25169458 (25.1 MB)
Interrupt:20 Memory:e3200000-e3220000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:45258 errors:0 dropped:0 overruns:0 frame:0
TX packets:45258 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4900560 (4.9 MB) TX bytes:4900560 (4.9 MB)
Check the line "inet6 addr".
Next you need a router/modem that also supports ipv6. And beyond that, your ISP must also support ipv6.
Instead of checking every part of the network infrastructure, its better to just find out if you can connect to websites over ipv6.
There are lots of websites that test ipv6 support on your connection. Check out [http://testmyipv6.com/][1] for example.
The kernel parameters that enable ipv6 are as follows
$ sysctl net.ipv6.conf.all.disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 0
$ sysctl net.ipv6.conf.default.disable_ipv6
net.ipv6.conf.default.disable_ipv6 = 0
$ sysctl net.ipv6.conf.lo.disable_ipv6
net.ipv6.conf.lo.disable_ipv6 = 0
The same can be also be checked from the proc files
$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6
0
Note that the variables control "disabling" of ipv6. So setting them to 1 would disable ipv6
### Disable ipv6 if its not supported ###
So if ipv6 is not supported on your network infrastructure, it might be useful to disable it all together. Why ? It can cause issues like delayed domain lookups, un-necessary attempts to connect to ipv6 addresses causing delay in network connection etc.
I did come across some problems like that. The apt-get command occasionally tries to connect to ipv6 addresses and fails and then retries an ipv4 address. Take a look at this output
$ sudo apt-get update
Ign http://archive.canonical.com trusty InRelease
Ign http://archive.canonical.com raring InRelease
Err http://archive.canonical.com trusty Release.gpg
Cannot initiate the connection to archive.canonical.com:80 (2001:67c:1360:8c01::1b). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::1b 80]
Err http://archive.canonical.com raring Release.gpg
Cannot initiate the connection to archive.canonical.com:80 (2001:67c:1360:8c01::1b). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::1b 80]
.....
Errors like those have been more frequent in the recent Ubuntu versions, probably because they try to use Ipv6 more than before.
I noticed similar issues happen in other applications like Hexchat and also Google Chrome which would sometimes take longer than usual to lookup a domain name.
So the best solution is to disable Ipv6 entirely to get rid of those things. It takes only a small configuration and can help you solve many network issues on your system. Users have even reported an increase in internet speed.
#### Disable Ipv6 - Method 1 ####
Edit the file - /etc/sysctl.conf
$ sudo gedit /etc/sysctl.conf
And fill in the following lines at the end of that file
# IPv6 disabled
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Save the file and close it
Restart sysctl with
$ sudo sysctl -p
Check the output of ifconfig again and there should be no ipv6 address
$ ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:5f:28:8b
inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1346 errors:0 dropped:0 overruns:0 frame:0
TX packets:965 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1501691 (1.5 MB) TX bytes:104883 (104.8 KB)
If it does not work, then try rebooting the system and check ifconfig again.
#### Disable ipv6 - GRUB method ####
Ipv6 can also be disabled by editing the grub configuration file
$ sudo gedit /etc/default/grub
Look for the line containing "GRUB_CMDLINE_LINUX" and edit it as follows
GRUB_CMDLINE_LINUX="ipv6.disable=1"
The same can also be added to the value of the variable named "GRUB_CMDLINE_LINUX_DEFAULT" and either would work. Save the file, close it and regenerate the grub configuration
$ sudo update-grub2
Reboot. Now ipv6 should be disabled.
--------------------------------------------------------------------------------
via: http://www.binarytides.com/disable-ipv6-ubuntu/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://testmyipv6.com/

View File

@ -0,0 +1,87 @@
How to speed up directory navigation in a Linux terminal
================================================================================
As useful as navigating through directories from the command line is, rarely anything has become as frustrating as repeating over and over "cd ls cd ls cd ls ..." If you are not a hundred percent sure of the name of the directory you want to go to next, you have to use ls. Then use cd to go where you want to. Hopefully, a lot of terminals and shell languages now propose a powerful auto-completion feature to cope with that problem. But it remains that you have to hit the tabulation key frenetically all the time. If you are as lazy as I am, you will be very interested in autojump. autojump is a command line utility that allows you to jump straight to your favorite directory, regardless of where you currently are.
### Install autojump on Linux ###
To install autojump on Ubuntu or Debian:
$ sudo apt-get install autojump
To install autojump on CentOS or Fedora, use yum command. On CentOS, you need to [enable EPEL repository][1] first.
$ sudo yum install autojump
To install autojump on Archlinux:
$ sudo pacman -S autojump
If you cannot find a package for your distribution, you can always compile from the sources on [GitHub][2].
### Basic Usage of autojump ###
The way autojump works is simple: it records your current location every time you launch a command, and adds it in its database. That way, some directories will be added more than others, typically your most important ones, and their "weight" will then be greater.
From there you can jump straight to them using the syntax:
autojump [name or partial name of the directory]
Notice that you do not need a full name as autojump will go through its database and return its most probable result.
For example, assume that we are working in a directory structure such as the following.
![](https://farm4.staticflickr.com/3921/14276240117_9f56b42fec_z.jpg)
Then the command below will take you straight to /root/home/doc regardless of where you were.
$ autojump do
If you hate typing too, I recommend making an alias for autojump or using the default one.
$ j [name or partial name of the directory]
Another notable feature is that autojump supports both zsh shell and auto-completion. If you are not sure of where you are about to jump, just hit the tabulation key and you will see the full path.
So keeping the same example, typing:
$ autojump d
and then hitting tab will return either /root/home/doc or /root/home/ddl.
Finally for the advanced user, you can access the directory database and modify its content. It then becomes possible to manually add a directory to it via:
$ autojump -a [directory]
If you suddenly want to make it your favorite and most frequently used folder, you can artificially increase its weight by launching from within it the command
$ autojump -i [weight]
This will result in this directory being more likely to be selected to jump to. The opposite would be to decrease its weight with:
$ autojump -d [weight]
To keep track of all these changes, typing:
$ autojump -s
will display the statistics in the database, while:
$ autojump --purge
will remove from the database any directory that does not exist anymore.
To conclude, autojump will be appreciated by all the command line power users. Whether you are ssh-ing into a server, or just like to do things the old fashion way, reducing your navigation time with fewer keystrokes is always a plus. If you are really into that kind of utilities, you should definitely look into [Fasd][3] too, which deserves a post in itself.
What do you think of autojump? Do you use it regularly? Let us know in the comments.
--------------------------------------------------------------------------------
via: http://xmodulo.com/2014/06/speed-up-directory-navigation-linux-terminal.html
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://xmodulo.com/2013/03/how-to-set-up-epel-repository-on-centos.html
[2]:https://github.com/joelthelion/autojump
[3]:https://github.com/clvv/fasd

View File

@ -1,47 +0,0 @@
OpenELEC 4.0.4 现已发布, 基于 XBMC 13.1 “Gotham”
================================================================================
![] (http://i1-news.softpedia-static.com/images/news2/OpenELEC-4-0-4-Is-Out-and-Based-on-XBMC-13-1-quot-Gotham-quot-445802-2.jpg)
**OpenELEC 4.0.4一个嵌入式的专门为运行XBMC的操作系统开放源代码的娱乐媒体中心已经发布并且使用 XBMC 13.1 作为 基础版本 .**
OpenELEC 开发商非常密切地关注着 XBMC
的产品开发周期而且他们已经发布了他们的最新的 4.0.4 的版本。它来自 XBMC
13.1"Gotham"满载着大量的好点子,并且开发者们做了一些了自己的改动。
"此版本包括一些bug修正、 安全修复和来自于 OpenELEC
4.0.3的改进。除了通常的错误修正和软件包更新,我们已经使用最新的补丁文件升级 XBMC 至最新的 XBMC 13.1 (final)
这个版本包含了很多已知问题的修复(其中有些我们已附带 OpenELEC 4.0.0中) 在 XBMC 13.0 发布之后 。
"我们发现并修复了一些和RaspberryPi相关内核问题、 固件和 XBMC 代码中的问题,在 popcornmix 的帮助下 ,非常感谢他的帮助 OpenELEC 4.0.4 现在是下一个稳定版本这是一款bug修正和 security修复 的 OpenELEC-4.0 系列版本,"开发商的官方网站上如是写道。
OpenELEC 4.0.3 界面更加美观而且更新和修复了许多问题。例如e2fsprogs 已更新到版本 1.42.10、 bluez 已更新到版本 5.19、 版本 2.11.1 现在是系统中的字型、 字体设置 213 已被集成并设为默认gnutls 3.2.12 已被添加用来修复一些安全问题,而且一个新的 Linux 内核3.14.5,已经来到。
此外DVB T2 已经添加了对 GeniaTech T220 / August T210 设备的支持,支持禁用 WOL 由于其破碎的驱动程序、"e1000e"已添加为破碎的驱动程序, RPi 支持补丁已更新。
如果你已经有一个旧版的 OpenELEC你可能需要考虑升级的系统而不是从头开始安装它。如果想顺利地完成安装至少应该是 3.2 版本。
如果您尝试从旧版本操作系统的更新,您可能发现一些插件和插件都不再工作。所以最明智的办法就是,在尝试升级之前备份你的系统。
XBMC 13.1"Gotham"版本作为一个基础版本,配有 Android 硬件解码、 许多树莓派和 Android 速度方面的改善,立体 3D 渲染,更好的触摸屏支持,改进了 UPnP 功能,很多的音频引擎的改进,更好地字幕搜索、 对开发者友好的扩展如 Python 和 JSON RPC API FFmpeg 1.2,还有更多。
查阅官方 [公告] [1] 的更改和改进的完整列表。
# # # 下载最新的 OpenELEC 4.0.4 # # #
- [OpenELEC 4.0.4 (tar.bz2) 64-bit][2][binary] [145 MB]
- [OpenELEC 4.0.4 (tar.bz2) 32-bit][3][binary] [142 MB]
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/OpenELEC-4-0-4-Is-Out-and-Based-on-XBMC-13-1-quot-Gotham-quot-445802.shtml
译者:[owen-carter](https://github.com/owen-carter) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://openelec.tv/news/22-releases/129-openelec-4-0-4-released
[2]:http://openelec.tv/get-openelec/download/viewdownload/8/339
[3]:http://openelec.tv/get-openelec/download/viewdownload/8/338

View File

@ -1,28 +0,0 @@
开源SDN项目OpenDaylight添加新成员
================================================================================
[Linux基金会][1]的[OpenDaylight][2] 项目促进开源。[软件定义网络][3] (SDN) 继续增长。 [Extreme Networks][4] (EXTR), [Flextronics][5]和[Oracle][6] (ORCL) 现在也是该项目成员了。
三个公司6月5日正式加入OpenDaylight成员数达到到39。该项目还有195位合作开发人员以建立一个开放源码的SDN平台。
新成员带来在数据中心和云计算的设计和基础设施的知识。Extreme Networks是专业提供高性能网络解决方案的企业而Flextronics提供系统设计、制作和组织工作。Oracle有广泛的业务同时专注于各种领域的云计算和数据中心。
OpenDaylight 领导人正在庆祝项目的会员增长并进一步走向创造一个以开放标准为中心和避免垄断的SDN生态系统。OpenDaylight执行主任Jacques Neela说"更多的声音意味着更强的辩论和更好的代码我们很高兴看到这种多样性的新成员加入来加宽探讨SDN和NFV的领域"。
OpenDaylight的第一款正式软件就是在2013年4月发布的OpenDaylight该软件首次以Hydrogen的名字在二月出现
--------------------------------------------------------------------------------
via: http://thevarguy.com/open-source-application-software-companies/open-source-sdn-project-opendaylight-adds-new-members
译者:[2q1w2007](https://github.com/2q1w2007) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://linuxfoundation.org/
[2]:http://www.opendaylight.org/
[3]:http://thevarguy.com/sdn
[4]:http://www.extremenetworks.com/
[5]:http://www.flextronics.com/
[6]:http://oracle.com/
[7]:http://thevarguy.com/open-source-application-software-companies/020514/embargo-until-feb-4-1130-am-est-opendaylight-releases-fir

View File

@ -1,38 +0,0 @@
下一代Ubuntu14.10镜像已开放下载
================================================================================
![Ubuntu 运行在8寸平板上](http://www.omgubuntu.co.uk/wp-content/uploads/2014/05/1.jpg)
Ubuntu 运行在8寸平板上
**不像大多数用户想得那样Ubuntu 14.10 的桌面版默认使用Unity 8和Mir([现已可下载][1])**
根据[上个月的讨论][2]Ubuntu 14.10镜像计划提供单独的Unity 8桌面。 提供此镜像目的是给开发者和测试人员提供一个识别并记录从传统界面到使用两种新技术的界面的变化的手段。
此镜像并不为为任何稳定的消费者进行生产测试。这个版本会并将会是极不稳定而充满bug的在十月之前还会不断有变动。所有想要一个完美的、可用的或统一的的桌面的人都会失望因为Unity 8桌面版镜像用的是平板的UI。
### 工作进行中 ###
为Mir和Unity 8建立足够的窗口管理特性的工作正在进行中。同样的在桌面显卡完全兼容Mir之前硬件和用户之间发生的经历将会不同而且不会支持虚拟机。
桌面Unity 8界面将开始融合平板UI用户会提出界面与原来相差太大的问题详见Ubuntu的创始人Mark Shuttleworth最近的视频的问答模块。
这是个好消息微软在桌面Windows8上强加了平板界面和为触摸屏设计的UI。结果被骂的不轻不得不不断地发出"改进"——在你吐槽后让步,来对付投诉。
### 下载Unity 8桌面版本 ###
按计划Ubuntu 14.10预定在10月23日发行稳定版继续基于 X.OrgCompiz和Unity 7。运行在Mir的Unity8预计将在2016年4月作出下一个 LTS之前成为新的的默认桌面。
此版本还不具有可用性下方链接的镜像只是为了协助开发人员测试和完善不是为了用户适应新的TARDIS样式。
- [下载下一代Ubuntu14.10 (.iso)][3]
--------------------------------------------------------------------------------
via:http://www.omgubuntu.co.uk/2014/06/unity-8-daily-build-images-go-live
译者:[2q1w2007](https://github.com/2q1w2007) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://blueprints.launchpad.net/ubuntu/+spec/client-1410-unity8-desktop-iso
[2]:http://www.omgubuntu.co.uk/2014/05/ubuntu-unity-8-desktop-flavour-discussed
[3]:http://cdimage.ubuntu.com/ubuntu-desktop-next/daily-live/current/

View File

@ -0,0 +1,80 @@
10款专为嵌入式系统打造的Linux平台
==========================================
Linux 有着广泛的用途。该平台被许多简单的家用电器所使用同时它也深受程序员和黑客们的青睐。此外Linux 还广泛地应用在嵌入式系统中有一系列专门适用于此类系统的发行版。我们将为大家推荐十个非常优秀的专为嵌入式系统发行的linux版本
![] (http://www.efytimes.com/admin/useradmin/photo/UJVP24130PM532014.jpeg)
### 1.[Ampro 嵌入式 Linux][1] ###
这是一个自由和开放源代码的从Ubuntu派生来的轻量级操作系统。
### 2. [BlueCat Linux from Lynx][2] ###
这个基于 Linux 的发行版是Lynx套件的一部分并为嵌入式系统打造。
### 3. [CacheGuard OS][3] ###
CacheGuard OS 是一个从零开始建立的集成了安全解决方案的基于Linux的可自定义版本 ,专门为网络管理设计的。
### 4. [Darma NAS OS][4] ###
这个发行版有一个基于 SSL 的加密客户端服务器和基于 Java 的图形用户界面。
### 5. [DIET-PC][5] ###
这是开源的瘦客户端软件 kitset它允许用户建立网络设备。
### 6. [ELinOS][6] ###
这个发行版为在嵌入式系统上工作的用户提供大量的技术。它是一个相当受欢迎的嵌入式 Linux 平台。
### 7. [eLux][7] ###
这个发行版有一个非常简单和容易使用的界面,适用于用户和管理员都不具有任何有关 Linux 的知识的特殊情况下。
### 8. [eLux NG][8] ###
这一个发行版为支持 eLux 的列表中的处理器添加了新的模式。
### 9. [Embedded Coyote Linux][9] ###
这种基于 Coyote Linux的防火墙和 VPN 服务器 一直为很多人选择的平台。
# # # 10。[嵌入式 Debian 项目][10] # # #
这个项目的目的是使 Debian GNU/Linux 成为嵌入式系统的第一选择。
--------------------------------------------------------------------------------
via: http://www.efytimes.com/e1/fullnews.asp?edid=137612
译者:[owen-carter](https://github.com/owen-carter) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.ampro.com/company/News/04_08_08_Ampro_Reveals_Ubuntu_Embedded_Linux.htm
[2]:http://www.lynuxworks.com/embedded-linux/embedded-linux-virtualization.php
[3]:http://www.cacheguard.com/cacheguard-os.html
[4]:http://nas.darma.com/
[5]:http://www.dietpc.org/
[6]:http://www.sysgo.com/products/elinos-embedded-linux/
[7]:http://www.myelux.com/index.htm?Unicon_Session=32bf53f198c94ba2ac2ce1ea45211754
[8]:http://www.myelux.com/eluxng.htm
[9]:http://www.myelux.com/eluxng.htm
[10]:http://www.emdebian.org/

View File

@ -0,0 +1,82 @@
微软真的改变对开源软件的态度了吗?
================================================================================
> **在今天的开源软件摘要中微软或许没有对开源软件有一个新的态度就像安卓和windows的对抗Cinnamon和Unity在Ubuntu14.04的对抗。**
微软因为以前对开源软件的态度而臭名昭著但是公司改建后对开源软件发出了积极的信号。CNet报道了微软对开源软件认知的行为的改变。
> [CNet][1]消息:
> 微软自助开源软件有一些时间了,那些曾经反对开源软件的领导者们已经退出了或者不在位了。开软软件现在用在遍布全世界的公司当中,这些公司有些自命不凡但这只是在认识到微软帝国之外的事。
> 一些新的想法反映了企业顶层的一些变化今年二月初Satya Nadella代替鲍尔默成为了微软CEONadella已经给微软带来了一些新的东西改变了微软以前的一些束缚。
>
> [更多报道][2]
>
> ![](http://www.itworld.com/sites/default/files/microsoft-open-source-communist_1.jpg)
>
> 微软和开源社区
> Image credit: [Curako's Blog][3]
我是一个持悲观态度的人但是我认为微软和开源软件之间的信任关系是有待确定的。一个新的CEO和些许改变或许会改变微软在开源世界中的存在状态但是对于微软这么大的企业来说改变并不容易所以对于开源的世界来说微软是否真的改变还有待确定。
我也从来不会忘记微软“欢迎,扩大,压死”的策略来打翻其他的竞争软件,光这一条凡是微软参合的开源项目就必须多一只谨慎的眼,或许这家公司真的改了,但如果没有呢!我们还是用几年时间来观察下吧。
### 安卓对抗windows ###
ZDNet曾经报道过使用数量最多的Linux发行版本但是现在桌面环境仍然是windows的天下但是安卓今年很可能会是用户数量最大的用户终端操作系统。
> [ZDNet][4]报道:
>
> 如果桌面和平板依旧像预期增长的销量安卓平板渐渐蚕食苹果的市场PC市场继续萎缩安卓在2014年末很有可能成为终端用户数量最多的操作系统而且不算安卓PC。
>
> 总而言之安卓几乎统治了Linux终端用户。你可能不会想到它作为桌面使用尽管Intel和AMD努力在让它变成现实但是安卓正在变成使用量第一的终端操作系统。
>
> [更多消息][4]
>
> ![](http://www.itworld.com/sites/default/files/android-devices-versus-windows-pcs.jpg)
> Image credit: [ZDNet][4]
上面提到的并不算真的惊喜移动终端的革命发展了接近10年了。桌面依然还像原来那样重要微软也确实没有真正的在乎过移动设备。即使现在微软在艰难的推他的手机和平板他仍旧认为移动终端市场并不重要。
谷歌严重的破坏了微软在移动领域的努力而现在他在桌面市场又对微软发起了挑战。从chrome OS到安卓谷歌给微软一连串的打击如果你查看下Amazon最受欢迎的[台式机][5]和[笔记本][6]的话你会看到很多chrome OS的电脑甚至是装有安卓的PC。所以人们的购买需求在变得多样化并不局限在windows一家了。
### Cinnamon和Unity在Ubuntu14.04上的对抗 ###
Tech Republic发表了一篇文章介绍了如何在Ubuntu14.04上安装cinnamon研究了一下Ubuntu14.04上用cinnamon替换unity的可行性。
> [Tech Republic][7]报道:
>
> 如果你寻求性能为主不需要其他有特色的可自定义的桌面cinnamon适合你。Cinnamon是一个直观简洁的桌面任何人都可以使用不论你是IT工作者还是你的老妈妈。它非常的简单易用。Cinnamon很平淡不会和你开什么玩笑也不会让你感到有惊奇的感觉但这就是它所注重的。它只会给桌面带来在标准层面上带来实用性它不求突破不耍花招不加条条框框。
>
> Cinnamon是一个很平凡的桌面它只集成了最好的功能并且把它们集成到一起完美整合到一块。如果你可以用一个看起来和用起来都点老掉牙但是性能很好的桌面的话cinnamon完全适合你。如果你喜欢各种花哨的界面和看起来很现代的感觉cinnamon可能就不适合你了。
> [ 更多消息][7]
>
> ![](http://www.itworld.com/sites/default/files/cinnamon-versus-unity-in-ubuntu-1404.jpg)
>
> Image credit: [Tech Republic][7]
我是站在cinnamon这边的,unity有自己的长处但是我从来没用习惯过。Cinnamon更接近传统桌面我用起来不错
但是在别人眼里漂亮的桌面总是很受欢迎。Linux最大的特色就是提供很多很多不同的选择如果你真不知道unity和cinnamon该选择谁你就用自己最喜欢的就行了。
你赞成那些呢?请在下方留下你的评论吧
作者的观点和ITworld无关
--------------------------------------------------------------------------------
via: http://www.itworld.com/open-source/421894/has-microsoft-really-changed-its-attitude-toward-open-source
译者:[jiajia9linuxer](https://github.com/jiajia9linuxer) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.cnet.com/news/dead-and-buried-microsofts-holy-war-on-open-source-software/
[2]:http://www.cnet.com/news/dead-and-buried-microsofts-holy-war-on-open-source-software/
[3]:http://curako.wordpress.com/2010/12/06/the-uneasy-alliance-free-software-vs-open-source/
[4]:http://www.zdnet.com/the-five-most-popular-end-user-linux-distributions-7000030058/http://www.zdnet.com/the-five-most-popular-end-user-linux-distributions-7000030058/
[5]:http://www.amazon.com/Best-Sellers-Electronics-Desktop-Computers/zgbs/electronics/565098/?_encoding=UTF8&camp=1789&creative=390957&linkCode=ur2&tag=fnh-20&linkId=REWXUPB7SQXPDSOL
[6]:http://www.amazon.com/Best-Sellers-Computers-Accessories-Laptop/zgbs/pc/565108/?_encoding=UTF8&camp=1789&creative=390957&linkCode=ur2&tag=fnh-20&linkId=POG3J2CFBHDWBAVL
[7]:http://www.techrepublic.com/article/is-cinnamon-a-worthy-replacement-for-ubuntu-unity/

View File

@ -1,14 +1,14 @@
Linux 平台七大桌面环境
================================================================================
通常的 Linux 发行版都使用 KDE 或者 GNOME 作为默认的桌面环境。它们都给用户提供了一个易用的并且有吸引力的桌面,并且内置了各式各样的多媒体软件、系统程序、游戏、实用程序、网页开发工具、编程工具等等。这两个桌面致力于提供给用户一个拥有类似于 Windows 操作系统体验的尖端计算环境,而忽略了最小化它们所占用的系统资源。
通常的 Linux 发行版都使用 KDE 或者 GNOME 作为默认的桌面环境。它们都给用户提供了一个原始的并且有吸引力的桌面,并且内置了各式各样的多媒体软件、系统程序、游戏、实用程序、网页开发工具、编程工具等等。这两个桌面致力于提供给用户一个拥有类似于 Windows 操作系统体验的尖端计算环境,而忽略了最小化它们所占用的系统资源。
如果你正在使用 Ubuntu (或者其他Linux发行版) 并且疲于始终使用 Unity 桌面,那么你应该看看这些可以替代 Unity 的选择。我收集了 7 种桌面环境。它们都很棒。在你读完这篇文章之后,请试着使用它们吧。
如果你正在使用 Ubuntu (或者其他Linux发行版) 并且厌倦始终使用 Unity 桌面,那么你应该看看这些可以替代 Unity 的选择。我收集了 7 种桌面环境。它们都很棒。在你读完这篇文章之后,请试着使用它们吧。
### [Mate][1] ###
![](http://i0.wp.com/pulpybucket.com/wp-content/uploads/2014/06/mate.png)
MATE 是 GNOME2 的一个分支。它提供了一个自然且吸引人的桌面环境。它是 Linux 和其他 Unix-like 工作环境中的传统工作框架的代表。MATE 正在改善以使用新的技术来保留传统的桌面体验。
MATE 是 GNOME2 的一个分支。它提供了一个自然且吸引人的桌面环境。它是 Linux 和其它类 Unix 工作环境中的传统工作框架的代表。MATE 正在改善以使用新的技术来保留传统的桌面体验。
在 Ubuntu 14.04 中,可以直接从 Ubuntu 软件中心获取 MATE 桌面。
@ -16,19 +16,19 @@ MATE 是 GNOME2 的一个分支。它提供了一个自然且吸引人的桌面
![](http://i2.wp.com/pulpybucket.com/wp-content/uploads/2014/06/Kubuntu-9.04-DesktopEffects.png)
KDE 是一个类似于 GNOME 一样的重量级桌面环境。它在本文章所提及的7种桌面环境中被认为是最华丽最重量级的一个。它同样是一个类似于 Windows 的桌面,在这一点上没有什么特殊的变化。不过 KDE 非常有特点,但是随之而来的是大量的设置来提升你的桌面体验。同样的,有很多关于 KDE 的话题。所以真的可以从 KDE 的特点中获益,并且保持你所想的外观。
KDE 是一个类似于 GNOME 一样的重量级桌面环境。它在本文章所提及的7种桌面环境中被认为是最华丽最重量级的一个。它同样是一个类似于 Windows 的桌面,在这一点上没有什么特殊的变化。不过 KDE 非常有特点,但是随之而来的是大量的设置来提升你的桌面体验。同样的,有很多关于 KDE 的话题。所以真的可以从 KDE 的特点中获益,并且保持你所想的外观。
### [Cinnamon][3] ###
![](http://i1.wp.com/pulpybucket.com/wp-content/uploads/2014/06/WD9O-C08B-ESP5.jpg)
Cinnamon 是一个基于 Gtk+ 的环境。它最初作为 GNOME Shell 的一个用户界面分支,由 Linux Mint 创造。 Cinnamon 本质上是为了推行使用终端和定点装置。无论是使用鼠标,还是使用触摸屏都可以获得同样便捷的操作。不像 KDE Plasma 工作空间, 只有一种 GUI。 当前版本—— Cinnamon 2.0 展示于2013年10月10日。
Cinnamon 是一个基于 Gtk+ 的环境。它最初作为 GNOME Shell 的一个用户界面分支,由 Linux Mint 创造。 Cinnamon 本质上是为了推行使用终端和定点装置。无论是使用鼠标,还是使用触摸屏都可以获得同样便捷的操作。不像 KDE Plasma 工作空间,只有一种 GUI。 当前版本—— Cinnamon 2.0 于2013年10月10日发布
### [Unity][4] ###
![](http://i1.wp.com/pulpybucket.com/wp-content/uploads/2014/06/Ubuntu_13.10_Desktop.png)
Unity 是 GNOME 桌面环境的一个界面,由 Canonical 公司创建,使用于 Ubuntu 系统中。Unity 最初现身于 Ubuntu 10.10 的上网本版本中。它起初打算充分利用上网本的屏幕空间例如一个被称为启动器的垂直应用切换器a vertical app switcher called launcher和一个节省垂直空间的多功能顶部菜单栏。Unity 不像 GNOME , KDE, Xfce 或者 LXDE 是许多软件的合集它是作为使用实用程序而开发的it is developed to use available utilities
Unity 是 GNOME 桌面环境的一个界面,由 Canonical 公司创建,使用于 Ubuntu 系统中。Unity 最初现身于 Ubuntu 10.10 的上网本版本中。它起初打算充分利用上网本的屏幕空间例如一个被称为启动器的垂直应用切换器a vertical app switcher called launcher和一个节省垂直空间的多功能顶部菜单栏。Unity 不像 GNOME、KDE、 Xfce 或者 LXDE 是许多软件的合集,它是作为使用实用功能而开发的
### [GNOME Shell][5] ###
@ -36,25 +36,25 @@ Unity 是 GNOME 桌面环境的一个界面,由 Canonical 公司创建,使
GNOME 提供了桌面核心接口例如交换窗口启动应用程序以及显示提示。它利用先进图形硬件来实现吸引人的创新的界面思想提供了愉悦简单的用户体验。GNOME Shell 定义了 GNOME 3 的客户体验。
作为 GNOME 的一个重要组成部分, GNOME Shell 的稳定版本首次发布于 2011年3月3日。
作为 GNOME 的一个重要组成部分, GNOME Shell 的稳定版本首次发布于2011年3月3日。
### [Xfce][6] ###
![](http://i0.wp.com/pulpybucket.com/wp-content/uploads/2014/06/New-Picture1.jpg)
Xfce 是一个轻量级的桌面环境,围绕 GTK 框架实现。他看起来很像 Gnome 2 或者 MATE然而 Xfce 是它们的轻量级替代品。相较于 KDE 和 GNOME 3 而言Xfce 非常轻量级,所以它是运行小工具或者那些希望实现最大执行效率的框架的理想环境。它还不是可以获得的最轻量级的选择 - 请继续往下看 - 然而Xfce 的确完成了执行效率和功能的平衡。
Xfce 是一个轻量级的桌面环境,围绕 GTK 框架实现。它看起来很像 Gnome 2 和 MATE然而 Xfce 是它们的轻量级替代品。相较于 KDE 和 GNOME 3 而言Xfce 非常轻量级,所以它对于运行轻量级的工具或者那些希望实现最大执行效率的框架使用者来说是理想的环境。它还不是可以获得的最轻量级的选择 - 请继续往下看 - 然而Xfce 的确完成了执行效率和功能的平衡。
### [LXDE][7] ###
![](http://i2.wp.com/pulpybucket.com/wp-content/uploads/2014/06/LXDE_desktop_full.png)
LXDE 显然是桌面环境中最轻量级的选择,至少在消费级的桌面标准中是这样。这个基于 GTK 的桌面环境使用了很多轻量级的选择替代了默认的应用(例如 Abiword, Gnumeric, 而不是 LibreOffice。它提供了无闪烁的视觉冲击 - 总体感觉也没有很不错,没有复杂的设置。但是LXDE 仍然提供了漂亮的桌面和完整的功能。当你需要快速简洁时,它就是你需要的选择。
LXDE 显然是桌面环境中最轻量级的选择,至少在传统的桌面标准中是这样。这个基于 GTK 的桌面环境使用了很多轻量级的选择替代了默认的应用(例如 Abiword, Gnumeric, 而不是 LibreOffice。它没有提供 flash 视觉冲击 ,总体感觉也不是特别的棒,没有高级的设置。但是LXDE 仍然提供了漂亮的桌面和完整的功能。当你需要快速简洁时,它就是你的选择。
--------------------------------------------------------------------------------
via: http://pulpybucket.com/top-7-desktop-environment-linux/
译者:[wwhio](https://github.com/wwhio) 校对:[校对者ID](https://github.com/校对者ID)
译者:[wwhio](https://github.com/wwhio) 校对:[Caroline](https://github.com/carolinewuyan)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
@ -65,3 +65,4 @@ via: http://pulpybucket.com/top-7-desktop-environment-linux/
[5]:http://www.gnome.org/
[6]:http://xfce.org/
[7]:http://lxde.org/

View File

@ -1,34 +1,33 @@
CNprober 翻译完成。<travelwithheart@yeah.net, 619913541>
优秀的Linux文本编辑器
================================================================================
想要挑起狂热Linux爱好者之间的激烈争辩吗那就问他们什么是他们最喜欢的文本编辑器。在开源社区中选择一个用来写文本或者更进一步用来写代码的编辑器比选择一个球队或者游戏控制器还要重要。但是任何一个Linux新手都不需要为大把大把的建议和各种各样的煽动而感到焦虑不安,取而代之,先去试着熟悉熟悉一堆不同的文本编辑器吧。所以今天我将要给你建议一个简单主题的列表,里面的编辑器都可以用在Linux下编辑文本。这个列表会排除那些成熟的只用来写代码的IDE也不包括那些专门的进行LaTex排版的编辑器。如果你对后者感兴趣我可以建议你去看看[这里][1].
想要挑起狂热Linux爱好者之间的激烈争辩吗那就问问他们最喜欢的文本编辑器是什么吧。在开源社区中选择一个用来写文本或者更进一步用来写代码的编辑器比选择一个球队或者游戏控制器还要重要。但是任何一个Linux新手都不该为过多的建议和各种各样的煽动而感到焦虑不安,取而代之,先去试着熟悉熟悉一堆不同的文本编辑器吧。所以今天我将要给你建议一个简单主题的列表,里面的编辑器都可以在Linux下编辑文本。这个列表不包括那些成熟的只用来编程的IDE也不包括那些专门进行LaTex排版的编辑器。如果你对后者感兴趣我可以建议你去看看[这里][1].
### 1. Vim & Emacs ###
![](https://farm3.staticflickr.com/2936/14371977196_1a4522359b_z.jpg)
让我们直接从这两个最大咖的开始。当有人在一个聊天室里问关于Linux下的编辑器时会有一个人立马回答[Vim][2],然后会有另外一个说[Emacs][3]. 之所以会这样,是有很充分的理由的。这两个都是非常强大的编辑器,有很多的特性,很多插件,很强大的社区支持。如果你一点都不熟悉他们的话,要描述清楚他们功能的有多么强大是有点困难的。但是简单来讲,它们允许你非常快速的在文本中移动,简单地做出大量的修改,记录宏以及你能想到基本上任何疯狂的编辑方式。这两个编辑器都有的缺点是不可避免的学习过程并且需要花费一定的时间。讲完这点之后,我不会陷入到哪一个更好的争论中去,但是我真的想建议每一个人至少学习这两者之一。
让我们直接从这两个“大咖”开始。当有人在一个聊天室里问关于Linux下的编辑器时会有一个人立马回答[Vim][2],然后会有另外一个说[Emacs][3]. 之所以会这样,理由很充分。这两个都是非常强大的编辑器,有很多的特性,很多插件,很强大的社区支持。如果你一点都不熟悉它们的话,要描述清楚它们强大的功能是有点困难。但是简单来讲,它们允许你在文本中快速移动,简单地做出大量的修改,记录宏以及你能想到基本上任何疯狂的编辑方式。这两个编辑器共同的缺点是,不可避免地花时间去学习。讲完这点之后,我不会陷入到哪一个更好的争论中去,但是我真的想建议每一个人至少学习这两者之一。
![](https://farm4.staticflickr.com/3916/14393718612_a880b86a52_z.jpg)
### 2. Sublime Text & Lime & Atom ###
![](https://farm3.staticflickr.com/2917/14391734181_0f0ec76e4f_z.jpg)
另一个在过去几年冉冉升起的文本编辑器是[Sublime Text][4].一些人可能会将它视为Vim或者Emacs的友好版专为编程而设计的。事实上它保持了一些与Vim和Emacs的相似特性。比如批量编辑和函数跳转都会让人或多或少想起Emacs或者[一个充满活力的Vim][5].然而,它保留了更多的可视性并且更加容易使用。同样,大量的插件引大家进行个性化定制。
一款叫做[Sublime Text][4]的文本编辑器在过去几年逐渐兴起.一些人可能会将它视为Vim或者Emacs的友好版专为编程而设计的。事实上它保持了一些与Vim和Emacs的相似特性。比如批量编辑和函数跳转都会让人或多或少想起Emacs或者[一个充满活力的Vim][5].然而,它保留了更多的可视性并且更加容易使用。同样,大量的插件引大家进行个性化定制。
Sublime Text唯一的“污点”是它的许可证如果你只使用开源软件的话你可以放弃它了。为此最近出现了一个雄心勃勃的克隆版 [Lime][6] 。这个软件正处在繁重的开发当中,但是它的精神跟Sublime Text相似的用户体验但是带着开源的韵味。对于Lime除了满满的期待没有更多要说的了。
Sublime Text唯一的“污点”是它的许可证如果你只使用开源软件的话你可以放弃它了。为此最近出现了一个雄心勃勃的克隆版 [Lime][6] 。这个软件正处在繁重的开发当中,但是它的理念跟Sublime Text相似的用户体验但是带着开源的韵味。对于Lime除了满满的期待没有更多要说的了。
现在更近的GitHub以开源形式发布了[Atom][7]展开了与Sublime Text正式的竞争。Atom打包了所有你想要的文件跳转代码片段使用等特性提供一个完整特性的编辑器而不是简单的编辑框。使用HTMLCSS和集成Node.js环境可以轻易地定制文本处理过程这正是魅力所在。这其实已经要涉及到IDE的定义了我们的列表最多会覆盖到这里。
现在更近的GitHub以开源形式发布了[Atom][7]展开了与Sublime Text正式的竞争。Atom打包了所有你想要的文件跳转代码片段使用等特性提供一个完整特性的编辑器而不是简单的编辑框。使用HTMLCSS和集成Node.js环境可以轻易地定制文本处理过程这正是它的魅力所在。这其实已经要涉及到IDE的定义了我们的列表最多会覆盖到这里。
![](https://www.flickr.com/photos/xmodulo/14395083745/)
### 3. Gedit & Kate & Mousepad & Leafpad ###
![](https://farm3.staticflickr.com/2927/14371977076_c95a557233_z.jpg)
![](https://farm3.staticflickr.com/2927/14371977076_c95a557233_z.jpg)
如果我们离开这些超级厉害的编辑器,我们可以转向我认为的“桌面环境经典版”编辑器。这些编辑器感觉上更加的传统,有些也可以用插件进行强化,但是它们的重点是简单输入。如果你头脑里有一些想法想要在忘记之前赶快记下来(我必须怪罪那些视频游戏让我的注意力范围变小)。[译注:这一句意思应该是作者因为玩游戏导致注意力下降,记不住东西,所以需要快速的记下头脑中的东西以免忘掉] 你不需要学习Vim或者Sublime Text的快捷键。你只需要一些空白的地方进行输入。这类编辑器的好处是们或多或少的和你的桌面环境集成在一起。在这一类编辑器中, Gnome 下的 [Gedit][8] 和 KDE下的 [Kate][9] 都很好的集成在桌面系统中可以通过插件进行个性化定制。比如更容易的进行LaTeX排版。[Mousepad][10] 和 [Leafpad][11] 更适合于轻量级的桌面比如Xfce和LXDE。它们在某种程度上很像Windows的记事本。所以如果你需要的是灵活和便捷请选择们。
如果不谈这些超级厉害的编辑器,我们可以转向我认为的“桌面环境经典版”编辑器。这些编辑器感觉上更加的传统,有些也可以用插件进行强化,但是它们的重点是输入简单。如果你头脑里有一些想法想要在忘记之前赶快记下来(我必须怪罪那些视频游戏让我的注意力变得短暂)。你不需要学习Vim或者Sublime Text的快捷键。你只需要一些空白的地方进行输入。这类编辑器的好处是们或多或少的和你的桌面环境集成在一起。在这一类编辑器中Gnome 下的 [Gedit][8] 和 KDE下的 [Kate][9] 都很好的集成在桌面系统中可以通过插件进行个性化定制。比如更容易的进行LaTeX排版。[Mousepad][10] 和 [Leafpad][11] 更适合于轻量级的桌面比如Xfce和LXDE。它们在某种程度上很像Windows的记事本。所以如果你需要的是灵活和便捷请选择们。
[![](https://farm6.staticflickr.com/5522/14415259703_d3885b3952_z.jpg)][12]
@ -36,11 +35,11 @@ Sublime Text唯一的“污点”是它的许可证如果你只使用开源
![](https://farm3.staticflickr.com/2938/14208641327_49fc7286ba_z.jpg)
另外一个流行的文本编辑器“大家庭”是“无分心编辑器”。如果你喜欢在后台持续地开着Facebook或者Twitter或者每5分钟就收一次邮件你就会知道把注意力集中在那篇明天就过期的散文或者这些还没编译通过的代码是多么困难的事。如果是这样,你需要一个编辑器,它可以占满整个屏幕空间,并且屏蔽掉所有的其事情。
另外一个流行的文本编辑器“大家族”是“无打扰编辑器”。如果你喜欢在后台持续地开着Facebook或者Twitter或者每5分钟就收一次邮件你就会知道把注意力集中在那篇明天要交的散文,或者这些还没编译通过的代码是多么困难的事。如果是这样,你需要一个编辑器,它可以占满整个屏幕空间,并且屏蔽掉所有的其事情。
也许这类编辑器里面最不受欢迎的是Nano。如果你想屏蔽所有分心的事关掉X server[译注关掉桌面只用文字终端界面Nano就是工作在这种模式下])。这是最简单和直接的方式。事实上,《权力游戏(Game of Thrones)》的作者Geogge R. R. Martin最近就在[一次采访][13]中说他使用一个类似DOS Word的文本处理程序写他的小说。
如果你想要一款更顺眼一点的编辑器,你可以试试我的最爱:[Qute][14]. 没有酷炫的特性也许有一点LaTeX排版使它开起来更美观但是重点其实是在的界面的。它提供了一个舒适的导航和编辑体验。如果你对终端感觉不太舒服Qute是个不错的选择。
如果你想要一款更顺眼一点的编辑器,你可以试试我的最爱:[Qute][14]. 没有酷炫的特性也许有一点LaTeX排版使它开起来更美观但是重点其实是在的界面的。它提供了一个舒适的导航和编辑体验。如果你对终端感觉不太舒服Qute是个不错的选择。
![](https://farm3.staticflickr.com/2927/14395083485_7f8f0d6d59_z.jpg)
@ -49,18 +48,19 @@ Sublime Text唯一的“污点”是它的许可证如果你只使用开源
![](https://farm4.staticflickr.com/3845/14395083565_b07b33abf0_z.jpg)
最后办公套件也是文本编辑器。我很怀疑你能否轻松的用办公套件编程但是它确实更适合纯文本编辑也比LaTeX更容易学习。在这类编辑器中[LibreOffice][15] 和 [Calligra][16] 是没办法绕过去的。这两个编辑器因为他们丰富的特性和响亮的名声成为这类编辑器中的巨兽。这两者我都喜欢但是很多人明确的偏向于前者。如果你怀念微软的Word处理软件你会有自己的选择。稍处下风的[Abiword][17]相对前面的两个是一个轻量级的选择。如果你的目的只是编辑一个文本文档不关心电子表格或者数据库Abiword的特性可以达到理想的效果。
最后办公套件也是文本编辑器。我不确定你能否轻松使用办公套件编程但是它确实更适合纯文本编辑也比LaTeX更容易学习。在这类编辑器中[LibreOffice][15] 和 [Calligra][16] 必能避而不谈。这两个编辑器因为它们丰富的特性和响亮的名声成为这类编辑器中的巨兽。这两者我都喜欢但是很多人明确的偏向于前者。如果你怀念微软的Word处理软件你会有自己的选择。稍处下风的[Abiword][17]相对前面的两个是一个轻量级的选择。如果你的目的只是编辑一个文本文档不关心电子表格或者数据库Abiword的特性可以达到理想的效果。
![](https://farm3.staticflickr.com/2915/14371976966_4d252928ec_z.jpg)
简单总结一下如果我有一条建议给你那么就是选择你周围的人正在用的编辑器。如果因为某些疯狂的理由每一个你周围的人都用LibreOffice写C程序或者用Sublime Text写小说而你也要做同样的事你应该跟随潮流。原因就是当你遇到一个问题需要帮助的时候他们可以更容易的给你提供帮助。
简单总结一下,如果我有一条建议给你,那么就是选择你周围的人正在使用的编辑器。如果因为某些疯狂的理由每一个你周围的人都用LibreOffice写C程序或者用Sublime Text写小说而你也要做同样的事你应该跟随潮流。原因就是当你遇到一个问题需要帮助的时候他们可以更容易的给你提供帮助。
你最喜欢的文本编辑器是什么?你用它来干嘛?请在评论里告我们吧。
你最喜欢的文本编辑器是什么?你都用它来做什么?请在评论中和我们分享吧。
--------------------------------------------------------------------------------
via: http://xmodulo.com/2014/06/good-text-editor-linux.html
译者:[love_daisy_love](https://github.com/CNprober) 校对:[校对者ID](https://github.com/校对者ID)
译者:[love_daisy_love](https://github.com/CNprober) 校对:[Caroline](https://github.com/carolinewuyan)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
@ -80,4 +80,5 @@ via: http://xmodulo.com/2014/06/good-text-editor-linux.html
[14]:http://www.inkcode.net/qute
[15]:https://www.libreoffice.org/
[16]:http://www.calligra-suite.org/
[17]:http://www.abisource.com/
[17]:http://www.abisource.com/

View File

@ -1,369 +0,0 @@
编写属于你的第一个Linux内核模块
================================================================================
> 曾经多少次想要在内核游荡?曾经多少次茫然不知方向?你不要再对着它迷惘,让我们指引你走向前方……
内核编程常常看起来像是黑魔法,而在亚瑟 C 克拉克的眼中它八成就是了。Linux内核和它的用户空间是大不相同的抛开漫不经心你必须小心翼翼因为你编程中的一个bug就会影响到整个系统。浮点数学做起来可不容易堆栈固定而渺小而你写的代码总是异步的因此你需要想想怎样让它并发。而除了所有这一切之外Linux内核只是一个很大的、很复杂的C程序它对每个人开放任何人都去读它、学习它并改进它而你也可以是其中之一。
> “开始内核编程的最简单的方式
> 是写模块——一段代码
> 可以用来动态加载进内核。”
可能开始内核编程的最简单的方式就是写模块——一段可以动态加载进内核并从内核移除的代码。模块所能做的事是有限的——例如他们不能添加或移除像进程描述符这样的常规数据结构域。但是在其它方面他们是成熟的内核级的代码可以在需要时随时编译进内核这样就可以摒弃所有的限制了。完全可以在Linux源代码树以外来开发并编译一个模块这并不奇怪它称为树外开发如果你只是想稍微玩玩而并不想提交修改以包含到主线内核中去这样的方式是很方便的。
在本教程中,我们将开发一个简单的内核模块用以创建一个**/dev/reverse**设备。写入该设备的字符串将以逆序的方式读回“Hello World”读成“World Hello”。这是一个流行的节目采访智力游戏而当你展示能力来实施时你也可能获得一些奖励分。在开始前有一句忠告你的模块中的一个bug会导致系统崩溃虽然可能性不大但还是有可能的和数据丢失。在开始前请确保你已经将重要数据备份或者采用一种更好的方式在虚拟机中进行试验。
### 尽可能避免root身份 ###
> 默认情况下,**/dev/reverse**只有root可以使用因此你不得不使用**sudo**来测试该程序。要解决该问题,可以创建一个包含以下内容的**/lib/udev/rules.d/99-reverse.rules**文件:
>
> SUBSYSTEM=="misc", KERNEL=="reverse", MODE="0666"
>
> 别忘了重新插入模块。让设备节点让非root用户访问这往往不是一个好主意但是在开发其间却是十分有用的这不是说以root身份运行二进制测试文件也不是个好主意。
#### 模块的构造 ####
由于大多数的Linux内核模块是用C写的除了低级别特定架构部分所以推荐你将模块以单一文件形式保存例如reverse.c。我们已经把完整的源代码放在GitHub上——这里我们将看其中的一些片段。开始时我们先要包含一些常见的文件头并用预定义的宏来描述模块
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Valentine Sinitsyn <valentine.sinitsyn@gmail.com>");
MODULE_DESCRIPTION("In-kernel phrase reverser");
这里一切都直接明了,除了**MODULE_LICENSE()**它不仅仅是一个标记。内核坚定地支持GPL兼容代码因此如果你把许可证设置为其它非GPL兼容的“专利”特定的内核功能将在你的模块中不可用。
### 什么时候不该写内核模块 ###
> 内核编程很有趣,但是在现实项目中写(尤其是调试)内核代码要求特定的技巧。通常来讲,在没有其它方式解决你的问题时,你才应该沉入内核级别。可能你可以待在用户空间中,如果:
> - 你开发一个USB驱动 —— 请查看[libusb][1]。
> - 你开发一个文件系统 —— 试试[FUSE][2]。
> - 你在扩展Netfilter —— 那么[libnetfilter_queue][3]对你有所帮助。
>
> 通常,本地内核代码会干得更好,但是对于许多项目而言,这点性能丢失并不严重。
由于内核编程总是异步的没有Linux顺序执行得**main()**函数来运行你的模块。取而代之的是,你为各种事件提供了回调函数,像这个:
static int __init reverse_init(void)
{
printk(KERN_INFO "reverse device has been registered\n");
return 0;
}
static void __exit reverse_exit(void)
{
printk(KERN_INFO "reverse device has been unregistered\n");
}
module_init(reverse_init);
module_exit(reverse_exit);
这儿,我们定义了函数,用来访问模块的插入和移除功能,只有第一个是必要的。目前,它们只是打印消息到内核环缓冲区(可以通过**dmesg**命令从用户空间访问);**KERN_INFO**是日志等级(注意,没有逗号)。**_init**和**_exit**是属性 —— 联结到函数的元数据片或者变量。属性在用户空间的C代码中是很罕见的但是内核中却很普遍。所有标记为**_init**的,会在初始化后再生(还记得那条老旧的“释放未使用的内核内存……”信息?)。**__exit**表明,当代码被静态构建进内核时,该函数可以安全地优化。最后,**module_init()**和**module_exit()**这两个宏将**reverse_init()**和**reverse_exit()**函数设置成为我们模块的生命周期回调函数。实际的函数名称并不重要,你可以称它们为**init()**和**exit()**,或者**start()**和**stop()**,你想叫什么就叫什么吧。在你的模块外,它们被申明成为静态的和不可见的。事实上,内核中的任何函数都是不可见的,除非明确地被导出。然而,在内核程序员中,给你的函数加上模块名前缀是约定俗成的。
这些是基本要素 —— 让我们把事情变得更有趣些。模块可以接收参数,就像这样:
# modprobe foo bar=1
**modinfo**命令显示了所有模块接受的参数,而这些也可以在**/sys/module//parameters**下作为文件使用。我们的模块需要一个缓冲区来存储短语 —— 让我们把这大小设置为用户可配置。添加**MODULE_DESCRIPTION()**以下的三行:
static unsigned long buffer_size = 8192;
module_param(buffer_size, ulong, (S_IRUSR | S_IRGRP | S_IROTH));
MODULE_PARM_DESC(buffer_size, "Internal buffer size");
这儿我们定义了一个变量来存储该值将其包裹到一个参数中并通过sysfs来让所有人可读。参数的描述最后一行会出现在modinfo的输出中。
由于用户可以直接设置**buffer_size**,我们需要在**reverseinit()**来清除它。你总该检查来自内核外的数据 —— 如果你不这么做,你就是会将你自身置于内核异常之中,设置造成安全漏洞。
static int __init reverse_init()
{
if (!buffer_size)
return -1;
printk(KERN_INFO
"reverse device has been registered, buffer size is %lu bytes\n",
buffer_size);
return 0;
}
来自模块初始化函数的非0返回值意味着模块执行失败。
### 导航 ###
> 但你开发模块时Linux内核就是你所需一切的源头。然而它相当大你可能在查找你所要的内容时会有困难。幸运的是在浏览庞大的代码库时有工具可以帮助你干得轻松一点。首先是Cscope —— 在终端中运行的一个令人肃然起敬的工具。你所要做的,就是在内核源代码的顶级目录中运行**make cscope && cscope**。Cscope和Vim以及Emacs整合得很好因此你可以在使用你最喜爱的编辑器舒适地工作时来使用它。
> 如果基于终端的工具不是你的最爱,那么就访问[http://lxr.free-electrons.com][4]吧。它是一个基于web的内核导航工具即使它的功能没有Cscope来得多例如你不能方便地找到函数的用法但它仍然提供了足够多的快速查询功能。
现在是时候来编译模块了。你将需要用于正在运行的内核版本的头文件(**linux-headers**,或者同等软件包)和**build-essential**或者类似的包。接下来该创建一个标准的Makefile模板
obj-m += reverse.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
现在,调用**make**来构建你的第一个模块。如果你输入的都正确在当前目录内会发现reverse.ko文件。使用**sudo insmod reverse.ko**插入,然后运行:
$ dmesg | tail -1
[ 5905.042081] reverse device has been registered, buffer size is 8192 bytes
恭喜了!然而,目前这一行还只是在逗你玩而已 —— 还没有设备节点呢。让我们来修复它。
#### 混杂设备 ####
在Linux中有一种特殊的字符设备类型叫做“混杂设备”或者简称为“misc”。它设计用于只有一个单一接入点的小型设备驱动而这正是我们所需要的。所有混杂设备共享同一个主设备号10因此一个驱动(**drivers/char/misc.c**)就可以查看它们所有设备了,而这些设备用次设备号来区分。在所有其它意义上,它们只是普通字符设备。
要为该设备注册一个次设备号(以及一个接入点),你需要声明**struct misc_device**,填上所有字段(注意语法),然后使用指针指向该结构函数来调用**misc_register()**。为了这个能工作,你也需要包含**linux/miscdevice.h**头文件:
static struct miscdevice reverse_misc_device = {
.minor = MISC_DYNAMIC_MINOR,
.name = "reverse",
.fops = &reverse_fops
};
static int __init reverse_init()
{
...
misc_register(&reverse_misc_device);
printk(KERN_INFO ...
}
这儿我们为名为“reverse”的设备请求一个第一个可用的动态的次设备号省略号表明我们已经见过的省略的代码。别忘了在模块卸下后注销掉该设备。
static void __exit reverse_exit(void)
{
misc_deregister(&reverse_misc_device);
...
}
fops字段存储了一个指针指向结构函数**file_operations**在Linux/fs.h中已声明而这真是我们模块的接入点。**reverse_fops**定义如下:
static struct file_operations reverse_fops = {
.owner = THIS_MODULE,
.open = reverse_open,
...
.llseek = noop_llseek
};
再者,**reverse_fops**包含了一系列回调函数(也称之为方法),当用户空间代码打开一个设备时,就会执行。从该设备读取,向该设备写入,或者关闭文件描述符。如果你忽略了所有这些,就会使用一个灵敏的回调函数来替代。这就是为什么我们明确给**noop_llseek()**设置了**llseek**方法,而它却什么也不干(就像名称中暗指的)。默认部署改变了文件指针,我们现在也不想我们的设备被找到(这是你们的今天的回家作业)。
#### 我在关闭时打开 ####
让我们实施该方法。我们将分配一个新的缓冲区给每个打开的文件描述符并在它关闭时释放。这事实上并不安全如果一个用户空间应用程序泄漏了描述符也许是故意的它就会霸占RAM并使系统不可用。在现实世界中你总得考虑到这些可能性。但在本教程中这种方法可以接受。
我们需要一个结构函数来描述缓冲区。内核提供了许多常规的数据结构链接列表双联的哈希表树等等之类。然而缓冲区常常从零开始实施。我们将调用我们的“struct buffer”
struct buffer {
char *data, *end, *read_ptr;
unsigned long size;
};
**data**是该缓冲区存储的一个指向字符串的指针,而最后部分是字符串结尾后的第一个字节。**read_ptr**是**read()**开始读取数据的地方。缓冲区大小为了完整性而存储 —— 目前,我们还没有使用该区域。你不能假设使用你结构体的用户会正确地初始化所有这些东西,所以最好在函数中封装缓冲区分配和解除。它们通常命名为**buffer_alloc()**和**buffer_free()**。
static struct buffer *buffer_alloc(unsigned long size)
{
struct buffer *buf;
buf = kzalloc(sizeof(*buf), GFP_KERNEL);
if (unlikely(!buf))
goto out;
...
out:
return buf;
}
内核内存使用**kmalloc()**来分配,并使用**kfree()**来释放;**kzalloc()**的风格是将内存设置为全零。不同于标准的**malloc()**,它的内核对应部分收到的标志指定了第二个参数中请求的内存类型。这里,**GFP_KERNEL**是说我们需要一个普通的内核内存不是在DMA或高内存中以及函数可以按需睡眠重新编排进程。**sizeof(*buf)**是一种常见的方式,它用来获取可通过指针访问的结构体的大小。
你应该随时检查**kmalloc()**的返回值解应用NULL指针将导致内核异常。同时也需要注意**unlikely()**宏的使用。它(及其相对宏**likely()**)被广泛用于内核中,用于表明条件几乎总是真的(或假的)。它不会影响到控制流,但是能帮助现代处理器通过分支预测技术来提升性能。
最后,注意**gotos**。它们常常为认为是邪恶的但是Linux内核以及一些其它系统软件采用它们来实施集中式的函数退出。这样的结果是减少嵌套深度使代码更具可读性而且非常像更高级语言中的**try-catch**区块。
有了**buffer_alloc()**和**buffer_free()****open**和**close**方法就变得很简单了。
static int reverse_open(struct inode *inode, struct file *file)
{
int err = 0;
file->private_data = buffer_alloc(buffer_size);
...
return err;
}
**struct file**是一个标准的内核数据结构,用以存储打开的文件的信息,如当前文件位置(**file->fpos**),标志(**file->flags**),或者打开模式(**file->fmode**)。另外一个字段**file->privatedata**用于关联文件到一些专有数据它的类型是void *,而且它在文件拥有者以外对内核不透明。我们将一个缓冲区存储在那里。
如果缓冲区分配失败,我们通过返回否定值(**-ENOMEM**)来为调用的用户空间代码标明。
#### 学会读写 ####
“read”和“write”方法是真正完成工作的地方。当数据写入到缓冲区时我们就丢弃它里头先前的内容并在没有任何临时存储时将短语恢复原状。**read**方法仅仅是从内核缓冲区复制数据到用户空间。但是如果缓冲区还没有数据,**reverseread()**会做什么呢?在用户空间中,**read()**调用会在有可用数据前阻塞它。在内核中你必须等待。幸运的是有一项机制用于处理这种情况就是wait queues
想法很简单。如果当前进程需要等待某个事件,它的描述符(**struct task_struct**存储为current被放进非可运行睡眠中状态并添加到一个队列中。然后**schedule()**就被调用来选择另一个进程运行。生成事件的代码通过使用队列将等待进程放回**TASKRUNNING**状态来唤醒它们。调度程序将在以后在某个地方选择它们之一。Linux有多种非可运行状态最值得注意的是**TASKINTERRUPTIBLE**(一个可以通过信号中断的睡眠)和**TASKKILLABLE**(一个可被杀死的睡眠中的进程)。所有这些都应该正确处理,并等待队列为你做这些事。
一个用以存储读取等待队列头的天然场所就是结构缓冲区,所以从为它添加**wait_queue_head_t read_queue**字段开始。你也应该包含**linux/sched.h**。可以使用DECLARE_WAITQUEUE()宏来静态声明一个等待队列。在我们这种情况下,需要动态初始化,因此添加下面这行到**buffer_alloc()**
init_waitqueue_head(&buf->read_queue);
我们等待可用数据;或者等待**read_ptr != end**条件成立。我们也想要让等待操作可以被中断通过Ctrl+C。因此“read”方法应该像这样开始
static ssize_t reverse_read(struct file *file, char __user * out,
size_t size, loff_t * off)
{
struct buffer *buf = file->private_data;
ssize_t result;
while (buf->read_ptr == buf->end) {
if (file->f_flags & O_NONBLOCK) {
result = -EAGAIN;
goto out;
}
if (wait_event_interruptible
(buf->read_queue, buf->read_ptr != buf->end)) {
result = -ERESTARTSYS;
goto out;
}
}
...
我们让它循环,直到有可用数据,如果没有则使用**wait_event_interruptible()**(它是一个宏,不是函数,这就是为什么要给队列传递值)来等待。好吧,如果**wait_event_interruptible()**被中断它返回一个非0值这个值代表**-ERESTARTSYS**。这段代码意味着系统调用应该重新启动。**file->f_flags**检查以非阻塞模式打开的文件数:如果没有数据,返回**-EAGAIN**。
我们不能使用**if()**来替代**while()**,因为可能有许多进程正等待数据。当**write**方法唤醒它们时,调度程序选择一个来以不可预知的方式运行,因此,在这段代码有机会执行的时候,缓冲区可能再次空出。现在,我们需要将数据从**buf->data** 复制到用户空间。**copytouser()**内核函数就干了此事:
size = min(size, (size_t) (buf->end - buf->read_ptr));
if (copy_to_user(out, buf->read_ptr, size)) {
result = -EFAULT;
goto out;
}
如果用户空间指针错误,那么调用可能会失败;如果发生了此事,我们就返回**-EFAULT**。记住,不要相信任何来自内核外的事物!
buf->read_ptr += size;
result = size;
out:
return result;
}
为了让数据能读入到专有组块中,需要进行简单运算。该方法返回读入的字节数,或者一个错误代码。
写方法更简短。首先,我们检查缓冲区是否有足够的空间,然后我们使用**copy_from_userspace()**函数来获取数据。再然后**read_ptr**和结束指针会被重置,缓冲区内容会被撤销掉:
buf->end = buf->data + size;
buf->read_ptr = buf->data;
if (buf->end > buf->data)
reverse_phrase(buf->data, buf->end - 1);
这里, **reverse_phrase()**干了所有吃力的工作。它依赖于**reverse_word()**函数,该函数相当简短并且标记为内联。这是另外一个常见的优化;但是,你不能过度使用。因为积极的内联会导致内核映像徒然增大。
最后,我们需要唤醒**read_queue**中等待数据的进程,就跟先前讲过的那样。**wake_up_interruptible()**就是用来干此事的:
wake_up_interruptible(&buf->read_queue);
唷!你现在已经有了一个内核模块,它至少已经编译成功了。现在,是时候来测试了。
### 调试内核代码 ###
> 或许,内核中最常见的调试方法就是打印。如果你愿意,你可以使用普通的**printk()** (假定使用**KERN_DEBUG**日志等级。然而那儿还有更好的办法。如果你正在写一个设备驱动这个设备驱动有它自己的“struct device”可以使用**pr_debug()**或者**dev_dbg()**:它们支持动态调试(**dyndbg**)特性,并可以根据需要启用或者禁用(请查阅**Documentation/dynamic-debug-howto.txt**)。对于单纯的开发消息,使用**prdevel()**该函数没有操作符除非设置了DEBUG。要为我们的模块启用DEBUG请添加以下行到Makefile中
> CFLAGS_reverse.o := -DDEBUG
>
> 完了之后,使用**dmesg**来查看**pr_debug()**或**pr_devel()**生成的调试信息。
> 或者,你可以直接发送调试信息到控制台。要想这么干,你可以设置**console_loglevel**内核变量为8或者更大的值**echo 8 /proc/sys/kernel/printk**),或者在高日志等级,如**KERN_ERR**,来临时打印要查询的调试信息。很自然,在发布代码前,你应该移除这样的调试声明。
> 注意出现在控制台的内核消息而不要在Xterm这样的终端模拟器窗口中去查看那也是你在内核开发时经常会建议你不要再X环境下进行的原因。
### 惊喜,惊喜! ###
编译模块,然后加载进内核:
$ make
$ sudo insmod reverse.ko buffer_size=2048
$ lsmod
reverse 2419 0
$ ls -l /dev/reverse
crw-rw-rw- 1 root root 10, 58 Feb 22 15:53 /dev/reverse
一切似乎就位。现在,要测试模块是否正常工作,我们将写一段小程序来翻转它的第一个命令行参数。**main()**(没有错误检查)可能看上去像这样:
int fd = open("/dev/reverse", O_RDWR);
write(fd, argv[1], strlen(argv[1]));
read(fd, argv[1], strlen(argv[1]));
printf("Read: %s\n", argv[1]);
像这样运行:
$ ./test 'A quick brown fox jumped over the lazy dog'
Read: dog lazy the over jumped fox brown quick A
它工作正常!玩得更逗一点:试试传递单个单词或者单个字母的短语,空的字符串或者是非英语字符串(如果你有这样的键盘布局设置),以及其它任何东西。
现在,让我们让事情变得更好玩一点。我们将创建两个进程,它们共享一个文件描述符(因而还有内核缓冲区)。其中一个会持续写入字符串到设备,而另一个将读取这些字符串。在下例中,我们使用了**fork(2)**系统调用而pthreads也很好用。我也忽略了打开和关闭设备以及错误检查部分的代码又来了
char *phrase = "A quick brown fox jumped over the lazy dog";
if (fork())
/* Parent is the writer */
while (1)
write(fd, phrase, len);
else
/* child is the reader */
while (1) {
read(fd, buf, len);
printf("Read: %s\n", buf);
}
你希望这个程序会输出什么呢?下面就是在我的笔记本上得到的东西:
Read: dog lazy the over jumped fox brown quick A
Read: A kcicq brown fox jumped over the lazy dog
Read: A kciuq nworb xor jumped fox brown quick A
Read: A kciuq nworb xor jumped fox brown quick A
...
这里发生了什么呢?举行了一场比赛。我们认为**read**和**write**是很小的,或者从头到尾一次执行一个指令。然而,内核是并发的野兽,它可以很容易地重排**reverse_phrase()**函数内部某个地方运行着的内核模式部分的写入操作。如果进行**read()**操作的进程在写入操作结束前就被编排进去就会产生数据不连续状态。这些bug非常难以排除。但是怎样来处理这个问题呢
基本上,我们需要确保在写方法返回前没有**read**方法能被执行。如果你曾经编写过一个多线程的应用程序你可能见过同步原语如互斥锁或者信号。Linux也有这些但有些细微的差别。内核代码可以运行在进程条件中“代表”用户空间代码工作就像我们的方法那样以及运行在中断条件中例如在IRQ处理器中。如果你的程序处于进程条件中并且你需要的锁已经被拿走你的程序就会睡眠并重试直至成功。在中断条件中是无法睡眠的因此代码在循环中流转直到有可用的锁为止。关联原语被称为自旋锁但在我们的环境中一个简单的互斥锁 —— 在特定时间内只有唯一一个进程能“占有”的对象 —— 就足够了。处于性能方面的考虑,现实的代码可能也会使用读-写信号。
锁总是保护某些数据在我们的环境中是一个“struct buffer”实例而且也常常会把它们嵌入到它们所保护的结构体中。因此我们添加一个互斥锁struct mutex lock到“struct buffer”中。我们也必须用**mutex_init()**来初始化互斥锁;**buffer_alloc**是用来处理这件事的好地方。使用互斥锁的代码也必须包含**linux/mutex.h**。
互斥锁很像交通信号灯 —— 除非驱动查看并跟踪信号,否则它没什么用。因此,在对缓冲区做操作并在操作完成时释放它之前,我们需要更新**reverse_read()**和**reverse_write()**来获取互斥锁。让我们来看看**read**方法 —— **write**的工作原理相同:
static ssize_t reverse_read(struct file *file, char __user * out,
size_t size, loff_t * off)
{
struct buffer *buf = file->private_data;
ssize_t result;
if (mutex_lock_interruptible(&buf->lock)) {
result = -ERESTARTSYS;
goto out;
}
我们在函数一开始就获取锁。**mutex_lock_interruptible()**要么抓取互斥锁然后返回,要么让进程睡眠,直到有可用的互斥锁。就像前面一样,**_interruptible**后缀意味着睡眠可以由信号来中断。
while (buf->read_ptr == buf->end) {
mutex_unlock(&buf->lock);
/* ... wait_event_interruptible() here ... */
if (mutex_lock_interruptible(&buf->lock)) {
result = -ERESTARTSYS;
goto out;
}
}
下面是我们的“等待数据”循环。当持有互斥锁,或者发生称之为“死锁”的情境时,不应该让进程睡眠。因此,如果没有数据,我们释放互斥锁并调用**wait_event_interruptible()**。当它返回时,我们重新获取互斥锁并像往常一样继续:
if (copy_to_user(out, buf->read_ptr, size)) {
result = -EFAULT;
goto out_unlock;
}
...
out_unlock:
mutex_unlock(&buf->lock);
out:
return result;
最后,当函数结束,或者在互斥锁被占有过程中发生错误时,互斥锁被解锁。重新编译模块(别忘了重新加载),然后再次进行测试。现在你应该没发现毁坏的数据了。
### 接下来是什么? ###
现在你体验了一把内核侵入。我们刚刚为你揭开了今天话题的外衣里面还有更多东西供你探索。我们的第一个模块是有意识地写得简单一点在从中学到的概念在更复杂的环境中也一样。并发、方法表、注册回调函数、使进程睡眠以及唤醒进程这些都是内核黑客们耳熟能详的东西而现在你已经看过了它们的运作。或许某天你的内核代码也将被加入到主线Linux源代码树中 —— 如果真这样,请联系我们!
--------------------------------------------------------------------------------
via: http://www.linuxvoice.com/be-a-kernel-hacker/
译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.libusb.org/
[2]:http://fuse.sf.net/
[3]:http://www.linuxvoice.com/be-a-kernel-hacker/www.netfilter.org/projects/libnetfilter_queue
[4]:http://lxr.free-electrons.com/

View File

@ -1,33 +0,0 @@
用iCup在linux追世界杯
================================================================================
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/06/icup2014-790x389.png)
Linux 极客们,
在本文简短的叙述中我将教你如何在Linux中安装一个非常棒的2014FIFA世界杯APP。这个应用叫iCup支持WindowsMac以及伟大的Linux。
我看足球比赛已经有很长的时间了所以我得我的电脑上安装这样的应用来保持更新2014世界杯的最新情况。我不想在我朋友们面前看起来一无所知。iCup应用正好提供了每一场赛程、比分、球队教练组等信息。更有提供实时比赛更新给你正在进行的比赛的最新数据。
### 支持一下功能: ###
- 30种语言支持完全本地化使用语言菜单选择
- 可以随意调整窗口大小的独家灵活的界面
- 可按天、阶段检索的比赛日历
- 可视化分组
- 支持自动转变比赛时间来适应本地时间和格式
- 一键化社交网络发表比赛评论支持FacebookGoogle+和Twitter
- 支持代理(支持基本认证和摘要认证方法)
我已经在Ubuntu12.04LTS上测试并且运很好!目前为止,我没有经历过任何错误或崩溃。你可以十分轻松地安装这个很棒的应用,通过[官方网站][1]你可以得到压缩包然后你可以解压到任何你喜欢的地方。解压完成后双击iCup 2014 FREE- Brazil运行。
iCup 对我非常有用,我希你也能享受到。
--------------------------------------------------------------------------------
via: http://www.unixmen.com/install-icup-2014-linux/
译者:[Vic020](http://www.vicyu.net) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.e-link.it/icup/brazil2014/icup-brazil-2014-desktop-app.php

View File

@ -2,11 +2,12 @@ Linux使用bash删除目录中的特定文件
================================================================================
![](http://s0.cyberciti.org/images/category/old/terminal.png)
我是一个Linux新手用户。现在我需要清理一个下载目录中的文件其实我就是想删除/Download/文件夹下面除了以下格式的文件外所以其它文件:
我是一名Linux新用户。现在我需要清理一个下载目录中的文件其实我就是想从/Download/文件夹删去除了以下格式的文件外所以其它文件:
*.iso - 所有的iso格式的文件。
*.zip - 所有zip格式的文件。
我如何在一个基于LinuxOS X 或者Unix-like系统上的bash shell中删除特定的文件呢
我如何在一个基于LinuxOS X 或者 Unix-like 系统上的bash shell中删除特定的文件呢
Bash shell 支持丰富的文件模式匹配符例如:
@ -19,7 +20,7 @@ Bash shell 支持丰富的文件模式匹配符例如:
这里你需要用系统内置的shopt命令来开启shell中的extglob选项然后你就可以使用扩展的模式符了这些模式匹配符如下
1. ?(pattern-list) 匹配零次或一次给定的模式。
1. *(pattern-list) -至少匹配零次给定的模式。
1. *(pattern-list) 至少匹配零次给定的模式。
1. +(pattern-list) 至少匹配一次给定的模式。
1. @(pattern-list) 匹配一次给定的模式。
1. !(pattern-list) 匹配所有除给定模式以外的模式。
@ -60,6 +61,7 @@ rm 命令的语法格式为:
### 策略 #2: 使用bash的 GLOBIGNORE 变量删除指定文件以外的所有文件 ###
摘自 [bash(1)][1] 手册页:
> 一个用冒号分开的模式列表定义了被路径扩展忽略的文件的集合。如果一个文件同时与路径扩展模式和GLOBIGNORE中的模式匹配那么它就从匹配列表中移除了。
要删除所有文件只保留 zip 和 iso 文件,应如下设置 GLOBIGNORE
@ -84,7 +86,7 @@ rm 命令的语法格式为:
find /dir/ -type f -not -name 'PATTERN' -print0 | xargs -0 -I {} rm [options] {}
为了删除 /source 目录下除 php 以外的文件,键入:
想要删除 /source 目录下除 php 以外的文件,键入:
find ~/sources/ -type f -not -name '*.php' -delete
@ -103,9 +105,9 @@ rm 命令的语法格式为:
via: http://www.cyberciti.biz/faq/linux-bash-delete-all-files-in-directory-except-few/
译者:[Linchenguang](https://github.com/Linchenguang) 校对:[校对者ID](https://github.com/校对者ID)
译者:[Linchenguang](https://github.com/Linchenguang) 校对:[Caroline](https://github.com/carolinewuyan)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.manpager.com/linux/man1/bash.1.html
[2]:http://www.manpager.com/linux/man1/find.1.html
[2]:http://www.manpager.com/linux/man1/find.1.html

View File

@ -1,13 +1,12 @@
-------------translating by tenght~
9 commands to check hard disk partitions and disk space on Linux
查看Linux硬盘分区和磁盘空间的9个命令
================================================================================
In this post we are taking a look at some commands that can be used to check up the partitions on your system. The commands would check what partitions there are on each disk and other details like the total size, used up space and file system etc.
Commands like fdisk, sfdisk and cfdisk are general partitioning tools that can not only display the partition information, but also modify them.
在这篇文章中,我们将看看用来检查你的系统分区的一些命令,这些命令将检查每个磁盘的分区情况和其他细节,例如总大小,用完的空间和文件系统等。
像fdisksfdisk和cfdisk命令是一般分区工具不仅可以显示分区信息还可以修改。
### 1. fdisk ###
Fdisk is the most commonly used command to check the partitions on a disk. The fdisk command can display the partitions and details like file system type. However it does not report the size of each partitions.
Fdisk是检查磁盘上分区的最常用命令fdisk命令可以显示分区和细节如文件系统类型但是它并不报告每个分区的大小。
$ sudo fdisk -l
@ -36,11 +35,10 @@ Fdisk is the most commonly used command to check the partitions on a disk. The f
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 7907327 3952640 b W95 FAT32
Each device is reported separately with details about size, seconds, id and individual partitions.
单独显示了每个设备的详细信息大小ID和单个分区。
### 2. sfdisk ###
Sfdisk is another utility with a purpose similar to fdisk, but with more features. It can display the size of each partition in MB.
Sfdisk是另一种跟fdisk目的相似的实用工具但具有更多的功能。它可以以MB为单位显示每个分区的大小。
$ sudo sfdisk -l -uM
@ -75,20 +73,20 @@ Sfdisk is another utility with a purpose similar to fdisk, but with more feature
### 3. cfdisk ###
Cfdisk is a linux partition editor with an interactive user interface based on ncurses. It can be used to list out the existing partitions as well as create or modify them.
Cfdisk是一个基于ncurses提供字符终端处理库包括面板和菜单的带有交互式用户界面的Linux分区编辑器它可以用来列出现有分区以及创建或修改这些分区。
Here is an example of how to use cfdisk to list the partitions.
下面是一个如何使用Cfdisk来列出分区的例子。
![linux cfdisk disk partitions](http://www.binarytides.com/blog/wp-content/uploads/2014/06/linux-cfdisk.png)
Cfdisk works with one partition at a time. So if you need to see the details of a particular disk, then pass the device name to cfdisk.
Cfdisk工作在同一个分区所以如果你需要看某一磁盘的细节可以把设备名传给Cfdisk。
$ sudo cfdisk /dev/sdb
### 4. parted ###
Parted is yet another command line utility to list out partitions and modify them if needed.
Here is an example that lists out the partition details.
Parted是另一个命令行实用程序用来列出分区,如果需要的话,也可进行修改。
下面是一个例子,列出了详细的分区信息。
$ sudo parted -l
Model: ATA ST3500418AS (scsi)
@ -115,9 +113,9 @@ Here is an example that lists out the partition details.
### 5. df ###
Df is not a partitioning utility, but prints out details about only mounted file systems. The list generated by df even includes file systems that are not real disk partitions.
Df是不是一个分区工具但它打印出挂装文件系统的细节Df可以列出甚至不是真实的磁盘分区的文件系统。
Here is a simple example
这里是个简单的例子:
$ df -h
Filesystem Size Used Avail Use% Mounted on
@ -131,16 +129,16 @@ Here is a simple example
/dev/sda8 196G 154G 33G 83% /media/13f35f59-f023-4d98-b06f-9dfaebefd6c1
/dev/sda5 98G 37G 62G 38% /media/4668484A68483B47
Only the file systems that start with a /dev are actual devices or partitions.
文件系统只有以 /dev 开始的,是实际设备或分区。
Use grep to filter out real hard disk partitions/file systems.
使用grep命令来筛选出实际的硬盘分区或文件系统。
$ df -h | grep ^/dev
/dev/sda6 97G 43G 49G 48% /
/dev/sda8 196G 154G 33G 83% /media/13f35f59-f023-4d98-b06f-9dfaebefd6c1
/dev/sda5 98G 37G 62G 38% /media/4668484A68483B47
To display only real disk partitions along with partition type, use df like this
为了只显示真正的磁盘分区与分区类型可以这样使用Df
$ df -h --output=source,fstype,size,used,avail,pcent,target -x tmpfs -x devtmpfs
Filesystem Type Size Used Avail Use% Mounted on
@ -148,11 +146,11 @@ To display only real disk partitions along with partition type, use df like this
/dev/sda8 ext4 196G 154G 33G 83% /media/13f35f59-f023-4d98-b06f-9dfaebefd6c1
/dev/sda5 fuseblk 98G 37G 62G 38% /media/4668484A68483B47
Note that df shows only the mounted file systems or partitions and not all.
请注意Df只显示已挂载的文件系统或分区并不是所有。
### 6. pydf ###
Improved version of df, written in python. Prints out all the hard disk partitions in a easy to read manner.
用Python写的Df的改进版本以一个易于阅读的方式打印出所有磁盘分区。
$ pydf
Filesystem Size Used Avail Use% Mounted on
@ -160,12 +158,13 @@ Improved version of df, written in python. Prints out all the hard disk partitio
/dev/sda8 195G 153G 32G 78.4 [#######..] /media/13f35f59-f023-4d98-b06f-9dfaebefd6c1
/dev/sda5 98G 36G 61G 37.1 [###......] /media/4668484A68483B47
Again, pydf is limited to showing only the mounted file systems.
另外pydf限制为仅显示已挂载的文件系统
### 7. lsblk ###
Lists out all the storage blocks, which includes disk partitions and optical drives. Details include the total size of the partition/block and the mount point if any.
Does not report the used/free disk space on the partitions.
列出了所有的存储块,包括磁盘分区和光盘驱动器。细节包括所有分区/块总大小和挂载点。
不报告分区上的已使用和空闲磁盘空间。
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
@ -180,13 +179,14 @@ Does not report the used/free disk space on the partitions.
└─sdb1 8:17 1 3.8G 0 part
sr0 11:0 1 1024M 0 rom
If there is no MOUNTPOINT, then it means that the file system is not yet mounted. For cd/dvd this means that there is no disk.
Lsblk is capbale of displaying more information about each device like the label and model. Check out the man page for more information
如果没有挂载点这就意味着文件系统未安装对于cd/dvd这意味着没有磁盘。
lsblk能够显示每个设备的更多信息如标签和模型更多请查看信息手册。
### 8. blkid ###
Prints the block device (partitions and storage media) attributes like uuid and file system type. Does not report the space on the partitions.
打印块设备分区和存储介质属性例如UUID和文件系统类型不报告分区空间。
$ sudo blkid
/dev/sda1: UUID="5E38BE8B38BE6227" TYPE="ntfs"
@ -198,7 +198,7 @@ Prints the block device (partitions and storage media) attributes like uuid and
### 9. hwinfo ###
The hwinfo is a general purpose hardware information tool and can be used to print out the disk and partition list. The output however does not print details about each partition like the above commands.
hwinfo是一个通用的硬件信息的工具可以用来打印出磁盘和分区表输出不再像上面的命令那样打印每个分区的详细信息。
$ hwinfo --block --short
disk:
@ -216,17 +216,18 @@ The hwinfo is a general purpose hardware information tool and can be used to pri
/dev/sr0 SONY DVD RW DRU-190A
### Summary ###
### 总结 ###
The output of parted is concise and complete to get an overview of different partitions, file system on them and the total space. Pydf and df are limited to showing only mounted file systems and the same on them.
parted的输出简洁而完整的得到不同分区的概述、上面的文件系统以及总空间。pydf和df被限制为只显示和他们一样的已挂载的文件系统。
Fdisk and Sfdisk show a whole lot of information that can take sometime to interpret whereas, Cfdisk is an interactive partitioning tool that display a single device at a time.
fdisk和sfdisk显示完整的大量的可以花些时间来解释的信息cfdisk是一个互动的分区工具每次显示一个单一的设备。
So try them out, and do not forget to comment below.
来尝试下吧,别忘了在下面评论哟!
--------------------------------------------------------------------------------
via: http://www.binarytides.com/linux-command-check-disk-partitions/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
译者:[tenght](https://github.com/tenght) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,297 @@
安装Linux Mint 17 Qiana Cinnamon后要做的20件事
================================================================================
### Linux Mint 17 Qiana Cinnamon ###
Linux Mint 17已经[发布][1]定名为Qiana。Mint是Linux最佳发行版之一它定位于桌面用户关注可用性和简洁。它携带了风格迥异的桌面环境如Mate以及Cinnamon并基于不同的发行版如Ubuntu或Debian。
在本文中我们使用的是Linux Mint 17的cinnamon版本。要获取更多关于Cinnamon版本的信息包括下载链接可以访问 - [http://blog.linuxmint.com/?p=2626][2]
下载适合你系统的正确的iso烧录成dvd或者也可以制作成usb启动盘来启动。安装完毕了是时候来使用一些优化工具和基本应用程序来优化系统性能和体验让你系统激情澎湃吧
### 1. 更新系统 ###
第一件事情是重中之重,就是让你的系统保持时刻最新。赶紧在终端中运行以下命令吧。
$ sudo apt-get update
$ sudo apt-get upgrade
或者你也可以使用更新管理器mintUpdate来干这事你可以在菜单Menu> 管理Administration中找到它。
![linux mint 17 qiana](http://www.binarytides.com/blog/wp-content/uploads/2014/06/linux-mint-17-qiana.png)
### 2. 找回旧壁纸 ###
每个Linux Mint发行版都自带了一套最新的漂亮的壁纸。但是你也可以安装先前版本中的壁纸。
$ sudo apt-get install mint-backgrounds-*
### 3. 多安装些浏览器 ###
Linux Mint 17默认安装了firefox你也可以获得更多的浏览器如Chronium和Google Chrome。
Chronium浏览器可以在仓库中获取。
$ sudo apt-get install chromium-browser
至于Google Chrome请访问google.com/chrome下载deb包并使用gdebi来安装。
# 64 位
$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
$ sudo gdebi google-chrome-stable_current_amd64.deb
# 32 位
$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb
$ sudo gdebi google-chrome-stable_current_i386.deb
### 4. 安装Flash Player ###
Mint上默认安装adobe flash插件包adobe-flashplugin因此你可以在Firefox中畅玩flash游戏也可以尽情享受网页版视频了。
Google Chrome现在使用了基于flash player的Pepper API而且该插件也内建于Chrome中因此你也不需要为它做任何事情了。
然而对于Chronium基于flash player的Pepper没有被囊括进来因为它不是个自由组件所以你需要手动安装了。
安装以下包来为Chronium安装pepper flash player。它会自动从Google Chrome浏览器中下载pepper flash player并加入到Chronium中。
$ sudo apt-get install pepperflashplugin-nonfree
上面的命令应该帮你将flash player安装到Chronium里头了。万一下载失败你可以使用下面的命令重新进行安装。
$ sudo dpkg-reconfigure pepperflashplugin-nonfree
### 5. 安装多媒体解码 ###
受限的额外包可以帮你安装大多数基本的解码可以让你播放像mp3这样的格式。它也会帮你安装微软字体。
$ sudo apt-get install ubuntu-restricted-extras
要启用加密dvd的回放请安装以下包。
$ sudo apt-get install libdvdread4
$ sudo /usr/share/doc/libdvdread4/install-css.sh
### 6. 安装专有驱动 ###
如果你有一张英伟达或者ati的图形卡或者broadcom的无线网卡那么请安装厂商提供的专有驱动这些驱动会为你带来最佳的硬件性能。
要安装英伟达驱动,你可以参照先前的这篇文章
如何在Linux Mint上安装最新的Nvidia驱动
### 7. 安装Dropbox ###
Linux mint仓库已经提供了dropbox的客户端软件包所以你不必满世界找了。
$ sudo apt-get install dropbox python-gpgme
如果你还是比较喜欢从官方网站下载,那么出门可直达[https://www.dropbox.com/install?os=lnx][4]请遵照说明下载用于Ubuntu的deb安装包。
Copy是另外一个云存储解决方案它也有本地Linux客户端。详情可查阅[copy.com][5],它也有[ppa仓库][6]。
### 8. Skype ###
Skype可以在Ubuntu canonical合作仓库中找到。
$ sudo apt-get install skype
### 9. 安装rar和其它归档工具 ###
要想在Nemo这样的文件管理器中通过上下文菜单创建rar归档请安装rar工具。安装rar的同时请安装其它几个包以增加对其它归档格式的支持。
$ sudo apt-get install unace p7zip-rar sharutils rar arj lunzip lzip
### 10. 安装剪贴板管理器 ###
剪贴板管理器允许你维护和访问通过像Ctr+C这样的操作拷贝的项目历史gnome下有很多的剪贴板管理器像diodonclipitglipperparcellite。
Diodon在cinnamon桌面上似乎存在一些问题在历史列表增长时会出现滚动条。Clipit和Gipper工作得很好你也可以安装
$ sudo apt-get install glipper
# 或者
$ sudo apt-get install clipit
然后,你可以从应用程序菜单中启动它们,它们应该会在你每次登陆时启动。
### 11. 优化桌面 ###
#### 1. 修复系统托盘上的日期格式 ####
在底部面板右边的时间小程序只显示了时间,它也可以设置显示日期。右击底部面板右边的日期-时间小程序,然后点击配置
Check the box labelled "Use a custom date format" and fill in
选中标有“使用自定义日期格式”的选框,然后填入
%B %e, %I:%M %p
这会以带有AM/PM的12小时格式显示月份名称、日期和时间。
#### 2. 安装主题、扩展、小程序、桌面组件 ####
为你的桌面搞一些好东西玩玩。你可以在桌面区域放置一些桌面组件,在面板上放些小程序,为桌面效果添加一些扩展,以及为桌面设计安装一些主题。
去系统设置吧,点击指定的图标,你可以看见一个可供选择的列表。点击“在线获取更多”标签来下载更多的好东西。
#### 3. 修改Firefox的搜索引擎 ####
你也许注意到Firefox默认选择了Yahoo搜索引擎而搜索引擎列表中并没有Google。点击“管理搜索引擎” > 获取更多搜索引擎,它会带你去[http://www.linuxmint.com/searchengines.php][7]。
向下拉动滚动条到商业搜索引擎部分找到并点击Google图标。进入下一页后再次点击搜索引擎列表而这次你会看到“添加Google”选项点击它就可以用上Google搜索了。
### 12. 优化字体渲染 ###
Linux mint默认使用Dejavu Sans字体它看起来真普通啊。你可以使用Droid和Noto字体获得好看得多视觉享受。请参照我们先前的教程它会一步一步带你渐入佳境。
[如何在Linux Mint上获得华丽好看的字体][8]
### 13. Guake下拉终端 ###
下拉终端让你可以通过点击单个键来访问终端Guake就是这其中之一它用于基于gtk的桌面。下拉终端按要求显示/隐藏,并保持运行,因此你无需从菜单或者启动器中打开终端了。这对于热衷于终端的人来说,这是一个必不可少的工具。
$ sudo apt-get install guake
Guake需要配置以便在每次登陆时启动。首先找到guake命令的路径。
$ which guake
/usr/bin/guake
现在,把它添加到启动程序列表中。出门左拐,请往系统设置 > 启动程序,然后点击添加。在对话框中填写
> 名称 - Guake下拉终端
> 命令 - /usr/bin/guake
点击添加。现在Guake已经跑到你的运行程序列表中去了并每次会自动启动。
### 14. Uget下载管理器 ###
Uget是一个简洁而健壮的跨平台下载管理器在Linux上工作得很好。虽然它缺少分段下载文件功能但是仍然是一个十分稳定的下载管理器。
$ sudo apt-get install uget
### 15. Deluge BitTorrent客户端 ###
Linux Mint自带了Transmission这是个简洁而高效的torrent客户端。如果正在寻找一个更有特色的torrent客户端那么你可以试试deluge或者vuze正式名称是azureus还可以试试qbittorent。
$ sudo apt-get install deluge-torrent
### 16. Hardinfo - 系统信息工具 ###
Hardinfo是一个十分便利的gui工具它可以用来报告大量完整的系统硬件信息。你可以通过它来集中查看处理器、内存、存储设备、网络配置、打印机、usb设备、声音/视频适配器等等信息。它具有测试和评估系统性能的功能。
$ sudo apt-get install hardinfo
### 17. 安装MATE桌面环境 ###
除了CinnamonLinux Mint还自带了另一个流行的桌面环境MATEMaatay桌面。如果你想试试那么就来安装吧。
$ sudo apt-get install mint-meta-mate
现在你可以在登陆屏幕选择MATE会话了。
### 18. 让其它分区可写 ###
如果你有其它ext分区比如想用来存储和备份文件那么你需要让它们可写以免每次都要使用root特权。
首先使用gksudo在文件管理器里打开分区挂载目录
$ gksudo nemo
导航到分区目录,右击去往属性 > 权限标签
赋予“目录访问” - 创建和删除文件权限给用户、组和其它。
赋予“文件访问” - 读和写权限给用户、组和其它。
对于NTFS分区你不需要做此事。
### 19. 安装Conky ###
Conky是一个轻量级系统监控工具它通过桌面图形组件显示系统各种资源的统计数据如cpu、内存、网络等。它不是必须的但是可以让你的桌面更加绚丽夺目。
$ sudo apt-add-repository -y ppa:teejee2008/ppa
$ sudo apt-get update
$ sudo apt-get install conky-manager
从应用程序菜单启动Conky管理器并添加组件到桌面。也可以选中开机启动选项来让Conky开机启动。
### 20. 安装一些游戏 ###
Linux确实有一些酷爽的游戏很具娱乐性而且是免费的。注意某些游戏像supertuxkart和0ad要求专用的图形处理器以优化性能。
# 0ad - 像帝国时代那样的策略游戏
$ aptitude search 0ad
# supertuxkart - 赛车游戏
$ aptitude search supertuxkart
# openarena
$ aptitude search openarena
仓库中还有更多的游戏可供你安装像Alien arena, secret maryo chronicles, supertux, frozen bubbles等等。
### 清除 ###
做完这一切后,请为系统进行一次大扫除,移除一些不必要的包。
$ sudo apt-get autoremove
### 注 ###
#### 为Google Chrome/Chronium提供Java小程序支持 ####
默认情况下已经安装了"icedtea-plugin"用以为firefox提供java小程序支持。
然而Chrome和Chronium却不再支持基于NPAPI的插件。因此java小程序在没有获得基于Pepper api的java插件前java小程序是不能在这些浏览器中工作的。要查看更多信息请往[这里][9]。
#### 更多应用程序 ####
如果你正在为你的Mint盒子寻找更多的应用程序那么这里列出了一部分更好的应用程序所有这些都可以在软件管理器中安装。
Opera - 网页浏览器
Gnome Encfs Manager - 管理使用Encfs加密的文件和文件夹
Smplayer - 多媒体播放器
Rhythmbox, Clementine - 音乐播放器
Openshot, Kdenlive - 视频编辑器
Audacity - 音频编辑器
Inkscape - 图形和图像编辑
Gparted - 分区编辑器
Gufw - 防火墙配置工具
qBittorrent, Vuze - Torrent客户端
Gwenview - 图像浏览
Team viewer - 远程桌面
Tv-maxe - 查看电视频道
Grub Customizer - 修改GRUB启动菜单设置
Linrunner TLP - 电源管理工具,对笔记本节电很有用
Virtualbox - 虚拟化
Kazam, recordMyDesktop - 桌面录像/演示
Bleachbit - 通过删除旧的/临时文件释放磁盘空间
Cheese - 使用网络摄像头拍照
Shutter - 带有众多功能的屏幕截图工具
那么请选择你喜欢的那些并尽情享受Linux Mint吧
### 资源 ###
下载最新Linux Mint
[http://www.linuxmint.com/download.php][10]
社区教程
[http://community.linuxmint.com/tutorial][11]
Linux Mint论坛
[http://forums.linuxmint.com/][12]
--------------------------------------------------------------------------------
via: http://www.binarytides.com/better-linux-mint-17-cinnamon/
译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://blog.linuxmint.com/?p=2626
[2]:http://blog.linuxmint.com/?p=2626
[3]:http://www.binarytides.com/install-nvidia-drivers-linux-mint-16/
[4]:http://www.dropbox.com/install?os=lnx
[5]:http://copy.com/?r=DSwtSd
[6]:http://launchpad.net/~paolorotolo/+archive/copy
[7]:http://www.linuxmint.com/searchengines.php
[8]:http://www.binarytides.com/optimize-fonts-linux-mint/
[9]:http://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1309508
[10]:http://www.linuxmint.com/download.php
[11]:http://community.linuxmint.com/tutorial
[12]:http://forums.linuxmint.com/

View File

@ -0,0 +1,115 @@
如何清除 Linux/Unix DNS缓存
================================================================================
![](http://figs.cyberciti.biz/3rdparty/configure.png)
我在Linux下使用拨号连接上网频繁的拨号断线造成DNS的问题。我如何在Linux/Unix发行版下使用shell命令清除DNS缓存
在MS-Windows下,你可以使用[ipconfig命令来清除dns缓存][1]。然而Linux和Unix提供了不同的方法来清除缓存。Linux可以运行nscd或者BIND或者dnsmasq作为名称服务缓存守护进程。大型或者工作组服务器可能使用BIND或者dnsmasq作为专用缓存服务器来加速查询。
### 如何: 清除 nscd dns 缓存 ###
Nscd caches libc-issued requests to the Name Service. If retrieving NSS data is fairly expensive, nscd is able to speed up consecutive access to the same data dramatically and increase overall system performance. Just restart nscd:
Nscd缓存libc发给名称服务的请求。如果检索NSS数据是很昂贵的那么nscd能够显著加快连续访问同一数据并提高整个系统的性能。只需重启nscd
$ sudo /etc/init.d/nscd restart
# service nscd restart
# service nscd reload
这个守护进程给最常用的名称服务请求提供了高速缓存。默认的配置文件/etc/nscd.conf决定了高速缓存守护进程的行为。
### 清除 dnsmasq dns 缓存 ###
[dnsmasq的是一个轻量级的DNS][2]TFTP和DHCP服务器。它的目的是给局域网提供耦合的DNS和DHCP服务。 dnsmasq的接受DNS查询并从本地高速缓存应答它们或将其转发到一个真正的递归DNS服务器。该软件也安装了很多便宜的路由器来缓存DNS查询。只需启动dnsmasq的服务来清除DNS缓存
$ sudo /etc/init.d/dnsmasq restart
或者
# service dnsmasq restart
### 清除BIND缓存服务器的dns缓存 ###
A caching BIND server obtains information from another server (a Zone Master) in response to a host query and then saves (caches) the data locally. All you have to do is restart bind to clear its cache:
一台BIND缓存服务器从另一台服务器区域主响应主机的查询而获得信息然后保存缓存)数据到本地。您所要做的就是重新绑定以清除其缓存:
# /etc/init.d/named restart
你也可以使用下面rndc命令来清除所有的缓存:
# rndc restart
或者
# rndc exec
flushname命令刷新所有的连接到一个特定的域名的记录。本例中刷新cyberciti.biz相关域的所有记录
# rndc flushname cyberciti.biz
它同样也可以用来清除BIND View.比如,LAN和WAN的View可以用下面的命令清除:
# rndc flush lan
# rndc flush wan
### Mac OS X Unix 用户提示 ###
使用root用户输入下面的命令:
# dscacheutil -flushcache
或者
$ sudo dscacheutil -flushcache
如果你正在使用OSX 10.5 或者更早的版本,尝试使用下面的命令:
lookupd -flushcache
### /etc/hosts 文件的一个提示 ###
/etc/hosts作为一个静态查询主机的表格。你需要在类Unix操作系统下依据你的要求移除并且/或者更新它:
# vi /etc/hosts
#### 示例输出: ####
127.0.0.1 localhost
127.0.1.1 wks01.WAG160N wks01
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
10.37.34.2 build
192.168.1.10 nas01
192.168.1.11 nas02
192.168.1.12 nas03
#192.168.2.50 nfs2.nixcraft.net.in nfs2
#192.168.2.51 nfs1.nixcraft.net.in nfs1
172.168.232.50 nfs1.nixcraft.net.in nfs1
172.168.232.51 nfs2.nixcraft.net.in nfs2
192.168.1.101 vm01
### 再看这里: ###
相关: 在Windows Vista / XP中用ipconfig 命令[ 清除 DNS 缓存][3]
--------------------------------------------------------------------------------
via: http://www.cyberciti.biz/faq/rhel-debian-ubuntu-flush-clear-dns-cache/
译者:[geekpi](https://github.com/译者ID) 校对:[geekpi](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://theos.in/windows-vista/flush-dns-cache-with-ipconfig/
[2]:http://www.cyberciti.biz/tips/how-do-i-improve-dns-performance-on-linuxwindows-desktop.html
[3]:http://theos.in/windows-vista/flush-dns-cache-with-ipconfig/