Merge pull request #7 from LCTT/master

Update My Repository
This commit is contained in:
joeren 2014-06-18 08:19:33 +08:00
commit 3a0359c69c
20 changed files with 1209 additions and 397 deletions

View File

@ -0,0 +1,42 @@
命令行之秘
================================================================================
有很多使用命令行的理由。正如我们在[issue 3 of Linux Voice][1]中展示的那样,它是与你的计算机交互的最强大和简明的方法。但是,我们还是先来看一下命令行的一些隐晦的使用场景(或许有些人会觉得没有意义)。
### 浏览网页 ###
Firefox和Chromium都是很好的浏览器但是你有没有发现它们有点太图形化了没有看一下下面的视频我们使用elinks web浏览器显示了与黑客相关的新闻。界面可能没有其他浏览器好看但是它的目标是显示绝大多数的web页面
<iframe width="570" scrolling="no" height="418" src="http://shelr.tv/records/5368d80796608063a3000072/embed" style="border: 0; id="shelr_record_5368d80796608063a3000072"></iframe>
作为一个极客当你只有SSH连接方式时需要快速检查一下能否访问网页时这将是一个很便利的方法。
### 在维基百科上查找想要的信息 ###
是的上面我们已经提到了使用Web但是web不是查看维基百科的唯一方式。David Leadbeater已经构建了一个将维基百科的内容放入DNS记录的DNS服务器。这能够让你使用像dig这样的命令行工具来抓取你想要的信息。
<iframe width="570" scrolling="no" height="418" src="http://shelr.tv/records/5368bfa896608063a300006d/embed" style="border: 0;" id="shelr_record_5368bfa896608063a300006d"></iframe>
### 看电影 ###
当你想要看《星球大战 4 新的希望》时不再需要使用Netflix或者YouTube只要在你的终端中直接telnet towel.blinkenlights.nl就行了。
<iframe width="570" scrolling="no" height="418" style="border: 0" src="http://shelr.tv/records/5368be5296608063a300006c/embed" id="shelr_record_5368be5296608063a300006c" border="0"></iframe>
### 玩游戏 ###
再Steam来之前Linux下就有许多游戏并且很多都不需要图形界面比如NetHack、Robots和Greed。下面是Moon Buggy 的一个演示:
<iframe width="570" scrolling="no" height="418" style="border: 0" src="http://shelr.tv/records/5368ca4596608063a300006f/embed" id="shelr_record_5368ca4596608063a300006f" border="0"></iframe>
LCTT译注大家注意到这篇文章中的视频了么不是通常的FLA也不是MP4、AVI。而是一个专门演示脚本“功夫”的一个网站提供的http://shelr.tv/ ,欢迎大家也去演练下你的脚本功夫吧!
LCTT译注为了正常呈现我专门临时打开了网站对IFRAME的限制。。。
--------------------------------------------------------------------------------
via: http://www.linuxvoice.com/commandline-secrets/
译者:[johnhoow](https://github.com/johnhoow ) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.linuxvoice.com/issue-3-is-out/

View File

@ -0,0 +1,126 @@
Linux终端下 dstat 监控工具
================================================================================
dstat 是一个可以取代vmstatiostatnetstat和ifstat这些命令的多功能产品。dstat克服了这些命令的局限并增加了一些另外的功能增加了监控项也变得更灵活了。dstat可以很方便监控系统运行状况并用于基准测试和排除故障。
dstat可以让你实时地看到所有系统资源例如你能够通过统计IDE控制器当前状态来比较磁盘利用率或者直接通过网络带宽数值来比较磁盘的吞吐率在相同的时间间隔内
dstat将以列表的形式为你提供选项信息并清晰地告诉你是在何种幅度和单位显示输出。这样更好地避免了信息混乱和误报。更重要的是它可以让你更容易编写插件来收集你想要的数据信息以从未有过的方式进行扩展。
Dstat的默认输出是专门为人们实时查看而设计的不过你也可以将详细信息通过CSV输出到一个文件并导入到Gnumeric或者Excel生成表格中。
###特性###
- 结合了vmstatiostatifstatnetstat以及更多的信息
- 实时显示统计情况
- 在分析和排障时可以通过启用监控项并排序
- 模块化设计
- 使用python编写的更方便扩展现有的工作任务
- 容易扩展和添加你的计数器(请为此做出贡献)
- 包含的许多扩展插件充分说明了增加新的监控项目是很方便的
- 可以分组统计块设备/网络设备,并给出总数
- 可以显示每台设备的当前状态
- 极准确的时间精度,即便是系统负荷较高也不会延迟显示
- 显示准确地单位和和限制转换误差范围
- 用不同的颜色显示不同的单位
- 显示中间结果延时小于1秒
- 支持输出CSV格式报表并能导入到Gnumeric和Excel以生成图形
### 安装方法 ###
Ubuntu/Mint和Debin系统
本地软件库中有相关安装包,你可以用下面命令安装:
# sudo apt-get install dstat
RHEL/Centos和Fedora系统:
你可以在romforge软件库中添加有相关安装包参照[指导][2],使用如下命令很简单就能进行安装:
# yum install dstat
ArchLinux系统
相关软件包在社区资源库中,你可以用这个命令来安装:
# pacman -S dstat
###使用方法 ###
dstat的基本用法就是输入dstat命令输出如下
![](http://cdn.linuxaria.com/wp-content/uploads/2014/05/dstat.png)
这是默认输出显示的信息:
**CPU状态**CPU的使用率。这项报告更有趣的部分是显示了用户系统和空闲部分这更好地分析了CPU当前的使用状况。如果你看到"wait"一栏中CPU的状态是一个高使用率值那说明系统存在一些其它问题。当CPU的状态处在"waits"时那是因为它正在等待I/O设备例如内存磁盘或者网络的响应而且还没有收到。
**磁盘统计**:磁盘的读写操作,这一栏显示磁盘的读、写总数。
**网络统计**:网络设备发送和接受的数据,这一栏显示的网络收、发数据总数。
**分页统计**系统的分页活动。分页指的是一种内存管理技术用于查找系统场景一个较大的分页表明系统正在使用大量的交换空间或者说内存非常分散大多数情况下你都希望看到page in换入和page out换出的值是0 0。
**系统统计**这一项显示的是中断int和上下文切换csw。这项统计仅在有比较基线时才有意义。这一栏中较高的统计值通常表示大量的进程造成拥塞需要对CPU进行关注。你的服务器一般情况下都会运行运行一些程序所以这项总是显示一些数值。
默认情况下dstat每秒都会刷新数据。如果想退出dstat你可以按"CTRL-C"键。
需要注意的是报告的第一行,通常这里所有的统计都不显示数值的。
这是由于dstat会通过上一次的报告来给出一个总结所以第一次运行时是没有平均值和总值的相关数据。
但是dstat可以通过传递2个参数运行来控制报告间隔和报告数量。例如如果你想要dstat输出默认监控、报表输出的时间间隔为3秒钟,并且报表中输出10个结果你可以运行如下命令
dstat 3 10
在dstat命令中有很多参数可选你可以通过man dstat命令查看大多数常用的参数有这些
- -l :显示负载统计量
- -m 显示内存使用率包括usedbuffercachefree值
- -r 显示I/O统计
- -s :显示交换分区使用情况
- -t :将当前时间显示在第一行
- fs 显示文件系统统计数据包括文件总数量和inodes值
- nocolor :不显示颜色(有时候有用)
- socket :显示网络统计数据
- tcp 显示常用的TCP统计
- udp 显示监听的UDP接口及其当前用量的一些动态数据
当然不止这些用法dstat附带了一些**插件**很大程度地扩展了它的功能。你可以通过查看/usr/share/dstat目录来查看它们的一些使用方法常用的有这些
- -disk-util :显示某一时间磁盘的忙碌状况
- -freespace :显示当前磁盘空间使用率
- -proc-count :显示正在运行的程序数量
- -top-bio 指出块I/O最大的进程
- -top-cpu 图形化显示CPU占用最大的进程
- -top-io 显示正常I/O最大的进程
- -top-mem :显示占用最多内存的进程
举一些例子:
查看全部内存都有谁在占用:
dstat -g -l -m -s --top-mem
显示一些关于CPU资源损耗的数据
dstat -c -y -l --proc-count --top-cpu
###如何输出一个csv文件###
想输出一个csv格式的文件用于以后可以通过下面的命令
# dstat output /tmp/sampleoutput.csv -cdn
--------------------------------------------------------------------------------
via: http://linuxaria.com/howto/linux-terminal-dstat-monitoring-tools
译者:[disylee](https://github.com/disylee) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://linuxaria.com/tag/network
[2]:http://www.tecmint.com/install-and-enable-rpmforge-repository-in-rhel-centos-6-5-4/

View File

@ -0,0 +1,60 @@
谢天谢地,开源软件中的个人崇拜正在消亡!
================================================================================
“开源之神圣独裁者”越来越少了,不过没事!
Roy Rubin这位流行的电子商务开源项目[Magento][1]的联合创始人从这一2008年启动的项目中功成身退后在[这周说出了][2]上面这样的话语。
![](http://readwrite.com/files/styles/1400_0/public/fields/richardstallman_0.jpg)
这已经不是第一次一个开源项目的领导者出走项目了,但值得注意的是对于它带来的反响是:没啥大的反应。
并不是因为Rubin对于Magento项目不重要实际上他非常重要。六年来Rubin实际上是Magento项目的灵魂。但是开源软件一直在成长它一直在削弱个人对其的影响。当然没人希望Linux的创始人Linus Torvalds不小心被车撞了在这点上我们是[爱他][3]的。但是另外一方面其实我们并不太在意。
但是并不总是这样的。
### 崇拜开源之神圣独裁者! ###
在好的一面,成功的开源项目一直以来都和伟大的领导者密不可分。对一个充满活力又有独立思想的一个开发团体施加影响,必定是众口难调的事情。在一个专门的开源项目当中不同的观点会产生各种不同的路线(在代码层上,管它叫做“分支”),通常这时候,要么是“开源之神圣独裁者”,要么是项目领袖,将会介入,施展自己的领导才能让开发人员团结在一起。
“[开源之神圣独裁者 BDFL][0]”这个词[可能第一个用于Python项目的领导者Guido von Rossum][4]。它现在也被用到了Linux的发明人Linus Torvalds身上以及Ubuntu的领导者Mark Shuttleworth和其他人身上。有时候另外两个人也会冠以这个称号比如[Django][5]项目的Adrian Holovaty和Kaplan-Moss。LCTT译注BDFLbenevolent dictator for life 由LCTT 核心译者 Viz 建议译作“开源之神圣独裁者”。)
在他们影响力最大的时候这些领袖离开项目会对项目的将来产生灾难性的影响这展现出这些伟大领导者与项目之间紧密的关联。但是有时候也不总是这样。Django的领导者[去了其他的项目][6]但是Django依然不断前行着像Python、Lucene领导者Doug Cutting、Jboss领导者Marc Fleury和其他很多的项目也是这样。
现在开源软件研发的团体依然围绕着伟大的领导者,但我们似乎并不像曾经的那样依赖他们了。开源软件的“个人崇拜”正在褪色,也有可能已经消亡了,但是接下来会怎么样呢?
### Apache和开源社区的崛起 ###
是的社区开始崛起了。我意识到我在做出一些自以为是的论调但是根据我在开源项目15年的经验来说我观察到开源软件项目从非常严格的控制阶段缓慢的转向了松散的开源团体他们经常是因为兴趣才互相合作的。
当然并不清楚是先有 BSD/Apache之类的许可证的“鸡”还是后有开源软件相互合作的“蛋”这两个很明显的一起改变了开源软件的运作模式。
当然还是需要“开源之神圣独裁者”。举个例子当自由GNU还不是一个项目时很难想象如果没有了Richard Stallman会是怎么样。相反的很容易想象Apache Hadoop如果没有领导会怎么样…等等好像Hadoop真的没有人领导…
如果真的要说答案的话,那就是这里每个人或者[许多人][7]。当然Hadoop由Doug Cutting启动但是它已经发展成了一个公司和个人不过大多数的公司雇佣了这些人的协作的社区。
OpenStack与之类似[被涉及的公司所主导][8]如果某一个Openstack的开发者离开了Openstack依然能够继续。因此对于一个成员正在增加的开源项目来说这种类似是确信无疑的。
### 未来不需要“开源之神圣独裁者”吗? ###
并不是说在以后的开源项目中不需要领导者。需要但是越来越多的开源项目转为团体之间的合作失去他们的风险消失了。坦白的说即使公司们没有深入的参入进来Apache许可证的项目反正也不依赖“开源之神圣独裁者”们。
Photo of Richard Stallman [courtesy of Friprog on Flickr][9]
--------------------------------------------------------------------------------
via: http://readwrite.com/2014/05/02/open-source-magento-roy-rubin-bdfl#feed=/hack&awesm=~oDgSTEdnXAjUv0
译者:[jiajia9linuxer](https://github.com/jiajia9linuxer) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://magento.com/
[2]:http://magento.com/blog/magento-news/note-roy-and-mark#.U2JhPK1dVii
[3]:http://www.serverwatch.com/server-news/if-linus-torvalds-got-hit-by-a-bus-would-linux-die.html
[4]:http://www.artima.com/weblogs/viewpost.jsp?thread=235725
[5]:https://www.djangoproject.com/
[6]:http://www.theatlantic.com/technology/archive/2014/01/on-the-reign-of-benevolent-dictators-for-life-in-software/283139/
[7]:http://hadoop.apache.org/who.html
[8]:http://activity.openstack.org/dash/releases/
[9]:https://www.flickr.com/photos/friprog/
[0]:http://en.wikipedia.org/wiki/Benevolent_dictator_for_life

View File

@ -1,29 +0,0 @@
Ubuntu for Phones Activated on 10,000 Devices
================================================================================
![](http://i1-news.softpedia-static.com/images/news2/Ubuntu-for-Phones-Activated-on-10-000-Devices-446824-2.jpg)
**Canonical has announced that their Ubuntu for phones operating system has been activated on 10,000 devices, marking an important milestone for the company.**
Ubuntu for phones was announced at the beginning of 2013 and the development team has been working on it since then. It took them a while to get a functioning version and they've been improving it constantly.
This new 10,000 milestone is important because company doesn't have devices shipping with the operating system. So far, only users with Nexus devices, phones and tablets, have been able to install it. This means a lot for an OS that you can only download.
“Ubuntu phone (and tablet) users sign into their Ubuntu One account on their device in order to download or update the applications on their phone. This allows us to provide many useful features that users expect coming from Android or iOS, such as being able to re-install their collection of apps on a new phone or after resetting their current one, or browsing the stores website (coming soon) and having the option to install an app directly to their device from there.”
“As a side effect, it means we know how many unique Ubuntu One accounts have connected to the store to in order to download an app, and that number has this week passed the 10,000 mark,” [said][1] Canonicals Michal Hall.
Currently, user dont have to delete their Android from their Nexus devices because its possible to dual boot, and there are even a few ways to do it. The first devices that will ship with Ubuntu preinstalled will arrive later this year, most likely before the holiday season, and the communitys interest is already at an all-high level.
Canonical also created an Ubuntu SDK to help developers make apps for the new operating systems and there are already quite a few native apps that rival the ones on other platforms. They are not there yet, but they still have a few months until the official release and there is still plenty of time get a decent amount of applications and not just some web app replacements.
If you have a Nexus 4 phones or a Nexus 7 tablet, you can install Ubuntu right now. Its still rough around the edges and you might find it a little too different from what you were used to, but give it time and you will grow to like it.
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/Ubuntu-for-Phones-Activated-on-10-000-Devices-446824.shtml
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://developer.ubuntu.com/2014/06/10000-users-of-ubuntu-phone/

View File

@ -0,0 +1,80 @@
14 Apps To Boost Ubuntu
================================================================================
Making the switch to Ubuntu or any popular Linux distribution is more than the mere act of changing operating systems. You must also have apps that allow you to get work done.
In this article, I'll be sharing critical applications that I rely on, and Ill talk about how I use them in my daily activities.
### Apps for Daily Use ###
Generally when it comes to software on the Linux desktop, I drop app titles into one of two categories. These would be stuff I use every day, and everything else. Below are applications I find myself running each and every day.
1) **Firefox** Sometimes I use other browsers, but lately [Firefox][1] has been my long trusted friend. Reliable, safe and cross platform, Firefox is generally what I use for my daily browsing needs.
In addition to accessing bookmarks and webpages, I also rely on Firefox to handle my various LAN server duties as well. Duties such as: [Plex][2], [Zoneminder][3], router/WAPs, and my file server. All of these are accessed each day using Firefox.
2) **Parcelite** I can't begin to function without a decent clipboard manager, and for me, you can't beat [Parcelite][4] on the GNOME desktop. Simple to use, easy to access and it's also chalked full of useful options. Parcelite options include everything from hotkeys to white space handling. There are a ton of great clipboard managers out there, but it's tough to beat what Parcelite offers.
3) **Bittorrent Sync** I have used various open source alternatives for file syncing that needed more development before being released. That being said [Bittorrent Synchas][5] NEVER let me down. It's easy to run and install thanks to the new GUI offering, and Bittorrent Sync allows me to transfer huge video files quickly from machine to machine without wasting time syncing stuff to the "cloud."
I've also found it to be a fantastic way to share large files easily with others, while maintaining IP address and directory privacy along the way. Despite the numerous alternatives available, I remain firmly grounded as a Bittorrent Sync fanboy.
4) **System Monitor** Because TOP only goes so far, I prefer a tabbed GUI as it's much easier on my eyes. Using GNOME's [System Monitor][6], I can quickly discover a runaway process and easily kill it without ever needing to break a sweat. Unlike a terminal app like [TOP][7], I can also get a visual perspective using graphs in real-time for my CPU, memory and disk usage. Being a visual person, it's difficult to beat the bar graph showing me how much space I have. Same applies to real-time resource usage as well.
5) **PulseAudioControl** Each day, I tend to bounce between multiple sound devices. Sometimes I need to make one the default, but then switch from Firefox audio to another device altogether. Because I like to have as much control over my audio as possible, I've found that [PulseAudioControl][8] is an invaluable tool.
### Everything else software ###
In this section, I'll share apps that I use, but may not necessarily use each and every day. Many of these apps are open source, some are not, all are of great value to me personally.
6) **Skype** Whether it's calling into [Jupiter Broadcasting][9] to co-host a weekly podcast, or simply catching up with a business contact, [Skype][10] is how Internet video conversations happen. After testing countless alternatives, I always find myself coming back to Skype. Even though there are really awesome open source options like [Ekiga][11] or [Jitsi][12], at the end of the day Skype is where everyone is at good luck getting people to switch.
7) **Kdenlive** I use two different video editors, and when it comes to banging out a heavily edited video, [Kdenlive][13] is the tool I use for picture in picture compositing and editing really large, complex videos. I've successfully managed 6 track edits in Kdenlive that have crashed in other video editors.
8) **OpenShot** For the most part, [OpenShot][14] is my goto video editor for most of my video editing tasks. Quick edits, and two track work goes by quickly and easily using this editor. I have also found that it offers great effects that are difficult to match elsewhere. Blender title effects and great video transitions make OpenShot a fantastic editor for my own projects.
9) **SpiderOak** After using countless cloud backup services over the years, I've settled on [SpiderOak][15] as my favorite. Easy to use and setup, I love the incremental options provided and how simple it is use. Just set it and forget it, then SpiderOak does all the heavy lifting.
10) **Dropbox** I've had a love/hate relationship with [Dropbox][16] for many years now. Despite being cross platform, which means I can access files from anywhere, I'm slowly finding my self less and less reliant on this cloud-based backup solution. Still, it does allow me to access files from any web browser even if it's not from a computer I'm normally using, which makes dropping the Dropbox habit even harder.
11) **Writer** I've been relying on [Writer][17] since I first used it on Windows via OpenOffice. Today, I am using Writer with LibreOffice and for my needs, it does everything I could need a word processor to do. Now it's fair to point out that some proprietary office suites might offer additional functionality not found in Writer, however 99% of what most people need is covered here with Writer. For me personally, I'll always be a LibreOffice Writer fan.
12) **SimpleScreenRecorder** Over the years, I've come to find myself using [SimpleScreenRecorder][18] over other alternatives as it does a nice job with multiple monitor support, plus it can even capture OpenGL applications as well. Easy to use and reliable, SimpleScreenRecorder has served me well. I recommend it to anyone who is tired of playing with other screen capturing software that only works some of the time.
13) **SimpleScan** When I need to scan a document, I don't want to spend a lot of time configuring a bloated program. [Simple Scan][19] is great in this capacity. Rocking the SANE scanner database, Simple Scan will work with just about any scanner or all-in-one printer/scanner you throw at it. What's also nice is that it's setup to work with the best resolution out of the box, yet you're still free to make any manual adjustments you see fit.
14) **Baobab** (Disk Usage Analyzer) I keep hearing how hard drive prices have come down. Be that as it may, the fact is I'm not made of money and each dollar I spend is usually part of a tight budget. This means I need to make the best use of the hard drive space I have available. To help me do this, I rely on [Baobab][20] to give me both a clear view of my available space on my hard drive, but also a clearer picture of which directories are eating away at my precious hard drive space.
### Apps That Really Work, Regardless ###
When it comes to applications I rely on, it's really less about their titles and licenses and more about the tasks that they allow me to accomplish. The myth that Linux doesn't really have required software is becoming a thing of the past. Most computing tasks, barring a few limited exceptions, can be done easily from the Linux desktop as I've explained above.
Obviously there are applications that are "must haves" for you, that I might not use myself. What applications do you rely on? Hit the Comments below and share your best applications with the readers here.
--------------------------------------------------------------------------------
via: http://www.datamation.com/applications/14-apps-to-boost-ubuntu-1.html
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.mozilla.org/en-US/firefox/new/
[2]:https://plex.tv/
[3]:http://www.zoneminder.com/
[4]:http://parcellite.sourceforge.net/
[5]:http://www.bittorrent.com/sync
[6]:https://help.gnome.org/users/gnome-system-monitor/3.12/
[7]:http://linux.about.com/od/commands/l/blcmdl1_top.htm
[8]:http://freedesktop.org/software/pulseaudio/pavucontrol/
[9]:http://en.wikipedia.org/wiki/Jupiter_Broadcasting
[10]:http://www.skype.com/en/download-skype/skype-for-linux/
[11]:http://ekiga.org/
[12]:https://jitsi.org/
[13]:http://www.kdenlive.org/
[14]:http://www.openshot.org/
[15]:https://spideroak.com/
[16]:https://www.dropbox.com/
[17]:http://www.libreoffice.org/discover/writer/
[18]:http://www.maartenbaert.be/simplescreenrecorder/
[19]:https://launchpad.net/simple-scan
[20]:http://www.marzocca.net/linux/baobab/baobab-getting-started.html

View File

@ -0,0 +1,112 @@
Does Linux Lack a Killer App?
================================================================================
![](http://www.linuxinsider.com/images/rw302843/linux-killer-app.jpg)
**What Linux needs most is games, said Hyperlogos blogger Martin Espinoza. However, "if you were trying to narrow it down to one app, it would probably still be Photoshop. For all the talk of how great GIMP has become, usability is still an abject nightmare, and in spite of the OSS community's self-back-patting regarding documentation, there is no documentation for GIMP which is not pathetic."**
Well the days are heating up here in the Linux blogosphere, and FOSS fans are flocking to the Broken Windows Lounge as much for the frosty air-conditioning as for the conversation.
Even Linux Girl, whose days generally involve far more pavement-pounding than she'd like, has found herself seeking solace in the blogobar's arctic climes far more often than she probably should.
It's a good thing she has been, though, or she might have missed the latest juicy debate. "What killer app is Linux missing?" was the question that [kicked things off][1], and the discussion has been escalating ever since.
"The Free Software world is incredibly rich, and covers pretty much all bases," **Linux Voice's** Mike Saunders began. "We have a wealth of desktop, server, development and multimedia tools to choose from -- some of which are the best in their field.
"But what is missing?" Sanders went on provocatively. "Is there a killer app that prevents you from running Linux 24x7 on your main machine?"
There was a momentary lull in the conversation around the bar as patrons pondered the suggestion. Linux Girl tried to enjoy the fleeting peace, but it didn't last for more than an instant.
### 'Depends on What You Do' ###
![Linux Girl](http://www.linuxinsider.com/images/article_images/linuxgirl_bg_pinkswirl_150x245.jpg)
"A long time ago Linux needed a lot of things," Google+ blogger Alessandro Ebersol offered. "These days, when every software and the kitchen sink are migrating to the cloud, everything is going to be multiplatform.
"I would say we lacked games, but that also is being taken care of," Ebersol said. "So I don't feel that we desperately need a killer app anymore."
The killer app "depends on what you do with your computer," consultant and [Slashdot][2] blogger Gerhard Mack opined. "If you are drafting, then the killer app is Autocad. But for other industries the killer app will be something else."
### 'The Enterprise Space' ###
Google+ blogger Kevin O'Brien had a similar view.
"There isn't much left on the consumer level," O'Brien said. "I could maybe gripe about games or Nvidia drivers, and I don't really see anything that can replace Quicken. But for me the big difference maker is in the enterprise space.
"Microsoft owns that, and there is nothing that compares to Outlook/Exchange server, Sharepoint, etc.," he asserted. "I suspect part of the reason is that there are not a lot of open source developers who really care about that stuff."
### 'The Tide Is Changing' ###
It's not so much a "missing app" situation as a "not-enough-critical-mass" kind of problem, Google+ blogger Gonzalo Velasco C. suggested.
Many more people use Linux today than did five years ago, he noted; at the same time, many are tied to non-Linux-friendly applications.
"'Everybody' uses $kype, but we have half a dozen apps for that in GNU/Linux, from the simple and very useful Pidgin (my favorite) to Ekiga and similar VoIP apps," Gonzalo Velasco C. explained. "Some users still claim they need Photo$hop and don't take the time to master and suggest improvements for GIMP, Inkscape, Bender and others."
Games used to be missing, "but the tide is changing, mainly -- but not only -- because of Valve's brave SteamOS movement," he added.
### 'Retail Shelf Space' ###
"I don't think there are any 'killer' apps these days," blogger [Robert Pogson][3] agreed. "In Debian GNU/Linux, there are 40K packages. My main PC has only 3K installed and I lack nothing. I have multiple browsers, editors, compilers/interpreters, platforms, and with virtual machinery like KVM, I can play with multiple operating systems and different versions of software as needed.
"I can treat multiple machines as if they were a single machine from anywhere on the LAN," Pogson added. "I can access resources on any node on the LAN from any machine. What more do I need?"
That said, "several professionals have told me that video and image editors in GNU/Linux are a bit weak," he noted. "GIMP is being improved in bit-depth, so that should be covered. Lightworks will eventually be released as FLOSS, so video should be covered."
Nevertheless, "these are tiny niches in IT," he pointed out. "Many ordinary folks go decades without using those other special applications, so I don't think this is anything holding GNU/Linux back."
The real killer in the market, however, is lack of shelf space in retail stores, Pogson asserted. "Where that is covered, GNU/Linux thrives."
### 'Linux Has Lost Out to OS X' ###
Chris Travers, a [blogger][4] who works on the [LedgerSMB][5] project, had a different perspective.
"I don't think that it is a question of killer apps," he began. "The real issue is that on the desktop, Linux has generally lost out to OS X, while it is increasingly dominating the server market along with the BSDs. People who use Linux on the desktop tend to be looking for openness."
What Linux needs is either "the momentum of Microsoft or the smooth UI and attention to detail of OS X," Travers said. "These may come over time."
### The Documentation Problem ###
Linux isn't missing one killer app -- "what it's missing is polish, as always," [Hyperlogos][6] blogger Martin Espinoza opined. "No desktop environment for Linux has the polish of Windows XP, let alone Windows 7.
"Move away from the bloat and oversimplicity of GNOME or from the widget salad of [KDE][7] to what, Xfce or LXDE, with their perfectly horrible file managers and primitive panels?" Espinoza added. "GNOME is the only DE that ever got close, and then they decided to remove all the complexity and eliminate their reason to exist."
Windows is just "a nicer place to hang out," he asserted.
Still, if Linux is missing anything for broader acceptance, "that is games," Espinoza said. "If you were trying to narrow it down to one app, it would probably still be Photoshop. For all the talk of how great GIMP has become, usability is still an abject nightmare, and in spite of the OSS community's self-back-patting regarding documentation, there is no documentation for GIMP which is not pathetic."
GIMP "might be able to do most of the things Photoshop can do, but I'll probably never know," Espinoza concluded. "I suppose if I spent hours trolling fora I could find out how to use GIMP. This failing is shared by most OSS projects, including the ones that think they're really well-documented."
### 'Ease of Use and Support' ###
Ease of use and support are the "killer app" SoylentNews blogger hairyfeet named.
"Oh, a freshly installed Linux distro LOOKS nice, it works great; the problem is it doesn't CONTINUE to look nice or work great," he explained. "First update and whoops! Wireless no longer can use WPA V2. Second update? Whoops, say goodbye to sound, as Pulse has puked. First 'upgrade'? Uh oh, hope you didn't need that!
"THIS is what Windows and OS X have that Linux doesn't: the ease of use and support," hairyfeet concluded. "As long as it takes 15+ Linux releases to equal the same support cycle a single Windows release gets? Then I'm sorry, but your product is just not in the same league -- you are comparing HS baseball to the majors."
### 'Windows 8' ###
Last but not least, [Linux Rants][8] blogger Mike Stone had a surprising suggestion.
"The killer app that Linux has been missing all these years is Windows 8," Stone quipped.
"Seriously, I don't think there is a particular app that can be the 'killer app,'" he said. "Linux needs to have more mainstream application support, and that's going to mean Photoshop and Microsoft Office at the minimum. Thankfully, Microsoft has done their best to make Office less relevant, and most people don't need Photoshop."
Linux "could be reaching critical mass, and I was only partially joking when I said Windows 8 earlier," he concluded. "The application base in Linux is starting to arrive, and the current version of Windows is remarkably unpopular. Fingers crossed we see some motion here soon."
--------------------------------------------------------------------------------
via:
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.linuxvoice.com/voice-of-the-masses-what-killer-app-is-linux-missing/
[2]:http://slashdot.org/
[3]:http://mrpogson.com/
[4]:http://ledgersmbdev.blogspot.com/
[5]:http://www.ledgersmb.org/
[6]:http://hyperlogos.org/
[7]:http://www.kde.org/
[8]:http://linuxrants.com/

View File

@ -1,3 +1,5 @@
zsJacky translating
How to diskless boot a Linux machine
================================================================================
Diskless booting implies that a client computer does not have any disk storage when booting an operating system. In that case, the computer can load the kernel as well as the root filesystem from a remote NFS server over network. It may use several different methods to load the kernel and the root filesystem from an NFS server: RARP, BOOTP or DHCP protocols. In this tutorial, I will use BOOTP/DHCP protocol because they are supported by many network cards.

View File

@ -1,3 +1,5 @@
Translating by shipsw
Linux Screenshot App Shutter Updates with Bug Fixes, New Icon
================================================================================
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/06/shutter.jpg)
@ -34,4 +36,4 @@ via: http://www.omgubuntu.co.uk/2014/06/shutter-0-91-new-icon
[1]:https://apps.ubuntu.com/cat/applications/shutter/
[2]:https://launchpad.net/~shutter/+archive/ppa
[3]:https://launchpad.net/~shutter/+archive/ppa/+files/shutter_0.91%7Eppa2%7Eubuntu14.04.1_all.deb
[3]:https://launchpad.net/~shutter/+archive/ppa/+files/shutter_0.91%7Eppa2%7Eubuntu14.04.1_all.deb

View File

@ -0,0 +1,86 @@
Managing Vim extensions with NeoBundle
================================================================================
[NeoBundle][1] is a third-generation extension manager for [Vim][2], building on [Vundle][3], which builds on [Pathogen][4]. In an earlier article, I [advised against using Neobundle][5] because of its rapid development and minimal English documentation. Now, more than a year later, both problems are more manageable.
Why use an extension manager? Vim supports a healthy number of plugins, but its unmodified structure makes administering them difficult because extension files can be spread over several directories. Vim extension managers simplify things. Pathogen, Vundle, and NeoBundle create the directory ~/.vim/bundle, with a separate subdirectory for all the files of each extension. This structure allows users to easily and thoroughly delete extensions, either manually or via a file manager, and helps minimize potential conflicts when you have a couple of dozen extensions.
NeoBundle openly models itself on Vundle. Like Vundle, it both installs and updates extensions. However, the help file openly admits that "Neobundle is not a stable plugin manager. If you want [a] stable plugin manager, you should use Vundle." New releases, the help warns, "may break compatibility" a comment that is less than reassuring, coming from the developers.
So why should you use NeoBundle? One reason is that Vundle works only with [Git][6], while NeoBundle also supports [Subversion][7] and [Mercurial][8] repositories. Another reason is that, if you want to keep extension updates from breaking your Vim ecosystem, you can lock NeoBundle so that it uses only a specific version of any particular extension.
In addition, NeoBundle's creator, Shougo Matsuishita, is adding its command structures to several other extensions in order to reduce the list of commands they use. Currently, NeoBundle supports three such extensions: [unite.vim][9], a file and buffer manager that works within Vim; [vimshell.vim][10], a scripting shell for Vim; and [vimproc.vim][11], which works within vimshell.vim to allow asynchronous events. That's an idiosyncratic collection, and all three are poorly documented in English, so average users may wish to forgo them. Before tackling any of them, most users should focus on the basics of NeoBundle.
### Installing and initializing NeoBundle ###
NeoBundle requires Vim 7.2.051 or higher and requires git be installed, and depends on [cURL][12] for downloading files. You can install NeoBundle manually, but the fast way to install it is to clone its repository on GitHub using cURL. From your home directory, enter the following command to copy the files for NeoBundle into .vim/bundle/neobundle.vim, where the extension can manage itself:
curl https://raw.githubusercontent.com/Shougo/neobundle.vim/master/bin/install.sh | sh
You also need to modify your .vimrc file. NeoBundle's GitHub page offers a sample .vimrc file, but copying it means installing five plugins you may not want. This is the minimal content that you need:
if has('vim_starting')
set nocompatible
set runtimepath+=~/.vim/bundle/neobundle.vim/
call neobundle#begin(expand('~/.vim/bundle/'))
NeoBundleFetch 'Shougo/neobundle.vim'
call neobundle#end()
filetype plugin indent on
These lines set up and start NeoBundle, and set NeoBundle to update itself just like any other plugin. NeoBundle defaults to updating itself from GitHub repositories, so if you use GitHub, all you have to do is specify the maintainer's username and the directory for the plugin; in the lines above, NeoBundleFetch needs to specify only "Shougo/neobundle.vim" instead of the complete path on GitHub. If you want to use another site instead, including one that supports Subversion or Mecurial, you need to add the complete URL to the repository.
If you want to install other NeoBundle plugins, use this generic form:
curl -k https://github.com/[MAINTAINER]/ [PLUGIN PATH] > ~/.vim/bundle/[PLUGIN PATH]
or, to give a more specific example, you can install the [vim-abolish plugin][13], a super-charged search and replace extension, with the command
curl -k https://github.com/tpope/vim-abolish > ~/.vim/bundle/abolish
To have the extension updated automatically, add a line below the NeoBundleFetch line that gives the path to its repository. For example:
NeoBundle 'tpope/vim-abolish'
Optionally, you can specify a particular branch or revision of NeoBundle to use, preventing any updates. This option can be useful if you are using extensions that are in rapid development and you want to avoid having them break when you update any other extensions. For instance:
NeoBundle 'Shougo/vimshell', { 'rev' : '3787e5' }
Another option is to place the directive NeoBundleCheck on a line at the end of the NeoBundle stanza in .vimrc. When this line is present, NeoBundle checks for uninstalled bundles and prompts you to install them. You can also run the utility `:NeoBundleInstall` from within NeoBundle to initialize or update installed extensions.
### NeoBundle utilities ###
Many of NeoBundle's utilities function similarly to Vundle's, but they are differently named. You use the utilities to administer plugins from within NeoBundle:
- Run `:NeoBundleUpdate` when you install or update extensions, and when you manually remove an extension's files. It can be followed by a specific plugin, such as "/Shougo/neobundle.vim," or without a plugin name to configure all plugins that are installed but not configured. The command NeoBundleInstall! provides the same functionality.
- `:NeoBundle {REPOSITORY URI} [[REVISION}] [,OPTIONS}]]` configures an extension while locking it into a specified version, preventing any updates.
- `:NeoBundleList` lists unintialized extensions.
- `:NeoBundleClean` runs an interactive utility for removing unused extensions.
These utilities are also available in slightly different forms when you run NeoBundle with unite.vim. You can learn more about the utilities in all their forms by running the command `:help neobundle`.
Deciding whether to use NeoBundle
NeoBundle is a powerful tool, but its seemingly permanent state of rapid development can be a blessing or a curse, depending on your preferences. If you want the latest features and extensions, NeoBundle can make Vundle and Pathogen look decidedly old-fashioned.
However, with the online help itself warning of instability, ignoring the possibility of the latest version of one extension interfering with the proper functioning of another would be rash. At the very least, you should specify in your .vimrc a version of NeoBundle that you know to be stable. You might also do the same for any extension that you use regularly. With this precaution, you can enjoy following the development of NeoBundle and its related extensions while avoiding the consequence of working on the bleeding edge.
--------------------------------------------------------------------------------
via: http://www.openlogic.com/wazi/bid/348084/Managing-Vim-extensions-with-NeoBundle
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://github.com/Shougo/neobundle.vim
[2]:http://olex.openlogic.com/packages/vim
[3]:https://github.com/gmarik/Vundle.vim
[4]:https://github.com/tpope/vim-pathogen
[5]:http://www.openlogic.com/wazi/bid/262302/Three-tools-for-managing-Vim-plugins
[6]:http://olex.openlogic.com/packages/git
[7]:http://olex.openlogic.com/packages/subversion
[8]:http://olex.openlogic.com/packages/mercurial
[9]:https://github.com/Shougo/unite.vim
[10]:https://github.com/Shougo/vimshell.vim/blob/master/doc/vimshell.txt
[11]:https://github.com/Shougo/vimproc.vim/blob/master/doc/vimproc.txt
[12]:http://olex.openlogic.com/packages/curl
[13]:https://github.com/tpope/vim-abolish

View File

@ -0,0 +1,51 @@
9 Good Ways To Protect Your Linux System
================================================================================
Securing your Linux-based system is very important nowadays. But you have to know how to do this. A simple anti-malware software is usually not good enough and you need to take some other steps. Try these,
![](http://www.efytimes.com/admin/useradmin/photo/2Rak10143PM6172014.jpeg)
### 1. Use SELinux ###
[SELinux][1] is a security enhancement to Linux, which allows users and administrators more control over access control. SELinux adds finer granularity to access controls. Instead of only being able to specify who can read, write or execute a file, for example, SELinux lets you specify who can unlink, append only, move a file and so on.
### 2. Subscribe to a Vulnerability Alert Service ###
Your operating system may not necessarily be the one that is vulnerable. In fact, vulnerabilities are most often found in the applications that one installs. In order to avoid this, you must keep your applications updated to the newest version. In addition, subscribe to alert services like [SecurityFocus][2].
### 3. Disable Unused Services and Applications ###
In general, users do not use half of the services and applications on their system for most of the time. These services and applications though are kept running, which could make for an invitation to attackers. It is best to keep unused services stopped.
### 4. Check System Logs ###
Your system logs tell you what activity has happened on the system, including whether an attacker has been successful in or tried to access the system. Being careful is your first line of defense and your system logs should be regularly monitored for this.
### 5. Consider Port Knocking ###
Setting up port knocking is a good way to establish a secure connection with a server. What basically happens is that a special package is sent to the server, which triggers a response/connection from the server. Port knocking is a good defensive manuever for those who have open ports on their systems.
### 6. Use Iptables ###
What is Iptables? This is an application framework, which allows the user to write their own powerful firewall for the system. So, learn how to write a good firewall and use the Iptables framework in order to do well.
### 7. Deny All by Default ###
Firewalls follow two philosophies: one is to allow every bit of traffic and the other is to deny access to everything, prompting you for permission. The second option is the better of the two. You should only allow the traffic that is important to come in.
### 8. Use an Intrusion Detection System ###
An Intrusion Detection System or IDS allows you to manage the traffic and attacks on your system better. [Snort][3]
Encrypted data is harder and sometimes impossible to steal, which is why you should keep your entire drive encrypted. This way if someone does get access to your system, they will still have a very hard time getting by the encryption. According to some reports, most data loss is through stolen machines.
--------------------------------------------------------------------------------
via: http://www.efytimes.com/e1/fullnews.asp?edid=141368
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://selinuxproject.org/page/Main_Page
[2]:http://www.securityfocus.com/rss/vulnerabilities.xml
[3]:http://www.snort.org/

View File

@ -0,0 +1,232 @@
-------------translating by tenght~
9 commands to check hard disk partitions and disk space on Linux
================================================================================
In this post we are taking a look at some commands that can be used to check up the partitions on your system. The commands would check what partitions there are on each disk and other details like the total size, used up space and file system etc.
Commands like fdisk, sfdisk and cfdisk are general partitioning tools that can not only display the partition information, but also modify them.
### 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.
$ sudo fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x30093008
Device Boot Start End Blocks Id System
/dev/sda1 * 63 146801969 73400953+ 7 HPFS/NTFS/exFAT
/dev/sda2 146802031 976771071 414984520+ f W95 Ext'd (LBA)
/dev/sda5 146802033 351614654 102406311 7 HPFS/NTFS/exFAT
/dev/sda6 351614718 556427339 102406311 83 Linux
/dev/sda7 556429312 560427007 1998848 82 Linux swap / Solaris
/dev/sda8 560429056 976771071 208171008 83 Linux
Disk /dev/sdb: 4048 MB, 4048551936 bytes
54 heads, 9 sectors/track, 16270 cylinders, total 7907328 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001135d
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.
### 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.
$ sudo sfdisk -l -uM
Disk /dev/sda: 60801 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End MiB #blocks Id System
/dev/sda1 * 0+ 71680- 71681- 73400953+ 7 HPFS/NTFS/exFAT
/dev/sda2 71680+ 476938 405259- 414984520+ f W95 Ext'd (LBA)
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
/dev/sda5 71680+ 171686- 100007- 102406311 7 HPFS/NTFS/exFAT
/dev/sda6 171686+ 271693- 100007- 102406311 83 Linux
/dev/sda7 271694 273645 1952 1998848 82 Linux swap / Solaris
/dev/sda8 273647 476938 203292 208171008 83 Linux
Disk /dev/sdb: 1020 cylinders, 125 heads, 62 sectors/track
Warning: The partition table looks like it was made
for C/H/S=*/54/9 (instead of 1020/125/62).
For this listing I'll assume that geometry.
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End MiB #blocks Id System
/dev/sdb1 * 1 3860 3860 3952640 b W95 FAT32
start: (c,h,s) expected (4,11,6) found (0,32,33)
end: (c,h,s) expected (1023,53,9) found (492,53,9)
/dev/sdb2 0 - 0 0 0 Empty
/dev/sdb3 0 - 0 0 0 Empty
/dev/sdb4 0 - 0 0 0 Empty
### 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.
Here is an example of how to use cfdisk to list the partitions.
![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.
$ 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.
$ sudo parted -l
Model: ATA ST3500418AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 75.2GB 75.2GB primary ntfs boot
2 75.2GB 500GB 425GB extended lba
5 75.2GB 180GB 105GB logical ntfs
6 180GB 285GB 105GB logical ext4
7 285GB 287GB 2047MB logical linux-swap(v1)
8 287GB 500GB 213GB logical ext4
Model: Sony Storage Media (scsi)
Disk /dev/sdb: 4049MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 4049MB 4048MB primary fat32 boot
### 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.
Here is a simple example
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 97G 43G 49G 48% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 3.9G 8.0K 3.9G 1% /dev
tmpfs 799M 1.7M 797M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 3.9G 12M 3.9G 1% /run/shm
none 100M 20K 100M 1% /run/user
/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.
Use grep to filter out real hard disk partitions/file systems.
$ 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 -h --output=source,fstype,size,used,avail,pcent,target -x tmpfs -x devtmpfs
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda6 ext4 97G 43G 49G 48% /
/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.
### 6. pydf ###
Improved version of df, written in python. Prints out all the hard disk partitions in a easy to read manner.
$ pydf
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 96G 43G 48G 44.7 [####.....] /
/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.
### 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
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 70G 0 part
├─sda2 8:2 0 1K 0 part
├─sda5 8:5 0 97.7G 0 part /media/4668484A68483B47
├─sda6 8:6 0 97.7G 0 part /
├─sda7 8:7 0 1.9G 0 part [SWAP]
└─sda8 8:8 0 198.5G 0 part /media/13f35f59-f023-4d98-b06f-9dfaebefd6c1
sdb 8:16 1 3.8G 0 disk
└─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
### 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.
$ sudo blkid
/dev/sda1: UUID="5E38BE8B38BE6227" TYPE="ntfs"
/dev/sda5: UUID="4668484A68483B47" TYPE="ntfs"
/dev/sda6: UUID="6fa5a72a-ba26-4588-a103-74bb6b33a763" TYPE="ext4"
/dev/sda7: UUID="94443023-34a1-4428-8f65-2fb02e571dae" TYPE="swap"
/dev/sda8: UUID="13f35f59-f023-4d98-b06f-9dfaebefd6c1" TYPE="ext4"
/dev/sdb1: UUID="08D1-8024" TYPE="vfat"
### 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 --block --short
disk:
/dev/sda ST3500418AS
/dev/sdb Sony Storage Media
partition:
/dev/sda1 Partition
/dev/sda2 Partition
/dev/sda5 Partition
/dev/sda6 Partition
/dev/sda7 Partition
/dev/sda8 Partition
/dev/sdb1 Partition
cdrom:
/dev/sr0 SONY DVD RW DRU-190A
### Summary ###
The output of parted is concise and complete to get an overview of different partitions, file system on them and the total space. Pydf and df are limited to showing only mounted file systems and the same on them.
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.
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)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,107 @@
How to use Linux lsblk Command to List Block Device Information
================================================================================
The command **lsblk** (list block devices) is used to list information about all available block devices, however, **it does not list information about RAM disks**. Examples of block devices are hard disk, flash drives, CD-ROM e.t.c
### How To Install lsblk ###
The command lsblk comes in the package util-linux-ng, now renamed util-linux. The package comes with several other utilities such as dmesg. To install lsblk download util-linux [here][1].
### How To Install lsblk In Fedora ###
Fedora users can install the package as follows:
$ sudo yum install util-linux-ng
The command has several options:
### The Default Option ###
The command lsblk by default will list all block devices in a tree-like format. Open your terminal and type the command as follows:
$ lsblk
The output is as follows:
![lsblk default](http://linoxide.com/wp-content/uploads/2014/03/lsblk-default.jpg)
There are seven columns namely:
**NAME** : This is the device name.
**MAJ:MIN** : This column shows the major and minor device number.
**RM** : This column shows whether the device is removable or not. Note in this example the device sdb and sr0 have their RM values equals to 1 indicating they are removable.
**SIZE** : This is column give information on the size of the device. For example 298.1G indicate the device is 298.1GB and 1K indicate the device size is 1KB.
**RO** : This indicates whether a device is read-only. In this case all devices have a RO=0, indicating they are not read only.
**TYPE** :This column shows information whether the block device is a disk or a partition(part) within a disk. In this example sda and sdb are disks while sr0 is a read only memory (rom).
**MOUNTPOINT** : This column indicates mount point on which the device is mounted.
### List All Devices ###
The default option does not list all empty devices. To view these also use the command as follows:
$ lsblk -a
This option will list all devices including empty ones.
![lsblk bytes sda](http://linoxide.com/wp-content/uploads/2014/03/lsblk-bytes-sda.png)
### List Device Permissions and Owner ###
The command lsblk can also be used to list the ownership of a particular device as well as the group the mode. This can be achieved as follows:
$ lsblk -m
![lsblk permissions](http://linoxide.com/wp-content/uploads/2014/03/lsblk-permissions.png)
### List Specific Devices ###
It is possible also to get information about a specific device only. This can be achieved by specifying the device name after the option supplied to lsblk. For example you would be interested to know your hard drive size in bytes. You can accomplish this by running the command as follows:
$ lsblk -b /dev/sda
or if you prefer:
$ lsblk --bytes /dev/sda
### List Devices Without Header in List Form ###
You can also combine several options to get a specific output. For example you might want to list the devices in a list format instead of the default tree format. You may also be interested in removing the header with the name of the different columns. The two different options can be combined to achieve the desired output as follows:
$ lsblk -nl
or still you can use the option which will give the same output.
$ lsblk --noheadings --list
![lsblk no header and list](http://linoxide.com/wp-content/uploads/2014/03/lsblk-no-header-and-list.png)
### List SCSI Devices ###
To get a list of SCSI devices only you can use the option -S. This option is capital S and it should not be confused with the option -s which prints dependencies in inverse order.
$ lsblk -S
lsblk SCSI devices On the contrary the inverse option will give output as follows: Type the command:
$ lsblk -s
or
$ lsblk --inverse
lsblk inverse You can use lsblk to get more information about your block devices, try it out today!
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-command/linux-lsblk-command/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:ftp://ftp.kernel.org/pub/linux/utils/util-linux/

View File

@ -0,0 +1,51 @@
Make Ubuntu 14.04 Look Like Mac With Zukimac Theme
================================================================================
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/06/Make_Ubuntu_Look_Like_Mac_OS.jpeg)
Ubuntu Unity itself is a beautiful desktop but people over the world are smitten by the looks of Mac OS X. If you are among one of those, you dont need to ditch Ubuntu just for the sake of OS X looks. Instead you can give it a makeover and **make Ubuntu 14.04 look like Mac OS X**.
### Make Ubuntu 14.04 look like Mac OS X ###
To give Ubuntu a makeover of Mac, we shall be using Zukimac theme.
- Get Zukimac theme from the link below:[Download Zukimac Theme for Ubuntu 14.04][1]
- Extract the downloaded zipped file. You will find two directories in there, Zukimac and Zukimac-ml. Copy these to .themes directory in your home directory. Go to Home and press Ctrl+H to show all the hidden folders. If there is no .themes folder here, create one.
- Use [Unity Tweak Tool to change the theme][2].
Thats it. Zukimac gives some a basic look and feel of Mac OS. Here is what it looks like with default OS X Maveric wallpaper.
![Make Ubuntu 14.04 look like Mac OS X](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/06/Ubuntu_MAC_OS_Looks.jpeg)
### Further changes to get Mac feel in Ubuntu 14.04 ###
Additionally, you can **install a dock launcher like Plank** or Docky. To install Plank in Ubuntu 14.04 use the commands below:
sudo add-apt-repository ppa:ricotz/docky
sudo apt-get update
sudo apt-get install plank
Along with the dock launcher, you can also install S**ynapse indicator as an alternative of Mac Spotlight**. Use the following PPA from Noobslabs to install Synapse indicator:
sudo add-apt-repository ppa:noobslab/apps
sudo apt-get update
sudo apt-get install indicator-synapse
Apart from these two, you can also install **Slingscold launcher, alternative of Mac OS X launchpad**. Use the same Noobslabs PPA as mentioned above to install Slingscold launcher in Ubuntu 14.04:
sudo add-apt-repository ppa:noobslab/apps
sudo apt-get update
sudo apt-get install slingscold
Honestly, I am an avid Ubuntu fan and I like Ubuntus default Unity looks. In addition, there are plenty of [beautiful icon themes in Ubuntu 14.04][3] to beautify it. But as I mentioned before there are plenty of people who like Mac OS X and I hope this tutorial helped them to make Ubuntu 14.04 look and feel like Mac OS X.
--------------------------------------------------------------------------------
via: http://itsfoss.com/ubuntu-1404-mac-zukimac-theme/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://gnome-look.org/content/show.php/Zukimac?content=165450
[2]:http://itsfoss.com/how-to-install-themes-in-ubuntu-13-10/
[3]:http://itsfoss.com/best-icon-themes-ubuntu-1404/

View File

@ -1,143 +0,0 @@
(翻译中 by runningwater)
Encrypting Your Cat Photos
================================================================================
The truth is, I really don't have anything on my hard drive that I would be upset over someone seeing. I have some cat photos. I have a few text files with ideas for future books and/or short stories, and a couple half-written starts to NaNoWriMo novels. It would be easy to say that there's no point encrypting my hard drive, because I have nothing to hide. The problem is, we wrongly correlate a "desire for privacy" with "having something to hide". I think where I live, in America, we've taken our rights to privacy for granted. Rather than the traditional "he must be hiding porn or bombs", think about something a little more mundane.
I live in Michigan. It's cold here in the winter, and I tend to keep my thermostat set around 75 degrees. That might seem high to you, but for my family, it's just right. Thanks to the privacy of my own home, my neighbors don't know how toasty warm we keep it. Some of those neighbors would be very upset to see how "wasteful" the Powers family is in the winter. In fact, there's one local man who makes it a point to let everyone know that anything over 60 degrees is ecologically wasteful. I don't want to get into a fight with Old Man Icebritches, so we just keep our comfortable house a secret. We don't have anything to hide, but it's not something everyone needs to know about.
Obviously my example is silly, but hopefully it makes you think. Modern Linux allows us to encrypt our data easily and reliably, so why not take advantage of it?
### How Does It Work? ###
I won't go into too much detail about how encryption works, but a basic understanding is necessary for even the simplest implementation. To encrypt and decrypt a file, two "keys" are required. One is the private key, which is just that, private. I like to think of the private key as an actual key—you can make copies if you want, but it's not wise to do so. The more copies of your private keys you make, the more likely someone nefarious will get one and break into your apartment—er, I mean files.
The public key is more like a schematic for a lock that only you can open (with your private key). You make this key available for anyone. You can post it on a Web site, put it in your e-mail, tattoo it on your back, whatever. When others want to create a file that only you can see, they encrypt it using your public key.
This one-to-many scenario also has a cool side effect. If you encrypt something using your private key, anyone can decrypt it using your public key. This may sound silly, but what makes such a scenario useful is that although the encrypted file isn't protected from prying eyes, it is guaranteed to be from you. Only a file encrypted with your private key can be decrypted with your public key. In this way, encrypting something with your private key digitally "signs" the file.
#### Usually it works like this: ####
1. You have a file you want to send to Suzy, so you encrypt it with Suzy's public key. Only Suzy can open it, but there's no way for Suzy to know that you are the one who sent it, since anyone could encrypt a file with her public key.
1. Therefore, you take the file you encrypted with Suzy's public key and encrypt that file with your private key. Suzy will have to decrypt the file twice, but she'll know it came from you.
1. Suzy receives the file and decrypts the first layer with your public key, proving it came from you.
1. Suzy then decrypts the second layer of encryption with her private key, as that's the only key able to decrypt the original file. (Because you originally encrypted it with her public key.)
That scenario is when encryption is used for safely transferring files, of course. It's also quite common simply to encrypt your files (or partitions) so that no one can see them unless you decrypt them first. Let's start with file encryption, because that's what most people will want to do on their systems.
### Starting Simple ###
Before I go into more complex type setting, let's discuss simply encrypting a file. There are various programs to handle encryption. In fact, it's easy to get overwhelmed with the available options for file and system encryption. Today, let's use a basic (but very powerful) command-line tool for encrypting a file. GPG (Gnu Privacy Guard) is an open-source implementation of PGP (Pretty Good Protection). It allows encryption and signing, and manages multiple keys and so on. For this example, let's simply encrypt a file.
Let's say you have a file called secret_manifesto.txt, which contains the secrets to life, the universe and everything. Using GPG, you can encrypt the file with a passphrase. Using a passphrase is far simpler than using a public and private key pair, because it's simply encrypted using your passphrase. This does make your file more susceptible to cracking (using rainbow tables or other hacking tools), but like the label on the tin says, it's Pretty Good Protection. To encrypt your file, you can do this:
# gpg -c secret_manifesto.txt
# Enter passphrase:
# Repeat passphrase:
Once complete, you'll have a new file in the same directory. It will be named secret_manifesto.txt.gpg by default. This is a binary file, which means it's fairly small, but it can't be copy/pasted into an e-mail or IM. For portability, you can add the -a flag, which will create an encrypted file that contains only ASCII text:
# gpg -a -c secret_manifesto.txt
# Enter passphrase:
# Repeat passphrase:
# ls -l
-rw-rw-r-- 1 spowers spowers 6 Nov 23 1:26 secret_manifesto.txt
-rw-rw-r-- 1 spowers spowers 174 Nov 23 1:27 secret_manifesto.txt.asc
-rw-rw-r-- 1 spowers spowers 55 Nov 23 1:26 secret_manifesto.txt.gpg
Notice there is now a file with .asc as the extension. This is text-only, but you can see in the code snippet that it's also much larger than the binary encrypted file, and much much larger than the original text file. Once you've encrypted your file, if you truly want to keep your information secret, it would be wise to delete the original text file.
To decrypt the file, you'll again use the gpg program. The same command will decrypt either file, whether it's binary or ASCII:
# gpg secret_manifesto.txt.asc
# gpg: CAST5 encrypted data
# Enter passphrase:
# gpg: encrypted with 1 passphrase
# File `secret_manifesto.txt' exists. Overwrite? (y/N)
Notice in the example above, I hadn't deleted the original text file, so gpg gave me the option of overwriting. Once complete, I have my original file back, unencrypted. If you just have a file or two you want to protect, the command-line gpg program might be all you need. If you'd rather have an area on your system that automatically encrypts everything you save, it's a little more complicated. It's still not terribly difficult, but let's start with a fairly simplistic model.
### Encrypting a USB Drive ###
Like I mentioned earlier, there are many options when it comes to encryption. One of the more popular methods of encrypting partitions is the LUKS (Linux Unified Key Setup) system. A USB drive with a LUKS-formatted partition should be detected automatically by most systems. In fact, if you're using a desktop environment like Ubuntu Desktop, encrypting a USB drive is a simple check box during the formatting process. Although that's a perfectly acceptable way to encrypt your USB drive, I'm going to demonstrate how to do it on the command line, so you understand what's actually happening behind the scenes.
#### Step 1: identify your USB drive. ####
If you type `dmesg` after plugging in your USB drive, you should get all sorts of system information, including the device name of your freshly plugged-in USB device. Make sure you have the correct device identified, because what you're doing will destroy any data on the drive. You wouldn't want to format the wrong disk accidentally. (It should go without saying, but I'll say it anyway, make sure there's nothing on your USB drive that you want to save—this is a destructive process.)
#### Step 2: partition the USB drive. ####
Assuming that your USB drive is the /dev/sdb device on your system, you need to create a single partition on the drive. Let's use fdisk. Below is the interaction with fdisk required. Basically, you create a new empty partition with the o command, then write changes with w. Then, you'll restart fdisk and use the n command to create a new primary partition, using the defaults so that the entire drive is used:
# sudo fdisk /dev/sdb
Command (m for help): o
Building a new DOS disklabel with disk identifier 0x1234567.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Command (m for help): w
The partition table has been altered!
# sudo fdisk /dev/sdb
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4, default 1): 1
Using default value 1
First sector (2048-1016522, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-1016522, default 1016522):
Using default value 1016522
Command (m for help): w
The partition table has been altered!
Now you have a USB drive with a single partition (/dev/sdb1), but there is no filesystem on it. That's exactly what you want, because the LUKS system creates an encryption layer on the partition before you put a filesystem on it. So before creating a filesystem, let's create the LUKS layer on the partition, using the cryptsetup program. If you don't have cryptsetup, search for it in your distribution's repository; it should be there. To create the LUKS encrypted partition layer:
# cryptsetup luksFormat /dev/sdb1
WARNING!
========
This will overwrite data on /dev/sdb1 irrevocably.
Are you sure? (Type uppercase yes): YES
Enter LUKS passphrase:
Verify passphrase:
Follow the directions, and be sure to remember your passphrase! Note, that a "passphrase" is usually more than just a word. It's most often a phrase, thus the name. The longer the phrase, the tougher to crack.
Once the process completes, you have an encrypted partition, but it's not mounted or formatted yet. The first step is to mount the partition, which again uses the cryptsetup utility:
# cryptsetup luksOpen /dev/sdb1 my_crypto_disk
Enter passphrase for /dev/sdb1:
When you type in your passphrase, the device name you entered will be mounted like a virtual hard drive. Usually, it's mounted under /dev/mapper/devicename, so this example mounts a partition at /dev/mapper/my_crypto_disk.
This device is now being accessed as an unencrypted volume. As long as it stays mounted, it will act like any other unencrypted volume. That means you need to write a filesystem to it if you want to use it:
# mkfs.vfat /dev/mapper/my_crypto_disk -n my_crypto_disk
mkfs.vfat 3.0.9 (31 Jan 2010)
Now the drive is fully functional and can be mounted like any other disk. In fact, when you put the USB drive into your computer, if you have a modern GUI desktop, it should prompt you for a password and mount it automatically. Then you can eject it like a normal disk, and it will be encrypted until you next enter your passphrase. It's simple to unmount and, therefore, re-encrypt the drive on the command line too, using cryptsetup:
# cryptsetup luksClose my_crypto_disk
That's Only the Tip of the Iceberg
In this article, my hope is to peel back some of the mystery behind encryption. It's simple to encrypt and decrypt a file. It's not too much more difficult (especially if you use the GUI desktop tools) to encrypt an entire USB drive. With most distributions, it's possible to encrypt the entire home directory during the installation process! When encryption is set up on your entire home directory, however, there are some issues you need to address. For example, jobs that run while you're not logged in most likely will not have access to your home directory. If you have cron jobs that need access to your home directory, you should rewrite them to access data elsewhere on the system. I find a happy medium between security and convenience is to encrypt a USB drive and store my personal data on it.
Once you get the encryption bug, I must warn you, you'll want to start encrypting everything. That's not a bad thing, but like the home directory scenario, you'll run into a few snags. Cross-platform accessibility is a big one if you go between systems. For situations like that, I highly recommend [TrueCrypt][1]. I've mentioned TrueCrypt in UpFront pieces before, but it's basically an open-source, cross-platform encryption system that allows you to encrypt files, folders, partitions and more while being able to access that data on any system. Windows, Mac and Linux clients are all available, and the community has great support.
You don't have to have something to hide in order to desire encryption for your files. Just like it's wise to lock your house at night, even if you live in a good neighborhood, it's a smart move to encrypt your personal data. If you want to share your photos of Mr Whiskerton in his cute little beanie hat with everyone on the Internet, that's your right. But others don't need to see those things if they're being nosey and poking around your hard drive!
--------------------------------------------------------------------------------
via: http://www.linuxjournal.com/content/encrypting-your-cat-photos
译者:[runningwater](https://github.com/runningwater) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.truecrypt.org/

View File

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

View File

@ -1,57 +0,0 @@
谢天谢地,开源软件中的个人崇拜正在消亡!
================================================================================
Roy Rubin这位流行的电子商务开源项目[Magento][1]的联合创始人从这一2008年启动的项目中功成身退后在[这周说出了][2]上面这样的话语。
![](url("http://readwrite.com/files/styles/1400_0/public/fields/richardstallman_0.jpg"))
这已经不是第一次一个开源项目的领导者出走项目了,但值得注意的是对于它的回应是:相对的沉默。
但是开源软件一直在成长它一直在削弱个人对其的影响。当然没人希望linux的创始人Linus Torvalds不小心被车撞了在这点上我们是[爱他][3]的,但是另外一方面其实我们并不太在意。
But it wasn't always this way.
### 崇拜仁慈的独裁者! ###
在好的一面,成功的开源项目一直以来都和伟大的领导者密不可分。对一个充满活力又有独立思想的一个开发团体施加影响,必定是众口难调的事情。在一个专门的开源项目当中不同的观点会产生各种不同的方法途径(在代码层上,管它叫做“分支“),通常这时候项目的领导者,一个“生活中并不仁慈的独裁者”,将会介入,施展自己的领导才能让开发人员团结在一起。
“生活中仁慈的独裁者BDFL”这个词[可能第一个开始于Python项目的领导者Guido von Rossum][4]。它现在也被用到了linux的发明人Linus Torvalds身上当然Ubuntu的领导者还有其他的人也被用到这个词上。有时候会是两个人比如[Django][5]项目的Adrian Holovaty和Kaplan-Moss。
在他们这点上他们之间的分歧会对未来的项目产生灾难性的影响展现出这些伟大领导者与项目之间紧密的关联。但是有时候它会发生变化。Django的领导者[去了其他的项目][6]但是Django依然不断前行着Ditto PythonLucene领导者Doug CuttingJboss领导者Marc Fleury和其他很多的项目也是。
现在开源软件研发的团体依然围绕着伟大的领导者,我们看起来并不是独立的,但是我们的确是。开源软件的“个人崇拜”正在褪色,也有可能已经消亡了,但是接下来怎么办呢?
### Apache和开源社区的兴起 ###
社区对于初学者来说我意识到我在做出一些自以为是的论调但是根据我在开源项目15年的经验来说我观察到开源软件项目从非常严格的控制阶段缓慢的转向了松散的开源团体他们经常是因为兴趣才互相合作的。
当然并不清楚是先有open BSD/Apache风格的“鸡”还是后有开源软件相互合作的“蛋”两者之间很明显的改变了开源软件的运作模式。
当然还是需要“生活中仁慈的独裁者”只是它不是一个项目比如GNU如果没有了Richard Stallman真的难以想象。相反的很容易想象Apache Hadoop这样如果没有谁的领导但是好像Hadoop真的没有人领导…
如果真的要说答案的话,那就是这里每个人或者[许多人][7]。当然它由Doug Cutting启动但是它已经发展成了一个独立并合作的团体大多数成员在独立的公司工作在一起工作。
OpenStack与之类似[有很多的成员][8]如果某一个Openstack的开发者离开了Openstack依然能够继续。因此对于一个成员正在增加的开源项目来说这种类似是确信无疑的。
### 一个“仁慈独裁者”并不存在的未来吗? ###
并不是说在以后的开源项目中不需要领导者。需要但是越来越多的开源项目转为团体之间的合作失去他们的风险消失了。坦白的说即使那么多人没有深入的参入进来如果没有Apache的授权很多项目没有了“生活中的独裁者”是根本不可能独立起来的。
Photo of Richard Stallman [courtesy of Friprog on Flickr][9]
--------------------------------------------------------------------------------
via: http://readwrite.com/2014/05/02/open-source-magento-roy-rubin-bdfl#feed=/hack&awesm=~oDgSTEdnXAjUv0
译者:[jiajia9linuxer](https://github.com/jiajia9linuxer) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://magento.com/
[2]:http://magento.com/blog/magento-news/note-roy-and-mark#.U2JhPK1dVii
[3]:http://www.serverwatch.com/server-news/if-linus-torvalds-got-hit-by-a-bus-would-linux-die.html
[4]:http://www.artima.com/weblogs/viewpost.jsp?thread=235725
[5]:https://www.djangoproject.com/
[6]:http://www.theatlantic.com/technology/archive/2014/01/on-the-reign-of-benevolent-dictators-for-life-in-software/283139/
[7]:http://hadoop.apache.org/who.html
[8]:http://activity.openstack.org/dash/releases/
[9]:https://www.flickr.com/photos/friprog/

View File

@ -1,25 +0,0 @@
命令行的秘密
================================================================================
有很多使用命令行的理由.它是与你的计算机交互的最强大和简明的方法,正如我们在[issue 3 of Linux Voice][1]中展示的那样.但是,我们决定先来看一下命令行的一些隐晦的使用场景(或许有些人会觉得没有意义).
### 浏览网页 ###
Firefox和Chromium都是很好的浏览器,但是你有没有发现它们有点太图像化了?没有?看一下下面的视频,我们使用elinks web浏览器显示了与黑客相关的新闻.界面可能没有其他浏览器好看,但是它能够显示更多的web页面.
<iframe width="570" scrolling="no" height="418" src="http://shelr.tv/records/5368d80796608063a3000072/embed" style="border: 0; id="shelr_record_5368d80796608063a3000072"></iframe>
当你只想在你通过SSH方式登录的计算机上检查一下能否上网的时候,这将是一个很便利的方法.
### 在维基百科上查找想要的信息 ###
是的,上文我们已经提到了使用Web,但是web不是查看维基百科的唯一方式.David Leadbeater已经构建了一个将维基百科DNS入口提取出来的DNS服务器.这能够让你使用想dig这样的命令行工具来抓取你想要的信息.
<iframe width="570" scrolling="no" height="418" src="http://shelr.tv/records/5368bfa896608063a300006d/embed" style="border: 0;" id="shelr_record_5368bfa896608063a300006d"></iframe>
### 看电影 ###
当你想要看Star Wars Episode IV时,不再需要使用Netflix或者YouTube,只要在你的终端中直接telnet towel.blinkenlights.nl就行了.
<iframe width="570" scrolling="no" height="418" style="border: 0" src="http://shelr.tv/records/5368be5296608063a300006c/embed" id="shelr_record_5368be5296608063a300006c" border="0"></iframe>
### 玩游戏 ###
再Steam来之前Linux下就有许多游戏,并且很多都不需要图形界面比如NetHack,Robots和Greed.
<iframe width="570" scrolling="no" height="418" style="border: 0" src="http://shelr.tv/records/5368ca4596608063a300006f/embed" id="shelr_record_5368ca4596608063a300006f" border="0"></iframe>
--------------------------------------------------------------------------------
via: http://www.linuxvoice.com/commandline-secrets/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.linuxvoice.com/issue-3-is-out/

View File

@ -0,0 +1,86 @@
如何在网络上在Windows,MAC和Linux之间共享文件
================================================================================
![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/windows-mac-and-linux-network.jpg)
家庭[文件共享][1]曾经是一个噩梦,即使在不同的Windows版本之间- 没有考虑Mac和Linux! 这些操作系统现在可以相互通信并且无需特殊软件就可共享文件。
我们之前使用SMB协议来做到这点。Windows使用SMB来做文件共享同时Mac和Linux发行版都内置支持SMB。Microsoft甚至给开源Samba项目[提交补丁][2]来改进它!
### 在Windows上共享一个文件夹 ###
既然其他操作系统不能访问家庭组,您需要[启用Windows老式的文件共享][3]。要做到这点,打开控制面板进入网络和共享> 更改高级共享设置。启用“网络发现”和“文件与打印共享”。
如果你想要无需密码访问共享文件夹你还需要微调一下选项。
![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/enable-file-and-printer-sharing-for-mac-and-linux-on-windows.png)
在Windows Explorer或者File Explorer中定位你想共享的文件夹右键点击选择属性。点击共享标签并使用这里的选项来共享和配置文件夹的权限。
![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/share-windows-folders-with-mac-and-linux-on-local-network.png)
### 在Windows上访问共享文件夹 ###
在Windows Explorer或者File Explorer中访问窗格来浏览其他计算机共享给你的文件。你会看到正确配置后的Mac和Linux计算机在Windows PC机附近出现了。双击一台计算机来查看它的共享文件。
![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/access-ubuntu-linux-shared-folder-on-windows.png)
如果你知道计算机名或者IP地址你同样可以直接连接到这台计算机上只需要在Windows Explorer或者File Explorer中输入//计算名后按下回车就可以了 如果你希望直接通过IP地址连接只需要将计算机名换成IP地址就可以了
![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/directly-access-network-share-on-windows.png)
### 在Mac OS X 上共享文件夹 ###
你需要在你的Mac上启用网络文件共享来共享文件。双击苹果logo并选择系统偏好。点击共享图标并启用文件共享。点击选项按钮并确认“使用SMB共享文件和文件夹”已经启用。
在共享文件夹那列中选择额外要共享的文件夹。使用用户列来选择哪些用户和组可以访问和写入它们
![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/share-folder-with-windows-from-mac-os-x.png)
### 在 Mac OS X 访问共享目录###
打开Finder在屏幕顶部的菜单中点击Go选择连接到服务器输入下面的地址用Windows计算机名代替COMPUTERNAMEsmb://COMPUTERNAME。你同样可以输入计算机IP来代替计算机名。
![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/directly-connect-to-windows-file-share-on-a-mac.png)
你会被提示你用相应的凭证来验证或者以访客方式登录。连接完成后在Finder的侧边栏的共享列中就会出现这台计算机
要在你每次登录后自动链接到共享文件夹,打开系统偏好窗口并进入用户与组> 登录项。从finder中的共享列中的网络共享拖拽到登录项列表中
![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/windows-shared-folder-on-mac.png)
### 在 Linux 中共享一个文件夹 ###
在Linux上使用你桌面文件管理器来共享一个文件。这里我们在Ubuntu 14.04上使用Nautilus但是在其他文件管理器上的过程应该是相似的。
打开文件管理器在想要共享的文件上右键选择属性。剪辑本地网络共享标签并对这个文件启用共享。如果这是你第一次启用共享你会被提示要求安装Samba软件- 这在你提供密码的时候会自动显示。
在安装玩Samba软件后配置共享设置- 确认点击创建共享按钮来开始共享文件夹。
![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/share-folder-from-ubuntu-linux-with-windows-pc-over-local-network.png)
### 在 Linux 上访问共享文件夹 ###
你的Linux桌面文件管理器可能包含了一个网络浏览器它可以用来定位并访问在本地网络的共享文件夹。
在文件管理器的侧边栏点击浏览网络选项。接着双击Windows网络选项双击你的工作组默认是WORKFROUP双击临近的计算机来浏览它的共享文件。
![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/browse-windows-network-shares-on-ubuntu.png)
为了直接连接到一台计算机选中Nautilus中的连接到服务器选项并输入像这样的远程计算机smb://COMPUTERNAME
![](http://cdn.howtogeek.com/wp-content/uploads/2014/06/directly-connect-to-windows-shared-folder-on-ubuntu.png)
然而在你连接时,你可能需要使用具有访问远程计算机权限的用户名和密码来验证。这依赖于你是否启用了访客访问以及你如何设置你的文件夹共享权限。
--------------------------------------------------------------------------------
via: http://www.howtogeek.com/191116/how-to-share-files-between-windows-mac-and-linux-pcs-on-a-network/
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.howtogeek.com/166407/how-to-easily-share-files-between-nearby-computers/
[2]:http://www.samba.org/samba/news/developers/ms-patch.html
[3]:http://www.howtogeek.com/school/windows-network-sharing/lesson3/

View File

@ -0,0 +1,142 @@
给猫咪照片加密
================================================================================
事实上,我的硬盘上不存在那种不愿意被别人看到的东西,只存有一些猫咪的照片、一些记录着想写的书想法的文本文件或者是一些短篇故事的文本,也有一些写了一半的 NaNoWriMo 小说文件。简单的说,我的硬盘就没有加密的必要,因为没有什么可隐藏的。可问题是,我们错误的把“隐私的渴望”跟“要隐藏某东西”两概念混淆在一起。比如说我生活的美国,我们视隐私权利是理所当然的事,但不包括那些传统所认为的“某人隐藏色情或炸弹”。隐私考虑的是一些平常的事情。
我居住在密歇根州。这儿的冬天很冷,我趋向于把温度设置在 75 度左右。对您们来说这个温度可能高了,但在我的家里刚好合适。多亏我的家是属于私有的,我的邻居不可能知道我们保持了这么高的温度,否则一但他们看到冬天如此“浪费”能源的家庭,这些邻居心里会很不平衡的。事实上,本地条规中有一条明确指出任何超过 60 度的就算是生态浪费。我并不想与这种僵老的条例较真,所以我仅仅想保守我们舒适的房子的秘密。我们并不想隐藏任何事情,但也并不是任何事情都要让外人知道。
很明显,我举的例子有点弱智,但我希望的是这能引起大家的思考。现代的 Linux 系统很容易的就可以对我们的数据进行加密,并且很可靠,所以为什么不好好利用利用呢?
### 加密原理? ###
我不会涉及太多关于加密原理的细节,但要明白最基本的原理,即使是最简单的实现,这是必须的。要加密和解密一个文件,需要两把“钥匙”。一把是私钥,正如名字所示,属于私有的。我宁愿把私钥看作是真实的钥匙-你想要多少就可造出多少,但这样做是不明智的。同样的私钥你造的越多,某些不怀好意的人得到其中一把的机率就越大,他们就会闯入你的公寓(额,我的意思的文件)。
公钥更像是锁的样子,只有你能打开(用你的私钥)此锁。这公钥任何人都可以得到,你可以将它张贴在网站上、把它放在你的 E-mail 中、甚至纹在你的背上。其它人想创建一个只有你能访问的文件,就可以使用此公钥来加密。
这种一对多的情况也有个很酷的副作用。如果你用你的私钥来加密一些东西,任何人都可以用你提供的公钥来解密它们。这听起来很傻,但这种情景很有用。虽然加密的文件不能免于被窥视,但是它能保证此文件确实来自于你而没有被恶意改动过。用你的公钥能解密的文件仅仅只能是用你私钥加密过的。用这种方式,用私钥加密的文件即是数字“签名”文件。
#### 通用加密步骤: ####
1. 你有一个文件想要发送给苏茜 ,所以你得使用苏茜的公钥来加密,这样就只有 苏茜才能打开这个文件,但苏茜没有办法知道是谁给她发送的文件。因为任何一个人都可以用她的公钥来加密文件。
2. 因此,你得把你的文件用苏茜的公钥和你的私钥都加密。苏茜将不得不解密两次,但她知道它是来自于你的文件。
3. 苏茜接收到此文件后会用能证明来自于你的公钥来解密第一层。
4. 然后用她的私钥来解密第二层的密码,这是唯一的能够将原始文件进行解密的钥匙了(因为你是用她的公钥来加密的)。
当然,这情景就是用来安全传输文件的加密手段。这也是加密你的文件(或者分区)相当常用及简单的方法。就让我们开始来对文件进行加密吧,因为大多数人都想加密他们的系统。
### 始于简 ###
在深入更复杂的各种加密设置操作前,我们先做简单的对文件加密例子。能处理加密的应用程序有很多很多,事实上,对文件和系统进行加密的各种可用软件选择,很容易就会让我们变得焦头烂额。现在,我们就使用一款很基本的(但非常强大)命令行工具来对文件加密。 GPG 英文名Gnu Privacy Guard是一款对商业软件 PGP英文名Pretty Good Protection的开源实现软件。它具有加密、签名及管理多个密钥等功能。用例子说明让我们简单的加密一个文件吧。
我们假设你有一个名叫 secret_manifesto.txt 的文件,它包含有关于生命、宇宙及一切事物的秘密。使用 GPG你只需要一个密码就可以加密此文件。使用密码远比使用公钥和私钥对简单因为它只是用你的密码加密。虽然这很容易就让你的文件遭受到破解使用彩虹表或其他黑客工具但像锡上的标签上所说的这是相当不错的保护。要加密你的文件可以这样做
# gpg -c secret_manifesto.txt
# Enter passphrase:
# Repeat passphrase:
一但完成,在相同的目录下就会多出个新的文件,它默认的名字是 secret_manifesto.txt.gpg 。这是一个二进制文件,这意味着它非常非常小,但是要拷贝/粘贴进电子邮件e-mail或 即时消息IM 就不可能了。要使其可拷贝等操作,可以添加 -a 标志,这将创建一个只包含 ASCII 码文本的加密文件:
# gpg -a -c secret_manifesto.txt
# Enter passphrase:
# Repeat passphrase:
# ls -l
-rw-rw-r-- 1 spowers spowers 6 Nov 23 1:26 secret_manifesto.txt
-rw-rw-r-- 1 spowers spowers 174 Nov 23 1:27 secret_manifesto.txt.asc
-rw-rw-r-- 1 spowers spowers 55 Nov 23 1:26 secret_manifesto.txt.gpg
注意到现在多了一个以 .asc 为扩展名的文件。它是个纯文本文件,从上面的代码段示例可以看到它比二进制的加密文件还大,当然比原文本文件就大的更多了。一但你把文件加密了,也确实想要对些信息保密,最明智的就是把原文本文件删除掉。
要解密文件,你需要再一次使用 GPG 程序。不管是二进制的还是 ASCII 文件,使用相同的命令就可以解密。如下示:
# gpg secret_manifesto.txt.asc
# gpg: CAST5 encrypted data
# Enter passphrase:
# gpg: encrypted with 1 passphrase
# File `secret_manifesto.txt' exists. Overwrite? (y/N)
注意到上面的例子中,我没有删除源文本文件,所以 GPG 给出了是否覆盖选项提示。一但操作完成,我的未加密的源文件又回来了。如果你仅仅只有一两个文件要保护,那基于命令行的 GPG 程序正是你所需的。但如果你想实现在系统上指定一个区域,任何保存到这区域的的文件都会自动加密的话,就有点复杂了。可这也并不是非常的困难,让我们用一个非常简单的示范例子来讲解吧。
### 加密 USB 驱动盘 ###
如我前面提到的,要加密有很多可选的方式方法。加密磁盘分区最通用的一种方法是 LUKSLinux Unified Key Setup 系统。一个使用 LUKS 格式化分区的 USB 驱动盘可以被大多数系统自动被别到。实际上,如果你使用的是像 Ubuntu 桌面这样的桌面环境系统的话,加密 USB 驱动盘其实就是在格式化过程中简单的勾选上一个复选框而已。虽然这是加密 USB 盘最容易让人接受的方式,但我还是想演示如何在命令行下进行加密,因为这种方式可以让你明白在加密的后面具体发生了什么。
#### 步骤 1: 识别您的 USB 驱动盘。 ####
在您插入 USB 驱动盘后,如果输入 `dmesg` 命令,将会显示出所有的系统信息,包括刚插入的 USB 驱动盘的设备名字。 确保设备标识是正确的,因为后面要进行的操作会破坏驱动盘上的所有数据。您也不想一不小心就格式化掉正常的磁盘吧。(虽然不用提醒,但我还是要说,确保您的 USB 驱动盘已经没有你想保留的数据,因为这是一个破坏性的过程。)
#### 步骤 2: 对 USB 驱动盘进行分区。 ####
假设,在您的系统上 USB 驱动盘是 /dev/sdb 这个设备,您需要在这个驱动上创建一个单分区。我们使用 fdisk 命令。下面是 fdisk 必须的交互操作。一般地,用 o 命令来创建一个新的空分区,然后用 w 命令来保存设置。然后重新运行 fdisk 命令,并用 n 命令来创建一个新的主分区,接下来保持默认的以使用整个设备空间:
# sudo fdisk /dev/sdb
Command (m for help): o
Building a new DOS disklabel with disk identifier 0x1234567.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Command (m for help): w
The partition table has been altered!
# sudo fdisk /dev/sdb
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4, default 1): 1
Using default value 1
First sector (2048-1016522, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-1016522, default 1016522):
Using default value 1016522
Command (m for help): w
The partition table has been altered!
现在你的 USB 驱动盘有了一个单分区了(/dev/sdb1但还没有文件系统这正是我们所想要的因为 LUKS 系统需要在创建文件系统前在您的分区上创建一个加密层。因此,在创建文件系统之前,就让我们在分区上先创建一个 LUKS 层吧,可以使用 cryptsetup 程序。如果您还没有安装 cryptsetup 的话,可以搜索您系统发布版本的仓库源,里有就有。下面就开始创建 LUKS 加密分区层:
# cryptsetup luksFormat /dev/sdb1
WARNING!
========
This will overwrite data on /dev/sdb1 irrevocably.
Are you sure? (Type uppercase yes): YES
Enter LUKS passphrase:
Verify passphrase:
按照提示的操作,一定要确保记得您的密码!注意,这儿的“密码单词”不仅仅只表示一个单词。这只是一个习惯,因而得名,设置的越长,越难被破解。
一但上面的操作完成,就创建好了一个加密的分区,但它还没有被挂载或格式化。要做的第一步就是挂载分区,可以再一次使用 cryptsetup 工具:
# cryptsetup luksOpen /dev/sdb1 my_crypto_disk
Enter passphrase for /dev/sdb1:
当输入完密码后,您输入名字的设备就会像虚拟硬盘一样被挂载上。通常,它挂载在 /dev/mapper/devicename 目录下,所以这个例子所示的分区就挂载到了 /dev/mapper/my_crypto_disk 目录。
现在这个设备就可当做未加密的卷来访问了。 只要它一被挂载,就跟其它未加密的卷是一样的了,这就意味着您想要使用它的话就需要先写入文件系统:
# mkfs.vfat /dev/mapper/my_crypto_disk -n my_crypto_disk
mkfs.vfat 3.0.9 (31 Jan 2010)
现在驱动功能完备,可以像其它驱动盘一样正常挂载使用了。实际上,如果你使用的是现代的图形用户界面系统的话,只要你把 USB 驱动盘一插入计算机,将会提示您输入密码,然后就自动挂载上了。退出的时候跟普通盘一样,里面存储的数据会被加密,直到下次输入密码。在命令行里使用 cryptsetup 卸载以及重加密驱动盘也是很简单的:
# cryptsetup luksClose my_crypto_disk
这仅仅只是冰山一角
写这篇文章,我的目的是希望剥开加密后面的秘密。加密和解密单个文件很简单,要加密整个 USB 驱动盘也不是太困难(如果使用的是图形用户界面工具就更容易了)。对于大多数系统的发布版本来说,在安装过程中就可以对整个 home 目录进行加密。加密是对您的整个 home 目录起作用,然而有些问题就需要特别处理了。例如,您没登陆时就运行的任务在大多数情况下是不会访问您的 home 目录的,但如果您有调度任务需要访问 home 目录的话,应该进行修改,让其访问系统中其它目录的数据。我觉得安全和便利平衡的中庸之道还是加密 USB 驱动盘,然后在上面存储个人资料。
我必须警告您,一但您考虑安全的问题,就会想要把任何东西都加密起来。这不是什么坏的事情,但是像要对 home 目录加密这种情况,是会碰到一些问题的。如果您使用不用系统的话,跨平台访问也是个大问题。像这种情况,我强烈建议您使用 [TrueCrypt][1]。在前期的文章片段里我提到过 TrueCrypt它是一款开源的跨平台的加密系统软件。可以对文件、文件夹、分区等等进行加密同时可以在任何系统中访问加密的数据。像 Windows、Mac 及 Linux 客户端都可以使用。社区也有大力的支持。
希望对文件进行加密的目的并不是为了隐藏某些东西。就像即使您有个好邻居,最好夜里也得锁门一样,对您的个人数据进行加密也是个很正常的举动。如果您想在网上与大家分享你的 Whiskerton 先生戴着可爱的小豆豆帽子的照片的话,这是您的权利。但其它的人,比如他们索检你硬盘的时候,就不需要让看到了。
--------------------------------------------------------------------------------
via: http://www.linuxjournal.com/content/encrypting-your-cat-photos
译者:[runningwater](https://github.com/runningwater) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.truecrypt.org/

View File

@ -1,142 +0,0 @@
Linux终端Dstat监控工具
================================================================================
Dstat 是一个可以取代vmstatiostatnetstat和ifstat这些命令的多功能产品。Dstat克服了这些命令的局限并增加了一些另外的功能比如增加了运算能力和变得更灵活了。Dstat在很方便监控系统运行状况并用于基准测试和排除故障。
Dstat可以让你实时地看到所有系统资源例如你能够通过中断IDE控制器来比较磁盘利用率或者直接通过网络带宽数来比较磁盘的吞吐率在相同的时间间隔内
Dstat将以列表的形式为你提供选项信息并清晰地告诉你是在何种幅度和单位显示输出。这样更好地避免了信息混乱和误报。更重要的是它让你更方便写插件来收集你想要的数据信息并且这种方式会令你意想不到。
Dstat的默认输出是专门为人们实时解释而设计的然而你却可以将详细信息通过CSV输出到一个文件或导入到Gnumeric或者Excel生成表格。
###特征###
- 结合了vmstatiostatifstatnetstat等信息
- 实时显示统计情况
- 运算结果在分析和排障时具有重要意义
- 模块化设计
- 使用python编写的更方便扩展现有的工作任务
- 容易扩展和添加你的计数器(请为此做出贡献)
- 包含了许多扩展插件以方便添加计数器
- 分组统计节点/网络设备总数
- 显示每台设备说明
- 极准确的时间帧,当系统负荷时不存在时间差
- 显示准确地单位和限制转换过程中产生的错误
- 用不同的颜色显示不同的单元内容
- 显示中间结果延时小于1秒
- 支持输出CSV格式报表并能导入到Gnumeric和Excel生成表格
### 安装方法 ###
Ubuntu/Mint和Debin系统
本地软件库中有相关安装包,你可以用下面命令安装:
# sudo apt-get install dstat
RHEL/Centos和Fedora系统:
你可以在romforge软件库中添加有相关安装包参照[2】指导后使用命令很简单就能进行安装
# yum install dstat
ArchLinux系统
相关软件包在社区资源库中,你可以用这个命令来安装:
# pacman -S dstat
###使用方法 ###
dstat的基本用法只是用dstat命令就会像这样输出
![](http://cdn.linuxaria.com/wp-content/uploads/2014/05/dstat.png)
这是默认输出显示的信息:
CPU状态CPU的使用率。这项报告更有趣的部分是显示了用户系统和空闲这更好地分析了CPU当前的使用状况。如果你看到"wait"一栏中CPU的状态是一个高使用率值那说明系统存在一些其它问题。当CPU的状态在"waits"时那是因为它正在等待I/O设备例如内存磁盘或者网络的响应而且还没有收到。
**磁盘统计**:磁盘的读写操作,这一栏显示磁盘的读写总数。
**网络统计**:网络设备发送和接受的数据,这一栏显示的网络收发数据的总数。
**分页统计**系统的分页活动。分页指的是一种内存管理技术用于查找系统场景一个高水平的分页表明系统正在使用大量的交换空间或者说内存非常分散大多数情况下你都希望看到page in和page out的值是0 0。
**系统统计**这一项显示的是中断int和文本转换csw。如果你需要一个基线来比较他们的话这项统计通常是唯一有用的。这一栏中较高的统计值通常表示大量的进程造成拥塞需要对CPU进行关注。当你的服务器默认情况下正在运行一些程序时那一项将会显示一些数值。
默认情况下dstat每秒都会刷新数据。如果想退出dstat你可以按"control-C"键。
需要注意的是报告的第一行通常所有统计都不显示数值的。
这是由于dstat会通过上一次的报告来给出一个总结。所以第一次运行时是没有平均值和总值的相关数据。
但是dstat可以通过传递2个参数运行输出来控制报告和报告数量之间的延迟。例如如果你想要dstat输出默认统计和报表输出的时间间隔未3秒钟,并且报表中输出10个结果你可以运行如下命令
dstat 3 10
在dstat命令中有很多参数可选你可以通过man dstat命令查看大多数常用的参数有这些
- -l = shows load statistics #显示加载统计量#
- -m = shows the memory usage (used, buffer, cache, free) #显示内存使用率包括usedbuffercachefree值#
- -r = displays I/O statistics, #显示I/O统计#
- -s = shows the swap usage #显示swap使用情况#
- -t = puts the current time in the first column #将当前时间显示在第一行#
- fs = displays file system stats (includes amount of files and used inodes)#显示系统数据包括文件总数量和inodes值#
- nocolor = sometimes very useful…
- socket = shows interesting network statistics #显示感兴趣的网络数据#
- tcp = displays common TCP stats #显示常用的CPU统计#
- udp = shows you the listen and active figures for the UDP usage #显示你监听的和UDP用法中的一些动态数据#
当然不止这些用法dstat附带了一些**插件**很大程度地扩展了它的功能。你可以通过查看/usr/share/dstat目录来查看它们的一些使用方法常用的有这些
- disk-util = shows how much the disks are busy at the moment#显示某一时间磁盘的忙碌状况#
- freespace = shows the current disk usage#显示当前磁盘使用率#
- proc-count = displays the number of running processes#显示正在运行的程序数量#
- top-bio = points to the most expensive block I/O process #指出最大块I/O进程#
- top-cpu = draws the attention on the most expensive CPU process#图形化显示最值得引起注意的CPU进程#
- top-io = shows the most expensive “normal” I/O process#显示大多数正常的I/O进程#
- top-mem = displays the process using the most memory#显示占用最多内存的进程#
举一些例子:
查看全部内存都有谁在占用:
dstat -g -l -m -s --top-mem
显示一些关于CPU资源损耗的数据
dstat -c -y -l --proc-count --top-cpu
###如何输出一个csv文件###
在往后的使用中想输出一个csv格式的文件可以通过下面的命令
# dstat output /tmp/sampleoutput.csv -cdn
--------------------------------------------------------------------------------
via: http://linuxaria.com/howto/linux-terminal-dstat-monitoring-tools
译者disylee (https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://linuxaria.com/tag/network
[2]:http://www.tecmint.com/install-and-enable-rpmforge-repository-in-rhel-centos-6-5-4/