20140225-3 选题

This commit is contained in:
DeadFire 2014-02-25 12:59:06 +08:00
parent 34da5d6c77
commit 4ed2e08d34
3 changed files with 135 additions and 0 deletions

View File

@ -0,0 +1,43 @@
How To Block A Website In Ubuntu
================================================================================
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/02/block-websites.jpg)
Dear **ubuntu** geeks,
In this tutorial I will teach you how to block unwanted websites in Ubuntu Linux by editing the **/etc/hosts** file which is used to handle DNS and internet on Linux based systems.
I like very much this method because I dont need to rely on third party applications and it is extremely easy to use. All you need to do is to make a simple change in the **/etc/hosts** file.
Make sure to have superuser access on the machine you are using this method, because the **/etc/hosts** file is owned by the root user and so it cannot not be edited by everyone.
What do you need to edit the **/etc/hosts** file?
root permissions and a text editor.
For this tutorial I will use my favourite text editor, vim. Ok guys, open a new terminal (**CTRL+ALT+T**) and run the following command to open the /etc/hosts file for editing.
vim /etc/hosts
Then add the following line.
127.0.0.1 domain.com
Replace the domain.com with the website you want to block and after you have finished the editing process, save the file and quit.
Now it is time to test if the method has worked or not. Try to access the website you blocked.
My cousin is addicted to the facebook social network so every time he find my laptop, he opens it and goes to facebook.com to chat with his friends.
What should I do?
I edit the **/etc/hosts** file and act like the website he is trying to reach is down.
You can also use this method to protect kids from adult content on the internet such as porn and horror movies.
--------------------------------------------------------------------------------
via: http://www.unixmen.com/block-website-ubuntu/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,37 @@
How To Execute bin Files In Linux
================================================================================
Hi **linux** geeks,
In this short tutorial I will teach you how to install **.bin** files in your Linux machine. Not scary terminal commands, I promise! But I will also show how to do it from the terminal.
What is a .bin file?
A .bin file is a self extracting binary file for Linux and Unix-like operating systems. Before executing a .bin file you need to give it executive permissions. This can be done from the terminal or from the gui. If you like to practise terminal commands then open a new terminal and run the following command to give the file execute permissions.
chmod +x filename.bin
The execute it with the following command.
./filename.bin
Make sure you are a superuser when typing the above commands.
How to do the same thing from the gui? Go to the folder where you have the .bin file and right click on it with your mouse, then go to properties like shown in the picture below.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/02/exec1.png)
Go to **Permissions** and tick **Allow executing file as a program**.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/02/exec2.png)
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/02/exec3.png)
Double click the file and it will be executed. It is done.
--------------------------------------------------------------------------------
via: http://www.unixmen.com/execute-bin-files-linux/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,55 @@
Linux Basics: Analyze Disk Usage In Ubuntu Linux
================================================================================
Dear **linux** geeks,
In this tutorial I will teach you how to analyze disk usage in Ubuntu. Taking care of the hard disk of your machine and running the proper analysis on it is very important to make sure that your system is healthy and that it will run in a very smooth way. To do this, we will use a nice graphical tool called **Baobab**.
Before going any further I must say that it is a very easy to use tool with many features and I am very sure it will meet your requirements. Baobab was part of gnome-utils, but has been standing as a standalone application since Gnome 3.4. By using this disk analyzer tool you can easily scan the home folder, filesystem and local or remote folders.
Everything is done with only a click! Do you like to stop the scanning process? Cool, just hit the **Stop scanning** button available on the top of the baobabs user interface.
I like the simplicity of this tool and the fact that it can graphically represent data in a ring chart or a treemap chart. Now, how about installing and using it in your own machine?
As far as I know it should come installed by default in Ubuntu, but if not, open a new terminal (**CTRL+ALT+T**) and run the following command to install it.
sudo apt-get install baobab
After the installation is finished go to **Applications, System Tools, Disk Usage Analyzer** or launch baobab directly from the terminal by running the following command.
baobab
The following picture shows how it should look like when launched in your system.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/02/baobab1.png)
Scan the Home folder by clicking on **Scan Home** or go to Analyzer and select Scan Home Folder option. The tool will do evrything so wait until the scan is finished and enjoy the results.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/02/baobab2.png)
As you can see from the above picture the baobabs scan gives me information about the Usage of every folder in Home directory, the size and the number of items it contains. The left side shows the graphical representation as a ring chart. But if you like you can easily change it and switch to treemap chart, by selecting **View as Treemap Chart**.
The following picture shows an example where I am using the treemap chart representation instead of the default one, the ring chart.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/02/baobab3.png)
To scan the filesystem go to **Analyzer** and select Scan Filesystem, or if you are lazy like go for the smart way, hit **CTRL+F** on your keyboard.
Both ways work and do the same job, it is up to you which one you like to use. Shortcuts are very useful, practical and they save alot of time, but it is hard to memorize them all when you dont use the tool everyday.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/02/baobab4.png)
Now, how about scanning a folder? It is very easy, go under Analyzer, select Scan A Folder and select the folder you want to scan, or hit **CTRL+O**. Is there an easier way? Yes it is! Can you see the Scan a Folder button? Just click it and the scan on the specified folder will begin.
The following picture shows the results of my python-nmap-0.1.4 folder scanning. I get very useful information presented in a beautiful and simple way.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/02/baobab5.png)
You learned to scan the Home folder, the Filesystem and Folders. There is a very important feature about this tool that you dont know yet, but I am sure you will find it yourself. Do you have any remote folder that you want to scan? Think about it.
--------------------------------------------------------------------------------
via: http://www.unixmen.com/linux-basics-analyze-disk-usage-ubuntu-linux/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出