mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
Merge branch 'master' of https://github.com/LCTT/TranslateProject
This commit is contained in:
commit
17af541227
@ -0,0 +1,316 @@
|
||||
Ubuntu 13.10安装后你要做的8件事
|
||||
================================================================================
|
||||
|
||||
Ubuntu 13.10 已经发布了,对于那些打算安装“纯净版”的用户,安装完系统后你可以考虑下面的8件事。
|
||||
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/ubuntu13.10-saucy-salamander.jpg)
|
||||
|
||||
### 1. 安装一些绚丽的小零件 ###
|
||||
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/indicator-systemload.png)
|
||||
|
||||
**系统负载** 是系统监控工具GNOME里的一个小应用。它能在面板上展示出CPU、内存、网络使用、硬盘I/O等信息。点击下面的按钮从Ubuntu软件中心安装。
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][1]
|
||||
|
||||
或者通过命令行进行安装:
|
||||
|
||||
sudo apt-get install indicator-multiload
|
||||
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/indicator-cpufreq.png)
|
||||
|
||||
**CPU频率**是一款等效于“GNOME-CPU调频”的应用。你可以实时的调整CPU的频率。点击下面的按钮从Ubuntu软件中心安装。
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][2]
|
||||
|
||||
或者通过命令行安装:
|
||||
|
||||
sudo apt-get install indicator-cpufreq
|
||||
|
||||
**我的天气**是一款显示当前天气的应用,它能显示5天内的预报并支持四大天气服务站点:OpenWeatherMap, Yahoo, Wunderground 和 World Weather Online。
|
||||
|
||||
通过命令行进行安装:
|
||||
|
||||
sudo add-apt-repository ppa:atareao/atareao
|
||||
sudo apt-get update
|
||||
sudo apt-get install my-weather-indicator
|
||||
|
||||
![](https://dl.dropboxusercontent.com/u/1113424/img/variety-wallpaper-changer.jpg)
|
||||
|
||||
|
||||
[**Variety**][3]一款带有AppIndicator的应用,但是基本上你只需要配置一次就可以用指示器来使用此软件了。Variety是一款很酷的壁纸更换的应用,他能在设定的时间内自动下载并更换壁纸。用起来就有种高帅富的感觉。壁纸库每天都会有更新,你可以很快的切换到另外一个壁纸,收藏自己喜欢的壁纸,留着日后再用。
|
||||
|
||||
通过以下命令行安装:
|
||||
|
||||
sudo add-apt-repository ppa:peterlevi/ppa
|
||||
sudo apt-get update
|
||||
sudo apt-get install variety
|
||||
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/diodon-indicator.png)
|
||||
|
||||
你可能还需要一个剪切板管理器,试试**Diodon** 吧,这是款轻量型软件,支持文件、图像等。点击下面的按钮安装:
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][4]
|
||||
|
||||
或者通过命令行安装:
|
||||
|
||||
sudo apt-get install diodon diodon-plugins
|
||||
|
||||
### 2. 设置 Unity ###
|
||||
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/unity-tweak-tool.png)
|
||||
|
||||
**Unity Tweak Tool**让用户能改变一些Unity设置,比如:自动隐藏、窗口最大化、“触发角”、Dash、Unity启动器或平视显示器、改变GTK或图标主题、改变字体和大小,移动窗口控制器到右边等。
|
||||
|
||||
|
||||
点击下面的按钮从软件中心安装
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][5]
|
||||
|
||||
或者通过命令行安装
|
||||
|
||||
sudo apt-get install unity-tweak-tool
|
||||
|
||||
### 3. 隐私设置 ###
|
||||
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/ubuntu13.10-privacy-security_2.png)
|
||||
|
||||
你应该知道可以通过默认的Dash来查看最近访问的文件和其他的一些文件。系统设置可以通过设置**“安全和隐私”**来选择显示的文件类型。这样就不用看到那些软件、文件夹之类的了。你也可以清除最近的记录。
|
||||
|
||||
此外你在使用搜索框的时候,可以设定不显示网络搜索的结果。但是这会屏蔽掉所有的网络信息。所以当你仅仅是想**“屏蔽购物推荐”**的话,你可以输入下面的命令:
|
||||
|
||||
gsettings set com.canonical.Unity.Lenses disabled-scopes "['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']"
|
||||
|
||||
更多插件屏蔽,点击[此处][6]
|
||||
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/indicator-privacy.png)
|
||||
|
||||
|
||||
另外一种在Ubuntu 13.10中设置隐私的方法是使用**隐私指示器**,这是一款让你快捷设置启用/屏蔽Zeitgeist 或者在线搜索结果的软件,并能清除Zeitgeist日志和最近文件(显示先边栏的“最近”里面)。
|
||||
|
||||
[**下载 Privacy Indicator**][7](此网页中含有deb文件下载)
|
||||
|
||||
### 4. 使用混合显卡功能###
|
||||
|
||||
Ubuntu的开发人员已经在Ubuntu 13.10 (和 12.04 LTS版 )中实现了混合显卡技术,下面你会看到相关设置的说明。
|
||||
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/nvidia-prime-nvsettings.png)
|
||||
|
||||
**Nvidia Optimus**:不幸的是,Linux平台下Nvidia显卡驱动并不完全支持Optimus,[更多][8]。
|
||||
|
||||
但是Ubuntu 13.10用了“nvidia-prime”包来过渡。这个包使默认支持Intel显卡芯片的Optimus平台也支持Nvidia显卡。通过下面指令你能Nvidia显卡一直处于工作状态,就是说没有办法让它停止工作来节能了。这样笔记本就会功耗更大和过热--——**对我而言,我是不会 用这个的,除非过热的问题解决了**,如果没有解决的话,你可以取消这个设置。
|
||||
|
||||
|
||||
再次不幸的是,这不是唯一的问题。你会发现画面分割和热插拔并不工作。所以,如果你想用多个显示器的话。你需要手动的在xorg.conf进行设置。这样的好处就是,你可以玩那些不支持Intel显卡的游戏,用支持VDPAU的媒体播放器等。
|
||||
|
||||
即便如此,如果你还是想尝试一下的话,请确保你使用的是默认的显示管理器LightDM,并不是其他的,如GDN等。此外,如果你安装了Bumblebee,你需要卸载掉它:
|
||||
|
||||
sudo apt-get purge bumblebee* bbswitch-dkms
|
||||
|
||||
然后安装最新的Nvidia驱动和“nvidia-prime”:
|
||||
|
||||
sudo apt-get install nvidia-319 nvidia-settings-319 nvidia-prime
|
||||
|
||||
最后重启电脑(重启X是不够)。
|
||||
|
||||
如果你想撤销这些改变,你可以输入通过下面的指令:
|
||||
|
||||
sudo apt-get remove nvidia-319 nvidia-settings-319 nvidia-prime
|
||||
|
||||
然后重启
|
||||
|
||||
**AMD 混合显卡**:我并没有测试过这个,因为我没有支持AMD显卡的系统,但是根据Ubuntu wiki上的[**HybridGraphics**][9]包说明,应该是没有问题。(再次申明,我并不确定,因为我没试过)
|
||||
|
||||
|
||||
要想在Ubuntu 13.10下获得合适的AMD显卡支持。你需要安装最新的 fglrx驱动和fglrx-pxpress:
|
||||
|
||||
sudo apt-get install fglrx fglrx-pxpress
|
||||
|
||||
并重启电脑。重启X是没有用的
|
||||
|
||||
### 5. 延长电池寿命 ###
|
||||
|
||||
有两个工具可以延长电池的寿命:laptop-mode-tools 和 TLP。这两个工具都是为了延长电池寿命,[**TLP**][10] 似乎效果更好一点,但是TLP仅有PPA,如果你不想添加APPs时,就安装 laptop-mode-tools吧。
|
||||
|
||||
注意:**不要同时安装laptop-mode-tools和TLP**
|
||||
|
||||
点击下面的按钮安装laptop-mode-tools。
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][11]
|
||||
|
||||
或者通过命令行安装:
|
||||
|
||||
sudo apt-get install laptop-mode-tools
|
||||
|
||||
输入下面命令安装TLP:
|
||||
|
||||
sudo add-apt-repository ppa:linrunner/tlp
|
||||
sudo apt-get update
|
||||
sudo apt-get install tlp tlp-rdw
|
||||
sudo tlp start
|
||||
|
||||
这两个工具都不需要额外的配置。
|
||||
|
||||
另外一种节约电池的方法是**Bumblebee**(是允许在独显运行软件或游戏的工具),Bumblebee是一款支持笔记本上双显卡智能切换的软件。能停止Nvidia显卡,当你不需要使用的时候。
|
||||
|
||||
**注意:如果你想在显卡自动切换技术的第4步采用混合显卡时,请不要安装Bumblebee**
|
||||
|
||||
点击下面的按钮进行安装:
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][12]
|
||||
|
||||
sudo apt-get install bumblebee bumblebee-nvidia
|
||||
|
||||
然后重启。
|
||||
|
||||
在Ubuntu中有个禁止"optirun"工作的[**bug**][13]。通过下面的命令解决这个问题。
|
||||
|
||||
- 32位系统
|
||||
|
||||
sudo ln -s /usr/lib/i386-linux-gnu/libturbojpeg.so.0 /usr/lib/i386-linux-gnu/libturbojpeg.so
|
||||
|
||||
- 64位系统
|
||||
|
||||
sudo ln -s /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0 /usr/lib/x86_64-linux-gnu/libturbojpeg.so
|
||||
|
||||
当你想用Nvidia显卡时,运行:
|
||||
|
||||
optirun APP-EXECUTABLE
|
||||
|
||||
将"APP-EXECUTABLE"替换为你要运行的软件或者游戏的可执行文件。
|
||||
|
||||
### 6. 安装 编解码器, Java 和 加密DVD播放 ###
|
||||
|
||||
如果需要播放更多类型的音频视频文件,那就安装 **Ubuntu Restricted Extras** 吧
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][14]
|
||||
|
||||
或者输入下面的命令行:
|
||||
|
||||
sudo apt-get install ubuntu-restricted-extras
|
||||
|
||||
我建议再安装一下“libavformat 和 libavcodec的无限制版”,这样当你使用一些编辑器或者转换器的时候就不会出现丢失编码丢失的情况。点击下面的按钮进行安装:
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][15]
|
||||
|
||||
或者输入一下命令行:
|
||||
|
||||
sudo apt-get install libavformat-extra-53 libavcodec-extra-53
|
||||
|
||||
你可能需要Java,但是你得明确你到底需要的是什么,不少用户仅仅使用**OpenJRE**和java游览器插件,你可以点击下面的按钮安装:
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][16]
|
||||
|
||||
或者输入命令行:
|
||||
|
||||
sudo apt-get install icedtea-7-plugin openjdk-7-jre
|
||||
|
||||
如果用于开发,你可能需要**OpenJDK**,点击下面的按钮进行安装:
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][17]
|
||||
|
||||
或者输入下面的命令行:
|
||||
|
||||
sudo apt-get install openjdk-7-jdk
|
||||
|
||||
|
||||
如果你因为某些原因需要安装**Oracle Java**(包含JDK,JRE,游览器插件的包)时,你可以通过下面的命令进行安装[**Oracle Java 7**][18] :
|
||||
|
||||
sudo add-apt-repository ppa:webupd8team/java
|
||||
sudo apt-get update
|
||||
sudo apt-get install oracle-java7-installer
|
||||
|
||||
|
||||
**加密DVD播放**: 由于现在很多安装包都能在官方的库中找到,或者有更好的替代物,Medibuntu也渐渐的[**被废弃**][19]了。但是在播放加密视频时仍然需要livdvdcss包。
|
||||
|
||||
输入以下指令启动加密DVD播放功能:
|
||||
|
||||
sudo apt-get install libdvdread4
|
||||
sudo /usr/share/doc/libdvdread4/install-css.sh
|
||||
|
||||
### 7. 安装最新的 Rhythmbox 和 VLC ###
|
||||
|
||||
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/rhythmbox-n-vlc.png)
|
||||
|
||||
在Ubuntu13.10中,Rhythmbox 和 VLC并没有升级到最新的版本,如果你想安装最新的版本,你可以使用PPAs
|
||||
|
||||
请注意:升级Rhythmbox后,里面的[**第三方插件**][20]将停止工作。Rhythmbox插件可以正常的运行。
|
||||
|
||||
**Rhythmbox**(Ubuntu 13.10下的版本:2.99.1,PPA中的版本:3.0.1):
|
||||
|
||||
sudo add-apt-repository ppa:jacob/media
|
||||
sudo apt-get update
|
||||
sudo apt-get install rhythmbox
|
||||
|
||||
**VLC**(Ubuntu 13.10下的版本:2.0.8,PPA中的版本:2.1.0):
|
||||
|
||||
sudo add-apt-repository ppa:videolan/stable-daily
|
||||
sudo apt-get update
|
||||
sudo apt-get install vlc
|
||||
|
||||
### 8. Tweak Nautilus: 打开被禁用的递归搜索和文件快速预览 ###
|
||||
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/nautilus-no-recursive.png)
|
||||
|
||||
在Nautilus V3.6之后,提前键入查找功能就被去除掉了。之后版本的搜索就只是在当前文件夹和其子文件下进行搜索。这用起来就很不爽了,如果你为此感到烦恼的话就安装Nautilus的补丁来启用[**被禁用的递归搜索**][21](你可以很方便的启用它)。
|
||||
|
||||
**用下面的命令将Nautilus升级到可以禁用递归搜过的版本**
|
||||
|
||||
sudo add-apt-repository ppa:dr3mro/personal
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade
|
||||
nautilus -q
|
||||
|
||||
**然后使用下面的命令禁用递归搜索**
|
||||
|
||||
gsettings set org.gnome.nautilus.preferences enable-recursive-search false
|
||||
|
||||
如果你还想恢复递归搜索的功能,使用下面的命令行:
|
||||
|
||||
gsettings set org.gnome.nautilus.preferences enable-recursive-search true
|
||||
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/gnome-sushi.png)
|
||||
|
||||
**GNOME Sushi**是一款快速预览的软件。点击下面的按钮安装。(会安装gnome-sushi 和 unoconv来实现预览)。
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][22]
|
||||
|
||||
或者输入命令行:
|
||||
|
||||
sudo apt-get install gnome-sushi unoconv
|
||||
|
||||
要使用这个软件,需选择一个文件(图片、文本文档、音乐文件等)然后点击SPACE按钮来预览。再次点击SPACE按钮或者关闭窗口可以关闭预览。
|
||||
|
||||
**现在!看完我们的介绍之后,你会选择哪个作为第一个安装的呢?**
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.webupd8.org/2013/10/8-things-to-do-after-installing-ubuntu.html
|
||||
|
||||
译者:[Timeszoro](https://github.com/Timeszoro) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:apt://indicator-multiload
|
||||
[2]:apt://indicator-cpufreq
|
||||
[3]:http://www.webupd8.org/2013/06/variety-wallpaper-changer-0415-released.html
|
||||
[4]:apt://diodon,diodon-plugins
|
||||
[5]:apt://unity-tweak-tool
|
||||
[6]:http://www.webupd8.org/2013/10/how-to-disable-amazon-shopping.html
|
||||
[7]:http://www.florian-diesch.de/software/indicator-privacy/
|
||||
[8]:http://www.webupd8.org/2013/08/using-nvidia-graphics-drivers-with.html
|
||||
[9]:https://wiki.ubuntu.com/X/Config/HybridGraphics#Known_issues
|
||||
[10]:http://www.webupd8.org/2013/04/improve-power-usage-battery-life-in.html
|
||||
[11]:apt://laptop-mode-tools
|
||||
[12]:apt://bumblebee,bumblebee-nvidia
|
||||
[13]:http://www.webupd8.org/2013/10/fix-bumblebee-libturbojpegso-issue-in.html
|
||||
[14]:apt://ubuntu-restricted-extras
|
||||
[15]:apt://libavformat-extra-53,libavcodec-extra-53
|
||||
[16]:apt://icedtea-7-plugin,openjdk-7-jre
|
||||
[17]:apt://openjdk-7-jdk
|
||||
[18]:http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
|
||||
[19]:http://gauvain.pocentek.net/node/61
|
||||
[20]:http://www.webupd8.org/2012/08/rhythmbox-third-party-plugins-ubuntu-ppa.html
|
||||
[21]:http://www.webupd8.org/2013/09/how-to-disable-recursive-search-in.html
|
||||
[22]:apt://gnome-sushi,unoconv
|
@ -1,317 +1,220 @@
|
||||
di - 比 df 更有用的磁盘信息工具
|
||||
===========================
|
||||
|
||||
================================================================================
|
||||
|
||||
如果你是个Linux命令行用户,你肯定会使用df命令检查文件系统的磁盘使用情况.尽管df是一个受欢迎的命令,但仍然不能提供一些高级的功能,如一个用户实际的磁盘可用空间,和各种有用的显示格式等.还有另一个命令行实用工具可用,不仅提供了这些高级功能也提供了df的所有特性.在本文中,我们将讨论磁盘信息工具 -- **di**
|
||||
如果你是个Linux命令行用户,你肯定会使用df命令检查文件系统的磁盘使用情况。尽管df是一个受欢迎的命令,但仍然不能提供一些高级的功能,如一个用户实际的磁盘可用空间,以及各种有用的显示格式等。还有另一个命令行实用工具可用,不仅提供了这些高级功能也提供了df的所有特性。在本文中,我们将讨论磁盘信息工具 -- **di**
|
||||
|
||||
**注释** - 如果你想了解 df 更多信息, 查看 [df命令教程][1].
|
||||
|
||||
### di - 磁盘信息工具 ###
|
||||
## di - 磁盘信息工具
|
||||
|
||||
![](http://mylinuxbook.com/wp-content/uploads/2013/10/di-main.png)
|
||||
|
||||
从这个di帮助手册页很明显的发现 di 提供了一些很有价值的特性,从而使得它值得被使用.让我们尝试一些这个工具实际的例子.
|
||||
从这个di帮助手册页很明显的发现 di 提供了一些很有价值的特性,值得一试。让我们看一些这个工具实际使用的例子。
|
||||
|
||||
### 测试环境 ###
|
||||
|
||||
- OS – Ubuntu 13.04
|
||||
|
||||
- Shell – Bash 4.2.45
|
||||
### 测试环境
|
||||
|
||||
- OS – Ubuntu 13.04
|
||||
- Shell – Bash 4.2.45
|
||||
- Application – di 4.30
|
||||
|
||||
### 一个简短的教程 ###
|
||||
## 一个简短的教程
|
||||
|
||||
下面是一些 di 工具的示例:
|
||||
|
||||
**1. 默认的输出**
|
||||
###1. 默认的输出
|
||||
|
||||
默认情况下di命令生成人们易读的输出格式
|
||||
|
||||
这里有个示例:
|
||||
|
||||
$ di
|
||||
|
||||
Filesystem Mount Size Used Avail %Used fs Type
|
||||
|
||||
/dev/sda6 / 28.1G 20.2G 6.5G 77% ext4
|
||||
|
||||
udev /dev 1.5G 0.0G 1.5G 0% devtmpfs
|
||||
|
||||
$ di
|
||||
Filesystem Mount Size Used Avail %Used fs Type
|
||||
/dev/sda6 / 28.1G 20.2G 6.5G 77% ext4
|
||||
udev /dev 1.5G 0.0G 1.5G 0% devtmpfs
|
||||
tmpfs /run 300.2M 0.9M 299.3M 0% tmpfs
|
||||
|
||||
所以你能发现用千兆字节(G)和兆字节(M)做磁盘使用情况的数据单位.这绝对是比 df 默认的输出产生的效果好.
|
||||
所以你能发现用千兆字节(G)和兆字节(M)做磁盘使用情况的数据单位。这绝对是比 df 默认的输出产生的效果好。(译注:df也可以输出带类似单位的显示,只是需要额外加参数 -h)
|
||||
|
||||
**2. 用 -A 选项打印类似挂载点,特殊设备名称等全部字段.
|
||||
###2. 用 -A 选项打印类似挂载点、特殊设备名称等全部字段
|
||||
|
||||
选项 -A可以用来极详细的打印挂载点,特殊设备名称等.
|
||||
选项 -A可以用来极详细的打印挂载点,特殊设备名称等。
|
||||
|
||||
这里有个示例:
|
||||
|
||||
$ di -A
|
||||
|
||||
Mount fs Type Filesystem
|
||||
|
||||
Options
|
||||
|
||||
Size Used Free %Used %Free
|
||||
|
||||
Size Used Avail %Used %Free
|
||||
|
||||
Size Used Avail %Used
|
||||
|
||||
Inodes Iused Ifree %Iused
|
||||
|
||||
/ ext4 /dev/sda6
|
||||
|
||||
rw,errors=remount-ro
|
||||
|
||||
28.1G 20.2G 8.0G 72% 28%
|
||||
|
||||
28.1G 21.6G 6.5G 77% 23%
|
||||
|
||||
26.7G 20.2G 6.5G 75%
|
||||
|
||||
1884160 389881 1494279 21%
|
||||
|
||||
/dev devtmpfs udev
|
||||
|
||||
rw,mode=0755
|
||||
|
||||
1.5G 0.0G 1.5G 0% 100%
|
||||
|
||||
1.5G 0.0G 1.5G 0% 100%
|
||||
|
||||
1.5G 0.0G 1.5G 0%
|
||||
|
||||
381805 571 381234 0%
|
||||
|
||||
/run tmpfs tmpfs
|
||||
|
||||
rw,noexec,nosuid,size=10%,mode=0755
|
||||
|
||||
300.2M 0.9M 299.3M 0% 100%
|
||||
|
||||
300.2M 0.9M 299.3M 0% 100%
|
||||
|
||||
300.2M 0.9M 299.3M 0%
|
||||
|
||||
$ di -A
|
||||
Mount fs Type Filesystem
|
||||
Options
|
||||
Size Used Free %Used %Free
|
||||
Size Used Avail %Used %Free
|
||||
Size Used Avail %Used
|
||||
Inodes Iused Ifree %Iused
|
||||
/ ext4 /dev/sda6
|
||||
rw,errors=remount-ro
|
||||
28.1G 20.2G 8.0G 72% 28%
|
||||
28.1G 21.6G 6.5G 77% 23%
|
||||
26.7G 20.2G 6.5G 75%
|
||||
1884160 389881 1494279 21%
|
||||
/dev devtmpfs udev
|
||||
rw,mode=0755
|
||||
1.5G 0.0G 1.5G 0% 100%
|
||||
1.5G 0.0G 1.5G 0% 100%
|
||||
1.5G 0.0G 1.5G 0%
|
||||
381805 571 381234 0%
|
||||
/run tmpfs tmpfs
|
||||
rw,noexec,nosuid,size=10%,mode=0755
|
||||
300.2M 0.9M 299.3M 0% 100%
|
||||
300.2M 0.9M 299.3M 0% 100%
|
||||
300.2M 0.9M 299.3M 0%
|
||||
384191 549 383642 0%
|
||||
|
||||
所以你可以看到所有的字段 -- 也可以用于调试目的 - 打印输出
|
||||
所以你可以看到所有的字段,可以用于调试目的时打印输出。
|
||||
|
||||
**3. 用 -a选项打印所有挂载设备.**
|
||||
###3. 用 -a选项打印所有挂载设备
|
||||
|
||||
这里是个示例:
|
||||
|
||||
$ di -a
|
||||
|
||||
Filesystem Mount Size Used Avail %Used fs Type
|
||||
|
||||
/dev/sda6 / 28.1G 20.2G 6.5G 77% ext4
|
||||
|
||||
udev /dev 1.5G 0.0G 1.5G 0% devtmpfs
|
||||
|
||||
devpts /dev/pts 0.0M 0.0M 0.0M 0% devpts
|
||||
|
||||
proc /proc 0.0M 0.0M 0.0M 0% proc
|
||||
|
||||
binfmt_misc /proc/sys/fs/bi 0.0M 0.0M 0.0M 0% binfmt_misc
|
||||
|
||||
tmpfs /run 300.2M 0.9M 299.3M 0% tmpfs
|
||||
|
||||
none /run/lock 0.0M 0.0M 0.0M 0% tmpfs
|
||||
|
||||
none /run/shm 0.0M 0.0M 0.0M 0% tmpfs
|
||||
|
||||
none /run/user 0.0M 0.0M 0.0M 0% tmpfs
|
||||
|
||||
gvfsd-fuse /run/user/himan 0.0M 0.0M 0.0M 0% fuse.gvfsd-fuse
|
||||
|
||||
sysfs /sys 0.0M 0.0M 0.0M 0% sysfs
|
||||
|
||||
none /sys/fs/cgroup 0.0M 0.0M 0.0M 0% tmpfs
|
||||
|
||||
none /sys/fs/fuse/co 0.0M 0.0M 0.0M 0% fusectl
|
||||
|
||||
none /sys/kernel/deb 0.0M 0.0M 0.0M 0% debugfs
|
||||
|
||||
$ di -a
|
||||
Filesystem Mount Size Used Avail %Used fs Type
|
||||
/dev/sda6 / 28.1G 20.2G 6.5G 77% ext4
|
||||
udev /dev 1.5G 0.0G 1.5G 0% devtmpfs
|
||||
devpts /dev/pts 0.0M 0.0M 0.0M 0% devpts
|
||||
proc /proc 0.0M 0.0M 0.0M 0% proc
|
||||
binfmt_misc /proc/sys/fs/bi 0.0M 0.0M 0.0M 0% binfmt_misc
|
||||
tmpfs /run 300.2M 0.9M 299.3M 0% tmpfs
|
||||
none /run/lock 0.0M 0.0M 0.0M 0% tmpfs
|
||||
none /run/shm 0.0M 0.0M 0.0M 0% tmpfs
|
||||
none /run/user 0.0M 0.0M 0.0M 0% tmpfs
|
||||
gvfsd-fuse /run/user/himan 0.0M 0.0M 0.0M 0% fuse.gvfsd-fuse
|
||||
sysfs /sys 0.0M 0.0M 0.0M 0% sysfs
|
||||
none /sys/fs/cgroup 0.0M 0.0M 0.0M 0% tmpfs
|
||||
none /sys/fs/fuse/co 0.0M 0.0M 0.0M 0% fusectl
|
||||
none /sys/kernel/deb 0.0M 0.0M 0.0M 0% debugfs
|
||||
none /sys/kernel/sec 0.0M 0.0M 0.0M 0% securityfs
|
||||
|
||||
所以你能看到与所有设备相关的所有信息,被打印出来了.
|
||||
所以你能看到与所有设备相关的所有信息,被打印出来了。
|
||||
|
||||
**4. 用 -c 选项用逗号作为值的分隔符**
|
||||
###4. 用 -c 选项用逗号作为值的分隔符
|
||||
|
||||
选项 -c 用命令分隔的值将附上双引号
|
||||
|
||||
这里是个示例:
|
||||
|
||||
$ di -c
|
||||
|
||||
s,m,b,u,v,p,T
|
||||
|
||||
/dev/sda6,/,28.1G,20.2G,6.5G,77%,ext4
|
||||
|
||||
udev,/dev,1.5G,0.0G,1.5G,0%,devtmpfs
|
||||
这里是个示例:
|
||||
|
||||
$ di -c
|
||||
s,m,b,u,v,p,T
|
||||
/dev/sda6,/,28.1G,20.2G,6.5G,77%,ext4
|
||||
udev,/dev,1.5G,0.0G,1.5G,0%,devtmpfs
|
||||
tmpfs,/run,300.2M,0.9M,299.3M,0%,tmpfs
|
||||
|
||||
确实如此,你可以看到打印了用逗号分隔符输出的值.
|
||||
如上,你可以看到打印了用逗号分隔符输出的值。(译注:这种输出便于作为其他程序的输入解析)
|
||||
|
||||
**5. 用 -g 选项通过千兆字节(G)打印大小**
|
||||
###5. 用 -g 选项通过千兆字节(G)打印大小
|
||||
|
||||
下面是个示例:
|
||||
|
||||
$ di -g
|
||||
|
||||
Filesystem Mount Gibis Used Avail %Used fs Type
|
||||
|
||||
/dev/sda6 / 28.1 20.2 6.5 77% ext4
|
||||
|
||||
udev /dev 1.5 0.0 1.5 0% devtmpfs
|
||||
|
||||
$ di -g
|
||||
Filesystem Mount Gibis Used Avail %Used fs Type
|
||||
/dev/sda6 / 28.1 20.2 6.5 77% ext4
|
||||
udev /dev 1.5 0.0 1.5 0% devtmpfs
|
||||
tmpfs /run 0.3 0.0 0.3 0% tmpfs
|
||||
|
||||
当然,你能看到所有与大小有关的值都用千兆字节(G)打印出来.
|
||||
当然,你能看到所有与大小有关的值都用千兆字节(G)打印出来。
|
||||
|
||||
同样的你可以用 -k 和 -m 选项来分别的显示千字节(K)大小和兆字节(M)大小.
|
||||
同样的你可以用 -k 和 -m 选项来分别的显示千字节(K)大小和兆字节(M)大小。
|
||||
|
||||
**6. 通过 -I 选项显示特定的文件系统类型的相关信息.
|
||||
###6. 通过 -I 选项显示特定的文件系统类型的相关信息
|
||||
|
||||
假设你想显示只跟tmpfs文件系统相关的信息.下面将告诉你如何用 -I 选项完成任务.
|
||||
|
||||
$ di -I tmpfs
|
||||
|
||||
Filesystem Mount Size Used Avail %Used fs Type
|
||||
|
||||
tmpfs /run 300.2M 0.9M 299.3M 0% tmpfs
|
||||
|
||||
none /run/lock 5.0M 0.0M 5.0M 0% tmpfs
|
||||
|
||||
none /run/shm 1.5G 0.0G 1.5G 0% tmpfs
|
||||
|
||||
none /run/user 100.0M 0.0M 100.0M 0% tmpfs
|
||||
假设你想显示只跟tmpfs文件系统相关的信息。下面将告诉你如何用 -I 选项完成任务。
|
||||
|
||||
$ di -I tmpfs
|
||||
Filesystem Mount Size Used Avail %Used fs Type
|
||||
tmpfs /run 300.2M 0.9M 299.3M 0% tmpfs
|
||||
none /run/lock 5.0M 0.0M 5.0M 0% tmpfs
|
||||
none /run/shm 1.5G 0.0G 1.5G 0% tmpfs
|
||||
none /run/user 100.0M 0.0M 100.0M 0% tmpfs
|
||||
none /sys/fs/cgroup 0.0M 0.0M 0.0M 0% tmpfs
|
||||
|
||||
Ok 你能看到只有tmpfs类型相关文件系统信息被输出并显示出来了.
|
||||
Ok 你能看到只有tmpfs类型相关文件系统信息被输出并显示出来了。
|
||||
|
||||
**7. 用 -n 选项跳过标题行的输出.
|
||||
###7. 用 -n 选项跳过标题行的输出
|
||||
|
||||
如果你正试图通过一个脚本(或程序)解析该命令的输出结果并希望 di 命令跳过显示的标题行,哪么用 -n 选项是绝佳的方法.
|
||||
如果你正试图通过一个脚本(或程序)解析该命令的输出结果并希望 di 命令跳过显示的标题行,那么用 -n 选项是绝佳的方法。
|
||||
|
||||
下面是个示例:
|
||||
|
||||
$ di -n
|
||||
|
||||
/dev/sda6 / 28.1G 20.2G 6.5G 77% ext4
|
||||
|
||||
udev /dev 1.5G 0.0G 1.5G 0% devtmpfs
|
||||
|
||||
$ di -n
|
||||
/dev/sda6 / 28.1G 20.2G 6.5G 77% ext4
|
||||
udev /dev 1.5G 0.0G 1.5G 0% devtmpfs
|
||||
tmpfs /run 300.2M 0.9M 299.3M 0% tmpfs
|
||||
|
||||
的确,你能发现输出中并没有显示标题行.
|
||||
如上,你能发现输出中并没有显示标题行。
|
||||
|
||||
**8. 通过 -t 选项在文件系统列表底下再打印一行总计行.*
|
||||
###8. 通过 -t 选项在文件系统列表底下再打印一行总计行
|
||||
|
||||
如果想要显示所有相关列的总数,用 -t 选项.
|
||||
如果想要显示所有相关列的总数,用 -t 选项。
|
||||
|
||||
示例:
|
||||
|
||||
$ di -t
|
||||
|
||||
Filesystem Mount Size Used Avail %Used fs Type
|
||||
|
||||
/dev/sda6 / 28.1G 20.2G 6.5G 77% ext4
|
||||
|
||||
udev /dev 1.5G 0.0G 1.5G 0% devtmpfs
|
||||
|
||||
tmpfs /run 300.2M 0.9M 299.3M 0% tmpfs
|
||||
|
||||
$ di -t
|
||||
Filesystem Mount Size Used Avail %Used fs Type
|
||||
/dev/sda6 / 28.1G 20.2G 6.5G 77% ext4
|
||||
udev /dev 1.5G 0.0G 1.5G 0% devtmpfs
|
||||
tmpfs /run 300.2M 0.9M 299.3M 0% tmpfs
|
||||
Total 29.9G 20.2G 8.3G 72%
|
||||
|
||||
观察到最后一行的值为所有文件系统的总数.
|
||||
观察到最后一行的值为所有文件系统的统计数据。
|
||||
|
||||
**9. 通过 -s 选项 排序输出.
|
||||
###9. 通过 -s 选项 排序输出
|
||||
|
||||
-s选项可用于排序该命令的输出结果
|
||||
-s选项可用于排序该命令的输出结果(译注:默认按照挂载点名称排序)
|
||||
|
||||
下面告诉你如何反向排序输出:
|
||||
|
||||
$ di -sr
|
||||
|
||||
Filesystem Mount Size Used Avail %Used fs Type
|
||||
|
||||
tmpfs /run 300.2M 0.9M 299.3M 0% tmpfs
|
||||
|
||||
udev /dev 1.5G 0.0G 1.5G 0% devtmpfs
|
||||
|
||||
$ di -sr
|
||||
Filesystem Mount Size Used Avail %Used fs Type
|
||||
tmpfs /run 300.2M 0.9M 299.3M 0% tmpfs
|
||||
udev /dev 1.5G 0.0G 1.5G 0% devtmpfs
|
||||
/dev/sda6 / 28.1G 20.2G 6.5G 77% ext4
|
||||
|
||||
这样你可以在-s后添加子选项'r'反向排序输出.
|
||||
你也可以在-s后添加子选项'r'逆序排序输出。
|
||||
|
||||
类似的,你可以使用 -s 选项做一些其他类型的排序.以下是摘自man手册供您参考:
|
||||
|
||||
-s sort-type
|
||||
-s 排序方式
|
||||
|
||||
Use sort-type to sort the output. The out‐
|
||||
可以指定排序方式。默认排序方式的按照挂载点的名称进行排序。支持如下的排序方式:
|
||||
m :按照挂载点名称排序(默认)
|
||||
n :不排序(即按照在挂载表/etc/fstab中的顺序)
|
||||
s :按照特殊设备名称
|
||||
t :按照文件系统类型
|
||||
r :逆序排序
|
||||
|
||||
排序方式可以组合使用,如: di --stsrm :按照类型、设备、挂载点逆序排序。di --strsrm :按照类型、设备逆序、挂载点逆序排序。
|
||||
|
||||
|
||||
put of di is normally sorted by mount
|
||||
###10. 通过 -f 选项指定输出格式
|
||||
|
||||
point. The following sort flags may be
|
||||
你可以通过结合-f选项和其子选项指定输出格式字符串。
|
||||
|
||||
used to change the sort order: m – by mount
|
||||
|
||||
point (default); n – leave unsorted (as it
|
||||
|
||||
appears in the mount table); s – by special
|
||||
|
||||
device name; t – by filesystem type; r -
|
||||
|
||||
reverse the sort order.
|
||||
|
||||
|
||||
|
||||
These sort options may be combined in any
|
||||
|
||||
order. e.g.: di -stsrm – by type, special,
|
||||
|
||||
reversed mount; di -strsrm – by type,
|
||||
|
||||
reversed special, mount.
|
||||
|
||||
**10. 通过 -f 选项指定输出格式.**
|
||||
|
||||
你可以通过结合-f选项和其子选项指定输出格式字符串.
|
||||
|
||||
例如, 用 -fm, 打印挂载点的名称.
|
||||
例如,用 -fm,打印挂载点的名称。
|
||||
|
||||
示例:
|
||||
|
||||
$ di -fm
|
||||
|
||||
Mount
|
||||
|
||||
/
|
||||
|
||||
/dev
|
||||
|
||||
$ di -fm
|
||||
Mount
|
||||
/
|
||||
/dev
|
||||
/run
|
||||
|
||||
因此你可以看到只有挂载点的名字被打印出来.
|
||||
如上你可以看到只有挂载点的名字被打印出来。
|
||||
|
||||
同样的,打印文件系统的类型,用 -ft
|
||||
同样的,打印文件系统的类型,用 -ft
|
||||
|
||||
示例:
|
||||
|
||||
$ di -ft
|
||||
|
||||
fsType
|
||||
|
||||
ext4
|
||||
|
||||
devtmpf
|
||||
|
||||
$ di -ft
|
||||
fsType
|
||||
ext4
|
||||
devtmpf
|
||||
tmpfs
|
||||
|
||||
如果你想快速查找,这里有个其他可用的格式选项截图.
|
||||
@ -328,31 +231,29 @@ Ok 你能看到只有tmpfs类型相关文件系统信息被输出并显示出来
|
||||
|
||||
- [下载链接][4]
|
||||
|
||||
命令行工具 di 也能通过apt, yum等命令在命令行下载和安装.Ubuntu用户也可以从Ubuntu 软件中心下载这个命令.
|
||||
命令行工具 di 也能通过apt、yum等命令在命令行下载和安装。Ubuntu用户也可以从Ubuntu 软件中心下载这个命令。
|
||||
|
||||
### 优点 ###
|
||||
|
||||
- 提供了许多高级功能
|
||||
|
||||
- 提供了许多高级功能
|
||||
- 跨平台
|
||||
|
||||
### 缺点 ###
|
||||
|
||||
- 在大多数的Linux发行版没有预装.
|
||||
|
||||
- 在大多数的Linux发行版没有预装
|
||||
- 大量选项需要学习
|
||||
|
||||
### 结论 ###
|
||||
|
||||
最后,di命令提供了一些非常有用的特性,比df命令更强大.如果你正在寻找一个类似df,但比df更高级的关于磁盘信息的命令行工具,那么di是最理想的选择.试试吧,包你满意!!!
|
||||
最后,di命令提供了一些非常有用的特性,比df命令更强大。如果你正在寻找一个类似df,但比df更强大的关于磁盘信息的命令行工具,那么di是最理想的选择。试试吧,包你满意!!!
|
||||
|
||||
**你试过di或任何其他类似df工具?请跟我们分享你的经验!**
|
||||
**你试过di或任何其他类似df工具?请跟我们分享你的经验!**
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://mylinuxbook.com/di-a-disk-information-utility/
|
||||
|
||||
译者:[Luoxcat](https://github.com/Luoxcat) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[Luoxcat](https://github.com/Luoxcat) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -1,64 +0,0 @@
|
||||
l3b2w1 translaing……
|
||||
10 Best Quotes from Linus Torvalds' Keynote at LinuxCon Europe
|
||||
================================================================================
|
||||
![](http://www.linux.com/images/stories/41373/Linus-and-Dirk.jpg)
|
||||
|
||||
*Linus Torvalds and Dirk Hohndel on stage at LinuxCon Europe in Edinburgh.*
|
||||
|
||||
Linux creator Linus Torvalds took the stage today at [LinuxCon Europe][1] in Edinburgh with Intel’s Chief Linux and Open Source Technologist Dirk Hohndel to discuss the present and future of Linux and answer questions from the community. They covered a range of topics including the upcoming 3.12 kernel release, the ideal characteristics of a kernel maintainer, the issues that keep Linus up at night, gaming on the Linux desktop, and more.
|
||||
|
||||
Here are 10 of Linus’s best quotes, in the order that he said them, from Wednesday morning’s keynote.
|
||||
|
||||
1. Linus is happy with the current timing of releases every 3 months because it allows developers to take their time building new features. If they miss the merge window, it’s not very long until the next one comes so they don’t feel rushed to send in their code.
|
||||
|
||||
**“Don't hurry your code. Make sure it works well and is well designed. Don't worry about timing.”**
|
||||
|
||||
2. The rapid pace of change also allows developers to merge their code quickly and move on.
|
||||
|
||||
**"Developers have the attention spans of slightly moronic woodland creatures."**
|
||||
|
||||
**3. “One of the most important things for a maintainer isn't that he's a super engineer. It’s that you're responsive and people can rely on you being there 24/7, 52 weeks a year.”**
|
||||
|
||||
It’s very difficult for a young developer to become a maintainer because it takes a few years for the community to trust that you’ll be around for a while. That said, once you’ve proven you’re reliable, it’s easy to become a maintainer because it’s a hard job. You have to be there all the time.
|
||||
|
||||
4. Dirk: “What keeps you up at night?”
|
||||
|
||||
Linus: Bugs in the code and other technical problems don’t worry him as much.
|
||||
|
||||
**“The thing with technology is if you do something stupid you can fix it.”**
|
||||
|
||||
5. What really keeps Linus up at night are the social issues and problems with the development process.
|
||||
|
||||
**“When tempers flare it can be really stressful for a few days. I have flare-ups and that works fine for me… Other people tend to mull over things. It eats at them for weeks on end, and those issues tend to be the painful ones.”**
|
||||
|
||||
6. Linus takes a Darwinistic view when it comes to convincing companies to contribute to the kernel or use open source software. They either see the benefits of open source or they suffer the economic consequences.
|
||||
|
||||
**“I do open source because it's fun and it works… Companies who work with the kernel community will waste less time and they'll just work better.”**
|
||||
|
||||
**7. “If you're a company that thinks your tiny change to the kernel is what gives you a competitive edge, you'll probably be facing economic problems. You'd be much better off worrying about making the best damn hardware for the lowest price.”**
|
||||
|
||||
![](http://www.linux.com/images/stories/41373/Linus-Torvalds-LinuxCon-Europe.jpg)
|
||||
|
||||
*Linux creator Linus Torvalds answers audience questions at LinuxCon Europe, 2013.*
|
||||
|
||||
8. He had a few things to say about the state of Linux on the desktop. It’s one area that Linux could still really see some improvement. But distribution infighting has become a problem.
|
||||
|
||||
**“I started Linux because I wanted to see it on the desktop... I wish people would work together better ... and make a really nice login screen.”**
|
||||
|
||||
9. Valve’s Steam for Linux is the best opportunity to help the Linux desktop, he said. They’ll do this by setting a standard for Linux distributions that want to enable gaming on their platforms.
|
||||
|
||||
**“It's the best model for standardization. Standards should not be people sitting in a smoky room… and writing papers. It's being successful enough to drive the market.”**
|
||||
|
||||
10. On diversity, Linus said he would like to see the kernel community grow to include more women and developers from different geographies.
|
||||
|
||||
**“We have very few women. But I'm not very worried. We used to have this discussion about not having enough Japanese developers. We can solve this but it will take time.”**
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linuxfoundation.org/news-media/blogs/browse/2013/10/10-best-quotes-linus-torvalds-keynote-linuxcon-europe
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://events.linuxfoundation.org/events/linuxcon-europe
|
@ -0,0 +1,107 @@
|
||||
How to Set Up Secure Remote Networking with OpenVPN on Linux, Part 1
|
||||
================================================================================
|
||||
It's always been prudent to wrap a warm comfy layer of encryption over your Internet travels to foil snoops of all kinds, and with our own government slurping up every bit wholesale it's more crucial than ever. OpenVPN is the top choice for protecting networking over untrusted networks. Today we'll learn a quick way to set up OpenVPN so you can securely access your home server when you're on the road.
|
||||
|
||||
A quick note on VPNs: there are many commercial VPNs that aren't worth the bits they're printed on. They're little better than SSL-protected Web sites, because they trust all clients. A true VPN (virtual private network) connects two trusted endpoints over untrusted networks. You can't just log in from whatever random PC you find, and this is good because (presumably) you understand that logging in to your private network from an infected host is a bad thing to do, no matter how secure the connection is. So you have to configure both your server and client.
|
||||
|
||||
### OpenVPN Quickstart ###
|
||||
|
||||
You need two computers on different subnets, like a wired and wireless PC on the same network (or a couple of Linux guests in Virtualbox), and you need to know the IP addresses of both PCs. Let's call our example computers Studio and Shop. Install OpenVPN on both of them. OpenVPN is included in most Linux distributions, so you can install it with your favorite package manager. This example is for Debian, Ubuntu, and their myriad descendants:
|
||||
|
||||
$ sudo apt-get install openvpn openvpn-blacklist
|
||||
|
||||
That installs the server and a little program to check the blacklist of compromised keys. You must install the blacklist checker! Because once upon a time Debian distributed a [broken version of OpenSSL][1] which had a broken random number generator, so keys created with this are assumed to be too vulnerable to trust. The random number generator was not really random, but predictable. This happened way back in 2008, and everyone who used the defective OpenSSL was supposed to hunt down and replace their weak keys. Even though it's been over five years, it's cheap insurance to use the blacklist checker.
|
||||
|
||||
Now let's test it by creating an unencrypted tunnel between our two PCs. First ping each machine to make sure they're talking to each other. Then make sure that OpenVPN is not running, because we're going to start it manually:
|
||||
|
||||
$ ps ax|grep openvpn
|
||||
|
||||
If it is, kill it. Let's say that Studio's IP address is 192.168.1.125, and Shop's is 192.168.2.125. Open an unencrypted tunnel from Studio to Shop:
|
||||
|
||||
$ sudo openvpn --remote 192.168.2.125 --dev tun0 --ifconfig 10.0.0.1 10.0.0.2
|
||||
|
||||
Then from Shop to Studio:
|
||||
|
||||
$ sudo openvpn --remote 192.168.1.125 --dev tun0 --ifconfig 10.0.0.2 10.0.0.1
|
||||
|
||||
When you make a successful connection you'll see something like this:
|
||||
|
||||
Wed Oct 16 2013 ******* WARNING *******: all encryption and authentication
|
||||
features disabled -- all data will be tunnelled as cleartext
|
||||
Wed Oct 16 2013 TUN/TAP device tun0 opened
|
||||
Wed Oct 16 2013 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
|
||||
Wed Oct 16 2013 /sbin/ifconfig tun0 10.0.0.1 pointopoint 10.0.0.2 mtu 1500
|
||||
Wed Oct 16 2013 UDPv4 link local (bound): [undef]
|
||||
Wed Oct 16 2013 UDPv4 link remote: [AF_INET]192.168.2.125:1194
|
||||
Wed Oct 16 2013 Peer Connection Initiated with [AF_INET]192.168.2.125:1194
|
||||
Wed Oct 16 2013 Initialization Sequence Completed
|
||||
|
||||
"Initialization Sequence Completed" are the magic words that confirm you did it right. You should be able to ping back and forth with the tunnel addresses, ping 10.0.0.1 and ping 10.0.0.2. When you build your tunnel you may use whatever IP addresses you want that don't overlap with your existing network. To close your tunnel press Ctrl+c.
|
||||
|
||||
Just for fun open an SSH session over your tunnel. Figure 1 shows a successful SSH login over a VPN tunnel, and it also demonstrates the fancy Message of the Day from [Put a Talking Cow in Your Linux Message of the Day][1]:
|
||||
|
||||
$ ssh carla@10.0.0.2
|
||||
|
||||
![](http://www.linux.com/images/stories/41373/SSH-OpenVPN.jpg)
|
||||
|
||||
*Figure 1: A successful SSH session over a VPN tunnel, and a fancy MOTD.*
|
||||
|
||||
Hurrah, it works!
|
||||
|
||||
### Encrypted VPN Tunnel ###
|
||||
|
||||
This is all fun and exciting, but pointless without encryption, so we'll set up a simple static key configuration. It's not as strong as a proper public key infrastructure (PKI) with root certificates and revocations and all that good stuff, but it's a good-enough solution for the lone nerd needing to call home from the road. OpenVPN helpfully includes a command to create the static key, so create a directory to store the key in, create the key, and make it read-only for the file owner:
|
||||
|
||||
$ sudo mkdir /etc/openvpn/keys/
|
||||
$ sudo openvpn --genkey --secret /etc/openvpn/keys/static.key
|
||||
$ sudo chmod 0400 /etc/openvpn/keys/static.key
|
||||
|
||||
This is a plain-text key that you can open in a text editor and look at if you're curious, and you can name it anything you want; you don't have to call it "static.key". Copy this key to both computers-- yes, the same key. It's not a private-public key pair, but just one single shared key.
|
||||
|
||||
Now we'll create some simple barebones configuration files for each computer. (On Debuntu etc. there are no default configuration files, but rather a wealth of example files in/usr/share/doc/openvpn/.) In my little test tab Studio is the server, and Shop is the wandering laptop that will log into the server. My server configuration file is/etc/openvpn/studio.conf, and this is all it has:
|
||||
|
||||
# config for Studio
|
||||
dev tun
|
||||
ifconfig 10.0.0.1 10.0.0.2
|
||||
secret /etc/openvpn/keys/static.key
|
||||
|
||||
Make this file readable and writable only to the file owner:
|
||||
|
||||
$ sudo chmod 0600 /etc/openvpn/studio.conf
|
||||
|
||||
The configuration file on the client is similar, with the addition of the IP address of the server:
|
||||
|
||||
# config for Shop
|
||||
dev tun
|
||||
ifconfig 10.0.0.2 10.0.0.1
|
||||
secret /etc/openvpn/keys/static.key
|
||||
remote 192.168.1.125
|
||||
|
||||
Mind the order of your IP addresses on the ifconfig line, because they need to be in the order of local > remote. Now fire up OpenVPN on the server, specifying the server configuration file, and do the same on your client:
|
||||
|
||||
$ sudo openvpn /etc/openvpn/studio.conf
|
||||
$ sudo openvpn /etc/openvpn/shop.conf
|
||||
|
||||
You'll see the same "Initialization Sequence Completed" message for a successful connection, and you must also look for the absence of this message, which should have appeared when you created your un-encrypted tunnel:
|
||||
|
||||
******* WARNING *******: all encryption and authentication features disabled
|
||||
|
||||
Firewalls and Dynamic IP Addresses
|
||||
|
||||
OpenVPN itself is simple to configure. The biggest hassles are dealing with firewalls and dynamic IP addresses. There are a skillion different firewalls in the world, so I shall leave it as your homework to figure out how to get through it safely. OpenVPN wants port 1194, and then you'll want to have a forwarding rule that points to the computer you want to access.
|
||||
|
||||
Dynamic IP addresses are another hassle. [Dyn.com][3] is an inexpensive way to manage dynamic IP assignment from your ISP. Or you might be able to pay your ISP a few bucks to get a static address.
|
||||
|
||||
At this point you could stop and call it good, because you can manually start OpenVPN on your server and leave it waiting for you, take your laptop out into the world, and connect to your server whenever you want. However, there are some refinements we can add such as daemonizing OpenVPN on the server, using Network Manager to make the connection automatically, and the biggest missing piece in OpenVPN howtos: how to access your remote resources. So come back next week for the rest of the story.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linux.com/learn/tutorials/743590-secure-remote-networking-with-openvpn-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.debian.org/security/2008/dsa-1571
|
||||
[2]:http://www.linux.com/learn/tutorials/741573-put-a-talking-cow-in-your-linux-message-of-the-day
|
||||
[3]:http://dyn.com/dns/
|
@ -0,0 +1,93 @@
|
||||
How to Set Up Secure Remote Networking with OpenVPN on Linux, Part 2
|
||||
================================================================================
|
||||
Greetings fellow Linux users, and welcome to the second part of our glorious OpenVPN series. When last we met we learned how to set up a [simple OpenVPN encrypted tunnel][1] between a home server and a remote node, such as a laptop. Today we're adding refinements such as how to daemonize OpenVPN so we don't have to start it manually, use Network Manager for easy connecting to our remote server, and access services.
|
||||
|
||||
### Network Manager Integration ###
|
||||
|
||||
Network Manager is a nice OpenVPN client; just make sure you have the network-manager-openvpn plugin installed. We'll use our example configurations from part 1. Open your Network Manager configuration and find the window where you set up a new VPN connection. This looks different on KDE and GNOME, but the information you'll need is the same. When you start you need to see an OpenVPN connection type, like in figure 1; if you don't see this then the plugin is missing. (The figures are from GNOME.)
|
||||
|
||||
![](http://www.linux.com/images/stories/41373/figu-1-openvpn-nm.jpg)
|
||||
|
||||
*Figure 1: Creating a new OpenVPN client config in Network Manager.*
|
||||
|
||||
Figure 2 shows the main configuration screen. Starting from the top:
|
||||
|
||||
- Whatever name you want for this connection.
|
||||
- The Gateway is the IP address of your remote server.
|
||||
- Select Static Key from the dropdown menu,
|
||||
- Then use the filepicker to find the key you want to use.
|
||||
- This is not a directional key, so select None.
|
||||
- The remote and local IP addresses are your virtual OpenVPN addresses, from your /etc/openvpn/foo.conf files.
|
||||
- We did not set a password.
|
||||
- "Available to all users" or just you, whichever you want.
|
||||
|
||||
![](http://www.linux.com/images/stories/41373/fig-2-openvpn-nm-1.jpg)
|
||||
|
||||
*Figure 2: Main Network Manager configuration for OpenVN client.*
|
||||
|
||||
Save, and then use Network Manager to connect. Easy peasey! Now you can connect and disconnect with the click of a button (figure 3).
|
||||
|
||||
![](http://www.linux.com/images/stories/41373/fig-3-openvpn-nm-3.jpg)
|
||||
|
||||
### Run OpenVPN Automatically ###
|
||||
|
||||
It's simple to start up OpenVPN manually, but you might want to daemonize it on your server for convenience, and to survive accidental reboots. On Debian/Ubuntu/great-thundering-herd-of-spawn distros this is handled automatically: when you install OpenVPN it's configured to automatically start at boot. So, after installation you need to reboot, or start the daemon with one of these commands:
|
||||
|
||||
$ sudo /etc/init.d/openvpn start
|
||||
$ sudo service openvpn start
|
||||
|
||||
The first command is the old-fashioned way, and the second command uses the service command. service first appeared in Red Hat Linux back in the olden days, and if your distro doesn't install it by default it's probably lurking in the repos if you want to use it.
|
||||
|
||||
Fedora uses the systemd init system, in contrast to Ubuntu which uses Upstart, and Debian still uses good old SysV init. If you have multiple OpenVPN configurations in /etc/openvpn you can start each one selectively in systemd, like this:
|
||||
|
||||
# systemctl start systemctl start openvpn@studio.service
|
||||
|
||||
Where "studio.service" references our example /etc/openvpn/studio.conf file from part one. This invocation does not survive a reboot, so it's just like running openvpn /etc/openvpn/studio.conf, which is how we started OpenVPN sessions manually in part 1. You should be able to daemonize OpenVPN on systemd with chkconfig:
|
||||
|
||||
# service openvpn start
|
||||
# chkconfig openvpn on
|
||||
|
||||
That should daemonize OpenVPN in the usual way, which is as a monolithic daemon and not individually per .conf file in /etc/openvpn/. systemd supports the chkconfig and servicecommands so it should work. However, the distros that use systemd are quite variable, so if yours is different please let us know in the comments.
|
||||
|
||||
### Strengthening Your Connection ###
|
||||
|
||||
OpenVPN is robust and is good at maintaining a persistent connection, even with service interruptions. You can make your connection even stronger by adding these lines to your .conf files on clients and server:
|
||||
|
||||
persist-tun
|
||||
persist-key
|
||||
|
||||
These are helpful for laptop users who disrupt their connection a lot with power-save and being on the move.
|
||||
|
||||
### Now What? ###
|
||||
|
||||
Now that you have this all set up and working, what do you do with it? If you're used to using OpenSSH for remote operations you might be stuck in the SSH mindset of being able to log into specific machines and run applications. It doesn't work that way. Rather, think of OpenVPN as a virtual Ethernet cable to your server or LAN, all wrapped in a nice stout layer of encryption. You can run unencrypted and encrypted services over the same tunnel, and you only have to open a single hole in your firewall.
|
||||
|
||||
So you can run SSH in the way you're used to over your OpenVPN tunnel, and do remote administration and run applications. You can access network resources such as fileshares and Web applications. You can force all networking on the client to go through your VPN tunnel, but for this series I've assumed that you want to be able to use both your native and VPN networks.
|
||||
|
||||
So there you are on your trusty laptop and you can surf the Web, run SSH, do whatever you want on whatever network you're connected to. Then when you want to run something over your OpenVPN tunnel open it up and specify the IP address, like this:
|
||||
|
||||
$ ssh carla@10.0.0.1
|
||||
|
||||
Web applications are easy: point your Web browser to the virtual IP address of your OpenVPN server and log in as usual. For example, I run various Web services for testing on my home server. So I access Drupal at [http://10.0.0.1/drupal][2] and OwnCloud at [http://10.0.0.1/owncloud][3]. I use the nice gFTP graphical FTP client, so all I need to connect is the virtual IP address on the Host line, username, and password. Or use the command line:
|
||||
|
||||
$ ftp 10.0.0.1 21
|
||||
|
||||
You can administer your MySQL database from afar, using your own username and password:
|
||||
|
||||
$ mysql -h 10.0.0.1 -u admin -p
|
||||
|
||||
So the main thing you need to know is how to add the host specification to whatever command you want to run.
|
||||
|
||||
Obviously, this would all be easier with name services instead of having to use IP addresses, so one of these days we'll learn how to implement name services in OpenVPN. Meanwhile, please enjoy your nice secure OpenVPN tunnel.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linux.com/learn/tutorials/745233-how-to-set-up-secure-remote-networking-with-openvpn-on-linux-part-2
|
||||
|
||||
译者:[译者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/743590-secure-remote-networking-with-openvpn-on-linux
|
||||
[2]:http://10.0.0.1/drupal
|
||||
[3]:http://10.0.0.1/owncloud
|
@ -0,0 +1,56 @@
|
||||
Linus Torvalds 十句精彩语录 —— 来自 LinuxCon Europe 大会上的主旨发言
|
||||
================================================================================
|
||||
![](http://www.linux.com/images/stories/41373/Linus-and-Dirk.jpg)
|
||||
|
||||
*Linus Torvalds 和 Linus Torvalds 在 Edinburgh举行的 LinuxCon Europe 大会主席台上*
|
||||
|
||||
今天, Linux创始人 Linus Torvalds 坐在了在Edinburgh举办的[LinuxCon Europe][1]大会主席台上,
|
||||
陪同他的是来自Intel公司linux主管和开源技术专家 Dirk Hohndel, 二人一起探讨linux的现在和未来,并且回答了来自社区的问题。讨论的话题很广泛,包括即将发布的3.12版内核, 内核维护者的理想性格,
|
||||
还有能让 Linus 熬夜去解决的一些问题,linux桌面游戏, 等等。
|
||||
|
||||
以下是linus的十句精彩语录, 来自周三早上的主旨演讲, 按大会上发言时的顺序排列。
|
||||
|
||||
1. Linus 很满意当前内核版本三个月时间的发布周期,因为这样的话,开发者可以充分利用该时间段构建新的特性。即使他们错过了合并的窗口期, 等到下一次机会的到来,三个月的等待时间也不算很长, 他们也就不必急于提交代码了。
|
||||
**不必担心你的代码。确保代码运行良好,并得到精心设计就行了。不要担心期限问题。**
|
||||
|
||||
|
||||
2. 快速变更的步调还允许开发人员快速合并他们的代码, 然后继续前进。
|
||||
|
||||
**“开发者在注意力持续时间问题上,有点类似于迟钝的林地动物。”**
|
||||
|
||||
**3. “对于一个维护者来说,最重要的不在于你是不是一个优秀的工程师, 而在于你得负责任, 别人可以指望你, 7天的每一个24小时, 一年52个星期都是如此”。**
|
||||
|
||||
年轻的开发者想成为一名维护人员是比较困难的。要经过数年时间的观察期,让社区信任你, 注意到你确实坚守在这里。那即是说,只要你能证明自己是可信赖的,想成为一名维护者还是容易的(因为你经受住了时间的考验),毕竟这是一份棘手的工作
|
||||
4. Dirk:“是什么让你熬夜?”
|
||||
Linus: 代码中的Bug,还有其他一些技术问题, 不过这些问题并不难解决。
|
||||
|
||||
**“技术上的东西,可以这么说,即使你做了蠢事,但都是可以解决的。**
|
||||
5. 真正让Linus熬夜的是与开发进度有关的社交性问题。
|
||||
|
||||
**有时候情绪来了,可能好几天都比较有压力。 我也有脾气, 这对我来说没什么…… 。 但是其他人倾向于陷入到问题里边。结果浪费好几周时间,而且这些问题都挺让人纠结的。**
|
||||
|
||||
6.当提到说服大公司继续贡献内核代码并且使用开源软件, linus持达尔文观点。他们要么从开源获益,要么就得承受经济上的损失。
|
||||
|
||||
**我从事开源,因为有乐趣而且开源行得通……。 跟开源社区合作的公司会花费更少的时间并且使工作更有成效。**
|
||||
|
||||
**7. 如果你有一家公司, 对内核的微小的改动会给你带来竞争优势, 你很可能就要面对经济上的问题。最好还是考虑一下生产廉价的高质量的硬件好了。**
|
||||
![](http://www.linux.com/images/stories/41373/Linus-Torvalds-LinuxCon-Europe.jpg)
|
||||
*Linux 创始人 Linux Torvalds 回答现场观众的提问,2013 LinuxCon Europe大会。*
|
||||
8. 有关linux桌面版的现状,linus有几点要谈。linux桌面仍然可以改善。但是各个发行版之间的内讧已然是个问题。
|
||||
|
||||
**我写linux就是因为想让它在桌面上跑…… 我希望人们可以一起努力…… 把登陆界面搞得更漂亮一点**
|
||||
9. Linus说, Valve’s Steam有助于linux桌面版的开发,这是个极好的机会。他们要为打算运行游戏的Linux发行版制定一个标准。
|
||||
|
||||
**这是标准化的最好的模式。标准不是说人们就坐在房间里,写啊写。标准能够带来市场效益才称得上成功。**
|
||||
10. 针对多样性, linus说他希望看到内核社区的发展壮大, 有来自不同地区的更多的女性和开发者参与到其中。
|
||||
|
||||
**女性太少了。但是我并不担心。过去我们就讨论过来自日本的开发者太少的问题。这是可以解决,只是时间问题。**
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linuxfoundation.org/news-media/blogs/browse/2013/10/10-best-quotes-linus-torvalds-keynote-linuxcon-europe
|
||||
|
||||
译者:[译者ID](https://github.com/l3b2w1) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://events.linuxfoundation.org/events/linuxcon-europe
|
@ -1,457 +0,0 @@
|
||||
注:这篇文章的原文不小心被删了。所以我保留了英文部分。麻烦校正玩把英文部分删掉。谢谢。
|
||||
|
||||
|
||||
8 Things To Do After Installing Ubuntu 13.10 (Saucy Salamander)
|
||||
|
||||
Ubuntu 13.10安装后你要做的8件事
|
||||
================================================================================
|
||||
|
||||
Ubuntu 13.10 was released today and for those of you who plan on doing a clean install, here are 8 useful things to do after the installation.
|
||||
|
||||
Ubuntu 13.10 今天发布了,对于那些打算安装“纯净版”的用户,安装完系统后你可以考虑下面的8件事。
|
||||
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/ubuntu13.10-saucy-salamander.jpg)
|
||||
|
||||
### 1. Install some extra AppIndicators (applets) ###
|
||||
### 1. 安装一些绚丽的AppIndicators(应用) ###
|
||||
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/indicator-systemload.png)
|
||||
|
||||
**System Load Indicator** is a port of the popular System Monitor GNOME Panel applet and it can display CPU, memory, network usage, hard disk I/O and more on the panel. Install it from the Ubuntu Software Center by clicking the button below:
|
||||
|
||||
**System Load Indicator** 是系统监控工具GNOME里的一个小应用。它能在面板上展示出CPU、内存、网络使用、硬盘I/O等信息。点击下面的按钮从Ubuntu软件中心安装。
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][1]
|
||||
|
||||
Or, to install it via command line, use:
|
||||
|
||||
或者通过命令行进行安装:
|
||||
|
||||
sudo apt-get install indicator-multiload
|
||||
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/indicator-cpufreq.png)
|
||||
|
||||
**Cpufreq Indicator** is the equivalent of the old GNOME CPU frequency scaling applet which can be used for changing the CPU frequency on-the-fly. Install it in Ubuntu by clicking the button below:
|
||||
|
||||
**Cpufreq Indicator**是一款等效于“GNOME-CPU调频”的应用。你可以实时的调整CPU的频率。点击下面的按钮从Ubuntu软件中心安装。
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][2]
|
||||
|
||||
Or install it from the command line:
|
||||
|
||||
或者通过命令行安装:
|
||||
|
||||
sudo apt-get install indicator-cpufreq
|
||||
|
||||
**My Weather Indicator** is an appindicator that displays the current weather on the Unity panel. The appindicator can also display a 5-day forecast, a desktop widget and supports four weather services: OpenWeatherMap, Yahoo, Wunderground and World Weather Online.
|
||||
|
||||
**My Weather Indicator**是一款显示当前天气的应用,它能显示5天内的预报并支持四大天气服务站点:OpenWeatherMap, Yahoo, Wunderground 和 World Weather Online。
|
||||
|
||||
To install it in Ubuntu 13.10, use the commands below:
|
||||
通过命令行进行安装:
|
||||
|
||||
sudo add-apt-repository ppa:atareao/atareao
|
||||
sudo apt-get update
|
||||
sudo apt-get install my-weather-indicator
|
||||
|
||||
![](https://dl.dropboxusercontent.com/u/1113424/img/variety-wallpaper-changer.jpg)
|
||||
|
||||
[**Variety**][3] is an application that comes with an AppIndicator but since you basically only have to configure it once and after that you'll only need to use the AppIndicator, I'll list it here. Variety is a cool wallpaper changer that automatically downloads and changes your wallpaper on a given interval. Using it, you'll get cool, fresh wallpapers each day. From the AppIndicator you can quickly switch to the next (random) wallpaper or copy the wallpaper to favourites, for later use.
|
||||
|
||||
[**Variety**][3]一款带有AppIndicator的应用,但是基本上你只需要配置一次就可以用AppIndicator来使用此软件了。Variety一款壁纸更换器的应用,他能在设定的时间内自动下载并更换壁纸。用起来就有种高帅富的感觉。壁纸库每天都会有更新,你可以很快的切换到另外一个壁纸,收藏自己喜欢的壁纸,留着日后再用。
|
||||
|
||||
To install Variety in Ubuntu, use the following commands:
|
||||
|
||||
通过一下命令行安装:
|
||||
|
||||
sudo add-apt-repository ppa:peterlevi/ppa
|
||||
sudo apt-get update
|
||||
sudo apt-get install variety
|
||||
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/diodon-indicator.png)
|
||||
|
||||
You'll probably also want a clipboard manager. I recommend **Diodon** which is lightweight, supports files, image sections and more. To install it in Ubuntu 13.10 Saucy Salamander, click the button below:
|
||||
|
||||
你可能需要一个剪切板管理器,试试**Diodon** 吧,这是款轻量型软件,支持文件、图像等。点击下面的按钮安装:
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][4]
|
||||
|
||||
Or open a terminal and copy/paste the following command to install it:
|
||||
|
||||
或者通过命令行安装:
|
||||
|
||||
sudo apt-get install diodon diodon-plugins
|
||||
|
||||
### 2. Tweak Unity ###
|
||||
|
||||
### 2. 设置 Unity ###
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/unity-tweak-tool.png)
|
||||
|
||||
**Unity Tweak Tool** allows users to change various Unity settings such as auto-hide bahavior, window snapping and hot corners, tweak Dash, the Unity Launcher or HUD, change the GTK or icon theme, change the font face or size, move the window controls to the right and much more.
|
||||
|
||||
**Unity Tweak Tool**让用户能改变一些Unity设置,比如:自动隐藏、窗口最大化、“触发角”、Dash、Unity启动器或平视显示器、改变GTK或图标主题、改变字体和大小,移动窗口控制器到右边等。
|
||||
|
||||
To install Unity Tweak Tool from the Ubuntu Software Center, click the button below:
|
||||
|
||||
点击下面的按钮从软件中心安装
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][5]
|
||||
|
||||
Or, install it in Ubuntu 13.10 via command line:
|
||||
|
||||
或者通过命令行安装
|
||||
|
||||
sudo apt-get install unity-tweak-tool
|
||||
|
||||
### 3. Privacy tweaks ###
|
||||
|
||||
### 3. 隐私设置 ###
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/ubuntu13.10-privacy-security_2.png)
|
||||
|
||||
As you probably know, by default Dash shows all the recently accessed files as well as other files found on your filesystem. By selecting **Security & Privacy** from System Settings, you can choose what file types can show up in Dash, exclude various applications or folders/partitions from showing up in Dash and there's also an option to clear usage data.
|
||||
|
||||
你应该知道可以通过默认的Dash来查看最近访问的文件和其他的一些文件。系统设置可以通过设置**“安全和隐私”**来选择显示的文件类型。这样就不用看到那些软件、文件夹之类的了。你也可以清除最近的记录。
|
||||
|
||||
Furthermore, on the Search tab, you can disable online search results from being displayed in Dash. However, this option disables all the online search results so if for instance you only want to **disable the shopping suggestions**, you can run the following command:
|
||||
|
||||
此外你在使用搜索框的时候,可以设定不显示网络搜索的结果。但是这会屏蔽掉所有的网络信息。所以当你仅仅是想**“屏蔽购物推荐”**的话,你可以输入下面的命令:
|
||||
|
||||
gsettings set com.canonical.Unity.Lenses disabled-scopes "['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']"
|
||||
|
||||
More on disabling Dash (search) plugins, [HERE][6].
|
||||
|
||||
更多插件屏蔽,点击[此处][6]
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/indicator-privacy.png)
|
||||
|
||||
|
||||
Another way to deal with privacy in Ubuntu 13.10 is to use the **Privacy Indicator**, a tool hat lets you quickly enable/disable Zeitgeist (activity logging) or online search results from showing up in Dash, clear the Zeitgeist log or recent files (which show up in the Nautilus "Recent" sidebar item for instance).
|
||||
|
||||
另外一种在Ubuntu 13.10中设置隐私的方法是使用**Privacy Indicator**,这是一款让你快捷设置启用/屏蔽Zeitgeist 或者在线搜索结果的软件,并能清除Zeitgeist日志和最近文件(显示先边栏的“最近”里面)。
|
||||
|
||||
[**Download Privacy Indicator**][7] (there's a deb available at the bottom of the page)
|
||||
|
||||
[**下载 Privacy Indicator**][7](此网页中含有deb文件下载)
|
||||
|
||||
### 4. Enable the discrete card on systems with Hybrid graphics ###
|
||||
|
||||
The Ubuntu developers have worked to support Hybrid graphics in Ubuntu 13.10 (and 12.04 LTS). Below you'll find instructions on how to set this up.
|
||||
Ubuntu的开发人员已经在Ubuntu 13.10 (和 12.04 LTS版 )中实现了混合显卡技术,下面你会看到相关设置的说明。
|
||||
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/nvidia-prime-nvsettings.png)
|
||||
|
||||
**Nvidia Optimus**: unfortunately, the Nvidia Linux graphics drivers don't yet fully support Optimus - more on this subject, [HERE][8].
|
||||
|
||||
|
||||
Ubuntu 13.10 (Saucy Salamander) ships with a new package called "nvidia-prime" which enables the Nvidia graphics card on Optimus systems (which by default use the integrated Intel graphics chip). By using the instructions below, the Nvidia card will always be in use, so there's no way to switch it off to save power. Because of this, the laptop will consume more power and possibly overheat - **in my case, the laptop gets really hot and for this reason I'm not using this solution but things may work better for your laptop** (and if not, you can easily revert the changes).
|
||||
|
||||
**Nvidia Optimus**:不幸的是,Linux平台下Nvidia显卡驱动并不完全支持Optimus,[更多][8]。但是Ubuntu 13.10用了“nvidia-prime”包来过渡。这个包使默认支持Intel显卡芯片的Optimus平台也支持Nvidia显卡。通过下面指令你能Nvidia显卡永远处于工作状态,就是说没有办法让它停止工作了。这样笔记本就会功耗更大和过热--——**对我而言,我是不会 用这个的,除非过热的问题解决了**,如果没有解决的话,你可以撤销更改。
|
||||
|
||||
|
||||
Unfortunately, that's not the only issue. You may also experience screen tearing and hotplug won't work so if you want to use multiple monitors, you'll have to manually set them up in xorg.conf. The advantages are that you'll be able to play games that aren't supported by the Intel graphics, use VDPAU-enabled media players, etc.
|
||||
|
||||
不幸的是,这不是唯一的问题。你会发现画面分割和热插拔并不工作。所以,如果你想用多个显示器的话。你需要手动的在xorg.conf进行设置。这个的好处就是,你可以玩那些不支持Intel显卡的游戏,用支持VDPAU的媒体播放器等。
|
||||
|
||||
That said, if you want to give this a try in Ubuntu 13.10 Saucy Salamander, make sure you're using LightDM (the default Ubuntu display manager) and not some other display manager like GDM. Also, if you've installed Bumblebee, you'll need to purge it:
|
||||
|
||||
即便如此,如果你还是想尝试一下的话,请确保你使用的是默认的显示管理器LightDM,并不是其他的,如GDN等。此外,如果你安装了Bumblebee,你需要卸载掉它:
|
||||
|
||||
sudo apt-get purge bumblebee* bbswitch-dkms
|
||||
|
||||
Then, install the latest Nvidia drivers and "nvidia-prime":
|
||||
|
||||
然后安装最新的Nvidia驱动和“nvidia-prime”:
|
||||
|
||||
sudo apt-get install nvidia-319 nvidia-settings-319 nvidia-prime
|
||||
|
||||
And finally, reboot (restarting X isn't enough).
|
||||
最后重启电脑(重启X是不够)。
|
||||
|
||||
If you want to revert this change, simply remove the installed packages:
|
||||
|
||||
如果你想撤销这些改变,你可以输入通过下面的指令:
|
||||
|
||||
sudo apt-get remove nvidia-319 nvidia-settings-319 nvidia-prime
|
||||
|
||||
And reboot.
|
||||
|
||||
然后重启
|
||||
|
||||
**AMD Hybrid graphics**: I didn't test this because I don't have a system with AMD graphics, but according to the [**HybridGraphics**][9] Ubuntu wiki page, there aren't any known issues, so I assume that everything works properly (again, I'm not sure since I can't test it!).
|
||||
|
||||
**AMD 混合显卡**:我并没有测试过这个,因为我没有支持AMD显卡的系统,但是根据Ubuntu wiki上的[**HybridGraphics**][9]包说明,应该是没有问题。(再次申明,我并不确定,因为我没试过)
|
||||
|
||||
|
||||
|
||||
To get proper AMD Hybrid graphics support in Ubuntu 13.10, all you have to do is install the latest fglrx driver and fglrx-pxpress from the repositories:
|
||||
|
||||
要想在Ubuntu 13.10下获得合适的AMD显卡支持。你需要安装最新的 fglrx驱动和fglrx-pxpress:
|
||||
|
||||
sudo apt-get install fglrx fglrx-pxpress
|
||||
|
||||
And then reboot the system (restarting X isn't enough).
|
||||
并重启电脑。重启X是没有用的
|
||||
|
||||
### 5. Improve battery life ###
|
||||
|
||||
### 5. 延长电池寿命 ###
|
||||
|
||||
There are two tools you can use to improve your laptop's battery life: laptop-mode-tools or TLP. Both try to achieve the same thing, but from what I've read, [**TLP**][10] seems to save a bit more power. However, TLP is only available in a PPA so if you don't like adding PPAs, install laptop-mode-tools.
|
||||
|
||||
有两个工具可以延长电池的寿命:laptop-mode-tools 和 TLP。这两个工具都是为了延长电池寿命,[**TLP**][10] 似乎效果更好一点,但是TLP仅有PPA,如果你不想添加APPs时,就安装 laptop-mode-tools吧。
|
||||
|
||||
Important note: **don't install both laptop-mode-tools and TLP!**
|
||||
|
||||
注意:**不要同时安装laptop-mode-tools和TLP**
|
||||
|
||||
To install laptop-mode-tools, click the button below:
|
||||
|
||||
点击下面的按钮安装laptop-mode-tools。
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][11]
|
||||
|
||||
Or install it from the command line:
|
||||
|
||||
或者通过命令行安装:
|
||||
|
||||
sudo apt-get install laptop-mode-tools
|
||||
|
||||
Or, to install TLP, use the commands below:
|
||||
|
||||
输入下面命令安装TLP:
|
||||
|
||||
sudo add-apt-repository ppa:linrunner/tlp
|
||||
sudo apt-get update
|
||||
sudo apt-get install tlp tlp-rdw
|
||||
sudo tlp start
|
||||
|
||||
No configuration is needed for either TLP or laptop-mode-tools.
|
||||
|
||||
这两个工具都不需要额外的配置。
|
||||
|
||||
Another way to save power and prevent your laptop from overheating (the tool also allows running apps or games on the discrete graphics card on demand, using the "optirun" command - see below) is **Bumblebee**. Bumblebee is a tool for laptops that use Nvidia Optimus, that disables the Nvidia card when not in use.
|
||||
|
||||
另外一种节约电池的方法是**Bumblebee**(是允许在独显运行软件或游戏的工具),Bumblebee是一款支持笔记本上双显卡智能切换的软件。能停止Nvidia显卡,当你不需要使用的时候。
|
||||
|
||||
**Note: if you plan on using the hybrid graphics solution under step 4 for Nvidia Optimus, don't install Bumblebee!**
|
||||
|
||||
**注意:如果你想在显卡自动切换技术的第4步采用混合显卡时,请不要安装Bumblebee**
|
||||
|
||||
To install Bumblebee, click the button below:
|
||||
|
||||
点击下面的按钮进行安装:
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][12]
|
||||
|
||||
Or install it via command line:
|
||||
|
||||
sudo apt-get install bumblebee bumblebee-nvidia
|
||||
|
||||
Then reboot.
|
||||
然后重启。
|
||||
|
||||
Currently there's a [**bug**][13] in Ubuntu 13.10 that prevents "optirun" from working. To fix it, use the following command:
|
||||
|
||||
在Ubuntu中有个禁止"optirun"工作的[**bug**][13]。通过下面的命令解决这个问题。
|
||||
|
||||
- 32位系统
|
||||
- 32bit:
|
||||
|
||||
sudo ln -s /usr/lib/i386-linux-gnu/libturbojpeg.so.0 /usr/lib/i386-linux-gnu/libturbojpeg.so
|
||||
|
||||
- 64位系统
|
||||
- 64bit:
|
||||
|
||||
sudo ln -s /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0 /usr/lib/x86_64-linux-gnu/libturbojpeg.so
|
||||
|
||||
When you want to use the Nvidia graphics card for an application, run:
|
||||
|
||||
当你想用Nvidia显卡时,运行:
|
||||
|
||||
optirun APP-EXECUTABLE
|
||||
|
||||
replacing "APP-EXECUTABLE" with the application (or game) executable.
|
||||
|
||||
将"APP-EXECUTABLE"替换为你要运行的软件或者游戏的可执行文件。
|
||||
|
||||
### 6. Install codecs, Java and encrypted DVD playback ###
|
||||
### 6. 安装 编解码器, Java 和 加密DVD播放 ###
|
||||
|
||||
To be able to play most audio and video formats, install **Ubuntu Restricted Extras** by clicking the button below:
|
||||
|
||||
如果需要播放更多类型的音频视频文件,那就安装 **Ubuntu Restricted Extras** 吧
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][14]
|
||||
|
||||
Or install it using the following command:
|
||||
|
||||
或者输入下面的命令行:
|
||||
|
||||
sudo apt-get install ubuntu-restricted-extras
|
||||
|
||||
I suggest to also install the **unrestricted versions of libavformat and libavcodec** so you don't encounter issues with missing codecs when trying to use some video editors or transcoders - install them by clicking the button below:
|
||||
|
||||
我建议再安装一下“libavformat 和 libavcodec的无限制版”,这样当你使用一些编辑器或者转换器的时候就不会出现丢失编码丢失的情况。点击下面的按钮进行安装:
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][15]
|
||||
|
||||
Or by using the following command:
|
||||
或者输入一下命令行:
|
||||
|
||||
sudo apt-get install libavformat-extra-53 libavcodec-extra-53
|
||||
|
||||
You may also need Java, but you must figure out what you need. Most users will only need **OpenJRE** and the Java browser plugin which you can install by clicking the button below:
|
||||
|
||||
你可能需要Java,但是你得明确你到底需要的是什么,不少用户仅仅使用**OpenJRE**和java游览器插件,你可以点击下面的按钮安装:
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][16]
|
||||
|
||||
Or by using the following command:
|
||||
|
||||
或者输入命令行:
|
||||
|
||||
sudo apt-get install icedtea-7-plugin openjdk-7-jre
|
||||
|
||||
For development, you'll also want **OpenJDK** which you can install by using the button below:
|
||||
|
||||
对于开发者而言,你可能需要**OpenJDK**,点击下面的按钮进行安装:
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][17]
|
||||
|
||||
Or by using the following command:
|
||||
|
||||
或者输入下面的命令行:
|
||||
|
||||
sudo apt-get install openjdk-7-jdk
|
||||
|
||||
|
||||
If for various reasons, you need **Oracle Java** (the package includes JDK, JRE and the browser plugin), you can install [**Oracle Java 7**][18] by using the following commands:
|
||||
|
||||
如果你因为某些原因需要安装**Oracle Java**(包含JDK,JRE,游览器插件的包)时,你可以通过下面的命令进行安装[**Oracle Java 7**][18] :
|
||||
|
||||
sudo add-apt-repository ppa:webupd8team/java
|
||||
sudo apt-get update
|
||||
sudo apt-get install oracle-java7-installer
|
||||
|
||||
|
||||
**Encrypted DVD playback**: the Medibuntu repository [**no longer exists**][19] and while most packages in the archive are obsolete or unnecessary because most are now in the official Ubuntu repository or have better equivalents, livdvdcss is still required for playing encrypted DVDs.
|
||||
|
||||
**加密DVD播放**: 由于现在很多安装包都能在官方的库中找到,或者有更好的替代物,Medibuntu也渐渐的[**被废弃**][19]了。但是在播放加密视频时仍然需要livdvdcss包。
|
||||
|
||||
You can enable encrypted DVD playback in Ubuntu 13.10 by using the following commands:
|
||||
|
||||
输入以下指令启动加密DVD播放功能:
|
||||
|
||||
sudo apt-get install libdvdread4
|
||||
sudo /usr/share/doc/libdvdread4/install-css.sh
|
||||
|
||||
### 7. Get the latest Rhythmbox and VLC ###
|
||||
### 7. 安装最新的 Rhythmbox 和 VLC ###
|
||||
|
||||
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/rhythmbox-n-vlc.png)
|
||||
|
||||
Two popular applications: Rhythmbox and VLC, haven't been updated to the latest version in Ubuntu 13.10. If you want to install the latest version for these apps, you can use PPAs.
|
||||
|
||||
在Ubuntu13.10中,Rhythmbox 和 VLC并没有升级到最新的版本,如果你想安装最新的版本,你可以使用PPAs
|
||||
|
||||
Please note that by upgrading Rhythmbox, the plugins in the Rhythmbox [**third-party plugins PPA**][20] will stop working. The plugins Rhythmbox ships with will obviously work.
|
||||
|
||||
请注意:升级Rhythmbox后,里面的[**第三方插件**][20]将停止工作。Rhythmbox插件可以正常的运行。
|
||||
|
||||
**Rhythmbox** (version in Ubuntu 13.10: 2.99.1, version in PPA: 3.0.1):
|
||||
|
||||
**Rhythmbox**(Ubuntu 13.10下的版本:2.99.1,PPA中的版本:3.0.1):
|
||||
|
||||
sudo add-apt-repository ppa:jacob/media
|
||||
sudo apt-get update
|
||||
sudo apt-get install rhythmbox
|
||||
|
||||
**VLC** (version in Ubuntu 13.10: 2.0.8, version in the PPA: 2.1.0):
|
||||
|
||||
**VLC**(Ubuntu 13.10下的版本:2.0.8,PPA中的版本:2.1.0):
|
||||
|
||||
sudo add-apt-repository ppa:videolan/stable-daily
|
||||
sudo apt-get update
|
||||
sudo apt-get install vlc
|
||||
|
||||
### 8. Tweak Nautilus: disable recursive search and install a quick file previewer ###
|
||||
|
||||
### 8. Tweak Nautilus: 禁用递归搜索和文件快速预览 ###
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/nautilus-no-recursive.png)
|
||||
|
||||
|
||||
The type-ahead find feature was remove from Nautilus starting with version 3.6. Later versions perform a search in the current directory and all its subdirectories when you start typing a file name. And this makes it unusable at times so if you find this behavior annoying, you can install Nautilus patched to allow [**disabling recursive search**][21] (you can easily enable it back if you want).
|
||||
|
||||
在Nautilus V3.6之后,提前键入查找功能就被去除掉了。之后版本的搜索就只是在当前文件夹和其子文件下进行搜索。这用起来就很不爽了,如果你为此感到烦恼的话就安装Nautilus的补丁[**禁用递归搜索**][21](你可以很方便的启用它)。
|
||||
|
||||
**To upgrade Nautilus to the patched version that allows disabling recursive search, use the following commands:**
|
||||
|
||||
**用下面的命令将Nautilus升级到可以禁用递归搜过的版本**
|
||||
|
||||
sudo add-apt-repository ppa:dr3mro/personal
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade
|
||||
nautilus -q
|
||||
|
||||
**Then, disable recursive search using the following command:**
|
||||
|
||||
**然后使用下面的命令禁用递归搜索**
|
||||
|
||||
gsettings set org.gnome.nautilus.preferences enable-recursive-search false
|
||||
|
||||
If later on you want to re-enable recursive search, use the command below:
|
||||
|
||||
如果你还想恢复递归搜索的功能,使用下面的命令行:
|
||||
|
||||
gsettings set org.gnome.nautilus.preferences enable-recursive-search true
|
||||
|
||||
![](http://dl.dropboxusercontent.com/u/1113424/img/gnome-sushi.png)
|
||||
|
||||
**GNOME Sushi** is a quick file previewer for Nautilus. To install it, click the button below (this will install gnome-sushi and unoconv, required to be able to preview some files such as documents):
|
||||
|
||||
**GNOME Sushi**是一款快速预览的软件。点击西面的按钮安装。(会安装gnome-sushi 和 unoconv来实现预览)。
|
||||
|
||||
[![](https://apps.ubuntu.com/assets/images/scbutton-free-200px.png)][22]
|
||||
|
||||
or install it via command line:
|
||||
|
||||
或者输入命令行:
|
||||
|
||||
sudo apt-get install gnome-sushi unoconv
|
||||
|
||||
To use it, select a file (picture, text or document, sound file and so on) and press the SPACE key to preview that file. You can close the preview either by clicking the SPACE key again or clicking the window close button.
|
||||
|
||||
要使用这个软件,需选择一个文件(图片、文本文档、音乐文件等)然后点击SPACE按钮来预览。再次点击SPACE按钮或者关闭窗口可以关闭预览。
|
||||
|
||||
**Now it's your turn. What are the first things you install or tweak after a fresh Ubuntu installation?**
|
||||
|
||||
**你的时间到啦!在Ubuntu安装介绍之后,你会选择哪个作为第一个安装的呢?**
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.webupd8.org/2013/10/8-things-to-do-after-installing-ubuntu.html
|
||||
|
||||
译者:[Timeszoro](https://github.com/Timeszoro) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:apt://indicator-multiload
|
||||
[2]:apt://indicator-cpufreq
|
||||
[3]:http://www.webupd8.org/2013/06/variety-wallpaper-changer-0415-released.html
|
||||
[4]:apt://diodon,diodon-plugins
|
||||
[5]:apt://unity-tweak-tool
|
||||
[6]:http://www.webupd8.org/2013/10/how-to-disable-amazon-shopping.html
|
||||
[7]:http://www.florian-diesch.de/software/indicator-privacy/
|
||||
[8]:http://www.webupd8.org/2013/08/using-nvidia-graphics-drivers-with.html
|
||||
[9]:https://wiki.ubuntu.com/X/Config/HybridGraphics#Known_issues
|
||||
[10]:http://www.webupd8.org/2013/04/improve-power-usage-battery-life-in.html
|
||||
[11]:apt://laptop-mode-tools
|
||||
[12]:apt://bumblebee,bumblebee-nvidia
|
||||
[13]:http://www.webupd8.org/2013/10/fix-bumblebee-libturbojpegso-issue-in.html
|
||||
[14]:apt://ubuntu-restricted-extras
|
||||
[15]:apt://libavformat-extra-53,libavcodec-extra-53
|
||||
[16]:apt://icedtea-7-plugin,openjdk-7-jre
|
||||
[17]:apt://openjdk-7-jdk
|
||||
[18]:http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
|
||||
[19]:http://gauvain.pocentek.net/node/61
|
||||
[20]:http://www.webupd8.org/2012/08/rhythmbox-third-party-plugins-ubuntu-ppa.html
|
||||
[21]:http://www.webupd8.org/2013/09/how-to-disable-recursive-search-in.html
|
||||
[22]:apt://gnome-sushi,unoconv
|
@ -1,36 +1,36 @@
|
||||
每日Ubuntu小技巧——怎样修改你的计算机名字
|
||||
================================================================================
|
||||
其他blog更新过,这篇是面向新Ubuntu用户和初学者。这篇blog告诉你当在使用Ubuntu时怎么样简单改变你的计算机名字。许多用户将再也不用担心在Ubuntu上怎么改变他们的计算机名字和主机名,至少这是他们关心的。
|
||||
本文又是一篇为Ubuntu新用户和新手准备的文章,将会指导你怎样在使用Ubuntu时轻松更改你的计算机名字,许多用户从来不会考虑在Ubuntu更改计算机名字或者主机名,那是他们最不用考虑担心的事情。
|
||||
|
||||
许多人会使用创建好的名字或者安装的时候会给机器一个名字。但是对于那些新用户想要知道怎么做到改名字,请继续接下来的学习。这篇不是给专家的,是为那些刚刚开始使用Ubuntu的初学者用户。
|
||||
许多用户会使用安装Ubuntu过程中创建或设定的名字,但是对于想要知道怎么更改名字的新用户,可以继续接下来的学习。本文不是为Ubuntu专家所准备,是为那些刚刚开始使用Ubuntu的初学者用户。
|
||||
|
||||
所以,你为什么不想再一次改变你的计算机名字?如果你没有一个好的原因比学习怎么做更好,那就不要。如果你有一个好的理由学习怎么做,那就跟着学。
|
||||
那么,为什么你又想要更改你的计算机名字?如果除了想要学习怎样操作,你没有一个好的理由,那么就不要学了,反之,如果你有一个好的理由或者想要学习怎样操作,那么请继续。
|
||||
|
||||
按下 **Ctrl – Alt – T** 组合键,打开终端。
|
||||
当终端打开,输入下列命令,使用gedit编辑hostname文件
|
||||
|
||||
sudo gedit /etc/hostname
|
||||
|
||||
接下来,无论文件里面有什么,改变一个新的计算机名字吧。例如,如果你想要你的计算机名字为“RDOMNU”,先删除文件内容,输入 **RDOMNU**,然后保存文件。
|
||||
接下来,无论旧的计算机名字是什么,换一个新的吧。例如,如果你想要你的计算机名字为“RDOMNU”,先删除文件内容,输入 **RDOMNU**,然后保存文件。
|
||||
|
||||
然后,输入下列命令来打开hosts文件
|
||||
|
||||
sudo gedit /etc/hosts
|
||||
|
||||
改变第二行下面所指你早先输入的计算机名字的值,完后后保存。
|
||||
更改第二行箭头标记位置的值,使它与你刚才输入的计算机名字相符,完成后保存文件。
|
||||
|
||||
|
||||
![](http://www.liberiangeek.net/wp-content/uploads/2013/10/ubuntuhostnamechange.png)
|
||||
|
||||
就是这样!重启你的计算机,然后你的机器将会显示新的名字。这就是怎么改变Ubuntu机器的名字。
|
||||
|
||||
享受吧!
|
||||
试一试吧!
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.liberiangeek.net/2013/10/daily-ubuntu-tips-change-computer-name/
|
||||
|
||||
译者:[Vic___](https://blog.csdn.net/Vic___) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[Vic___](https://blog.csdn.net/Vic___) 校对:[Caroline](https://github.com/carolinewuyan)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
Loading…
Reference in New Issue
Block a user