mirror of
https://github.com/LCTT/TranslateProject.git
synced 2026-08-23 04:03:29 +08:00
@@ -0,0 +1,33 @@
|
||||
为什么我们不应该接受低劣的Linux移植游戏
|
||||
================================================================================
|
||||
由于最近The Witcher 2的惨败,我想写下些想法,为什么我们不应该接受来自开发人员的品质低劣的移植游戏。
|
||||
|
||||
最近几年在我们的Linux游戏库里面有如此多游戏,以至于你现在可以看到来自Linux玩家的评论“我们已经有很多游戏了!”可能这些声音来自很多像你一样的人。感谢Valve 和 Steam,之前我们从来没有得到过这么多的开发者的关注。
|
||||
|
||||
同样由于开发者的推进,我们看见了伴随而来的各种移植游戏,坦率地说,它们的质量十分的低劣,或者说对于大多数人们来说根本不值得去看一眼。
|
||||
|
||||
现在的问题就是,如果我们继续接受这种低水平质量的移植,Linux就会赢得一个游戏质量水平低的名声。请认真考虑一下这样的后果吧!
|
||||
|
||||
再想象一下,如果那些AAA级的开发者给Linux推送了大量游戏,其中使用了The Witcher2 移植所用的“eON”技术。看起来就像我们有了大量开发者,突然之间Linux有很多大牌游戏了。然后你可以看见大量的人尝试Linux,却发现它们的游戏在同等硬件之下却有着糟糕的画面,就会给他们一个印象,Linux对游戏不友好。这对我们所有人都很糟糕。
|
||||
|
||||
我已经看见许多人说“这个工具包用于移植没关系?”。这在我的眼里看来是一个非常天真的想法。当然,这有关系, 它意味Linux的游戏里面的光线和白天的不同品质。这就直接追溯到我上面关于Linux游戏的观点上了。
|
||||
|
||||
你可以坚持说工具包没有关系,而且使用任何一个你想用的比较/类比的效果,但如果工具包是导致问题的根源,就像我们说的计算机占用了99%的处理能力的软件一样,是的,它当然有关系!
|
||||
|
||||
如今,我已经看见许多来自其他主流网站发表的评论,“我们应该接受它们并且作感谢状,我们毕竟拥有了它们”。那些都是鼠目寸光的人们说的胡话!
|
||||
|
||||

|
||||
|
||||
想想,那些开发者和发行商看到那些低劣的Linux移植游戏也能被接受时,他们的脑里只有钱。消费者对Linux游戏的感知就会进一步恶化,就是因为这些低劣的移植品。
|
||||
|
||||
我可以接受这些来自开发者的移植,毕竟是我运营着这个网站( http://www.gamingonlinux.com/ )。但是,如果我作为一个消费者不愿意为在windows运行挺好的游戏买单,而却为在Linux慢得像蜗牛一样的游戏买单?我会么?你会么?
|
||||
|
||||
最后附加的一点:你绝不应该攻击一个试图在社区里面解决问题的开发者,这样是不可以的。反馈是很好,骂人却是很幼稚的,这会使得Linux看起来更糟。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.gamingonlinux.com/articles/why-we-shouldnt-accept-bad-linux-ports.3765
|
||||
|
||||
译者:[Vic020](http://www.vicyu.net) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
@@ -2,14 +2,13 @@
|
||||
================================================================================
|
||||
**嗨,极客们!**
|
||||
|
||||
今天,我们介绍给大家一个新的系列节目,它叫命令行星期二。为什么叫命令行星期二?因为在该系列节目中,就像你们这样的忠实的计算机迷们,每天将会试着走出图形用户界面(GUI)文化的藩篱,GUI文化就是让事情变得简单而大众化。
|
||||
今天,我们介绍给大家一个新的系列节目,它叫命令行星期二。为什么叫命令行星期二?因为在该系列节目中,每天坐在计算机前的你们,将会试着走出图形用户界面(GUI)文化的藩篱,从今天开始“让事情变得简单而大众化”。
|
||||
|
||||
当然,如果你访问过任何与GNU/Linux相关的社区论坛的话,你可能耳闻目睹了一次火热的辩论,当然这是个假设,话题是哪个实际上更易用。是让GUI掌控一切,还是只是学习并享受命令行界(CLI)面带来的乐趣。
|
||||
当然,如果你访问过任何与GNU/Linux相关的社区论坛的话,你可能已经看到了,关于GUI和命令行哪个更好的讨论非常热烈。是让GUI掌控一切,还是只是学习并享受命令行界(CLI)面带来的乐趣呢?
|
||||
|
||||

|
||||
终端
|
||||
|
||||
对于使用或抛弃GUI工具的争论有很多。正方最常提到的优点之一,就是我们是在点击的计算模式下长大的,所以它基本上就是我们和机器进行交互的一种语言或文化形式。我们日复一日重复着这样的模式,点击那个大按钮来让它干我们需要它干的事。
|
||||
对于使用或抛弃GUI工具的争论有很多。正方最常提到的优点之一,就是我们是在点击的计算模式下长大的,所以它基本上就是我们和机器进行交互的一种语言,或者你可以说是一种文化。我们日复一日重复着这样的模式,点击那个大按钮来让它干我们需要它干的事。
|
||||
|
||||
而对于反方,我读到的关于命令行的优点的最有趣的评论之一,就是你可以通过命令行来更快,更简单地做更多事情,比GUI工具来得快。但你需要明白的是:你需要学习命令。是的,学习它们,就像学一首诗一样。
|
||||
|
||||
@@ -17,27 +16,28 @@
|
||||
|
||||
### 寓言 ###
|
||||
|
||||
我已经用了Linux超过3年了。27岁,是个文学专业学生,我对任何形式的技术都没有太大的兴趣。我直到中学才有了一台属于自己的计算机,我想大概是17岁那年吧。对于我而言,只用了10年的计算机。我只用过三个程序,BS播放器,Winamp和足球经理,偶尔也用用MS Word。大约三年多以前,我做临时工时的一位同事,在我正和另外一位同僚谈话时告诉我说,有个新版的东西,它一下子就抓住了我的心,它看起来确实与众不同。我现在想想,它就是Ubuntu的敏捷的独角鲸。在和这位同事讨论这个新版本后,他指出了一些常见的优点,这些优点也是我们经常向新手宣传的,不需要杀毒软件,启动快捷,安全性更高,附带有软件中心等等之类。最突出的一点:它背后的自由和开源(FOSS)哲学。他用他不带侵害性和没一点孩子气的方式把我带了进去。
|
||||
我已经用了Linux超过3年了。27岁,是个文学专业学生,我对任何形式的技术都没有太大的兴趣。我直到中学才有了一台属于自己的计算机,我想大概是17岁那年吧。对于我而言,只用了10年的计算机。我只用过三个程序,BS播放器,Winamp和足球经理,偶尔也用用MS Word。大约三年多以前,我做临时工时的一位同事,在我正和另外一位同僚谈话时告诉我说,有个新版的东西,它一下子就抓住了我的心,它看起来确实与众不同。我现在想想,它就是Ubuntu的“敏捷的独角鲸”。在和这位同事讨论这个新版本后,他指出了一些常见的优点,这些优点也是我们经常向新手宣传的,不需要杀毒软件,启动快捷,安全性更高,附带有软件中心等等之类。最突出的一点:它背后的自由和开源(FOSS)哲学。他用他温和而优雅的方式把我带了进去。
|
||||
|
||||
我决定来一次尝试,而从那以后便一发不可收拾。而至于我是怎么又从第一次对Ubuntu的浅尝辄止转而投向openSUSE 11.4的,咋们下回再讲吧。而我发现它只是一个完美而甜蜜的小插曲,那就完完全全另外一回事了。问题在于,我最终进入了Linux领域。这很有趣,感觉很不一样,它让我的计算机跑得更好,它也更稳定,我也和它相处得很好(似乎我是在不经意间买到了相当正统的硬件)。Linux似乎也远不止是桌面,所以我只是在不得不使用终端的时候也使用终端。但是这么说吧,它是Linux中一个最为讨厌的,最为可怕,最令人不爽的工具之一。如果没有GUI来进行特别的操作,我马上会诚惶诚恐,十分不安了。因为当我从论坛复制/粘贴命令的时候,我都不知道我究竟在干些什么。
|
||||
我决定来一次尝试,而从那以后便一发不可收拾。而至于我是怎么又从第一次对Ubuntu的浅尝辄止转而投向openSUSE 11.4的,咋们下回再讲吧。而我发现它只是一个完美而甜蜜的小插曲时,那就完完全全另外一回事了。问题在于,我最终进入了Linux领域。这很有趣,感觉很不一样,它让我的计算机跑得更好,它也更稳定,我也和它相处得很好(似乎我是在不经意间买到了相当普通的硬件)。似乎Linux并不是一个完全的桌面系统,所以我有时不得不使用终端。但是这么说吧,它是Linux中一个最为讨厌的,最为可怕,最令人不爽的工具之一。如果某些操作没有GUI可以做的话,我马上会诚惶诚恐,十分不安了。因为当我从论坛复制/粘贴命令的时候,我都不知道我究竟在干些什么。
|
||||
|
||||
随着时间流逝,情况发生了变化。相对于其他以消费者为导向的系统,发生在我身上的事可能有点与一般人相反。在那三年中,我感觉不是我在玩系统,而是系统在玩我。我学会了怎样寻找基本问题,提交bug报告,怎样正确地在论坛上提问。对于碰到的每个问题,我学会了为那些更有能力帮我解决问题的人提供更有用的信息。
|
||||
|
||||
不久以前,我女朋友发泄道,她简直不敢相信,我主要为了用计算机而用计算机,而不是用它来做一些别的事情。”你只用它来进行音乐收藏和做些Linux的乱七八糟的事情,Nenad. Gaawd“它让我想啊,使劲想。Linux,特别是openSUSE发行版它成了我的爱好之一。我不是一个专家,不管怎么说都说得通,Linux不在我的专业知识范畴内。但我有足够的知识来搞定它,搞定一些小问题,修改一些配置文件等等。但是我终于认识到,随着玩Linux日久,对系统的调整日多,我真的需要熟悉一下命令行(CLI)了。我也了解到,我在对底层的东西一无所知的情况下对系统胡作非为。我要对着ETC大喊大叫了,它究竟是个什么东西?BIN又是个什么东西?为什么会有个.sh在后面?问什么这个文件在这里?那个文件又在那里?为什么我得点击那一大堆的文件夹来找到正确的文件进行修改?然后,我读到‘你可以用一个命令来简单地列出某个地方的所有文件’时,它又变得很有趣了,我突然感到迫不及待要想试试了。
|
||||
不久以前,我女朋友发泄说,她简直不敢相信,我主要为了用计算机而用计算机,而不是用它来做一些别的事情。“你只用它来进行音乐收藏和做些Linux的乱七八糟的事情,Nenad. Gaawd”它让我想啊,使劲想。Linux,特别是openSUSE发行版它成了我的爱好之一。我不是一个专家,不管怎么看都是这样,Linux不在我的专业知识范畴内。但我有足够的知识来搞定它,搞定一些小问题,修改一些配置文件等等。但是我终于认识到,随着玩Linux日久,对系统的调整日多,我真的需要熟悉一下命令行(CLI)了。我也了解到,我在对底层的东西一无所知的情况下对系统胡作非为。我要对着etc大喊大叫了,它究竟是个什么东西?bin又是个什么东西?为什么会有个.sh在后面?问什么这个文件在这里?那个文件又在那里?为什么我得点击那一大堆的文件夹来找到正确的文件进行修改?然后,我读到“你可以用一个命令来简单地列出某个地方的所有文件”时,它又变得很有趣了,我突然感到迫不及待要想试试了。
|
||||
|
||||
### 好吧,让我们干吧! ###
|
||||
|
||||
我们来了……。作为一位新的openSUSE的新闻发布者,我会试着以我所见最有成效的方式来发表我的看法,这样的方式我想对社区中绝大多数人会奏效。该高举旗帜,一起开始学习命令行了。如果是是什么吸引你到Linux和openSUSE中来这么个态度,就想我,引领你走了这么远,那么是时候走得更远一点了。
|
||||
我们来了……。作为一位新的openSUSE的新闻发布者,我会试着以我所见最有成效的方式来发表我的看法,这样的方式我想对社区中绝大多数人会奏效。该高举旗帜,一起开始学习命令行了。如果是哲学理念吸引你到Linux和openSUSE中来的,就像我一样,那么是时候走得更远一点了。
|
||||
|
||||

|
||||
|
||||
看,我就知道在那外头有一大堆像我这样的人。我知道,你也许没有抓住90后极客们的要点,黑屏-绿字-手指在键盘上乱飞-让一切都激情澎湃。但这在很多地方都很有用。我们将以一种有趣的,而又共有的方式来学习,目录是用来干什么,什么文件放在什么地方,以及一些最常用的终端命令。在我们在控制台处理一些任务时,这将让我们更轻松一些;在碰到一些问题时,获得更大的回报。它也会让bug处理者更轻松些,如果他们从我们这头收到正确的信息的话。它也让我们的爱好变得乐趣无穷。
|
||||
看,我就知道在那外头有一大堆像我这样的人。我知道,你也许没有抓住90后极客们的要点,黑屏-绿字-手指在键盘上乱飞-让一切都激情澎湃。但这在很多地方都很有用。我们将以一种有趣的,而又通用的方式来学习,目录是用来干什么,什么文件放在什么地方,以及一些最常用的终端命令。在我们在控制台处理一些任务时,这将让我们更轻松一些;在碰到一些问题时,获得更大的回报。它也会让bug处理者更轻松些,如果他们从我们这头收到正确的信息的话。它也让我们的爱好变得乐趣无穷。
|
||||
|
||||
我是说,我的天啊,你已经过渡到连Dilber和xkcd都感到有趣的阶段了。是时候到终端下去了。
|
||||
|
||||
附录:
|
||||
|
||||
要用到的一些参考资料:威廉 · 肖茨—— 《Linux命令行》,以及克罗地亚黑客韦利米尔 ·巴克沙,别名鲁塞拉斯,《关于最常用命令的简短教程》。对于你们的要求:
|
||||
要用到的一些参考资料:威廉·肖茨—— 《Linux命令行》,以及克罗地亚黑客韦利米尔·巴克沙,别名鲁塞拉斯,《关于最常用命令的简短教程》。对于你们的要求:
|
||||
|
||||
- 每周1到2小时的空闲时间
|
||||
- 一品脱冰冻啤酒或者其它饮料
|
||||
- 有人已经指出,使用[Gedit][1],或者手工记录本(你懂的,笔和纸,呵呵)可以让学习更简单一些。
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
via: https://news.opensuse.org/2014/05/27/command-line-tuesdays-the-introductory/
|
||||
|
||||
译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[GOLinux](https://github.com/GOLinux) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
如何在Ubuntu 14.04中阻止其它用户访问你的家目录
|
||||
[小白技巧]如何在Linux中阻止其它用户访问你的家目录
|
||||
================================================================================
|
||||

|
||||
|
||||
如果你和其他人共享Ubuntu机器,那么你可能要设置多个用户,并考虑让其他用户登录到他们自己的帐号,而只能访问他们自己的家目录。但是,默认情况下,任何一个用户都可以访问任何一个家目录。
|
||||
如果你和其他人共享Ubuntu机器,那么你可能要设置多个用户,希望其他用户登录到他们自己的帐号,并只能访问他们自己的家目录。但是,默认情况下,任何一个用户都可以访问任何一个家目录。
|
||||
|
||||
当你在Ubuntu中添加一个新用户时,adduser工具为新的帐号添加了一个新的家目录。默认情况下,该目录位于根下面的/home/目录下,并以该帐号的用户名命名。例如,/home/lori。Ubuntu中创建的用户家目录具有全局读/写权限,这就给系统中所有其他用户可以读因外一些用户的家目录中的内容的权利。具体请阅读我们的[文件权限在Linux中是如何工作的][1]一文。
|
||||
当你在Ubuntu中添加一个新用户时,adduser工具为新的帐号添加了一个新的家目录。默认情况下,该目录位于根下面的/home/目录下,并以该帐号的用户名命名。例如,/home/lori。Ubuntu中创建的用户家目录具有其它人可读/执行权限,这就给系统中所有其他用户可以读另外外一些用户的家目录中的内容的权利。具体请阅读我们的[文件权限在Linux中是如何工作的][1]一文。
|
||||
|
||||
**注**:当我们在文中提到输入什么时,输入的文字内容是在引号中的,不要输入引,除非我们另外指定。
|
||||
**注**:当我们在文中提到输入什么时,输入的文字内容是在引号中的,不要输入引号,除非我们另外指定。
|
||||
|
||||
你可以很容易地修改你的家目录的权限来保护你的私人文件。要检查你家目录的权限,输入Ctrl + Alt + T打开终端窗口,并在提示符后输入以下行,然后按回车。使用你自己的用户名来替换“<username>”。
|
||||
你可以很容易地修改你的家目录的权限来保护你的私人文件。要检查你家目录的权限,输入Ctrl + Alt + T打开终端窗口,并在提示符后输入以下命令,然后按回车。使用你自己的用户名来替换下面的“用户名”。
|
||||
|
||||
ls –ld /home/lori
|
||||
ls -ld /home/lori
|
||||
|
||||
**注**:该命令使用的是小写的L,而不是数字1.
|
||||
**注**:该命令仅包含小写的L,而不是数字1。(LCTT译注:这是给完全小白的提示,绝大部分人可以无视这个备注了)
|
||||
|
||||
在该行的开头,列出了该文件的权限。就像我们在[文章][1]中关于Linux权限部分讲的那样。
|
||||
|
||||
> ”r表示“读”,w表示“写”,而x表示“执行”。目录权限以“d”开头,而不是“-”。你也会注意到权限值占了10个位置。你可以忽略第一个,后面是3个一组,分为3组。第一组是属主权限,第二组是属组权限,最后一组是大众权限“。
|
||||
> r表示“读”,w表示“写”,而x表示“执行”。目录权限以“d”开头,而不是“-”。你也会注意到权限值占了10个位置。你可以忽略第一个,后面是3个一组,分为3组。第一组是属主(owner)权限,第二组是属组(group)权限,最后一组是其它人(other或world)权限。
|
||||
|
||||
因此,下面列出的家目录的属主具有读、写和执行权限,而属组和大众具有读和执行权限。
|
||||
因此,下面列出的家目录的属主具有读、写和执行权限,而属组和其它人具有读和执行权限。
|
||||
|
||||

|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||

|
||||
|
||||
按上箭头两次,再次调用“ls -ld /home/<username>“命令来检查权限。注意,全局权限现在都是破折号(-),这就意味着大众将无法读、写或执行你家目录中的任何东西了。
|
||||
按上箭头两次,再次调用“ls -ld /home/用户名”命令来检查权限。注意,其它人权限现在都是破折号(-),这就意味着其它人将无法读、写或执行你家目录中的任何东西了。
|
||||
|
||||
然而,和你同组的用户可以读和执行你家目录中的文件和文件夹。如果你不想除你之外的任何人访问你的家目录,可以在chmod命令中输入“0700”。
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||

|
||||
|
||||
你也可以在创建新用户时,甚至Ubuntu使用指定的权限。要完成此项任务,你需要编辑adduser配置文件。要编辑该文件,在提示符下输入以下命令并回车。
|
||||
甚至你也可以在创建新用户时让Ubuntu使用指定的权限。要完成此项任务,你需要编辑adduser配置文件。要编辑该文件,在提示符下输入以下命令并回车。
|
||||
|
||||
gksudo gedit /etc/adduser.conf
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||

|
||||
|
||||
在adduser.conf文件中向下滚动到DIR_MODE命令处,这里的默认值是“0755”。修改该值来反映你想要授权给各种用户类型(用户,组,大众)的不同权限(r,w,x),如我们先前讨论过的“0750”或“0700“。点击保存(Save)。
|
||||
在adduser.conf文件中向下滚动到DIR_MODE命令处,这里的默认值是“0755”。修改该值来反映你想要授权给各种用户类型(属主,属组,其它人)的不同权限(r,w,x),如我们先前讨论过的“0750”或“0700”。点击保存(Save)。
|
||||
|
||||

|
||||
|
||||
@@ -72,13 +72,13 @@
|
||||
|
||||

|
||||
|
||||
现在,你家目录中文件会保持私有。切记,如果有其他用户和你处于同一组中,你也需要为你的家目录权限剔除组和大众权限。
|
||||
现在,你家目录中文件会保持私有。切记,如果有其他用户和你处于同一组中,你也许要为你的家目录权限剔除组和大众权限。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.howtogeek.com/190084/how-to-prevent-other-users-from-accessing-your-home-directory-in-ubuntu-14.04/
|
||||
|
||||
译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[GOLinux](https://github.com/GOLinux) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
命令行星期二 — 第一篇
|
||||
命令行星期二 —— 第一篇
|
||||
================================================================================
|
||||
极客们,我们又回来了!真抱歉让你们久等了,但我保证,我们又回归正轨了。我们满怀热情与大家相约,让我们激情燃烧,寻找刺激吧:)
|
||||
|
||||
现在,整个的想法已经在两周前的开场白中告诉你们了,所以现在让我们来干点正事吧。就像Shotts先生书里讲得那样,我们需要来了解一下shell是个什么东西,终端模拟器又是个什么东西,因为我们要在这里头干活。
|
||||
现在,整个的想法已经在之前的开场白中告诉你们了,所以现在让我们来干点正事吧。就像肖茨先生书里讲得那样,我们需要来了解一下shell是个什么东西,终端模拟器又是个什么东西,因为我们要在这里头干活。
|
||||
|
||||
Shotts在他的书中写道,shell实际上是当我们谈论命令行时所谈论的东西。shell基本上一个程序,它将你敲击键盘的动作传递给计算机;它也是某种形式的翻译器,将你所讲的东西翻译给计算机听。在这世界上活着的shell真是五花八门,但是活得最好的要数**bash**了,它在GNU/Linux中随处可见。我们也叫它Bourne Again Shell,这是一个精巧的双关语,因为自从Bourne先生创造了它的祖先**sh**后,Brian Fox又把它重写成为一个自由的sh替代品。啊哈!GUN人和他们的幽默,真的很精明。:)
|
||||
肖茨在他的书中写道,shell实际上是当我们谈论命令行时所谈论的东西。shell基本上一个程序,它将你敲击键盘的动作传递给计算机;它也是某种形式的翻译器,将你所讲的东西翻译给计算机听。在这世界上活着的shell真是五花八门,但是活得最好的要数**bash**了,它在GNU/Linux中随处可见。我们也叫它Bourne Again Shell,这是一个精巧的双关语,因为自从Bourne先生创造了它的祖先**sh**后,Brian Fox又把它重写成为一个自由的sh替代品。啊哈!GUN人和他们的幽默,真的很精明。:)
|
||||
|
||||

|
||||
|
||||
接下来我所需要,是一个让我们能和shell交互的东西,它就是终端模拟器。每个Linux发行版都自带了一个,至于长什么样就得看你使用的桌面环境了,可能是KDE的**Konsole**,也可能是Gnome的**Gnome terminal**等等。Shotts先生说了,你可以开发出你所偏爱的一个,但是大部分时间我还是用用桌面环境给我提供的那个吧。
|
||||
接下来我所需要,是一个让我们能和shell交互的东西,它就是终端模拟器。每个Linux发行版都自带了一个,至于长什么样就得看你使用的桌面环境了,可能是KDE的**Konsole**,也可能是Gnome的**Gnome terminal**等等。肖茨先生说了,你可以挖掘出你所偏爱的一个,但是大部分时间我还是用桌面环境给我提供的那个吧。
|
||||
|
||||
现在来发动你的终端。打开后,你会见到一行字,这行字告诉你用户名和机器的主机名,它叫作shell提示符。它告诉你它准备好了,你可以输入命令了。让我们来随便玩玩,随便输入点什么东西进去,然后敲回车看看。
|
||||
|
||||
呵呵,还记开篇我们讲过,我们需要像学诗歌一样来学习命令吗?记得就好,随意乱来可干不了啥事。
|
||||
|
||||
现在,按那个上箭头,你会发现命令又回来了。这是啥魔法?你键盘上的上箭头用来取出历史命令。终端会保存总计500个你输入过的命令,所以别一次又一次地重复敲它们了,你可以用上/下箭头来查找它们。左右箭头用来在指定行中移动光标,这样你就可以在文本中编辑或者插入了。另外一个东西 — **ctrl+v**是用来粘贴不工作的文本的。你可以在某个地方将它设置成快捷键,但是它常常不是那么回事。检查你的模拟器的快捷键!(在Konsole中,它位于设置 > 配置快捷键)
|
||||
现在,按那个上箭头,你会发现命令又回来了。这是啥魔法?你键盘上的上箭头用来取出历史命令。终端会保存总计500个你输入过的命令,所以别一次又一次地重复敲它们了,你可以用上/下箭头来查找它们。左右箭头用来在指定行中移动光标,这样你就可以在文本中编辑或者插入了。另外注意,想用**ctrl+v**来粘贴文本是不行的。你可以在某个地方将它设置成快捷键,但是它常常不是那么回事。检查你的模拟器的快捷键!(在Konsole中,它位于设置 > 配置快捷键)
|
||||
|
||||
现在,为了我们不在挨‘命令找不到’这一巴掌,让我们试试一些简单的。敲个**date**来试试。(是的,我不知道有这么个命令,这真着实让我兴奋了一把):)
|
||||
现在,为了我们不再被‘命令找不到’抽一巴掌,让我们试试一些简单的。敲个**date**来试试。(是的,我不知道有这么个命令,这真着实让我兴奋了一把):)
|
||||
|
||||

|
||||
|
||||
你又来了。当你能打开终端并输入date命令来查看日期时,为什么在时钟中看看内建日历会让你不胜其烦 :) 只是开个玩笑。就像Shotts书里写的那样,它确实是个简单的命令,更有用/困难的命令会在以后介绍。跟date相关的命令是cal - 它会显示当前月的日历。
|
||||
你又来了。当你能打开终端并输入date命令来查看日期时,为什么在时钟中看看内建日历会让你不胜其烦 :) 只是开个玩笑。就像肖茨书里写的那样,它确实是个简单的命令,更有用也更复杂的命令会在以后介绍。跟date相关的命令是cal - 它会显示当前月的日历。
|
||||
|
||||
你也可以试试**df**,它会列出你驱动器上的空闲空间。
|
||||
|
||||
@@ -38,7 +38,7 @@ Shotts在他的书中写道,shell实际上是当我们谈论命令行时所谈
|
||||
- 我们需要用什么来和shell交流(终端模拟器)
|
||||
- 使用光标按钮来驾驭终端命令以及退出终端
|
||||
|
||||
是个简单的命令:
|
||||
四个简单的命令:
|
||||
|
||||
- **date** – 显示当前日期
|
||||
- **cal** – 显示当前月份的日历
|
||||
@@ -47,7 +47,6 @@ Shotts在他的书中写道,shell实际上是当我们谈论命令行时所谈
|
||||
|
||||
### 下周二我们将会做什么呢? ###
|
||||
|
||||
We learn navigation through the file system (what are all those bin etc etc. folders, what are they used for, how to navigate through them via the terminal). Until then…
|
||||
我们会学习在文件系统中导航(bin、etc等等这所有的文件夹都是些什么东西?它们用来干什么?怎样通过终端来浏览它们)。到那时……
|
||||
|
||||
### 你就有得乐了! ###
|
||||
@@ -58,6 +57,6 @@ We learn navigation through the file system (what are all those bin etc etc. fol
|
||||
|
||||
via: https://news.opensuse.org/2014/06/10/command-line-tuesdays-part-one/
|
||||
|
||||
译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[GOLinux](https://github.com/GOLinux) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
82
published/201406/20140617 14 Apps To Boost Ubuntu.md
Normal file
82
published/201406/20140617 14 Apps To Boost Ubuntu.md
Normal file
@@ -0,0 +1,82 @@
|
||||
14个可以提升Linux桌面体验的应用程序
|
||||
==============================
|
||||
|
||||
转战到Ubuntu,或者是别的流行的Linux发行版,不仅仅是操作系统的操作方式的改变,更多的是你还需要一些能支持你完成工作的好的应用。
|
||||
|
||||
在这篇文章中,我将分享一些我精选出来不可或缺的应用程序,并谈谈在我的日常工作中如何有效地使用它们。
|
||||
|
||||
### 日常使用的应用程序 ###
|
||||
|
||||
一般当说到Linux桌面上的应用,我总是将这些应用划分为两大类,频繁使用的和一些别的应用。下边我为大家介绍的是一些自己日常使用的应用。
|
||||
|
||||
1) **Firefox** — 有时我也会使用用其他的浏览器,但最近[火狐浏览器][1]已经成为我可以长期信赖的朋友。可靠的、 安全的、 跨平台的,火狐浏览器完全满足了我的日常冲浪需求。
|
||||
|
||||
除了访问书签和网页,我还依靠火狐浏览器来处理我的各种部署在局域网服务器上的工作,如 [Plex][2], [Zoneminder][3], 路由器/WEB应用防火墙, 及我的文件服务器。所有这些均可以使用火狐浏览器进行访问。
|
||||
|
||||
2) **Parcelite**— 如果没有一个像样的剪贴板管理器我简直没法开始工作,至少对我来说,你无法找到在GNOME 下的[Parcelite][4]有什么不足。使用简单,易于访问而且它提供了很多的有用的选项。Parcelite选项应有尽有,包括了从热键设置到空格处理方式。尽管已经有很多的剪贴板管理器,但它们却很难击败 Parcelite。
|
||||
|
||||
3) **Bittorrent Sync** — 我已经使用过了各种开源替代方案进行文件同步,但是他们在正式发布之前还需要进行进一步开发。应该说[Bittorrent Synchas][5]从来没有让我失望过。它运行和安装都很简单和方便,这多亏了新的GUI的实现,而且 Bittorrent Sync 允许我快速地从一台机器到另外一台机器传输巨大的视频文件,而无需浪费时间去将大量的文件同步到“云端”。
|
||||
|
||||
我还发现它是与别人分享大型文件的最佳方法,在分享的同时能一直保持 IP 地址和目录的隐蔽。尽管有许多的替代品,我仍然坚定地成为了Bittorrent Sync的骨灰粉丝。
|
||||
|
||||
4) **System Monitor** — 因为TOP实在是滚动地太快了,所以我个人更喜欢一个具有选项卡式的 GUI,因为它能够让我的眼睛更轻松些。使用 GNOME 的系统监视器,我可以很快地发现一个失控的进程,并且轻松地kill掉它而不需吹灰之力。与[TOP][7]这样的终端程序不同的是,我可以实时的以图形化的方式去查看我的 CPU、 内存和磁盘的使用情况。作为一个拥有正常视觉的人,很难找到一个比用条形图来展示我还拥有多少的空间的更好方式。当然这也同样适用于其它的实时资源使用情况的监视。
|
||||
|
||||
5) **PulseAudioControl** — 每一天,我总是需要在多个声音设备之间来回穿梭。有时我需要将其中一个设为默认设备,然后却可能会从火狐浏览器音频完全切换到到另一个设备。因为我想控制我的尽可能多的音频,然后我就发现 [PulseAudioControl][8]是一个无价的工具。
|
||||
|
||||
### 一些别的软件 ###
|
||||
|
||||
在本节中,我将分享我使用,但可能并不一定是每天都使用的应用程序。许多这些应用程序都是开放源代码的,有一些不是,但是它们对我个人都非常具有价值。
|
||||
|
||||
|
||||
6) **Skype** — 无论是拨入[Jupiter Broadcasting][9] 收听每周共同主持的播客,或者只是简单联系一个业务,[Skype][10] 见证了互联网视频会议的发展史。测试完成无数的替代品后,我总是会发现自己还是终回到了Skype。即使有真的很棒的开源选择像[Ekiga][11] 和 [Jitsi][12],而在最后Skype总是与大家同在 —— 切换到Skype是一件很幸运的事。
|
||||
|
||||
7)**Kdenlive** — 我使用两个不同的视频编辑器,当我要处理一个需要大量编辑的视频剪辑项目的时候,[Kdenlive][13]是我用于图片合成和编辑大型的复杂的视频的工具。我已经成功地在 Kdenlive 里边做过6个素材轨道的编辑,但同样的负载量早已经让别的视频剪辑软件崩溃了。
|
||||
|
||||
8)**OpenShot** — 大多数情况下,我会将[OpenShot][14]作为视频剪辑任务的首选神兵利器。快速的编辑和两个素材轨道工作区让你可以流畅而操作简单。我还发现它提供了很棒的无与伦比的特效。调制标题效果和超赞的的视频转场效果使OpenShot在我自己的视频项目上成为一款超棒的视频制作软件。
|
||||
|
||||
9)**SpiderOak** — 在使用了无数云备份服务这么多年后, [SpiderOak][15] 已经成为了我的至爱。易于安装和使用,我超喜欢它所提供的增量选项而且使用起来是如此的简单。只需一次设置,不再操心,之后SpiderOak将会挑起你的文件搬运大任。
|
||||
|
||||
10) **Dropbox** — 许多年来,我已经与[Dropbox][16] 爱恨交织。尽管它的跨平台特性这意味着我可以从任何位置访问文件,我慢慢地发现我自己越来越少依赖这个基于云计算的备份解决方案。尽管如此,它允许我从任何 web 浏览器中访问文件,即使是从我不经常使用的计算机,这使得抛弃 Dropbox 更是难上加难。
|
||||
|
||||
11) **Writer** — 自从我第一次在Windows的OpenOffice里面使用过它之后,我一直都在使用[Writer][17]。今天,我使用LibreOffice 所带的Writer来满足我的需求,它可以做一切一个文字处理器可以做的事情。现在,公正地说,一些专有的办公套件可能会提供附加功能在Writer中是没有的,但是99%的人需要的功能在Writer这里都有。就我个人而言,我会永远是一个LibreOffice Writer粉。
|
||||
|
||||
12)**SimpleScreenRecorder** — 多年来,我发现自己使用 [SimpleScreenRecorder][18]远超过其他同类软件,它能很好支持多监视器模式,再加上它甚至可以捕获基于 OpenGL 的应用程序的视频。易于使用和可靠的 SimpleScreenRecorder 让我的工作更加得心应手。我把它推荐给那些只是偶尔需要,懒得使用其它屏幕捕捉软件的同学们。
|
||||
|
||||
13)**SimpleScan** — 当我需要扫描文档的时候,我一点都不想将大把大把的时间花费在配置的臃肿的程序上。 [Simple Scan][19] 可以在这方面做得很好。智能的SANE扫描数据库,Simple Scan将与市面上的任何扫描仪或多功能一体打印机/扫描仪很好的进行协作。此外还有一点好处就是它会设置成的最佳分辨率,当然你还可以很方便手动调整任何你需要的设置。
|
||||
|
||||
14)**Baobab**(磁盘使用分析器) — 我不断听到关于如何硬盘价格已回落。这或许没错,但现实却是我却囊中羞涩。这意味着我需要充分利用我能利用的所有硬盘空间,为了实现这个目的,我使用 [Baobab][20] 来观察我在我的硬盘上的可用空间,而且还可以直观地看到到底是哪一个目录正在蚕食我宝贵的硬盘空间。
|
||||
|
||||
### 真正的具有生产力的软件 ###
|
||||
|
||||
谈到我所依赖的这些软件,我们真正关心的是他们能为我们完成什么样的任务,而不是它们所拥有的光辉头衔和自身的许可证。linux不需要软件的传奇时代早已过去。多数的计算机上的工作,除了有限的几个例外,大都可以在linux桌面上轻松地如我所说的那样完成。
|
||||
|
||||
很明显有一些对于你来说是必不可少的软件,但是也许不是我必须用的。你所倚重的软件是什么?您可在下方进行评论并与我们的读者进行分享那些优秀的软件。
|
||||
|
||||
------
|
||||
|
||||
via: http://www.datamation.com/applications/14-apps-to-boost-ubuntu-1.html
|
||||
|
||||
译者:[owen-carter](https://github.com/owen-carter) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.mozilla.org/en-US/firefox/new/
|
||||
[2]:https://plex.tv/
|
||||
[3]:http://www.zoneminder.com/
|
||||
[4]:http://parcellite.sourceforge.net/
|
||||
[5]:http://www.bittorrent.com/sync
|
||||
[6]:https://help.gnome.org/users/gnome-system-monitor/3.12/
|
||||
[7]:http://linux.about.com/od/commands/l/blcmdl1_top.htm
|
||||
[8]:http://freedesktop.org/software/pulseaudio/pavucontrol/
|
||||
[9]:http://en.wikipedia.org/wiki/Jupiter_Broadcasting
|
||||
[10]:http://www.skype.com/en/download-skype/skype-for-linux/
|
||||
[11]:http://ekiga.org/
|
||||
[12]:https://jitsi.org/
|
||||
[13]:http://www.kdenlive.org/
|
||||
[14]:http://www.openshot.org/
|
||||
[15]:https://spideroak.com/
|
||||
[16]:https://www.dropbox.com/
|
||||
[17]:http://www.libreoffice.org/discover/writer/
|
||||
[18]:http://www.maartenbaert.be/simplescreenrecorder/
|
||||
[19]:https://launchpad.net/simple-scan
|
||||
[20]:http://www.marzocca.net/linux/baobab/baobab-getting-started.html
|
||||
@@ -0,0 +1,42 @@
|
||||
Ubuntu的Orange Box首次亮相
|
||||
================================================================================
|
||||
|
||||
> Orange Box现已推出,它是一个便携的服务器集群,Canonical用它来演示和培训基于Ubuntu的OpenStack云。
|
||||
|
||||

|
||||
|
||||
Canonical刚刚发布的Orange Box是一个便携式服务器集群,该公司用来展示[OpenStack][1],[MAAS][2],[Juju][3]和其它的基于Ubuntu Linux的云服务。
|
||||
|
||||
下面是它的介绍。
|
||||
|
||||
对于刚刚接触到它的人来说,重要的是要了解Orange Box不是什么:它不是一台Canonical用来盈利的硬件产品。到目前为止,该公司并无表示计划大规模销售这些设备。如果你真的想[买一款][4]的话,大概价格为$12,900,这个价格来自其合同制造商[TranquilPC Limited][5]。
|
||||
|
||||
从大的方面来说,Orange Box是一个说服企业在基于Ubuntu的云计算投入资金的工具。Canonical的创始人马克·沙特尔沃思[上个月宣布了][6]Ubuntu OpenStack的战略,这是该战略的一个关键组成部分,更是该公司提供的称作[Jumpstart][7]的OpenStack的培训计划的一部分。
|
||||
|
||||
作为Jumpstart的一部分,Canonical会将Orange Box借给合作伙伴,以便他们的员工可以在Ubuntu集群上练习配置OpenStack和相关软件。Canonical的工作人员也将在培训期间提供咨询。
|
||||
|
||||
不过除开培训的目的不谈,Orange Box[看起来真的很酷][8]。它装有10个[英特尔NUC][9],总计集成了160GB的RAM,1200GB的存储空间和10个酷睿i5处理器,这种设备在一个袖珍空间内提供了相当强大的计算能力。
|
||||
|
||||

|
||||
|
||||
更好的是,Orange Box通过预装软件为启动基于Ubuntu的云技术打下了良好基础。
|
||||
|
||||
不过,对于Canonical来说,真正的考验是确保企业能够从Orange Box中获益。借出它们不只是为了让合作伙伴们体验一下不错的硬件设备,而是为了通过一个真正令人信服的方式体验Ubuntu的云,以吸引IT决策者选择Ubuntu所建立的下一代云基础设施。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://thevarguy.com/ubuntu/062314/canonical-debuts-orange-box-ubuntu-openstack-cloud-demos
|
||||
|
||||
译者:[乌龙茶](https://github.com/yechunxiao19) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://openstack.org/
|
||||
[2]:https://maas.ubuntu.com/
|
||||
[3]:http://juju.ubuntu.com/
|
||||
[4]:http://www.tranquilpcshop.co.uk/ubuntu-orange-box/
|
||||
[5]:http://www.tranquilpcshop.co.uk/
|
||||
[6]:http://thevarguy.com/ubuntu/051614/shuttleworth-highlights-ubuntu-openstack-cloud-innovations
|
||||
[7]:http://www.ubuntu.com/cloud/tools/jumpstart
|
||||
[8]:http://arstechnica.com/information-technology/2014/06/hands-on-with-canonicals-orange-box-and-a-peek-into-cloud-nirvana/
|
||||
[9]:http://www.intel.com/content/www/us/en/nuc/overview.html
|
||||
@@ -1,38 +0,0 @@
|
||||
乌龙茶占坑
|
||||
Canonical Debuts 'Orange Box' for Ubuntu OpenStack Cloud Demos
|
||||
================================================================================
|
||||
> The Orange Box, a portable server cluster that Canonical will use for Ubuntu-based OpenStack cloud demonstrations and training, is now available.
|
||||
|
||||

|
||||
|
||||
Canonical's Orange Box, the portable server cluster that the company intends to use to showcase [OpenStack][1], [MAAS][2], [Juju][3] and other aspects of the Ubuntu Linux-based cloud, is out. Here's what it's all about.
|
||||
|
||||
For starters, it's important to understand what the Orange Box is not: A revenue-generating hardware product from Canonical. The company has given no indication so far that it plans to sell these devices on a large scale—although if you truly want you can [buy one][4], for the equivalent of around $12,900, from [TranquilPC Limited][5], the company that has the contract for manufacturing them.
|
||||
|
||||
Primarily, the Orange Box is a tool for convincing enterprises to invest in the Ubuntu-based cloud. It's a key part of the Ubuntu OpenStack strategy that Canonical founder Mark Shuttleworth [outlined last month][6], especially the OpenStack training program the company is offering, called [Jumpstart][7].
|
||||
|
||||
As part of Jumpstart, Canonical will loan an Orange Box to a participating organization so its employees can practice configuring OpenStack and related software on an Ubuntu cluster. Canonical staff also will provide consultation during the training period.
|
||||
|
||||
But training purposes aside, the Orange Box [looks pretty cool][8]. And with 10 [Intel NUCs][9] inside—packing a collective punch of 160GB of RAM, 1,200GB of storage space and 10 i5 CPUs—the device fits quite a bit of computing power into a tiny space.
|
||||
|
||||
Better still, the Orange Box comes preconfigured with software that provides a basis for launching Ubuntu-based cloud technologies.
|
||||
|
||||
For Canonical, however, the real test will be making sure enterprises take advantage of the Orange Boxes that the company lends them not just to poke around an unusual hardware device, but to experience the Ubuntu cloud in a truly compelling way—compelling enough to convince IT decision-makers to ground the next-generation cloud infrastructure that they are building in Ubuntu.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://thevarguy.com/ubuntu/062314/canonical-debuts-orange-box-ubuntu-openstack-cloud-demos
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://openstack.org/
|
||||
[2]:https://maas.ubuntu.com/
|
||||
[3]:http://juju.ubuntu.com/
|
||||
[4]:http://www.tranquilpcshop.co.uk/ubuntu-orange-box/
|
||||
[5]:http://www.tranquilpcshop.co.uk/
|
||||
[6]:http://thevarguy.com/ubuntu/051614/shuttleworth-highlights-ubuntu-openstack-cloud-innovations
|
||||
[7]:http://www.ubuntu.com/cloud/tools/jumpstart
|
||||
[8]:http://arstechnica.com/information-technology/2014/06/hands-on-with-canonicals-orange-box-and-a-peek-into-cloud-nirvana/
|
||||
[9]:http://www.intel.com/content/www/us/en/nuc/overview.html
|
||||
@@ -0,0 +1,51 @@
|
||||
KDE Connect Adds Android File Sending, Touchpad Emulation
|
||||
================================================================================
|
||||
**A new version of KDE Connect for Android that adds a number of new features has been released.**
|
||||
|
||||

|
||||
KDE Connect can now share files between desktop and mobile
|
||||
|
||||
KDE Connect for Android and the Plasma desktop now allow the touchscreen of a connected device to be used as a touchpad for your computer.
|
||||
|
||||
This additional wireless input device will act just like a basic mouse, though doesn’t (yet) support multitouch features like two finger scrolling or right-clicking.
|
||||
|
||||
Android’s share intent now supports KDE Connect, allowing you to send files from Android to your desktop and vice versa using a menu entry in the Dolphin file manager or by pushing files using a new command line option.
|
||||
|
||||
Similar features for [iOS 8 and OS X Yosemite][1] and [Android ‘L’ and Chrome OS][2] are planned to debut this fall.
|
||||
|
||||
The updated version also fixes a number of bugs and includes numerous improvements, including support for FreeBSD systems.
|
||||
|
||||
Full Feature List:
|
||||
|
||||
- Share files to/from Android and KDE
|
||||
- Touchpad emulation
|
||||
- Receive notifications from Android 4.3+ on desktop
|
||||
- Shared clipboard supports copy and paste between phone and PC
|
||||
- Multimedia remote control for select desktop media players (MPRIS)
|
||||
- Battery status
|
||||
- Wi-Fi connection sharing
|
||||
- RSA Encryption
|
||||
|
||||
### Download KDE Connect 0.7 ###
|
||||
|
||||
The KDE Connect Android application is free to download from the Google Play and F-Droid stores.
|
||||
|
||||
- [Download KDE Connect from Google Play][3]
|
||||
|
||||
To make use of the newest features you will also need to install the latest version of KDE Connect (version 0.7) for Plasma. As of writing this is not yet available as a .deb installer or through a PPA. It can, however, be installed from source on Kubuntu 14.04 LTS and above by following the instructions [provided here][4].
|
||||
|
||||
- [Download KDE Connect 0.7 Source][5]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.omgubuntu.co.uk/2014/06/kde-connect-android-notifications-linux-desktop
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.omgubuntu.co.uk/2014/06/os-x-10-10-feature-ubuntu-already
|
||||
[2]:http://www.omgchrome.com/android-apps-notifications-call-alerts-chromebook/
|
||||
[3]:https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp
|
||||
[4]:https://albertvaka.wordpress.com/2014/06/28/awesome-contributions-to-kde-connect/#comment-1175
|
||||
[5]:http://download.kde.org/unstable/kdeconnect/0.7/src/kdeconnect-kde-0.7.tar.xz.mirrorlist
|
||||
@@ -0,0 +1,33 @@
|
||||
New Linux Podcast App ‘Vocal’ Hits Beta, Ready for Testing
|
||||
================================================================================
|
||||
**Back in April we found ourselves enamoured by a promising new [podcast app for Ubuntu called ‘Vocal‘][1]. Well, the app has since gone from being a stylish mockup to real working code — and you can help test it.**
|
||||
|
||||
The project’s developer, Nathan Dyer, has made beta builds — still unstable and not feature complete — available for testing through a dedicated PPA for Ubuntu 14.04 LTS and 14.10.
|
||||
|
||||
The kicker to this (rather sweet) news is that the beta builds of the app **can only be installed if you’re using the next-gen elementary desktop**. And since elementary do not provide official pre-beta development builds for users to test, that makes it a trite difficult.
|
||||
|
||||
Not quite as difficult as trying it out on Unity, GNOME or KDE desktops, mind. If you’re an Ubuntu user wanting to kick the tires on Vocal you will first need to add an unstable elementary desktop PPA to your systems, something we strongly advise against doing.
|
||||
|
||||
Dyer suggests interested users wait until the first beta of the next elementary version is made available.
|
||||
|
||||
For now we can at least look at it:
|
||||
|
||||

|
||||
Vocal Beta running on Elementary (Image: Dyer)
|
||||
|
||||
Since Vocal is open source there’s nothing to stop it being ported over to mainstream Linux desktop environments such as Unity.
|
||||
|
||||
In the meantime to learn more visit [the developer’s blog][1], [check out the unstable PPA][2] or hit up [Vocal on Launchpad][3].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.omgubuntu.co.uk/2014/06/linux-podcast-app-vocal-hits-preview-kicker
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.omgubuntu.co.uk/2014/04/vocal-podcast-manager-linux
|
||||
[2]:http://nathandyer.me/2014/06/28/vocal-beta-released-daily-ppa-available/
|
||||
[3]:https://launchpad.net/~nathandyer/+archive/vocal-daily
|
||||
[4]:https://launchpad.net/vocal
|
||||
62
sources/talk/20140630 Ubuntu 14.04 LTS--Customizing Unity.md
Normal file
62
sources/talk/20140630 Ubuntu 14.04 LTS--Customizing Unity.md
Normal file
@@ -0,0 +1,62 @@
|
||||
Ubuntu 14.04 LTS: Customizing Unity
|
||||
================================================================================
|
||||
Although the Unity Desktop Manager has made HUGE performance and usability strides since the initial release in Ubuntu 11.10, some people are still put off by a number of the limitations in customizing the look and behavior of the window manager. We are going to take a look at how to customize Unity and bring back a sense of control to your desktop.
|
||||
|
||||
### Unity Customizations Available ###
|
||||
|
||||
In Ubuntu 14.04, Unity has several customizations that are available that were not previously. If you log into Unity, go the the “Settings” and choose “Display”, you will see the following screen:
|
||||
|
||||

|
||||
Ubuntu 14.04 LTS Display and Unity Settings
|
||||
|
||||
Most of what you see is new since the Ubuntu 11.10 Unity introduction and several are new since just the latest version of Ubuntu 13.10. New since 13.10 are the ability to scale the menu and title bars. This is useful in very high resolution screens OR as a visual impairment option. Everything scales equally.
|
||||
|
||||
Specific to Unity we can also turn on or off that “sticky edges” option. This is the somewhat annoying “pause” your mouse does on the edge of each screen of a multi-monitor setup. It stops the mouse momentarily at the edge, like it gets stuck. Finally, we have to option to turn that off.
|
||||
|
||||
In the “Settings” screen still, choose the “Appearance” option to see the following:
|
||||
|
||||

|
||||
Ubuntu 14.04 LTS Appearance and Unity Settings
|
||||
|
||||
Here we have one of the most requested options for the Unity Dock, the ability to change the Launcher size. Although it could be done in multiple ways in various versions of Ubuntu since 11.10, including it in the Appearance setting just makes it all official. I like that it allows you to change the icon size all the way down to 16 (even the tool we will talk about next only supports 24).
|
||||
|
||||
### Unity Tweak Tool – Now Repo Strong! ###
|
||||
|
||||
This tool has been around since the early days of Ubuntu 11.10 when Unity was first introduced, although you had to jump through a large number of hoops (and progressively smaller as the versions went on) to get it installed and it would be broken by Unity updates.
|
||||
|
||||
Now however, it has officially been added to the default Ubuntu repositories and gets updated when Unity gets updated. There are a large number of customizations, so let’s get it installed:
|
||||
|
||||
sudo apt-get install unity-tweak-tool
|
||||
|
||||
After installation, start it up and you will see the following screen:
|
||||
|
||||

|
||||
Ubuntu 14.04 LTS Official Unity Tweak Tool
|
||||
|
||||
This tool encapsulates a large number of Unity Desktop customizations all in once convenient location. Most of these options can be had in the default Unity settings, at the command line or by editing sometimes hard to find configuration files.
|
||||
|
||||
We can change the behavior of the dock, the panel, web applet integration, search within the Unity menu, etc. all within this one tool. Take the time to explore the options available to you – Unity Tweak Tool – learn it, live it, love it (at least if you use Unity).
|
||||
|
||||
### Final Thoughts ###
|
||||
|
||||
Ubuntu 14.04 LTS is shaping up more and more to be the Linux Desktop (sorry Canonical, you are still Linux) of choice for both the casual Linux user (is there such a thing) as well as the die hard professional.
|
||||
|
||||
We now have more control than every over the Unity Desktop without resorting to tools, utilities or configuration file edits that may break with each subsequent Unity update. The desktop performance is pretty rock solid and, by adding some flavor with the Unity Tweak Tool, looks pretty cool as well! Drop us your thoughts or post links to your Unity Desktop set up in the comments below, we would be interested to see how you are using Ubuntu 14.04 LTS.
|
||||
|
||||
----------
|
||||
|
||||
#### Terrence T. Cox ####
|
||||
|
||||
Developer, Linux Advocate, Open Source Junkie. Been at this whole tech thing long enough to be considered 'very experienced' but not so long as to be bored of it.
|
||||
|
||||
[Twitter][1]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://linuxacademy.com/blog/linux/ubuntu-14-04-lts-customizing-unity/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:https://twitter.com/mourngrymtc/
|
||||
@@ -1,128 +0,0 @@
|
||||
How to Rescue a Non-booting GRUB 2 on Linux
|
||||
================================================================================
|
||||

|
||||
Figure 1: GRUB 2 menu with cool Apollo 17 background.
|
||||
|
||||
Once upon a time we had legacy GRUB, the Grand Unified Linux Bootloader version 0.97. Legacy GRUB had many virtues, but it became old and its developers did yearn for more functionality, and thus did GRUB 2 come into the world.
|
||||
|
||||
GRUB 2 is a major rewrite with several significant differences. It boots removable media, and can be configured with an option to enter your system BIOS. It's more complicated to configure with all kinds of scripts to wade through, and instead of having a nice fairly simple `/boot/grub/menu.lst` file with all configurations in one place, the default is `/boot/grub/grub.cfg`. Which you don't edit directly, oh no, for this is not for mere humans to touch, but only other scripts. We lowly humans may edit `/etc/default/grub`, which controls mainly the appearance of the GRUB menu. We may also edit the scripts in `/etc/grub.d/`. These are the scripts that boot your operating systems, control external applications such as memtest and os_prober, and theming`./boot/grub/grub.cfg` is built from `/etc/default/grub` and `/etc/grub.d/*` when you run the update-grub command, which you must run every time you make changes.
|
||||
|
||||
The good news is that the update-grub script is reliable for finding kernels, boot files, and adding all operating systems to your GRUB boot menu, so you don't have to do it manually.
|
||||
|
||||
We're going to learn how to fix two of the more common failures. When you boot up your system and it stops at the grub> prompt, that is the full GRUB 2 command shell. That means GRUB 2 started normally and loaded the normal.mod module (and other modules which are located in /boot/grub/[arch]/), but it didn't find your grub.cfg file. If you see grub rescue> that means it couldn't find normal.mod, so it probably couldn't find any of your boot files.
|
||||
|
||||
How does this happen? The kernel might have changed drive assignments or you moved your hard drives, you changed some partitions, or installed a new operating system and moved things around. In these scenarios your boot files are still there, but GRUB can't find them. So you can look for your boot files at the GRUB prompt, set their locations, and then boot your system and fix your GRUB configuration.
|
||||
|
||||
### GRUB 2 Command Shell ###
|
||||
|
||||
The GRUB 2 command shell is just as powerful as the shell in legacy GRUB. You can use it to discover boot images, kernels, and root filesystems. In fact, it gives you complete access to all filesystems on the local machine regardless of permissions or other protections. Which some might consider a security hole, but you know the old Unix dictum: whoever has physical access to the machine owns it.
|
||||
|
||||
When you're at the `grub>` prompt, you have a lot of functionality similar to any command shell such as history and tab-completion. The `grub rescue>` mode is more limited, with no history and no tab-completion.
|
||||
|
||||
If you are practicing on a functioning system, press C when your GRUB boot menu appears to open the GRUB command shell. You can stop the bootup countdown by scrolling up and down your menu entries with the arrow keys. It is safe to experiment at the GRUB command line because nothing you do there is permanent. If you are already staring at the `grub>` or `grub rescue>`prompt then you're ready to rock.
|
||||
|
||||
The next few commands work with both `grub>` and `grub rescue>`. The first command you should run invokes the pager, for paging long command outputs:
|
||||
|
||||
grub> set pager=1
|
||||
|
||||
There must be no spaces on either side of the equals sign. Now let's do a little exploring. Type ls to list all partitions that GRUB sees:
|
||||
|
||||
grub> ls
|
||||
(hd0) (hd0,msdos2) (hd0,msdos1)
|
||||
|
||||
What's all this msdos stuff? That means this system has the old-style MS-DOS partition table, rather than the shiny new Globally Unique Identifiers partition table (GPT). (See [Using the New GUID Partition Table in Linux (Goodbye Ancient MBR)][1]. If you're running GPT it will say (hd0,gpt1). Now let's snoop. Use the ls command to see what files are on your system:
|
||||
|
||||
grub> ls (hd0,1)/
|
||||
lost+found/ bin/ boot/ cdrom/ dev/ etc/ home/ lib/
|
||||
lib64/ media/ mnt/ opt/ proc/ root/ run/ sbin/
|
||||
srv/ sys/ tmp/ usr/ var/ vmlinuz vmlinuz.old
|
||||
initrd.img initrd.img.old
|
||||
|
||||
Hurrah, we have found the root filesystem. You can omit the msdos and gpt labels. If you leave off the slash it will print information about the partition. You can read any file on the system with the cat command:
|
||||
|
||||
grub> cat (hd0,1)/etc/issue
|
||||
Ubuntu 14.04 LTS \n \l
|
||||
|
||||
Reading /etc/issue could be useful on a multi-boot system for identifying your various Linuxes.
|
||||
|
||||
### Booting From grub> ###
|
||||
|
||||
This is how to set the boot files and boot the system from the grub> prompt. We know from running the ls command that there is a Linux root filesystem on (hd0,1), and you can keep searching until you verify where /boot/grub is. Then run these commands, using your own root partition, kernel, and initrd image:
|
||||
|
||||
grub> set root=(hd0,1)
|
||||
grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1
|
||||
grub> initrd /boot/initrd.img-3.13.0-29-generic
|
||||
grub> boot
|
||||
|
||||
The first line sets the partition that the root filesystem is on. The second line tells GRUB the location of the kernel you want to use. Start typing /boot/vmli, and then use tab-completion to fill in the rest. Type root=/dev/sdX to set the location of the root filesystem. Yes, this seems redundant, but if you leave this out you'll get a kernel panic. How do you know the correct partition? hd0,1 = /dev/sda1. hd1,1 = /dev/sdb1. hd3,2 = /dev/sdd2. I think you can extrapolate the rest.
|
||||
|
||||
The third line sets the initrd file, which must be the same version number as the kernel.
|
||||
|
||||
The fourth line boots your system.
|
||||
|
||||
On some Linux systems the current kernels and initrds are symlinked into the top level of the root filesystem:
|
||||
|
||||
$ ls -l /
|
||||
vmlinuz -> boot/vmlinuz-3.13.0-29-generic
|
||||
initrd.img -> boot/initrd.img-3.13.0-29-generic
|
||||
|
||||
So you could boot from grub> like this:
|
||||
|
||||
grub> set root=(hd0,1)
|
||||
grub> linux /vmlinuz root=/dev/sda1
|
||||
grub> initrd /initrd.img
|
||||
grub> boot
|
||||
|
||||
### Booting From grub-rescue> ###
|
||||
|
||||
If you're in the GRUB rescue shell the commands are different, and you have to load the normal.mod andlinux.mod modules:
|
||||
|
||||
grub rescue> set prefix=(hd0,1)/boot/grub
|
||||
grub rescue> set root=(hd0,1)
|
||||
grub rescue> insmod normal
|
||||
grub rescue> normal
|
||||
grub rescue> insmod linux
|
||||
grub rescue> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1
|
||||
grub rescue> initrd /boot/initrd.img-3.13.0-29-generic
|
||||
grub rescue> boot
|
||||
|
||||
Tab-completion should start working after you load both modules.
|
||||
|
||||
### Making Permanent Repairs ###
|
||||
|
||||
When you have successfully booted your system, run these commands to fix GRUB permanently:
|
||||
|
||||
# update-grub
|
||||
Generating grub configuration file ...
|
||||
Found background: /usr/share/images/grub/Apollo_17_The_Last_Moon_Shot_Edit1.tga
|
||||
Found background image: /usr/share/images/grub/Apollo_17_The_Last_Moon_Shot_Edit1.tga
|
||||
Found linux image: /boot/vmlinuz-3.13.0-29-generic
|
||||
Found initrd image: /boot/initrd.img-3.13.0-29-generic
|
||||
Found linux image: /boot/vmlinuz-3.13.0-27-generic
|
||||
Found initrd image: /boot/initrd.img-3.13.0-27-generic
|
||||
Found linux image: /boot/vmlinuz-3.13.0-24-generic
|
||||
Found initrd image: /boot/initrd.img-3.13.0-24-generic
|
||||
Found memtest86+ image: /boot/memtest86+.elf
|
||||
Found memtest86+ image: /boot/memtest86+.bin
|
||||
done
|
||||
# grub-install /dev/sda
|
||||
Installing for i386-pc platform.
|
||||
Installation finished. No error reported.
|
||||
|
||||
When you run grub-install remember you're installing it to the boot sector of your hard drive and not to a partition, so do not use a partition number like /dev/sda1.
|
||||
|
||||
### But It Still Doesn't Work ###
|
||||
|
||||
If your system is so messed up that none of this works, try the [Super GRUB2 live rescue disk][2]. The official [GNU GRUB Manual 2.00][3] should also be helpful.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linux.com/learn/tutorials/776643-how-to-rescue-a-non-booting-grub-2-on-linux
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.linux.com/learn/tutorials/730440-using-the-new-guid-partition-table-in-linux-good-bye-ancient-mbr-
|
||||
[2]:http://www.supergrubdisk.org/
|
||||
[3]:https://www.gnu.org/software/grub/manual/grub.html
|
||||
@@ -1,37 +0,0 @@
|
||||
Linux Screenshot App Shutter Updates with Bug Fixes, New Icon
|
||||
================================================================================
|
||||

|
||||
|
||||
**[Shutter][1], our favourite screenshot tool for Linux, has been updated with select bug fixes and a new application icon. **
|
||||
|
||||
The open-source and feature-rich screenshot utility allows you to snap sections of your desktop, app windows or the whole screen and add annotations, text or effects.
|
||||
|
||||
Version 0.91 fixes a number of outstanding bugs, including an issue where thumbnails were not shown in the Session tab on 14.04, and removes the option to upload screenshots to Pixlr’s image hosting service ‘imm.io’, which was discontinued earlier this year.
|
||||
|
||||
Finally, the update features a refined version of the familiar camera shutter application icon courtesy of artist Lucas Romero Di Benedetto.
|
||||
|
||||

|
||||
|
||||
### Install Shutter 0.91 in Ubuntu ###
|
||||
|
||||
Upgrading to the new version of Shutter is simple enough — providing you add the official PPA. [The Shutter PPA][2] provides new stable releases to Ubuntu 12.04 LTS, 13.10 and 14.04 LTS.
|
||||
|
||||
sudo add-apt-repository ppa:shutter/ppa
|
||||
|
||||
sudo apt-get update && sudo apt-get install shutter
|
||||
|
||||
Don’t like PPAs? You can also download Debian installers from the download section on the project homepage. If you’re running Ubuntu 14.04 LTS you can grab the installer by hitting the button below.
|
||||
|
||||
- [Download Shutter 0.91 for Ubuntu 14.04 LTS][3]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.omgubuntu.co.uk/2014/06/shutter-0-91-new-icon
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:https://apps.ubuntu.com/cat/applications/shutter/
|
||||
[2]:https://launchpad.net/~shutter/+archive/ppa
|
||||
[3]:https://launchpad.net/~shutter/+archive/ppa/+files/shutter_0.91%7Eppa2%7Eubuntu14.04.1_all.deb
|
||||
@@ -1,190 +0,0 @@
|
||||
CNprober 翻译中... 619913541
|
||||
|
||||
10 Tips to Push Your Git Skills to the Next Level
|
||||
================================================================================
|
||||
Recently we published a couple of tutorials to get you familiar with [Git basics][1] and [using Git in a team environment][2]. The commands that we discussed were about enough to help a developer survive in the Git world. In this post, we will try to explore how to manage your time effectively and make full use of the features that Git provides.
|
||||
|
||||
> Note: Some commands in this article include part of the command in square brackets (e.g. `git add -p [file_name]`). In those examples, you would insert the necessary number, identifier, etc. without the square brackets.
|
||||
|
||||
### 1. Git Auto Completion ###
|
||||
|
||||
If you run Git commands through the command line, it’s a tiresome task to type in the commands manually every single time. To help with this, you can enable auto completion of Git commands within a few minutes.
|
||||
|
||||
To get the script, run the following in a Unix system:
|
||||
|
||||
cd ~
|
||||
curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
|
||||
|
||||
Next, add the following lines to your ~/.bash_profile file:
|
||||
|
||||
if [ -f ~/.git-completion.bash ]; then
|
||||
. ~/.git-completion.bash
|
||||
fi
|
||||
|
||||
Although I have mentioned this earlier, I can not stress it enough: If you want to use the features of Git fully, you should definitely shift to the command line interface!
|
||||
|
||||
### 2. Ignoring Files in Git ###
|
||||
|
||||
Are you tired of compiled files (like `.pyc`) appearing in your Git repository? Or are you so fed up that you have added them to Git? Look no further, there is a way through which you can tell Git to ignore certain files and directories altogether. Simply create a file with the name `.gitignore` and list the files and directories that you don’t want Git to track. You can make exceptions using the exclamation mark(!).
|
||||
|
||||
*.pyc
|
||||
*.exe
|
||||
my_db_config/
|
||||
|
||||
!main.pyc
|
||||
|
||||
### 3. Who Messed With My Code? ###
|
||||
|
||||
It’s the natural instinct of human beings to blame others when something goes wrong. If your production server is broke, it’s very easy to find out the culprit — just do a `git blame`. This command shows you the author of every line in a file, the commit that saw the last change in that line, and the timestamp of the commit.
|
||||
|
||||
git blame [file_name]
|
||||
|
||||

|
||||
|
||||
And in the screenshot below, you can see how this command would look on a bigger repository:
|
||||
|
||||

|
||||
|
||||
### 4. Review History of the Repository ###
|
||||
|
||||
We had a look at the use of `git log` in a previous tutorial, however, there are three options that you should know about.
|
||||
|
||||
|
||||
- **--oneline** – Compresses the information shown beside each commit to a reduced commit hash and the commit message, all shown in a single line.
|
||||
- **--graph** – This option draws a text-based graphical representation of the history on the left hand side of the output. It’s of no use if you are viewing the history for a single branch.
|
||||
- **--all** – Shows the history of all branches.
|
||||
|
||||
Here’s what a combination of the options looks like:
|
||||
|
||||

|
||||
|
||||
### 5. Never Lose Track of a Commit ###
|
||||
|
||||
Let’s say you committed something you didn’t want to and ended up doing a hard reset to come back to your previous state. Later, you realize you lost some other information in the process and want to get it back, or at least view it. This is where `git reflog` can help.
|
||||
|
||||
A simple `git log` shows you the latest commit, its parent, its parent’s parent, and so on. However, `git reflog` is a list of commits that the head was pointed to. Remember that it’s local to your system; it’s not a part of your repository and not included in pushes or merges.
|
||||
|
||||
If I run `git log`, I get the commits that are a part of my repository:
|
||||
|
||||

|
||||
|
||||
However, a `git reflog` shows a commit (`b1b0ee9` – `HEAD@{4}`) that was lost when I did a hard reset:
|
||||
|
||||

|
||||
|
||||
### 6. Staging Parts of a Changed File for a Commit ###
|
||||
|
||||
It is generally a good practice to make feature-based commits, that is, each commit must represent a feature or a bug fix. Consider what would happen if you fixed two bugs, or added multiple features without committing the changes. In such a situation situation, you could put the changes in a single commit. But there is a better way: Stage the files individually and commit them separately.
|
||||
|
||||
Let’s say you’ve made multiple changes to a single file and want them to appear in separate commits. In that case, we add files by prefixing `-p` to our add commands.
|
||||
|
||||
git add -p [file_name]
|
||||
|
||||
Let’s try to demonstrate the same. I have added three new lines to `file_name` and I want only the first and third lines to appear in my commit. Let’s see what a `git diff` shows us.
|
||||
|
||||

|
||||
|
||||
And let’s see what happes when we prefix a `-p` to our `add` command.
|
||||
|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
### 7. Squash Multiple Commits ###
|
||||
|
||||
When you submit your code for review and create a pull request (which happens often in open source projects), you might be asked to make a change to your code before it’s accepted. You make the change, only to be asked to change it yet again in the next review. Before you know it, you have a few extra commits. Ideally, you could squash them into one using the rebase command.
|
||||
|
||||
git rebase -i HEAD~[number_of_commits]
|
||||
|
||||
If you want to squash the last two commits, the command that you run is the following.
|
||||
|
||||
git rebase -i HEAD~2
|
||||
|
||||
On running this command, you are taken to an interactive interface listing the commits and asking you which ones to squash. Ideally, you `pick` the latest commit and `squash` the old ones.
|
||||
|
||||

|
||||
|
||||
You are then asked to provide a commit message to the new commit. This process essentially re-writes your commit history.
|
||||
|
||||

|
||||
|
||||
### 8. Stash Uncommitted Changes ###
|
||||
|
||||
Let’s say you are working on a certain bug or a feature, and you are suddenly asked to demonstrate your work. Your current work is not complete enough to be committed, and you can’t give a demonstration at this stage (without reverting the changes). In such a situation, `git stash` comes to the rescue. Stash essentially takes all your changes and stores them for further use. To stash your changes, you simply run the following-
|
||||
|
||||
git stash
|
||||
|
||||
To check the list of stashes, you can run the following:
|
||||
|
||||
git stash list
|
||||
|
||||

|
||||
|
||||
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}
|
||||
|
||||

|
||||
|
||||
### 9. Check for Lost Commits ###
|
||||
|
||||
Although `reflog` is one way of checking for lost commits, it’s not feasible in large repositories. That is when the `fsck` (file system check) command comes into play.
|
||||
|
||||
git fsck --lost-found
|
||||
|
||||

|
||||
|
||||
Here you can see a lost commit. You can check the changes in the commit by running git show [commit_hash] or recover it by running `git merge [commit_hash]`.
|
||||
|
||||
`git fsck` has an advantage over `reflog`. Let’s say you deleted a remote branch and then cloned the repository. With `fsck` you can search for and recover the deleted remote branch.
|
||||
|
||||
### 10. Cherry Pick ###
|
||||
|
||||
I have saved the most elegant Git command for the last. The `cherry-pick` command is by far my favorite Git command, because of its literal meaning as well as its utility!
|
||||
|
||||
In the simplest of terms, `cherry-pick` is picking a single commit from a different branch and merging it with your current one. If you are working in a parallel fashion on two or more branches, you might notice a bug that is present in all branches. If you solve it in one, you can cherry pick the commit into the other branches, without messing with other files or commits.
|
||||
|
||||
Let’s consider a scenario where we can apply this. I have two branches and I want to cherry-pick the commit `b20fd14: Cleaned junk` into another one.
|
||||
|
||||

|
||||
|
||||
I switch to the branch into which I want to cherry-pick the commit, and run the following:
|
||||
|
||||
git cherry-pick [commit_hash]
|
||||
|
||||

|
||||
|
||||
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/
|
||||
@@ -0,0 +1,104 @@
|
||||
How to access popular search engines from the command line on Linux
|
||||
================================================================================
|
||||
Why would anyone want to search things on the Internet via a terminal? I don't know. There are probably a lot of reasons. But since an answer that no one asked for is always less frustrating than a question that no one can answer, here is a list of popular search engines with the command-line tools that allow you to access them from a Linux terminal.
|
||||
|
||||
### 1. Google ###
|
||||
|
||||
Let's start right with a giant: Bing! No just kidding, Google. To be frank, you don't really need a utility to search on Google from the command line. A simple:
|
||||
|
||||
$ xdg-open https://www.google.com/search?q="[query]"
|
||||
|
||||
would open your web browser on the appropriate search page. However, if what you want is to see the results of that search from a terminal window, without opening any kind of web browser, I would recommend using [cli-google][1]. It is super old (last updated in 2009) but I like it. It is a simple and straightforward application which does exactly what it's supposed to do.
|
||||
|
||||
Once you install cli-google, you can do searches with a colored output. You can also adjust the amount of results and the language that you want. Just type:
|
||||
|
||||
$ google
|
||||
|
||||
in your terminal to see all the options.
|
||||
|
||||

|
||||
|
||||
### 2. YouTube ###
|
||||
|
||||
There is going to be a lot of Google in this list. I will try to keep it as minimal as possible, but there is no escape. YouTube is for a lot of people the go to when it comes to finding a video of something quickly. To do such things from a terminal, my go to is [mps-youtube][2]. This software lets you search, make playlists, download videos, and read the comments from the terminal. Once you install mps-youtube, launch it with:
|
||||
|
||||
$ mpsyt
|
||||
|
||||
Then type h to see the options. For quick usage, you can just do:
|
||||
|
||||
/[query]
|
||||
|
||||
to search for something, then type the number ID of the video to listen to its sound, or type:
|
||||
|
||||
i [video-number]
|
||||
|
||||
to see its information, and type:
|
||||
|
||||
d [video-number]
|
||||
|
||||
to download it. If just listening is not enough for you, here is the trick:
|
||||
|
||||
set player mplayer
|
||||
set show_video True
|
||||
|
||||
Now the video will show up in another window on mplayer.
|
||||
|
||||

|
||||
|
||||
### 3. Wikipedia ###
|
||||
|
||||
Same as for Google, for Wikipedia I like an old script that works just fine: [cliWiki][3]. Once you install it, just run:
|
||||
|
||||
$ cliwiki
|
||||
|
||||
And then type in your search. If there is a direct match, the page will be displayed in the terminal. The output can be quite long so I advise you to channel it with the less command. It is certainly not the most efficient way to do it, but if your goal is to get a block of text concerning a keyword, this is exactly what you need.
|
||||
|
||||

|
||||
|
||||
### 4. The Pirate Bay ###
|
||||
|
||||
Now let's talk dirty. There are surprisingly (or not) a lot of utilities to find torrents on The Pirate Bay from the command line. However my preference goes to [pirate-get][4]. It comes with a ton of options that you can discover with:
|
||||
|
||||
$ pirate-get -h
|
||||
|
||||
But to keep it simple:
|
||||
|
||||
$ pirate-get --color -c [category] [query]
|
||||
|
||||
will return the result from a certain category of the search corresponding to a query, and with a colored output! From there, the application will prompt you to enter the number of the result that you want, and will then download the torrent from a magnet link. Simple and easy. Use only on non-copyrighted material!
|
||||
|
||||

|
||||
|
||||
### 5. Twitter ###
|
||||
|
||||
Twitter is a good search engine for trends. We already covered [how to access Twitter from the command line][5] using t, but I personally prefer [TTYtter][6] to it. This utility is extermely powerful, could deserve its own post, and cannot be resumed to simply searching. But I am just going to use it as a search engine here. Once installed and configured, you can log in and search using the command:
|
||||
|
||||
/search [query]
|
||||
|
||||
The interface is a bit rough on the eye, but you will get accustomed quickly. Notice that this will work with plain words but also hash-tags.
|
||||
|
||||

|
||||
|
||||
To conclude, these are in my opinion the big five search engines that people tend to use the most and which are accessible via the command line. The absents are probably Google Images and Google Maps, but those are kind of hard to adapt to the console I guess. I also wanted to look for a music search engine, but did not find any "worthy" of this list. As you have probably noticed, the tools on this list are uneven in term of features and options: some are simplistic while others go deep into functionality. But in the end they all do the job.
|
||||
|
||||
Which search engines are missing from this list? Do you know some utilities that were not mentioned? Let us know in the comments.
|
||||
|
||||
----------
|
||||
|
||||
#### Adrien Brochard ####
|
||||
|
||||
I am a Linux aficionado from France. After trying multiple distributions, I finally settled for Archlinux. But I am always trying to improve my system by stacking up tips and tricks.
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/2014/06/access-popular-search-engines-command-line-linux.html
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:https://github.com/henux/cli-google
|
||||
[2]:https://github.com/np1/mps-youtube
|
||||
[3]:https://github.com/AnirudhBhat/cliWiki.py
|
||||
[4]:https://github.com/vikstrous/pirate-get
|
||||
[5]:http://xmodulo.com/2013/12/access-twitter-command-line-linux.html
|
||||
[6]:http://www.floodgap.com/software/ttytter/
|
||||
@@ -1,33 +0,0 @@
|
||||
为什么我们不接收不良Linux 接口
|
||||
================================================================================
|
||||
由于最近The Witcher 2的惨败,我想写下些想法,为什么我们不应该接受来自开发人员的不良接口。
|
||||
|
||||
最近几年在我们linux的游戏库有太多该死的游戏,导致你现在可以看到来自linux玩家的评论“我已经有很多游戏了!”现在我可以想象到很多熟悉的声音。感谢Valve&Steam,之前我们从来没有看见过这么多自来开发者的注意力。
|
||||
|
||||
同样由于开发者的提交,我们看见了伴随而来的接口,它们,坦率地说,质量十分的糟糕或者说对于多数人们彻彻底底的不会用。
|
||||
|
||||
这个问题就是如果我们继续接受低水平质量的接口,Linux就会赢得一个游戏质量水平低的声誉。严肃地想想一个贴图的大怪兽。
|
||||
|
||||
再想象一下,一个3A开发者给linux推送大量游戏,使用用了The Witcher2接口“eON”的技术。那就是说我们有了大量开发者,就像突然看起来Linux有很多大牌游戏了。然后你可以看见大量的人尝试Linux,却看见它们的游戏运行者糟糕的画面,在同等硬件水品下,就会给它们一个印象,linux对游戏不友好。所以,这对所有人都不好。
|
||||
|
||||
|
||||
我已经看见许多人说“工具包用于接口真的没关系?”。这在我的眼里看来是一个非常天真的声明。当然,这有关系, 它意味Linux的游戏质量光和天的不同。它直接导致我回到关于Linux游戏的认知之上的观点。
|
||||
你可以坚持说工具包没有关系和使用任何比较/类比你幻想,但如果工具包是导致问题的根源,如同当我们讨论计算机软件它会占用99%的时间,是的,它当然有关系!
|
||||
|
||||
如今,我已经看见许多评论,来自其他主流网页声明,我们应该接受它们并且作感谢状,我们毕竟拥有他们。那真是个白痴的声明,那些不看大局的人。
|
||||
|
||||

|
||||
|
||||
想想,那些开发者和发行商认为可以接受推送的糟糕linux接口送出了门,总有一天得召回。它们的脑里只有利润。消费者对Linux游戏的感知就会进一步恶化,就是因为这些不良的接口。
|
||||
|
||||
我完全赞同来子开发者的接口,当然毕竟我运行着这个网站。但是,我作为一个消费者不愿意在windows可运行的游戏付钱,可是在linux运行得却像蜗牛,为什么我应该?为什么你应该?
|
||||
|
||||
最后增加一个观点:当开发者研究出有问题,发布在社区,你们应该从不攻击它们,这是不可接受的。反馈是很好,骂人是很孩子气,这使得Linux再一次看起来糟糕。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.gamingonlinux.com/articles/why-we-shouldnt-accept-bad-linux-ports.3765
|
||||
|
||||
译者:[Vic020](http://www.vicyu.net) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
@@ -1,107 +0,0 @@
|
||||
14个可以提升Ubuntu体验的应用程序
|
||||
|
||||
转战到Ubuntu-或者是别的流行的Linux发行版-不仅仅是操作系统的操作方式的改变,更多的是你还需要一些能支持你完成工作的好的apps。
|
||||
|
||||
|
||||
在这篇文章中,我将分享一些我使用的关键的基础应用程序,我将谈谈在我的日常工作中如何有效地使用它们。
|
||||
|
||||
|
||||
|
||||
|
||||
### 日常使用的应用程序 ###
|
||||
|
||||
|
||||
一般当说到Linux 桌面上的应用,我总是将这些应用划分为两大类,频繁使用的和一些别的应用。下边我为大家介绍的是一些自己日常使用的应用。
|
||||
|
||||
|
||||
1) **Firefox** — 有时我也会使用用其他的浏览器,但最近[火狐浏览器][1]已经成为我可以长期信赖的朋友。可靠的、 安全的、 跨平台的,火狐浏览器完全满足了我的日常冲浪需求。
|
||||
|
||||
|
||||
除了访问书签和网页,我还依靠火狐浏览器来处理我各种局域网服务器的事务,如 [Plex][2], [Zoneminder][3], router/WAPs, 和我的文件服务器。所有这些均可以使用火狐浏览器进行访问。
|
||||
|
||||
|
||||
2) **Parcelite**— 如果没有一个像样的剪贴板管理器我简直没法开始工作,至少对我来说,你无法吐槽在GNOME 桌面环境下的[Parcelite][4] 。使用简单,易于访问而且它提供了很多的有用的选项。Parcelite 选项包括一切从热键到white space handling的处理。尽管已经有很多的剪贴板管理器,但它们却很难击败 Parcelite 。
|
||||
|
||||
|
||||
3) **Bittorrent Sync** — 我已经使用过了各种开源替代方案,为了同步那些在发布之前还需要进行开发的那些项目,之后我发现[Bittorrent Synchas][5] 从来没有让我失望过。它运行和安装都很简单和方便这多亏了新的GUI的实现,而且 Bittorrent Sync 允许我快速地传输巨大的视频文件从机器到机器而无需浪费时间去将大量的文件同步到“云端”。
|
||||
|
||||
|
||||
我还发现它是很容易与别人分享大型文件,同时能一直保持 IP 地址和目录的隐蔽。尽管有许多的替代品,我仍然坚定地将Bittorrent Synchas作为 Bittorrent Sync变形金刚迷。
|
||||
|
||||
|
||||
4) **System Monitor** — 因为TOP实在是滚动地太快了,所以我个人更喜欢一个具有选项卡式的 GUI,因为它能够释放我的眼睛。使用 GNOME 的系统监视器,我可以很地会发现一个失控的进程,并且轻松地kill掉它而不需吹灰之力。与[TOP][7]终端应用程序不同的是,我可以使用实时图形在视觉角度去查看我的 CPU、 内存和磁盘的使用情况。作为一个拥有视觉的人,你不得不说,用条形图去展示我还拥有多少的空间,当然这也同样适用于实时的资源使用情况,这种GUI实现实在是太赞了。
|
||||
|
||||
|
||||
5) **PulseAudioControl** — 每一天,我总是需要在多个声音设备之间来回穿梭。有时我需要将其中一个设为默认设备,但然后却完全可能会从火狐浏览器音频切换到到另一个设备。因为我喜欢控制我尽可能多的音频,然后我就发现 [PulseAudioControl][8]是一个无价的工具。
|
||||
|
||||
|
||||
|
||||
|
||||
### 一些别的软件 ###
|
||||
|
||||
在本节中,我将分享我使用,但可能并不一定是每天都使用的应用程序。许多这些应用程序都是开放源代码的,有一些不是,但是它们对我个人都非常具有价值。
|
||||
|
||||
|
||||
6) **Skype** — 无论它在呼唤[Jupiter Broadcasting][9] 进入每周共同主持的播客,或者只是联系上了一个业务,[Skype][10] 见证了互联网视频会议的发展史。测试完成无数的替代品后,我总是会发现自己还是终归回到 了Skype。即使有真的很棒的开源选择像[Ekiga][11] 和 [Jitsi][12],在年底的一天,Skype 与大家同在 — — 希望切换到Skype是一件很愉快的事。
|
||||
|
||||
|
||||
7)**Kdenlive** — 我使用两个不同的视频编辑器,当我要导出一个庞大的视频剪辑项目的时候。[Kdenlive][13]是我使用的图片合成和编辑大型的、 复杂的视频的工具。我已经成功地在 Kdenlive 里边管理了6个素材轨道,但同样的负载量早已经让别的视频剪辑软件崩溃了。
|
||||
|
||||
|
||||
|
||||
8)**OpenShot** — 大多数情况下,我会将[OpenShot][14]作为视频剪辑任务的首选神兵利器。快速的编辑和两个素材轨道工作区的流畅的简单操作、 方便地使用此编辑器。我还发现它提供了很棒的无与伦比的特效。混合标题效果和超赞的的视频转场效果使OpenShot成为一款超棒的视频制作软件,在我自己的视频项目上。
|
||||
|
||||
|
||||
9)**SpiderOak** — 在使用了无数云备份服务这么多年后, [SpiderOak][15] 已经成为了我的至爱,。易于安装和使用,我超喜欢它所提供的增量选项而且使用起来是如此的简单。只需一次完美设置,然后忘记,之后SpiderOak将会挑起你的文件搬运大任。
|
||||
|
||||
|
||||
10) **Dropbox** — 许多年来,我已经与[Dropbox][16] 爱恨交织。尽管它的跨平台特性这意味着我可以从任何位置访问文件,我慢慢地发现我自己越来越少依赖这个基于云计算的备份解决方案。尽管如此,它允许我从任何 web 浏览器中访问文件,即使是从我不经常使用的计算机,这使得抛弃 Dropbox 更是难上加难。
|
||||
|
||||
|
||||
11) **Writer** — 我一直以来都在使用[Writer][17] 自从我第一次使用它在 Windows 上通过 OpenOffice。今天,我使用Writer与 LibreOffice 来满足我的需求,它可以做一切一个文字处理器可以做的。现在它是公正地指出,一些在作家中找不到专有的办公套件可能会提供附加功能,但是 99%的大多数人需要的功能在Writer这里都有。就我个人而言,我会永远是一个LibreOffice Writer粉。
|
||||
|
||||
|
||||
12)**SimpleScreenRecorder** — 多年来,我发现自己使用 [SimpleScreenRecorder][18]远超过其他同类软件,它能很好支持多监视器模式,再加上它甚至可以捕获基于 OpenGL 的应用程序。易于使用和可靠的 SimpleScreenRecorder 让我的工作更加得心应手。我把它推荐给那些已经疲于使用甚至很少使用同类软件屏幕捕捉软件的同学们。
|
||||
|
||||
|
||||
13)**SimpleScan** — 当我需要扫描文档的时候,我一点都不想将大把大把的时间花费在配置的臃肿的程序上。 [Simple Scan][19] 可以在这方面做得很好。智能的扫描数据库,Simple Scan将与市面上的任何扫描仪或多功能一体打印机/扫描仪很好的进行协作。此外还有一点好处就是它会设置成的最佳分辨率,当然现在你还可以很自由的去进行任何你认为合适的手动调整。
|
||||
|
||||
|
||||
14)**Baobab**(磁盘使用分析器) — — 我不断听到关于如何硬盘价格已回落。这或许没错,但现实却是我却囊中羞涩。这意味着我需要充分利用我能利用的所有硬盘空间,为了实现这个目的,我使用 [Baobab][20] 来观察我在我的硬盘上的可用空间,而且还可以直观地看到到底是哪一个目录正在蚕食我宝贵的硬盘空间。
|
||||
|
||||
|
||||
### 真正的具有生产力的软件 ###
|
||||
|
||||
谈到我所依赖的这些软件,我们真正关心的更多的是他们能为我们完成什么样的任务而不是它们所拥有的光辉头衔和自身的许可证。linux不需要软件的传奇时代早已过去。大量的计算任务,除了有限的几个例外,大都可以在linux桌面上轻松地如我所说的那样完成。
|
||||
|
||||
|
||||
很明显你应该装备一些必不可少的软件,当然那些软件并不一定是我也使用的。你所倚重的软件是什么?您可在下方进行评论并与我们的读者进行分享那些优秀的软件。
|
||||
|
||||
|
||||
|
||||
via: http://www.datamation.com/applications/14-apps-to-boost-ubuntu-1.html
|
||||
|
||||
译者:[owen-carter](https://github.com/owen-carter) 校对:[校对者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
|
||||
@@ -0,0 +1,128 @@
|
||||
如何拯救一台没有成功通过Grub启动的Linux电脑
|
||||
================================================================================
|
||||

|
||||
Figure 1: GRUB 2 menu with cool Apollo 17 background.
|
||||
|
||||
自从我们拥有GRUB以来,Linux Bootloader 0.97就开始了传奇的一生。尽管传统的GRUB有很多的有点,但是他开始陈旧了,并且他的开发者也开始添加更多的功能,于是,Grub2.0时代就要来了。
|
||||
|
||||
GRUB 2 做了几个明显的改进。它可以从移动存储设备上启动,并且可以有进入BIOS配置的选项。尽管它有着更复杂的脚本配置,但是一个简单的`/boot/grub/menu.lst`文件却一个地方集中了所有配置选项,默认的是存放在`/boot/grub/grub.cfg `。你不能直接编辑,这不是人做的事,太复杂,我们需要用简单的脚本实现。我们卑微的人类可以编辑`/etc/default/grub`文件来修改,它主要是控制Grub菜单。我们还可以修改` /etc/grub.d/ `。这些脚本可以启动操作系统,控制外部应用程序,如memtest 和 os_prober,还有theming `./boot/grub/grub.cfg`是建立在`/etc/default/grub`和`/etc/grub.d/*`的基础上的。当你修改了一个地方,你必须要运行更新GRUB的命令。
|
||||
|
||||
好消息是,update-grub脚本是可以可靠的检测内核,启动文件,并添加所有的操作系统的,自动生成你的启动菜单,所以你不必手动的修改他们。
|
||||
|
||||
我们还要学习如何解决两个常见的故障。当启动系统时,它会停在GRUB >提示上,这是完整的GRUB 2命令界面,所以不要惊慌。这意味着GRUB 2依旧可以正常启动和加载normal.mod模块(和其他模块分别位于/boot/grub/[arch]/),但没有找到你的grub.cfg文件。如果你看到grub rescue> 这意味着它无法找到normal.mod,因此它有可能找不到你的启动文件。
|
||||
|
||||
这是如何发生的?因为内核可能改变驱动器分配或您移动您的硬盘驱动器,或者你手动改变一些分区,或安装一个新的操作系统或者移动一些文件。在这些情况下你的启动文件仍然存在,但GRUB不能找到他们。所以你可以看看在GRUB提示符中启动文件,设置它们的位置,然后启动您的系统和修复您的grub配置。
|
||||
|
||||
### GRUB 2 命令行 ###
|
||||
|
||||
GRUB 2 命令是一个伟大的财富。你不仅可以用它来发现引导镜像,内核,和根文件系统。事实上,它给你完全访问本地计算机上的所有文件的系统权限。其中有些人可能会认为一个安全漏洞,但是你知道古老的UNIX的名言:有物理访问机器权限的人,就是拥有它的人。
|
||||
|
||||
当你在` GRUB > `提示时,你有许多类似的功能,如命令如历史和tab补全。但是`grub rescue> `模式是有限的,没有历史,没有tab补全。
|
||||
|
||||
如果你是在一个正常运作的系统上练习,那就当GRUB菜单打开GRUB命令行时,按C。你可以通过向上和向下滚动你的菜单条目箭头键停止启动倒计时。它是安全的,在此GRUB命令行下,你不会进行永久的修改,一切都是暂时的。如果你已经看到`grub > `或`grub rescue> `提示符,那就说明你的表现时刻到了。
|
||||
|
||||
接下来的几个命令可以在`grub>`和`grub rescue`模式下运行。同时,你应该第一个运行的命令如下:
|
||||
|
||||
grub> set pager=1
|
||||
|
||||
等号两侧必须不能出现空格。现在让我们做一点探讨。ls列出的所有分区:
|
||||
|
||||
grub> ls
|
||||
(hd0) (hd0,msdos2) (hd0,msdos1)
|
||||
|
||||
MSDOS是什么?这意味着该系统具有老式的MS-DOS分区表,而不是全新的全局唯一标识符的分区表(GPT)。(见[Using the New GUID Partition Table in Linux (Goodbye Ancient MBR)][1]。如果你正在运行的GPT,它会出现(hd0,GPT1)。使用ls命令查看你的系统文件是什么:
|
||||
|
||||
grub> ls (hd0,1)/
|
||||
lost+found/ bin/ boot/ cdrom/ dev/ etc/ home/ lib/
|
||||
lib64/ media/ mnt/ opt/ proc/ root/ run/ sbin/
|
||||
srv/ sys/ tmp/ usr/ var/ vmlinuz vmlinuz.old
|
||||
initrd.img initrd.img.old
|
||||
|
||||
好的,我们已经找到了根文件系统。你可以省略MSDOS和GPT的标签。如果你无视打印的分区信息。你可以用cat命令读取文件系统上的文件:
|
||||
|
||||
grub> cat (hd0,1)/etc/issue
|
||||
Ubuntu 14.04 LTS \n \l
|
||||
|
||||
从/etc/issue文件中,可以看到你的不同的Linux系统
|
||||
|
||||
### 从 grub> 中启动###
|
||||
|
||||
这是如何设置启动文件和启动从`GRUB>`提示中进入系统。我们知道,从运行ls命令有一个Linux根文件系统(hd0,1),你可以继续寻找直到你找到你的/boot/grub所在位置。然后运行这些命令,使用您自己的根分区,内核和initrd映像:
|
||||
|
||||
grub> set root=(hd0,1)
|
||||
grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1
|
||||
grub> initrd /boot/initrd.img-3.13.0-29-generic
|
||||
grub> boot
|
||||
|
||||
第一行设置分区的根文件系统是。第二行告诉grub您想要使用的内核位置。开始输入/boot/vmli,然后使用tab完成填写。输入`root= /dev/sdX`设置根文件系统位置。是的,这似乎是多余的,但如果你忘记了输入你会得到一个kernel panic。你知道怎么正确的分区?hd0,1 = /dev/sda1。hd1,1 = /dev/sdb1。hd3,2 = /开发/ sdd2。我想你可以推出自己的。
|
||||
|
||||
第三行设置initrd文件,必须是和内核相同的版本号。
|
||||
|
||||
最后一行启动系统。
|
||||
|
||||
在一些Linux系统上,内核和initrds是被符号链接到当前的根文件系统的根目录,就像:
|
||||
|
||||
$ ls -l /
|
||||
vmlinuz -> boot/vmlinuz-3.13.0-29-generic
|
||||
initrd.img -> boot/initrd.img-3.13.0-29-generic
|
||||
|
||||
所以,你也可以这样输入命令:
|
||||
|
||||
grub> set root=(hd0,1)
|
||||
grub> linux /vmlinuz root=/dev/sda1
|
||||
grub> initrd /initrd.img
|
||||
grub> boot
|
||||
|
||||
### 从grub-rescue> 中启动 ###
|
||||
|
||||
你必须要加载两个模块normal.mod 和 linux.mod,如果你的GRUB命令不同于大众。
|
||||
|
||||
grub rescue> set prefix=(hd0,1)/boot/grub
|
||||
grub rescue> set root=(hd0,1)
|
||||
grub rescue> insmod normal
|
||||
grub rescue> normal
|
||||
grub rescue> insmod linux
|
||||
grub rescue> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1
|
||||
grub rescue> initrd /boot/initrd.img-3.13.0-29-generic
|
||||
grub rescue> boot
|
||||
|
||||
tab补全应该在你加载了这几个模块之后开始工作。
|
||||
|
||||
### 永久性的修复 ###
|
||||
|
||||
当你成功地启动你的系统,运行这些命令来永久修复GRUB:
|
||||
|
||||
# update-grub
|
||||
Generating grub configuration file ...
|
||||
Found background: /usr/share/images/grub/Apollo_17_The_Last_Moon_Shot_Edit1.tga
|
||||
Found background image: /usr/share/images/grub/Apollo_17_The_Last_Moon_Shot_Edit1.tga
|
||||
Found linux image: /boot/vmlinuz-3.13.0-29-generic
|
||||
Found initrd image: /boot/initrd.img-3.13.0-29-generic
|
||||
Found linux image: /boot/vmlinuz-3.13.0-27-generic
|
||||
Found initrd image: /boot/initrd.img-3.13.0-27-generic
|
||||
Found linux image: /boot/vmlinuz-3.13.0-24-generic
|
||||
Found initrd image: /boot/initrd.img-3.13.0-24-generic
|
||||
Found memtest86+ image: /boot/memtest86+.elf
|
||||
Found memtest86+ image: /boot/memtest86+.bin
|
||||
done
|
||||
# grub-install /dev/sda
|
||||
Installing for i386-pc platform.
|
||||
Installation finished. No error reported.
|
||||
|
||||
当你运行 `grub-install` 时,记得grub是安装到硬盘驱动器的引导扇区而不是到一个具体分区,所以不要加上像/dev/sda1的分区号。
|
||||
|
||||
### 如果还是不能使用 ###
|
||||
|
||||
如果你的系统是如此的倒霉,而且这个方式没有能起作用,那就尝试[超级GRUB2现场救援磁盘][2]。[官方GNU GRUB手册][3]也应该是有帮助的。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linux.com/learn/tutorials/776643-how-to-rescue-a-non-booting-grub-2-on-linux
|
||||
|
||||
译者:[MikeCoder](https://github.com/MikeCoder) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.linux.com/learn/tutorials/730440-using-the-new-guid-partition-table-in-linux-good-bye-ancient-mbr-
|
||||
[2]:http://www.supergrubdisk.org/
|
||||
[3]:https://www.gnu.org/software/grub/manual/grub.html
|
||||
@@ -0,0 +1,37 @@
|
||||
Linux截屏软件Shutter获得更新,修复bug,更换新图标
|
||||
================================================================================
|
||||

|
||||
|
||||
**[Shutter][1],是一款Linux平台下最受欢迎的截屏软件。最近的更新中,该软件修复了若干bug,并且使用了新的应用图标。**
|
||||
|
||||
这款开源并且功能强大的截屏工具可以让你选择桌面的任意区域、指定应用窗口或者整个屏幕区域来进行截屏。此外,你还可以添加注释、文本或者特效。
|
||||
|
||||
0.91版本修复了若干之前遗留的bug,包括在Ubuntu 14.04中缩略图无法正常地在应用切换栏中显示的问题。由于'imm.io'在今年早些停止服务,所以此次更新还取消了将截图上传到Pixlr图像服务的选项。
|
||||
|
||||
最后,这次更新突出了由Lucas Romero Di Benedetto精心设计的百叶窗相机式的应用图标。
|
||||
|
||||

|
||||
|
||||
### 在Ubuntu环境下安装Shutter 0.91版本 ###
|
||||
|
||||
升级到Shutter的最新版本是非常简单的——前提是你添加了该软件的PPA。[The Shutter PPA][2] 面向Ubuntu 12.04 LTS、13.10、14.04 LTS提供该软件最新稳定的发行版。
|
||||
|
||||
sudo add-apt-repository ppa:shutter/ppa
|
||||
|
||||
sudo apt-get update && sudo apt-get install shutter
|
||||
|
||||
不喜欢PPA?那么你也可以从该项目的主页下载Debian安装包。如果你使用的是Ubuntu 14.04 LTS系统,你可以点击下面的链接来下载安装包。
|
||||
|
||||
- [下载适用于Ubuntu 14.04 LTS系统的Shutter 0.91][3]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.omgubuntu.co.uk/2014/06/shutter-0-91-new-icon
|
||||
|
||||
译者:[JonathanKang](https://github.com/JonathanKang) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:https://apps.ubuntu.com/cat/applications/shutter/
|
||||
[2]:https://launchpad.net/~shutter/+archive/ppa
|
||||
[3]:https://launchpad.net/~shutter/+archive/ppa/+files/shutter_0.91%7Eppa2%7Eubuntu14.04.1_all.deb
|
||||
@@ -0,0 +1,190 @@
|
||||
CNprober 翻译完成... 619913541
|
||||
|
||||
10招让你的Git技能提升一个台阶
|
||||
================================================================================
|
||||
|
||||
之前我们发了一些教程让你熟悉[Git基础][1]和[在团队合作环境中使用Git][2].我们讨论的这些Git命令足够让一个开发者在Git的世界里生存下去。在这篇教程里,我们试着探索如何高效地管理你的时间以及如何充分利用Git提供的特性。
|
||||
|
||||
> 注意:这里介绍的命令中有的包含方括号(例如:`git add -p [file_name]`)。在这些例子中,你应该用你自己的数字,标识符等替代方括号里的内容,并且去掉方括号。
|
||||
|
||||
### 1. Git自动补全 ###
|
||||
|
||||
如果你在命令行环境中运行Git命令,每次都手动地逐个输入命令是一件很无聊的事。为此,你可以花几分钟时间配置一下Git命令的自动补全功能。
|
||||
|
||||
在*nix系统运行下列命令下载自动补全脚本:
|
||||
|
||||
cd ~
|
||||
curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
|
||||
|
||||
然后,添加下面的行到你的~/.bash_profile文件:
|
||||
|
||||
if [ -f ~/.git-completion.bash ]; then
|
||||
. ~/.git-completion.bash
|
||||
fi
|
||||
|
||||
尽管我之前已经提到过,但我还是想再强调一下:如果你想使用完整的Git特性,你绝bi应该切换到命令行环境。
|
||||
|
||||
### 2. 在Git中忽略文件 ###
|
||||
|
||||
你是不是对出现在你Git库里面的编译生成文件(比如`.pyc`)感到很无语?或者你是不是很厌恶不小心将他们添加到了Git?直接看这里,这里有一个方法可以让你告诉Git忽略所有这些文件和目录。只需要创建一个名字为`.gitignore`的文件,里面列出你不想要Git跟踪的文件和目录。可以用感叹号(!)列出例外情况。
|
||||
|
||||
*.pyc
|
||||
*.exe
|
||||
my_db_config/
|
||||
|
||||
!main.pyc
|
||||
|
||||
### 3. 谁动了我的代码? ###
|
||||
|
||||
当事情出了乱子时立马责怪别人这是人类的天性。如果你的服务器程序不能正常工作了,要找出罪魁祸首是非常简单的--只需要执行`git blame`。这个命令告诉你文件里的每一行的作者是谁,最后改动那一行的提交,以及提交的时间戳。
|
||||
|
||||
git blame [file_name]
|
||||
|
||||

|
||||
|
||||
在下面的截图里,你可以看到在一个更大的库里这个命令的输出是什么样的:
|
||||
|
||||

|
||||
|
||||
### 4. 查看库的历史 ###
|
||||
|
||||
在之前的教程里,我们已经看过了如何使用`git log`命令。不管怎样,有3个选项你应该知道。
|
||||
|
||||
- **--oneline** - 压缩每次的提交信息,只保留一个缩减的Hash值和说明文字,然后把这些都展示在一行里。
|
||||
- **--graph** - 这个选项将在左边画出一个文字界面的提交历史图。如果你只有一个分支,用这个选项查看历史时是没什么意义的。
|
||||
- **--all** - 显示所有分支历史。
|
||||
|
||||
这是这3个选项合起来使用的效果:
|
||||
|
||||

|
||||
|
||||
### 5. 不要丢失对某个提交的跟踪 ###
|
||||
|
||||
假设你提交了一些不需要的东西,然后你进行了hard重置回到之前的状态。后来,你发现在这个过程中你丢失了其他一些重要的信息,你想要把这些信息找回来,或者至少可以查看一下这些信息。这就需要`git reflog`帮忙。
|
||||
|
||||
简单的`git log`只能告诉你最近的提交,这个提交的父提交,父提交的父提交,等等。但是`git reflog`是一个HEAD指向的提交的列表。记住,这个列表依赖于你自己的操作环境,它不是库的一部分,也不包含在push或者merge中。
|
||||
|
||||
如果执行`git log`命令,可以看到提交历史,这是我的库的一部分:
|
||||
|
||||

|
||||
|
||||
但是,`git reflog`命令显示了一个被我用hard重置丢掉的提交(`b1b0ee9`-`HEAD@{4}`).
|
||||
|
||||

|
||||
|
||||
### 6. 暂存文件的一部分更改以便进行一次提交 ###
|
||||
|
||||
通常依据特性来提交是一个好的实践方法,意思是说,每一个提交都只添加一个特性或者修复一个bug。想一下如果你一次修复了两个bug或者添加了两个特性但是都还没有提交该怎么办。这种场景下,你可以将他们一起提交。但是有一个更好的办法:单独暂存这些文件,然后分开提交。
|
||||
|
||||
让我们假设你对一个文件做了多个更改,然后想让这些更改分开提交。这时,我们用带`-p`的添加命令。
|
||||
|
||||
git add -p [file_name]
|
||||
|
||||
我们来试试这种用法。我添加了3个新行到`file_name`,但是我只想让第1行和第3行出现在我的提交里。让我们看看`git diff`的输出是什么样的。
|
||||
|
||||

|
||||
|
||||
然后,我们看看带`-p`选项的`add`命令会发生什么。
|
||||
|
||||

|
||||
|
||||
似乎Git认为所有的更改都是同一个目的的一部分,所以把他们分组到同一个块里。这时,你可以:
|
||||
|
||||
- 输入 y 暂存块
|
||||
- 输入 n 不暂存块
|
||||
- 输入 e 手动编辑块
|
||||
- 输入 d 退出或者跳转到下一个文件
|
||||
- 输入 s 分割块
|
||||
|
||||
在我们这个例子中,我们想把这个块分割成更小的部分,然后选择其中一些忽略另外一些。
|
||||
|
||||

|
||||
|
||||
如你所见,我们已经添加了第1和第3行,忽略了第2行。你可以看到库的状态并且进行一次提交。
|
||||
|
||||

|
||||
|
||||
### 7. 合并多个提交 ###
|
||||
|
||||
为了进行核查或者发起一个合并请求(这经常发生在开源项目里),对代码进行了修改提交。但在最后代码被接受之前,你也许会被要求修改你的代码。于是你修改代码,但是下一次核查的时候又一次被要求进行修改。不知不觉中,你就已经有了好几个提交。理论上你应该用rebase命令把他们合并起来。
|
||||
|
||||
git rebase -i HEAD~[number_of_commits]
|
||||
|
||||
如果你想合并最后的两次提交,你应该运行下面的命令。
|
||||
|
||||
git rebase -i HEAD~2
|
||||
|
||||
一旦你运行这个命令,你将进入一个交互式界面,它将询问你想要合并哪些提交。你`pick`(拣选)最近的提交然后`squash`(合并)旧的提交。
|
||||
|
||||

|
||||
|
||||
接着你被要求提供一个对新提交的说明。这个过程会重写你的提交历史。
|
||||
|
||||

|
||||
|
||||
### 8. 储藏没有提交的更改 ###
|
||||
|
||||
假设你正在修复一个bug或者添加一个特性,突然你被要求展示一下你的工作成果。你现在的工作还没有完成,不够进行一次提交。这时,`git stash`命令可以用来急救一下。Stash命令跟踪你所有的更改,然后把他们储藏起来以便以后使用。命令如下-
|
||||
|
||||
git stash
|
||||
|
||||
可以多次储藏更改,查看储藏列表,你可以运行下面的命令:
|
||||
|
||||
git stash list
|
||||
|
||||

|
||||
|
||||
如果你想取消储藏,覆盖当前的更改,你可以通过下面的命令使用储藏:
|
||||
|
||||
git stash apply
|
||||
|
||||
在最后的这个截图里,你可以看到每个储藏都有一个标识符,是一个唯一的数字(尽管在这里我们只有一个储藏)。如果你想使用某个储藏,你在apply命令后面加上这个唯一的标识符:
|
||||
|
||||
git stash apply stash@{2}
|
||||
|
||||

|
||||
|
||||
### 9. 检查丢失的提交 ###
|
||||
|
||||
尽管`reflog`是一种检查丢失提交的方法,大型的库里却不太实用。这个时候,应该用`fsck`(文件系统检查)命令。
|
||||
|
||||
git fsck --lost-found
|
||||
|
||||

|
||||
|
||||
这里你可以看到一个丢失的提交。你可以通过`git show [commit_hash]` 查看提交的更改或者通过运行`git merge [commit_hash]`命令进行恢复。
|
||||
|
||||
`git fsck`跟`reflog`命令相比有一个优点。假设你删除了一个远程分支,然后clone了这个库。用`fsck`命令你可以找到并且恢复这个删除的远程分支。
|
||||
|
||||
### 10. 最佳选择 ###
|
||||
|
||||
之前我已经存记下了那些最优雅的Git命令。但是目前为止,`cherry-pick`命令是我最喜欢的Git命令,因为它直白的名字和实用的功能!
|
||||
|
||||
最简单的情况下,`cherry-pick`从另一个分支里选出单独的一个提交,然后合并到当前分支。如果你正并行工作在两个或者更多的分支上,你也许会发现一个存在于所有分支上的bug。如果你解决了一个分支上的这个bug,你可以拣选这个对应的提交应用到其他分支上,而不会弄乱其他文件或者提交。
|
||||
|
||||
让我们来考虑一个可以使用这个命令的场景。我有两个分支,我想拣选`b20fd14: Cleaned junk`这个提交到另一个分支上。
|
||||
|
||||

|
||||
|
||||
我切换到想要应用这个拣选出来的提交的分支,然后运行下面的命令:
|
||||
|
||||
git cherry-pick [commit_hash]
|
||||
|
||||

|
||||
|
||||
尽管这次我们很干净的用了`cherry-pick`命令,但你应该知道这个命令经常会引起冲突,所以请小心使用。
|
||||
|
||||
### 总结 ###
|
||||
|
||||
到了这里,我们结束了这个能使你Git能力提升一个级别的列表。Git是最好的版本控制器,它能完成你能想象到的任何事情。所以,经常试着用Git挑战你自己。一不小心你就会学到很多新东西。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.sitepoint.com/10-tips-git-next-level/
|
||||
|
||||
译者:[love_daisy_love](https://github.com/CNprober) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.sitepoint.com/git-for-beginners/
|
||||
[2]:http://www.sitepoint.com/getting-started-git-team-environment/
|
||||
Reference in New Issue
Block a user