2
0
mirror of https://github.com/LCTT/TranslateProject.git synced 2025-04-02 02:50:11 +08:00
This commit is contained in:
theo-l 2015-03-19 13:00:53 -03:00
commit 1f8142b7ea
9 changed files with 1209 additions and 54 deletions

View File

@ -1,85 +1,100 @@
预见我们将会在2015年及之后的Linux游戏
================================================================================他们说Linux游戏开发已经死了已经变得毫无意义随他们说去吧一起看看2015甚至以后会为我们带来什么游戏
Linux 游戏之 2015 动向
================================================================================
他们说Linux游戏开发已经死了已经变得毫无意义…… 随他们说去吧。一起看看2015甚至以后会为我们带来什么Linux游戏。
真的很难跟上为我们出现的每一样事物,但是可以快速浏览一下我们将会看到的变化.
真的很难跟得上扑面而来的各种形形色色的新事物,但是可以快速浏览一下我们将会看到的变化。
### 已确认的游戏 ###
#### 冒险游戏 ####
- [看火人][1]
- [失落的天堂:初探][2]
- [蒸汽世界:浩劫][3]
- [看火人Firewatch][1]
- [失落的天堂初探Paradise Lost: First Contact][2]
- [时空英豪 1.1Outcast 1.1][42]
- [蒸汽世界:浩劫SteamWorld Heist][3]
#### 动作游戏 ####
- [暗黑血统][4]
- [暗黑血统][5]
- [尸人的世界][6]
- [骷髅女孩][7]
- [暗黑血统Darksiders][4]
- [暗黑血统 2Darksiders 2][5]
- [尸人的世界Ray's The Dead][6]
- [骷髅女孩Skullgirls][7]
#### 第一人称游戏 ####
- [生化奇兵:永恒][8]
- 半条命 3 /troll      #此处troll不知道如何翻译
- [烽火家园:革命][9]
- [杀戮空间 2][10]
- 英雄萨姆 4(目前无官方站点)
- [联合风暴][11]
- [烈火击杀][12]
- [生化奇兵永恒Bioshock Infinite][8]
- 半条命 3 /troll Half Life 3 /troll   
- [烽火家园:革命Homefront: The Revolution][9]
- [叛变Insurgency][43]
- [杀戮空间 2Killing Floor 2][10]
- 英雄萨姆 4Serious Sam 4目前无官方站点
- [联合风暴Storm United][11]
- [烈火击杀SUPERHOT][12]
#### 平台游戏 ####
- [武装原型][13]
- [峡谷][14] #此处游戏名尚不确定
- [吉安娜姐妹][15]
- [心之所向Alicia][16]
- [ ][17] #此处游戏名未知
- [无限工厂][18]
- [无敌9号][19]
- [林中之夜][20]
- [夜][21]
- [奇异的世界:新鲜可口][22]
- [真红女神][23]
- [武装原型Broforce][13]
- [峡谷Chasm][14] #此处游戏中文名尚不确定
- [吉安娜姐妹Giana Sisters][15]
- [心之所向AliciaHeart Forth, Alicia][16]
- [热铁皮屋顶Hot Tin Roof][17]
- [无限工厂Infinifactory][18]
- [无敌Mighty No. 9][19]
- [林中之夜Night in the Woods][20]
- [夜Noct][21]
- [奇异的世界新鲜可口Oddworld: New 'N' Tasty][22]
- [真红女神Red Goddess][23]
#### 赛车游戏 ####
- [赛车计划Project Cars][44]
- [死亡赛车再生Carmageddon: Reincarnation][45]
#### 角色扮演游戏 ####
- [神界:原罪][24]
- [永恒之柱][25]
- [暗影狂奔:香港][26]
- [旗帜的传说][27]
- [神界:原罪Divinity: Original Sin][24]
- [永恒之柱Pillars Of Eternity][25]
- [暗影狂奔香港Shadowrun: Hong Kong][26]
- [旗帜的传说The Banner Saga][27]
- [镇魂曲:遗器之潮Torment: Tides of Numenera][46]
#### 策略游戏 ####
- [奇迹时代3][28]
- [放逐之城][29]
- [城:天际][30]
- [发条帝国][31]
- [][32]
- [卷轴][33]
- [太空海盗和僵尸 2][34]
- [奇迹时代Age of Wonders III][28]
- [At The Gates][47] # 尚无中文名
- [放逐之城Banished][29]
- [城天际Cities: Skylines][30]
- [发条帝国Clockwork Empires][31]
- [Parkitect][32] # 尚无中文名
- [卷轴Scrolls][33]
- [太空海盗和僵尸 2Space Pirates And Zombies 2][34]
#### 沙盒游戏 ####
- [泰拉瑞亚][35]
- [X 重生][36]
- [泰拉瑞亚Terraria][35]
- [X 重生X Rebirth][36]
#### 不太确认,不过可能性高 ####
#### 体育游戏 ####
- [英雄连][37]
- [逃生][38]
- [影子武士][39]
- [火炬之光 2][40]
- [惊爆美国棒球16Out of the Park Baseball 16][48]
然而有两个来自Feral Interactive的由于不知道他们是什么所以没有列举出来
### 不太确认,不过可能性高 ###
我们猜测Aspyr也在准备新的大制作但是他们仅仅发布了他们最新的游戏所以可能要等上几个月我们才能看到些什么
- [英雄连 2Company of Heroes 2][37]
- [逃生Outlast][38]
- [影子武士Shadow Warrior][39]
- 无光之海 - 其开发商试验性地构建 Linux 版本,不过这要取决于他们的 Windows 版本的销售情况(据邮件沟通信息)
- [火炬之光 2Torchlight II][40]
当然,** 这不是完整的列表 **,我们会轻易忘记巨量的游戏正在走向我们,哇,如此丰富的列表.
然而有[两个来自Feral Interactive的移植大作][49],由于不知道他们是什么,所以没有列举出来。
下个月就是游戏开发者大会我们也期待一些改变发生然而我们没有什么确切的东西对于Valve与Steam Machines的合作我们期待至少会增加一些Linux游戏否则如我们担心炫耀一些过时的游戏会让Valve脸上无光
我们猜测Aspyr也在准备新的大制作但是他们仅仅发布了他们最新的游戏所以可能要等上几个月我们才能看到些什么。
你怀念Linux的哪些地方曾让你兴奋
当然,** 这不是完整的列表 **,我们会轻易忘记如此多的游戏正在走向我们,哇,如此丰富的列表。
我们也期待 GDC 2015 上有一些改变然而我们没有什么确切的东西对于Valve与Steam Machines的合作我们期待至少会增加一些Linux游戏否则如我们担心炫耀一些过时的游戏会让Valve脸上无光。
希望我们没有错过那些 Linux 中让你感到兴奋的东西!
--------------------------------------------------------------------------------
@ -87,7 +102,7 @@ via: http://www.gamingonlinux.com/articles/a-look-at-what-linux-games-we-will-se
作者:[liamdawe][a]
译者:[wi-cuckoo](https://github.com/wi-cuckoo)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
@ -132,5 +147,12 @@ via: http://www.gamingonlinux.com/articles/a-look-at-what-linux-games-we-will-se
[38]:https://www.gamingonlinux.com/articles/outlast-that-really-scary-game-looks-like-its-still-heading-to-linux.4896
[39]:https://www.gamingonlinux.com/articles/shadow-warrior-looks-like-it-will-come-to-linux.4859
[40]:https://www.gamingonlinux.com/articles/torchlight-ii-has-even-more-positive-signs-for-linux.4817
[41]:http://www.gamingonlinux.com/articles/feralinteractive.com/en/upcoming/
[41]:https://www.gamingonlinux.com/articles/feralinteractive.com/en/upcoming/
[42]:https://www.gamingonlinux.com/articles/outcast-a-real-classic-has-been-revamped-and-linux-is-planned.4736
[43]:https://www.gamingonlinux.com/articles/insurgency-fps-is-waiting-on-valve-so-it-can-come-to-linux-updated.4564
[44]:http://projectcarsgame.com/
[45]:https://www.gamingonlinux.com/articles/carmageddon-reincarnations-jason-garber-answers-our-questions-on-their-linux-support.3380
[46]:https://www.gamingonlinux.com/articles/torment-tides-of-numenera-new-video-looks-absolutely-stunning.4320
[47]:http://www.atthegatesgame.com/info
[48]:http://www.ootpdevelopments.com/newsletters/nl0154/
[49]:http://feralinteractive.com/en/upcoming/

View File

@ -0,0 +1,82 @@
[translating by KayGuoWhu]
The future of Linux storage
================================================================================
> **Summary**:Linux software developers are working hard on expanding Linux's file and storage options.
BOSTON - At the [Linux Foundation's][1] new [Vault][2] show, it's all about file systems and storage. You might think that there's nothing new to say about either topic, but you'd be wrong.
![](http://zdnet2.cbsistatic.com/hub/i/r/2015/03/12/c8f92cc2-b963-4238-80a0-d785ec93698c/resize/770x578/08d93a8a393d3f50b2a56e6b0e7a0ca9/btrfs-1.jpg)
Linux file systems, such as Btrfs, and storage support options are constantly evolving. -- Facebook
Storage technology has come a long way from the days of, as Linus Torvalds put it, "[nasty platters of spinning rust][3]" and Linux has had to keep up. In recent years, for example, [flash memory has arrived as enterprise server primary storage][4] and [persistent memory][5] is bringing us storage that works at DRAM speeds. At the same time, Big Data, cloud computing, and containers are all bringing new use cases to Linux.
To deal with this, Linux developers are both expanding their existing file and storage programs and working on new ones.
### Btrfs ###
For instance, Chris Mason, a Facebook software engineer and one of the [Btrfs][6] (pronounced Butter FS) maintainers, explained how Facebook uses this file system. Btrfs has many advantages as a file system such as the ability to handle both numerous small files and single files as large as 16 exabytes; baked in RAID; built-in file-system compression; and integrated multi-storage device support.
Facebook, of course, runs on Linux. To be exact, Facebook runs the 3.10 and 3.18 Linux kernels on an internal distribution, which is based on [CentOS][7]. For Facebook, the real win is that Btrfs is stable and fast under the endless input/output operations per second (IOPS) pounding from Facebook's constantly updating users.
That's the good news. The bad news is that Btrfs is still much too slow for traditional DBMSs such as MySQL. For those, Facebook uses [XFS][8]. To co-ordinate the two file systems, Facebook uses [Gluster][9], the open-source distributed file system.
Facebook, which works hand-in-glove with the upstream Btrfs Linux kernel developers, is working on improving Btrfs's DBMS speed. Mason, and his companions, are doing this by using Btrfs with the [RocksDB][10] database. This is a persistent key-value store for fast storage, which can be used as the foundation for a client-server database.
Btrfs also still has some bugs. For example, if you're foolish enough to fill a disk almost to bursting, Btrfs will stop you from writing to storage before the disk is completely stuffed. For some projects, such as [CoreOS][12], the enterprise Linux that relies on containers, that's a showstopper. [CoreOS has since switched to using xt4 and overlayfs][11].
The Btrfs crew is also working on data deduplication. In this, when a file system has more than one identical file, you automatically delete the duplicate. As Mason said, "Not everyone needs this, but if you need it, you really need it!"
Btrfs isn't the only file system that's both very important and getting worked on. John Spray, a senior software engineer at [Red Hat][13], talked about the distributed [Ceph][14] file system.
### Ceph FS ###
Ceph provides a distributed object store and file system which, in turn, relies on a resilient and scalable storage model (RADOS) using clusters of commodity hardware. Along with the RADOS block device (RBD), and the RADOS object gateway (RGW), Ceph provides a [POSIX][15] file-system interface -- Ceph FS. While RBD and RGW have been in use for production workloads for some time, efforts to make Ceph FS ready for production are now underway.
[Red Hat, after acquiring Inktank][16], Ceph's parent company, in 2014 has been working hard on making CephFS production ready. For better or worse, Spray said, "Some people are already using it in production; we're terrified of this. It's really not ready yet." Still, Spray added, that this "is a mixed blessing because while it's a bit scary, we get really useful feedback and testing from those users."
That's because while Ceph object stores scale out well, Ceph FS, as a POSIX compliant file-system, are hard to scale out. For example, as a distributed file system, Ceph FS has to deal with multiple writes from multiple clients. This can lead to all or nothing situations where one client can write and others must wait. This can result in file-locking situations that are more complicated than those in ordinary file systems.
Still, Ceph FS is worth doing, Spray said, "since POSIX file-systems are an operating system lingua franca." That's not to say that Ceph FS doesn't work. "It's not horribly broken. It works. What's missing is the repair and monitoring tools."
Red Hat is currently hard at work on getting [fsck][17] and journal repair tools, snapshot hardening, better client access control, and cloud and container integration. For now, though, Ceph FS is a file system that only the very brave, or foolish, should use in production.
### File and storage odds and ends ###
As for larger issues of file-systems and storage, Jeff Layton, senior software engineer at [Primary Data][18], explained that there are efforts under way to to create "tests for catastrophic power failure, without actually pulling the plug." These tests will soon be integrated with [xfstests][19], the gold standard for Linux file-system testing.
Rik van Riel, a Red Hat principal software engineer, spoke about the problem of dealing with persistent memory products. You can treat them as storage or as memory. But, you can't currently take snapshots for backups if you use them as memory. The real problem: van Riel is certain that people will try to use persistent memory as both, which will lead to such as situations as "Without back up, how do you deal with a 200GB persistent memory database?" Adding insult to injury, logging systems don't currently work with persistent memory.
What's the right answer? Linux doesn't have one yet, but programmers are working on it.
So, while Linux has many file systems and can use any kind of storage out there that can hold a byte, there's still a lot of work to be done. Technology never stands still. Linux, which runs on everything from devices to desktops to servers to clouds to supercomputers, has to keep up with storage advances no matter where they appear.
--------------------------------------------------------------------------------
via: http://www.zdnet.com/article/linux-storage-futures/
作者:[Steven J. Vaughan-Nichols][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.zdnet.com/meet-the-team/us/sjvn/
[1]:http://www.linuxfoundation.org/
[2]:http://events.linuxfoundation.org/events/vault
[3]:http://www.wired.com/2012/10/linus-torvalds-hard-disks/
[4]:http://www.zdnet.com/article/sandisk-launches-infiniflash-aims-to-bring-flash-array-costs-down/
[5]:http://events.linuxfoundation.org/sites/events/files/eeus13_wheeler.pdf
[6]:https://btrfs.wiki.kernel.org/index.php/Main_Page
[7]:http://www.centos.org/
[8]:http://oss.sgi.com/projects/xfs/
[9]:http://www.gluster.org/
[10]:http://rocksdb.org/
[11]:http://lwn.net/Articles/627232/
[12]:https://coreos.com/
[13]:http://www.redhat.com/
[14]:http://ceph.com/
[15]:http://pubs.opengroup.org/onlinepubs/9699919799/
[16]:http://www.zdnet.com/article/red-hat-acquires-inktank-for-175m/
[17]:http://linux.die.net/man/8/fsck
[18]:http://primarydata.com/
[19]:http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs/cmds/xfstests.git;a=summary

View File

@ -0,0 +1,266 @@
11 Linux Terminal Commands That Will Rock Your World
================================================================================
I have been using Linux for about 10 years and what I am going to show you in this article is a list of Linux commands, tools and clever little tricks that I wish somebody had shown me from the outset instead of stumbling upon them as I went along.
![Linux Keyboard Shortcuts.](http://f.tqn.com/y/linux/1/L/m/J/1/keyboardshortcuts.png)
Linux Keyboard Shortcuts.
### 1. Useful Command Line Keyboard Shortcuts ###
The following keyboard shortcuts are incredibly useful and will save you loads of time:
- CTRL + U - Cuts text up until the cursor.
- CTRL + K - Cuts text from the cursor until the end of the line
- CTRL + Y - Pastes text
- CTRL + E - Move cursor to end of line
- CTRL + A - Move cursor to the beginning of the line
- ALT + F - Jump forward to next space
- ALT + B - Skip back to previous space
- ALT + Backspace - Delete previous word
- CTRL + W - Cut word behind cursor
- Shift + Insert - Pastes text into terminal
Just so that the commands above make sense look at the next line of text.
sudo apt-get intall programname
As you can see I have a spelling error and for the command to work I would need to change "intall" to "install".
Imagine the cursor is at the end of the line. There are various ways to get back to the word install to change it.
I could press ALT + B twice which would put the cursor in the following position (denoted by the ^ symbol):
sudo apt-get^intall programname
Now you could press the cursor key and insert the ''s' into install.
Another useful command is "shift + insert" especially If you need to copy text from a browser into the terminal.
![](http://f.tqn.com/y/linux/1/L/n/J/1/sudotricks2.png)
### 2. SUDO !! ###
You are going to really thank me for the next command if you don't already know it because until you know this exists you curse yourself every time you enter a command and the words "permission denied" appear.
- sudo !!
How do you use sudo !!? Simply. Imagine you have entered the following command:
apt-get install ranger
The words "Permission denied" will appear unless you are logged in with elevated privileges.
sudo !! runs the previous command as sudo. So the previous command now becomes:
sudo apt-get install ranger
If you don't know what sudo is [start here][1].
![Pause Terminal Applications.](http://f.tqn.com/y/linux/1/L/o/J/1/pauseapps.png)
Pause Terminal Applications.
### 3. Pausing Commands And Running Commands In The Background ###
I have already written a guide showing how to run terminal commands in the background.
- CTRL + Z - Pauses an application
- fg - Returns you to the application
So what is this tip about?
Imagine you have opened a file in nano as follows:
sudo nano abc.txt
Halfway through typing text into the file you realise that you quickly want to type another command into the terminal but you can't because you opened nano in foreground mode.
You may think your only option is to save the file, exit nano, run the command and then re-open nano.
All you have to do is press CTRL + Z and the foreground application will pause and you will be returned to the command line. You can then run any command you like and when you have finished return to your previously paused session by entering "fg" into the terminal window and pressing return.
An interesting thing to try out is to open a file in nano, enter some text and pause the session. Now open another file in nano, enter some text and pause the session. If you now enter "fg" you return to the second file you opened in nano. If you exit nano and enter "fg" again you return to the first file you opened within nano.
![nohup.](http://f.tqn.com/y/linux/1/L/p/J/1/nohup3.png)
nohup.
### 4. Use nohup To Run Commands After You Log Out Of An SSH Session ###
The [nohup command][2] is really useful if you use the ssh command to log onto other machines.
So what does nohup do?
Imagine you are logged on to another computer remotely using ssh and you want to run a command that takes a long time and then exit the ssh session but leave the command running even though you are no longer connected then nohup lets you do just that.
For instance I use my [Raspberry PI][3] to download distributions for review purposes.
I never have my Raspberry PI connected to a display nor do I have a keyboard and mouse connected to it.
I always connect to the Raspberry PI via [ssh][4] from a laptop. If I started downloading a large file on the Raspberry PI without using the nohup command then I would have to wait for the download to finish before logging off the ssh session and before shutting down the laptop. If I did this then I may as well have not used the Raspberry PI to download the file at all.
To use nohup all I have to type is nohup followed by the command as follows:
nohup wget http://mirror.is.co.za/mirrors/linuxmint.com/iso//stable/17.1/linuxmint-17.1-cinnamon-64bit.iso &
![Schedule tasks with at.](http://f.tqn.com/y/linux/1/L/q/J/1/at.png)
Schedule tasks with at.
### 5. Running A Linux Command 'AT' A Specific Time ###
The 'nohup' command is good if you are connected to an SSH server and you want the command to remain running after logging out of the SSH session.
Imagine you want to run that same command at a specific point in time.
The 'at' command allows you to do just that. 'at' can be used as follows.
at 10:38 PM Fri
at> cowsay 'hello'
at> CTRL + D
The above command will run the program [cowsay][5] at 10:38 PM on Friday evening.
The syntax is 'at' followed by the date and time to run.
When the at> prompt appears enter the command you want to run at the specified time.
The CTRL + D returns you to the cursor.
There are lots of different date and time formats and it is worth checking the man pages for more ways to use 'at'.
![](http://f.tqn.com/y/linux/1/L/l/J/1/manmost.png)
### 6. Man Pages ###
Man pages give you an outline of what commands are supposed to do and the switches that can be used with them.
The man pages are kind of dull on their own. (I guess they weren't designed to excite us).
You can however do things to make your usage of man more appealing.
export PAGER=most
You will need to install 'most; for this to work but when you do it makes your man pages more colourful.
You can limit the width of the man page to a certain number of columns using the following command:
export MANWIDTH=80
Finally, if you have a browser available you can open any man page in the default browser by using the -H switch as follows:
man -H <command>
Note this only works if you have a default browser set up within the $BROWSER environment variable.
![View Processes With htop.](http://f.tqn.com/y/linux/1/L/r/J/1/nohup2.png)
View Processes With htop.
### 7. Use htop To View And Manage Processes ###
Which command do you currently use to find out which processes are running on your computer? My bet is that you are using '[ps][6]' and that you are using various switches to get the output you desire.
Install '[htop][7]'. It is definitely a tool you will wish that you installed earlier.
htop provides a list of all running processes in the terminal much like the file manager in Windows.
You can use a mixture of function keys to change the sort order and the columns that are displayed. You can also kill processes from within htop.
To run htop simply type the following into the terminal window:
htop
![Command Line File Manager - Ranger.](http://f.tqn.com/y/linux/1/L/s/J/1/ranger.png)
Command Line File Manager - Ranger.
### 8. Navigate The File System Using ranger ###
If htop is immensely useful for controlling the processes running via the command line then [ranger][8] is immensely useful for navigating the file system using the command line.
You will probably need to install ranger to be able to use it but once installed you can run it simply by typing the following into the terminal:
ranger
The command line window will be much like any other file manager but it works left to right rather than top to bottom meaning that if you use the left arrow key you work your way up the folder structure and the right arrow key works down the folder structure.
It is worth reading the man pages before using ranger so that you can get used to all keyboard switches that are available.
![Cancel Linux Shutdown.](http://f.tqn.com/y/linux/1/L/t/J/1/shutdown.png)
Cancel Linux Shutdown.
### 9. Cancel A Shutdown ###
So you started the [shutdown][9] either via the command line or from the GUI and you realised that you really didn't want to do that.
shutdown -c
Note that if the shutdown has already started then it may be too late to stop the shutdown.
Another command to try is as follows:
- [pkill][10] shutdown
![Kill Hung Processes With XKill.](http://f.tqn.com/y/linux/1/L/u/J/1/killhungprocesses.png)
Kill Hung Processes With XKill.
### 10. Killing Hung Processes The Easy Way ###
Imagine you are running an application and for whatever reason it hangs.
You could use 'ps -ef' to find the process and then kill the process or you could use 'htop'.
There is a quicker and easier command that you will love called [xkill][11].
Simply type the following into a terminal and then click on the window of the application you want to kill.
xkill
What happens though if the whole system is hanging?
Hold down the 'alt' and 'sysrq' keys on your keyboard and whilst they are held down type the following slowly:
- [REISUB][12]
This will restart your computer without having to hold in the power button.
![youtube-dl.](http://f.tqn.com/y/linux/1/L/v/J/1/youtubedl2.png)
youtube-dl.
### 11. Download Youtube Videos ###
Generally speaking most of us are quite happy for Youtube to host the videos and we watch them by streaming them through our chosen media player.
If you know you are going to be offline for a while (i.e. due to a plane journey or travelling between the south of Scotland and the north of England) then you may wish to download a few videos onto a pen drive and watch them at your leisure.
All you have to do is install youtube-dl from your package manager.
You can use youtube-dl as follows:
youtube-dl url-to-video
You can get the url to any video on Youtube by clicking the share link on the video's page. Simply copy the link and paste it into the command line (using the shift + insert shortcut).
### Summary ###
I hope that you found this list useful and that you are thinking "i didn't know you could do that" for at least 1 of the 11 items listed.
--------------------------------------------------------------------------------
via: http://linux.about.com/od/commands/tp/11-Linux-Terminal-Commands-That-Will-Rock-Your-World.htm
作者:[Gary Newell][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://linux.about.com/bio/Gary-Newell-132058.htm
[1]:http://linux.about.com/cs/linux101/g/sudo.htm
[2]:http://linux.about.com/library/cmd/blcmdl1_nohup.htm
[3]:http://linux.about.com/od/mobiledevicesother/a/Raspberry-Pi-Computer-Running-Linux.htm
[4]:http://linux.about.com/od/commands/l/blcmdl1_ssh.htm
[5]:http://linux.about.com/cs/linux101/g/cowsay.htm
[6]:http://linux.about.com/od/commands/l/blcmdl1_ps.htm
[7]:http://www.linux.com/community/blogs/133-general-linux/745323-5-commands-to-check-memory-usage-on-linux
[8]:http://ranger.nongnu.org/
[9]:http://linux.about.com/od/commands/l/blcmdl8_shutdow.htm
[10]:http://linux.about.com/library/cmd/blcmdl1_pkill.htm
[11]:http://linux.about.com/od/funnymanpages/a/funman_xkill.htm
[12]:http://blog.kember.net/articles/reisub-the-gentle-linux-restart/

View File

@ -0,0 +1,213 @@
tanslating by martin.
Fedora GNOME Keyboard Shortcuts
================================================================================
To get the very best out of the [GNOME desktop environment][1], within Fedora, you need to learn and remember the keyboard shortcuts required to navigate the system.
This article lists the most useful keyboard shortcuts and how they are used.
![GNOME Keyboard Shortcuts - The Super Key. ](http://f.tqn.com/y/linux/1/L/o/K/1/gnomekeyboardshortcut1.png)
GNOME Keyboard Shortcuts - The Super Key.
#### 1. The Super Key ####
[The "super" key][2] is your best friend when navigating modern operating systems.
On a standard laptop the "super" key sits on the bottom row next to the "alt" key.
When you press the "super" key the "activities" overview will be displayed and you will be able to see all of the open applications zoomed out.
Pressing "ALT" and "F1" together will show the same display.
![GNOME Run Command.](http://f.tqn.com/y/linux/1/L/p/K/1/runcommand.png)
GNOME Run Command.
### 2. How To Run A Command Quickly ###
If you need to run a command quickly, you can press "ALT" and "F2" which displays a "Run Command" dialog.
You can now enter your command into that window and press return.
![TAB Through Applications.](http://f.tqn.com/y/linux/1/L/q/K/1/tabthroughwindows.png)
TAB Through Applications.
### 3. Quickly Switch To Other Open Applications ###
As with Microsoft Windows you can switch applications using the "ALT" and "TAB" keys.
On some keyboards the tab key looks like this: **|<- ->|** and on others it simply spells the word "TAB".
The GNOME application switcher simply shows the icons and names of the applications as you tab through them.
If you hold down the "shift" and "tab" keys, the application switcher rotates around the icons in reverse order.
![Switch Windows In The Same Application.](http://f.tqn.com/y/linux/1/L/r/K/1/switchwindowsinsameapplication.png)
Switch Windows In The Same Application.
### 4. Quickly Switch To Another Window In The Same Application ###
If you are anything like me then you will end up with half a dozen instances of Firefox open.
You now know that "Alt" and "Tab" switch between applications.
There are two ways to cycle through all of the open instances of the same application.
The first is to press "Alt" and "Tab" until the cursor sits over the icon of the application with many windows that you wish to cycle through. After a pause a dropdown will appear and you can select the Window with the mouse.
The second and preferred option is to press "Alt" and "Tab" until the cursor sits over the icon of the application you want to cycle through and then press the "super" and "`" keys to toggle through the open instances.
**Note that the "`" key is the one just above the tab key. The key for cycling through the open instances is always the key above the tab key regardless of your keyboard layout, therefore it isn't always guaranteed to be the "`" key.**
If you have nimble fingers (or as I like to call them ninja fingers) then you can hold the "shift", "`" and "super" key to cycle backwards through the open instances of an application.
![Switch Keyboard Focus.](http://f.tqn.com/y/linux/1/L/s/K/1/switchkeyboardfocus.png)
Switch Keyboard Focus.
### 5. Switch Keyboard Focus ###
This keyboard shortcut isn't essential but a nice to know.
If you want to switch the keyboard focus to the search bar or to an application window you can press "CTRL", "ALT" and "TAB". to show a list of possible areas to switch to.
You can then use the arrow keys to cycle through the possible options.
![Show All Applications.](http://f.tqn.com/y/linux/1/L/t/K/1/showapplications.png)
Show All Applications.
### 6. Show A List Of All The Applications ###
If the last one was a nice to have then this one is a real time saver.
To quickly navigate to a full list of all the applications on your system press the "super" key and "A".
![Switch Workspaces.](http://f.tqn.com/y/linux/1/L/u/K/1/switchworkspaces.png)
Switch Workspaces.
### 7. Switch Workspaces ###
If you have been using Linux for a while you will appreciate the fact that you [can use multiple workspaces][3].
For instance in one workspace you might have development environments open, in another web browsers and in a third your email client.
To toggle between workspaces press the "super" and the "Page Up" (PGUP) keys to toggle in one direction and the "super", "Page Down" (PGDN) keys to toggle in the other direction.
The alternative but more longwinded away to switch to another workspace is to press the "super" key to show a list of applications and then select the workspace you wish to switch to on the right side of the screen.
![Move Application To Another Workspace.](http://f.tqn.com/y/linux/1/L/v/K/1/movetoanewworkspace.png)
Move Application To Another Workspace.
### 8. Move Items To A New Workspace ###
If the workspace you are using is getting cluttered and you wish to move the current application to a new workspace press the "super", "shift" and "page up" button or "super", "shift" and "page down" key.
Alternatively press the "super" key to bring up the list of applications and drag the application you wish to move to one of the workspaces on the right of the screen.
![Show The Message Tray.](http://f.tqn.com/y/linux/1/L/w/K/1/showmessagetray.png)
Show The Message Tray.
### 9. Show The Message Tray ###
The message tray provides a list of notifications.
To bring up the message tray press the "super" and "M" key on the keyboard.
Alternatively move the mouse to the bottom right corner of the screen.
![Lock The Screen.](http://f.tqn.com/y/linux/1/L/x/K/1/lockscreen.png)
Lock The Screen.
### 10. Lock The Screen ###
Need to a comfort break or a cup of coffee? Don't want sticky paws all over your keyboard?
Whenever you leave your computer alone get in the habit of pressing "super" and L to lock the screen.
To unlock the screen drag up from the bottom and enter your password.
![Control Alt Delete Within Fedora.](http://f.tqn.com/y/linux/1/L/y/K/1/poweroff.png)
Control Alt Delete Within Fedora.
### 11. Power Off ###
If you used to be a Windows user then you will remember the three finger salute known as CTRL, ALT and DELETE.
If you press "CTRL", "ALT" and "DEL" on your keyboard within Fedora a message will appear telling you that your computer will shut down in 60 seconds.
### 12. Editing Shortcuts ###
The editing keyboard shortcuts are pretty much universal across every operating system.
- CTRL + A - Select All
- CTRL + X - Cut
- CTRL + C - Copy
- CTRL + V - Paste
- CTRL + Z - Undo
### 13. Screen Capturing ###
As with the editing shortcuts, the screencapturing keys are fairly standard
- PRTSC (Print Screen) - Take screenshot
- Alt + PRTSC - Take screenshot of current window
- Shift + PRTSC - Take screenshot of an area of the screen
Here is one that is fairly unique but great for people making tutorial videos.
- CTRL + ALT + SHIFT + R - Record Screencast
- CTRL + ALT + SHIFT + R again - Stop Screencast
The [screencasts][4] will be stored in the videos folder under your home directory in the [webm][5] format.
![Put Windows Side By Side.](http://f.tqn.com/y/linux/1/L/z/K/1/splitwindows.png)
Put Windows Side By Side.
### 14. Put Windows Side By Side ###
You can put windows side by side so that one uses up the left side of the screen and the other uses the right side of the screen.
Press the "Super" and "Left Arrow" key on the keyboard to shift the current application to the left.
Press the "Super" and "Right Arrow" key on the keyboard to shift the current application to the right.
### 15. Maximise, Minimise And Restore Windows ###
To maximise a window double click on the title bar.
To restore a window to its original size double click on the maximised window.
To minimise a window, right click and select "minimise" from the menu.
![GNOME Keyboard Shortcut Cheat Sheet. ](http://f.tqn.com/y/linux/1/L/-/L/1/gnomekeyboardshortcuts.png)
GNOME Keyboard Shortcut Cheat Sheet.
### 16. Summary ###
To help you learn these keyboard shortcuts I have created a cheat sheet which you can print out and stick to your wall.
When you have learned these shortcuts you will begin to appreciate how modern desktop environments work.
- [Click here to view the Fedora Linux GNOME Desktop Environment cheat sheet.][6]
- [Click here for the GNOME WIKI][7]
- [The other GNOME WIKI][8]
- [An alternative GNOME 3 Cheat Sheet][9]
--------------------------------------------------------------------------------
via: http://linux.about.com/od/howtos/tp/Fedora-GNOME-Keyboard-Shortcuts.htm
作者:[Gary Newell][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://linux.about.com/bio/Gary-Newell-132058.htm
[1]:https://www.gnome.org/gnome-3/
[2]:http://en.wikipedia.org/wiki/Super_key_%28keyboard_button%29
[3]:http://linux.about.com/library/gnome/blgnome2n4.htm
[4]:http://en.wikipedia.org/wiki/Screencast
[5]:http://en.wikipedia.org/wiki/WebM
[6]:https://s-media-cache-ak0.pinimg.com/originals/d5/f4/a4/d5f4a42c0940fae6653ee9a17294d450.jpg
[7]:http://en.wikipedia.org/wiki/GNOME
[8]:https://wiki.gnome.org/
[9]:https://wiki.gnome.org/Gnome3CheatSheet

View File

@ -0,0 +1,268 @@
How to Manage and Use LVM (Logical Volume Management) in Ubuntu
================================================================================
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/652x202xbanner-1.png.pagespeed.ic.VGSxDeVS9P.png)
In our [previous article we told you what LVM is and what you may want to use it for][1], and today we are going to walk you through some of the key management tools of LVM so you will be confident when setting up or expanding your installation.
As stated before, LVM is a abstraction layer between your operating system and physical hard drives. What that means is your physical hard drives and partitions are no longer tied to the hard drives and partitions they reside on. Rather, the hard drives and partitions that your operating system sees can be any number of separate hard drives pooled together or in a software RAID.
To manage LVM there are GUI tools available but to really understand what is happening with your LVM configuration it is probably best to know what the command line tools are. This will be especially useful if you are managing LVM on a server or distribution that does not offer GUI tools.
Most of the commands in LVM are very similar to each other. Each valid command is preceded by one of the following:
- Physical Volume = pv
- Volume Group = vg
- Logical Volume = lv
The physical volume commands are for adding or removing hard drives in volume groups. Volume group commands are for changing what abstracted set of physical partitions are presented to your operating in logical volumes. Logical volume commands will present the volume groups as partitions so that your operating system can use the designated space.
### Downloadable LVM Cheat Sheet ###
To help you understand what commands are available for each prefix we made a LVM cheat sheet. We will cover some of the commands in this article, but there is still a lot you can do that wont be covered here.
All commands on this list will need to be run as root because you are changing system wide settings that will affect the entire machine.
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/01/lvm-cheatsheet.png)
### How to View Current LVM Information ###
The first thing you may need to do is check how your LVM is set up. The s and display commands work with physical volumes (pv), volume groups (vg), and logical volumes (lv) so it is a good place to start when trying to figure out the current settings.
The display command will format the information so its easier to understand than the s command. For each command you will see the name and path of the pv/vg and it should also give information about free and used space.
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/01/539x225xpvdisplay.png.pagespeed.ic.u2XV5LBTYa.png)
The most important information will be the PV name and VG name. With those two pieces of information we can continue working on the LVM setup.
### Creating a Logical Volume ###
Logical volumes are the partitions that your operating system uses in LVM. To create a logical volume we first need to have a physical volume and volume group. Here are all of the steps necessary to create a new logical volume.
#### Create physical volume ####
We will start from scratch with a brand new hard drive with no partitions or information on it. Start by finding which disk you will be working with. (/dev/sda, sdb, etc.)
> Note: Remember all of the commands will need to be run as root or by adding sudo to the beginning of the command.
fdisk -l
If your hard drive has never been formatted or partitioned before you will probably see something like this in the fdisk output. This is completely fine because we are going to create the needed partitions in the next steps.
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/fdisk.png.pagespeed.ce.AmAEsxm-7Q.png)
Our new disk is located at /dev/sdb so lets use fdisk to create a new partition on the drive.
There are a plethora of tools that can create a new partition with a GUI, [including Gparted][2], but since we have the terminal open already, we will use fdisk to create the needed partition.
From a terminal type the following commands:
fdisk /dev/sdb
This will put you in a special fdisk prompt.
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/627x145xfdisk00.png.pagespeed.ic.I7S8bjoXQG.png)
Enter the commands in the order given to create a new primary partition that uses 100% of the new hard drive and is ready for LVM. If you need to change the partition size or want multiple partions I suggest using GParted or reading about fdisk on your own.
**Warning: The following steps will format your hard drive. Make sure you dont have any information on this hard drive before following these steps.**
- n = create new partition
- p = creates primary partition
- 1 = makes partition the first on the disk
Push enter twice to accept the default first cylinder and last cylinder.
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/562x216xfdisk01.png.pagespeed.ic.DsSZ38kWcA.png)
To prepare the partition to be used by LVM use the following two commands.
- t = change partition type
- 8e = changes to LVM partition type
Verify and write the information to the hard drive.
- p = view partition setup so we can review before writing changes to disk
- w = write changes to disk
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/560x339xfdisk03.png.pagespeed.ic.FC8foICZsb.png)
After those commands, the fdisk prompt should exit and you will be back to the bash prompt of your terminal.
Enter pvcreate /dev/sdb1 to create a LVM physical volume on the partition we just created.
You may be asking why we didnt format the partition with a file system but dont worry, that step comes later.
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/pvcreate.png.pagespeed.ce.W7VAr-ig3t.png)
#### Create volume Group ####
Now that we have a partition designated and physical volume created we need to create the volume group. Luckily this only takes one command.
vgcreate vgpool /dev/sdb1
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/vgcreate.png.pagespeed.ce.fVLzSmPZou.png)
Vgpool is the name of the new volume group we created. You can name it whatever youd like but it is recommended to put vg at the front of the label so if you reference it later you will know it is a volume group.
#### Create logical volume ####
To create the logical volume that LVM will use:
lvcreate -L 3G -n lvstuff vgpool
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/lvcreate.png.pagespeed.ce.vupLB-LJEW.png)
The -L command designates the size of the logical volume, in this case 3 GB, and the -n command names the volume. Vgpool is referenced so that the lvcreate command knows what volume to get the space from.
#### Format and Mount the Logical Volume ####
One final step is to format the new logical volume with a file system. If you want help choosing a Linux file system, read our [how to that can help you choose the best file system for your needs][3].
mkfs -t ext3 /dev/vgpool/lvstuff
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/571x424xmkfs.png.pagespeed.ic.ERMan1Mz0P.png)
Create a mount point and then mount the volume somewhere you can use it.
mkdir /mnt/stuff
mount -t ext3 /dev/vgpool/lvstuff /mnt/stuff
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/510x69xmount.png.pagespeed.ic.k0i1tvqgcV.png)
#### Resizing a Logical Volume ####
One of the benefits of logical volumes is you can make your shares physically bigger or smaller without having to move everything to a bigger hard drive. Instead, you can add a new hard drive and extend your volume group on the fly. Or if you have a hard drive that isnt used you can remove it from the volume group to shrink your logical volume.
There are three basic tools for making physical volumes, volume groups, and logical volumes bigger or smaller.
Note: Each of these commands will need to be preceded by pv, vg, or lv depending on what you are working with.
- resize can shrink or expand physical volumes and logical volumes but not volume groups
- extend can make volume groups and logical volumes bigger but not smaller
- reduce can make volume groups and logical volumes smaller but not bigger
Lets walk through an example of how to add a new hard drive to the logical volume “lvstuff” we just created.
#### Install and Format new Hard Drive ####
To install a new hard drive follow the steps above to create a new partition and add change its partition type to LVM (8e). Then use pvcreate to create a physical volume that LVM can recognize.
#### Add New Hard Drive to Volume Group ####
To add the new hard drive to a volume group you just need to know what your new partition is, /dev/sdc1 in our case, and the name of the volume group you want to add it to.
This will add the new physical volume to the existing volume group.
vgextend vgpool /dev/sdc1
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/vgextend.png.pagespeed.ce.atRPT1yg5f.png)
#### Extend Logical Volume ####
To resize the logical volume we need to say how much we want to extend by size instead of by device. In our example we just added a 8 GB hard drive to our 3 GB vgpool. To make that space usable we can use lvextend or lvresize.
lvextend -L8G /dev/vgpool/lvstuff
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/lvextend1.png.pagespeed.ce.6scXbQVUTT.png)
While this command will work you will see that it will actually resize our logical volume to 8 GB instead of adding 8 GB to the existing volume like we wanted. To add the last 3 available gigabytes you need to use the following command.
lvextend -L+3G /dev/vgpool/lvstuff
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/430x85xlvextend2.png.pagespeed.ic.7aBiTBrW03.png)
Now our logical volume is 11 GB in size.
#### Extend File System ####
The logical volume is 11 GB but the file system on that volume is still only 3 GB. To make the file system use the entire 11 GB available you have to use the command resize2fs. Just point resize2fs to the 11 GB logical volume and it will do the magic for you.
resize2fs /dev/vgpool/lvstuff
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/650x150xresize2fs.png.pagespeed.ic.Mx74EdMuk_.png)
**Note: If you are using a different file system besides ext3/4 please see your file systems resize tools.**
#### Shrink Logical Volume ####
If you wanted to remove a hard drive from a volume group you would need to follow the above steps in reverse order and use lvreduce and vgreduce instead.
1. resize file system (make sure to move files to a safe area of the hard drive before resizing)
1. reduce logical volume (instead of + to extend you can also use to reduce by size)
1. remove hard drive from volume group with vgreduce
#### Backing up a Logical Volume ####
Snapshots is a feature that some newer advanced file systems come with but ext3/4 lacks the ability to do snapshots on the fly. One of the coolest things about LVM snapshots is your file system is never taken offline and you can have as many as you want without taking up extra hard drive space.
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/652x202xbanner-2.png.pagespeed.ic.VtOUuqYX1W.png)
When LVM takes a snapshot, a picture is taken of exactly how the logical volume looks and that picture can be used to make a copy on a different hard drive. While a copy is being made, any new information that needs to be added to the logical volume is written to the disk just like normal, but changes are tracked so that the original picture never gets destroyed.
To create a snapshot we need to create a new logical volume with enough free space to hold any new information that will be written to the logical volume while we make a backup. If the drive is not actively being written to you can use a very small amount of storage. Once we are done with our backup we just remove the temporary logical volume and the original logical volume will continue on as normal.
#### Create New Snapshot ####
To create a snapshot of lvstuff use the lvcreate command like before but use the -s flag.
lvcreate -L512M -s -n lvstuffbackup /dev/vgpool/lvstuff
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/597x68xlvcreate-snapshot.png.pagespeed.ic.Rw2ivtcpPg.png)
Here we created a logical volume with only 512 MB because the drive isnt being actively used. The 512 MB will store any new writes while we make our backup.
#### Mount New Snapshot ####
Just like before we need to create a mount point and mount the new snapshot so we can copy files from it.
mkdir /mnt/lvstuffbackup
mount /dev/vgpool/lvstuffbackup /mnt/lvstuffbackup
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/565x68xmount-snapshot.png.pagespeed.ic.pVMkhK1o4x.png)
#### Copy Snapshot and Delete Logical Volume ####
All you have left to do is copy all of the files from /mnt/lvstuffbackup/ to an external hard drive or tar it up so it is all in one file.
**Note: tar -c will create an archive and -f will say the location and file name of the archive. For help with the tar command use man tar in the terminal.**
tar -cf /home/rothgar/Backup/lvstuff-ss /mnt/lvstuffbackup/
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/627x67xsnapshot-backup.png.pagespeed.ic.tw-2AK_lfZ.png)
Remember that while the backup is taking place all of the files that would be written to lvstuff are being tracked in the temporary logical volume we created earlier. Make sure you have enough free space while the backup is happening.
Once the backup finishes, unmount the volume and remove the temporary snapshot.
umount /mnt/lvstuffbackup
lvremove /dev/vgpool/lvstuffbackup/
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/630x102xlvremove.png.pagespeed.ic.yBWk47X6lF.png)
#### Deleting a Logical Volume ####
To delete a logical volume you need to first make sure the volume is unmounted, and then you can use lvremove to delete it. You can also remove a volume group once the logical volumes have been deleted and a physical volume after the volume group is deleted.
Here are all the commands using the volumes and groups weve created.
umount /mnt/lvstuff
lvremove /dev/vgpool/lvstuff
vgremove vgpool
pvremove /dev/sdb1 /dev/sdc1
![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/580x185xdelete-lvm.png.pagespeed.ic.3zJTo0Zu9k.png)
That should cover most of what you need to know to use LVM. If youve got some experience on the topic, be sure to share your wisdom in the comments.
--------------------------------------------------------------------------------
via: http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.howtogeek.com/howto/36568/what-is-logical-volume-management-and-how-do-you-enable-it-in-ubuntu/
[2]:http://www.howtogeek.com/howto/17001/how-to-format-a-usb-drive-in-ubuntu-using-gparted/
[3]:http://www.howtogeek.com/howto/33552/htg-explains-which-linux-file-system-should-you-choose/

View File

@ -0,0 +1,67 @@
How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots
================================================================================
![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55035707bbd74.png.pagespeed.ic.9_yebxUF1C.png)
Ubuntus installer offers an easy “Use LVM” checkbox. The description says it enables Logical Volume Management so you can take snapshots and more easily resize your hard disk partitions — heres how to do that.
LVM is a technology thats similar to [RAID arrays][1] or [Storage Spaces on Windows][2] in some ways. While this technology is particularly useful on servers, it can be used on desktop PCs, too.
### Should You Use LVM With Your New Ubuntu Installation? ###
The first question is whether you even want to use LVM with your Ubuntu installation. Ubuntu makes this easy to enable with a quick click, but this option isnt enabled by default. As the installer says, this allows you to resize partitions, create snapshots, merge multiple disks into a single logical volume, and so on — all while the system is running. Unlike with typical partitions, you dont have to shut down your system, boot from a live CD or USB drive, and [resize your partitions while they arent in use][3].
To be perfectly honest, the average Ubuntu desktop user probably wont realize whether theyre using LVM or not. But, if you want to do more advanced things later, LVM can help. LVM is potentially more complex, which could cause problems if you need to recover your data later — especially if youre not that experienced with it. There shouldnt be a noticeable performance penalty here — LVM is implemented right down in the Linux kernel.
![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55035cbada6ae.png.pagespeed.ic.cnqyiKfCvi.png)
### Logical Volume Management Explained ###
Were previously [explained what LVM is][4]. In a nutshell, it provides a layer of abstraction between your physical disks and the partitions presented to your operating system. For example, your computer might have two hard drives inside it, each 1 TB in size. Youd have to have at least two partitions on these disks, and each of these partitions would be 1 TB in size.
LVM provides a layer of abstraction over this. Instead of the traditional partition on a disk, LVM would treat the disks as two separate “physical volumes” after you initialize them. You could then create “logical volumes” based on these physical volumes. For example, you could combine those two 1 TB disks into a single 2 TB partition. Your operating system would just see a 2 TB volume, and LVM would deal with everything in the background. A group of physical volumes and logical volumes is known as a “volume group.” A typical system will just have a single volume group.
This layer of abstraction makes it possibly to easily resize partitions, combine multiple disks into a single volume, and even take “snapshots” of a partitions file system while its running, all without unmounting it.
Note that merging multiple disks into a single volume can be a bad idea if youre not creating backups. Its like with RAID 0 — if you combine two 1 TB volumes into a single 2 TB volume, you could lose important data on the volume if just one of your hard disks fails. Backups are crucial if you go this route.
### Graphical Utilities for Managing Your LVM Volumes ###
Traditionally, [LVM volumes are managed with Linux terminal commands][5].These will work for you on Ubuntu, but theres an easier, graphical method anyone can take advantage of. If youre a Linux user used to using GParted or a similar partition manager, dont bother — GParted doesnt have support for LVM disks.
Instead, you can use the Disks utility included along with Ubuntu for this. This utility is also known as GNOME Disk Utility, or Palimpsest. Launch it by clicking the icon on the dash, searching for Disks, and pressing Enter. Unlike GParted, the Disks utility will display your LVM partitions under “Other Devices,” so you can format them and adjust other options if you need to. This utility will also work from a live CD or USB drive, too.
![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_550361b3772f7.png.pagespeed.ic.nZWwLJUywR.png)
Unfortunately, the Disks utility doesnt include support for taking advantage of LVMs most powerful features. Theres no options for managing your volume groups, extending partitions, or taking snapshots. You could do that from the terminal, but you dont have to. Instead, you can open the Ubuntu Software Center, search for LVM, and install the Logical Volume Management tool. You could also just run the **sudo apt-get install system-config-lvm** command in a terminal window. After its installed, you can open the Logical Volume Management utility from the dash.
This graphical configuration tool was made by Red Hat. Its a bit dated, but its the only graphical way to do this stuff without resorting to terminal commands.
Lets say you wanted to add a new physical volume to your volume group. Youd open the tool, select the new disk under Uninitialized Entries, and click the “Initialize Entry” button. Youd then find the new physical volume under Unallocated Volumes, and you could use the “Add to existing Volume Group” button to add it to the “ubuntu-vg” volume group Ubuntu created during the installation process.
![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_550363106789c.png.pagespeed.ic.drVInt3Weq.png)
The volume group view shows you a visual overview of your physical volumes and logical volumes. Here, we have two physical partitions across two separate hard drives. We have a swap partition and a root partition, just as Ubuntu sets up its partitioning scheme by default. Because weve added a second physical partition from another drive, theres now a good chunk of unused space.
![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_550363f631c19.png.pagespeed.ic.54E_Owcq8y.png)
To expand a logical partition into the physical space, you could select it under Logical View, click Edit Properties, and modify the size to grow the partition. You could also shrink it from here.
![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55036893712d3.png.pagespeed.ic.ce7y_Mt0uF.png)
The other options in system-config-lvm allow you to set up snapshots and mirroring. You probably wont need these features on a typical desktop, but theyre available graphically here. Remember, you can also [do all of this with terminal commands][6].
--------------------------------------------------------------------------------
via: http://www.howtogeek.com/211937/how-to-use-lvm-on-ubuntu-for-easy-partition-resizing-and-snapshots/
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.howtogeek.com/162676/how-to-use-multiple-disks-intelligently-an-introduction-to-raid/
[2]:http://www.howtogeek.com/109380/how-to-use-windows-8s-storage-spaces-to-mirror-combine-drives/
[3]:http://www.howtogeek.com/114503/how-to-resize-your-ubuntu-partitions/
[4]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/
[5]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/
[6]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/

View File

@ -0,0 +1,144 @@
How to share a directory with Samba on Fedora or CentOS
================================================================================
Nowadays sharing data across different computers is not something new at home or many work places. Riding on this trend, modern operating systems make it easy to share and exchange data transparently across computers via network file systems. If your work environment involves a mix of Microsoft Windows and Linux computers, one way to share files and folders among them is via SMB/CIFS, a cross-platform network file sharing protocol. Windows Microsoft natively supports SMB/CIFS, while Linux offers free software implementation of SMB/CIFS network protocol in Samba.
In this article, we will demonstrate **how to share a directory using Samba**. The Linux platform we will use is **Fedora or CentOS**. This article is dividied into four parts. First, we will install Samba under Fedora/CentOS environment. Next, we discuss how to adjust SELinux and firewall configurations to allow file sharing with Samba. Finally, we cover how to enable Samba to share a directory.
### Step One: Install Samba on Fedora or CentOS ###
First thing first. Let's install Samba and configure basic settings.
Check whether Samba application is already installed on your system by running:
$ rpm -q samba samba-common samba-client
If the above command doesn't show anything at all, it means that Samba is not installed. In that case, install Samba using the command below.
$ sudo yum install samba samba-common samba-client
Next, creates a local directory which will share data over network. This directory will be exported to remote users as a Samba share. In this tutorial, we will create this directory in the top-level directory '/', so make sure that you have the privileges to do it.
$ sudo mkdir /shared
If you want to create a shared directory inside your home directory (e.g., ~/shared), you must activate Samba home directory sharing in the SELinux options, which will be described below in more detail.
After creating /shared directory, set the privileges of the directory so other users can access it.
$ sudo chmod o+rw /shared
If you don't want other users to be able to have write to the directory, just remove the 'w' option in chmod command as follows.
$ sudo chmod o+r /shared
Next, create one empty file as a test. This file will be used to verify that he Samba share is mounted properly.
$ sudo touch /shared/file1
### Step Two: Configure SELinux for Samba ###
Next, we need to re-configure SELinux which is enabled by default in Fedora and CentOS distributions. SELinux allows Samba to read and modify files or directories only when they have the right security context (e.g., labeled with the 'samba_share_t' attribute).
The following command adds the necessary label to file-context configuration:
$ sudo semanage fcontext -a -t samba_share_t "<directory>(/.*)?"
Replace the <directory> with the local directory we created earlier for Samba share (e.g., /shared):
$ sudo semanage fcontext -a -t samba_share_t "/shared(/.*)?"
To activate the label change, we then must run the restorecon command like below.
$ sudo restorecon -R -v /shared
![](https://farm9.staticflickr.com/8584/16652774078_2055f45f70_b.jpg)
To share a directory inside our home directory via Samba, we must enable sharing home directory option in SELinux because it is disabled by default. The following command achieves the desired effect. Skip this step if you are not sharing your home directory.
$ sudo setsebool -P samba_enable_home_dirs 1
### Step Three: Configure Firewall for Samba ###
The next step is to open necessary TCP/UDP ports in the firewall settings for Samba to operate.
If you are using firewalld (e.g., on Fedora or CentOS 7), the following command will take care of permanent firewall rule change for Samba service.
$ sudo firewall-cmd --permanent --add-service=samba
If you are using iptables for your firewall (e.g., CentOS 6 or earlier), use the following commands to open up necessary Samba ports to the world.
$ sudo vi /etc/sysconfig/iptables
----------
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 445 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
Then restart iptables service:
$ sudo service iptables restart
### Step Four: Change Samba Configuration ###
The last step is to configure Samba to export a created local directory as a Samba-share.
Open the Samba configuration file with a text editor, and add the following lines at the bottom of the file.
$ sudo nano /etc/samba/smb.conf
----------
[myshare]
comment=my shared files
path=/shared
public=yes
writeable=yes
In the above the text inside a pair of brackets (e.g., "myshare") is the name of the Samba-shared resource, which will be used to access the Samba share from a remote host.
Create a Samba user account which is required to mount and export the Samba file system. To create a Samba user, use the smbpasswd tool. Note that the Samba user account must be the same as any existing Linux user. If you try to add a non-existing user with smbpasswd, it will give an error message.
If you don't want to use any existing Linux user as a Samba user, you can create a new dedicated user in your system. For safety, set the new user's login shell to /sbin/nologin, and do not create its home directory.
In this example, we are creating a new user named "sambaguest" as follows.
$ sudo useradd -M -s /sbin/nologin sambaguest
$ sudo passwd sambaguest
![](https://farm9.staticflickr.com/8702/16814479366_53f540d3ba_b.jpg)
After creating a new user, add the user as a Samba user using smbpasswd command. When this command asks a password, you can type a different password than the user's password.
$ sudo smbpasswd -a sambaguest
4. Activate the Samba service, and check whether the Samba service is running or not.
$ sudo systemctl enable smb.service
$ sudo systemctl start smb.service
$ sudo systemctl is-active smb
![](https://farm8.staticflickr.com/7607/16652984770_622f24bccc_b.jpg)
To see the list of shared directories in Samba, type the following command.
$ smbclient -U sambaguest -L localhost
![](https://farm8.staticflickr.com/7281/16220411103_06bf585901_b.jpg)
The following is a screenshot of accessing the Samba-shared directory on Thunar file manager, and doing copy-paste of file1. Note that the Samba share is accessible via "smb://<samba-server-IP-address>/myshare" address on Thunar.
![](https://farm8.staticflickr.com/7644/16218011174_c8b34fcedc_b.jpg)
--------------------------------------------------------------------------------
via: http://xmodulo.com/share-directory-samba-fedora-centos.html
作者:[Kristophorus Hadiono][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/kristophorus

View File

@ -0,0 +1,93 @@
Install And Use Go For It! To Do App In Linux
================================================================================
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_For_It_TODO_Linux.jpeg)
How do you manage tasks and remember things in desktop Linux? I preferred [using sticky notes in Ubuntu][1] for a long time. But the problem I faced was syncing it with other devices, especially with my smartphone. This is the reason why went on with [Google Keep][2].
Now, Google Keep is feature rich app and I really like it, and like it to the extent of calling it [Linux alternative of Evernote][3]. But not everyone may like a feature rich todo list app. Minmalist is the current trend and liked by many. And if you are one of the minimalist lover, who is looking for an open source to do list app, you should give [Go For It!][4] a try.
### Go For It! productivity desktop app for Linux ###
Go For It! is a simple to do list app that comes with a timer to keep you focused on the work. So, you add a task to the list and can attach a timer to it. It will keep remind you to work on the task. You can watch the video by its developer, [Manuel Kehl][5]:
注释youtube视频发布的时候可做成一个链接
<iframe width="640" height="390" frameborder="0" allowfullscreen="true" src="http://www.youtube.com/embed/mnw556C9FZQ?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent" type="text/html" class="youtube-player"></iframe>
### Install Go For It! ###
To install Go For It! in Ubuntu 15.04, 14.10, 14.04 and other Ubuntu based Linux distributions such as Linux Mint, elementary OS Freya etc, use the official PPA of this app:
sudo add-apt-repository ppa:mank319/go-for-it
sudo apt-get update
sudo apt-get install go-for-it
You can download the .deb binaries, binaries for Windows and source code from the respective links below:
- [Download source code][6]
- [Download .deb binaries][7]
- [Download for Windows][8]
### Using Go For It! in desktop Linux ###
Using Go For It! is really simple. You add tasks in the list. The tasks are saved in todo.txt file.
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux.png)
By default a timer of 25 minutes will be set on each task.
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux_1.png)
Once done, task is automatically archived to done.txt. Based on preferences, it will send desktop notifications at regular time interval and few minutes before the task is supposed to be over:
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Linux_notification.png)
You can change all these preferences from configuration.
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux_2.png)
So far so good. But what about using it on a smartphone. A productivity app is not complete if you cannot keep it synced across various devices. Good thing is that Go For It! is based on [todo.txt][9], which means you can use it in smartphones using third party apps and a cloud service like Dropbox.
### Using Go For It! in Android smartphones and tablets ###
You need to do couple of things here. First thing first, install Dropbox in Linux as well as in your Android phone, if you havent installed it already. The next thing you need to do is to change the configuration of Go For It! and **change the todo.txt directory to Dropbox location**.
Next, you will have to download [Simpletask Android app][10]. Its a free app. Install this app. When you run Simpletask for the first time, you will ask to link your account with Dropbox:
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Android_1.jpeg)
Once you have linked Simpletask with Dropbox, open the app. If you have change the configuration of Go For It! to save the files in Dropbox, you should be able to see it in Simpletask. If you do not see it, click on the settings from the bottom and use the option of Open Todo file:
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Android.jpeg)
Now you should be able to see your tasks synced with Simpletask.
### Conclusion ###
With Simpletask, you can use it in similar fashion as a [markup language tool][11]. For minimal and focused usage Go For It! is a nice to do app. A clean interface is another plus point. It could have been better to have its own smartphone app but we already saw the workarounds.
On the down side, Go For It! doesnt run in background. Which means, youll have to keep it running always. It doesnt even has a minimize button, a tiny annoyance. What I would like to see is an indicator applet for it. Running in the background and quick access in the panel will definitely improve its usability.
Do try Go For It! and share your experience with it. What other to-do app do you use on desktop Linux? How does Go For It! compare with your other favorite productivity app?
--------------------------------------------------------------------------------
via: http://itsfoss.com/go-for-it-to-do-app-in-linux/
作者:[Abhishek][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://itsfoss.com/author/abhishek/
[1]:http://itsfoss.com/indicator-stickynotes-windows-like-sticky-note-app-for-ubuntu/
[2]:http://itsfoss.com/install-google-keep-ubuntu-1310/
[3]:http://itsfoss.com/5-evernote-alternatives-linux/
[4]:http://manuel-kehl.de/projects/go-for-it/
[5]:http://manuel-kehl.de/about-me/
[6]:https://github.com/mank319/Go-For-It
[7]:https://launchpad.net/~mank319/+archive/ubuntu/go-for-it
[8]:http://manuel-kehl.de/projects/go-for-it/download-windows-version/
[9]:http://todotxt.com/
[10]:https://play.google.com/store/apps/details?id=nl.mpcjanssen.todotxtholo&hl=en
[11]:http://itsfoss.com/install-latex-ubuntu-1404/