Ubuntu:Hardy cn

From

Revision as of 03:13, 31 August 2009 by Pigling (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Ubuntuguide翻译成中文的谷歌

如果只是部分的网页翻译,请点击重新载入(刷新)按钮,把更多的。


Image:Ubuntuguide_logo.png


Ubuntu 8.04 LTS (Hardy Heron)

Ubuntu Hardy Heron,既Gutsy Gibbon后于2008年4月24日成功发布。请帮助测试和维护这份指南。


Contents

绪言

关于 Hardy

  • 2008年4月24日Ubuntu 8.04发布。
  • 它的开发代号为“Hardy Heron”,它是Ubuntu 7.10 Gutsy Gibbon的继任者。
  • Hardy是一个LTS(长期支持)的版本,所以它将得到比正常版本(18个月)更长时间的技术支持--桌面版3年,服务器版为5年。

如何查出你正在使用的Ubuntu版本号

使用以下命令:

lsb_release -a

如何查出你使用的Ubutnu发行版内核版本号

使用以下命令:

 uname -r

Ubutnu的版本更新

  • 每个版本的开发周期为6个月
  • 时间为四月到六月
  • 每年的十月三十号会发布下一个版本的开发日程表,2008年将会是Ubuntu 8.10 (Intrepid Ibex)
  • Hardy Heron 将是一个LTS(长期支持)版本,它的服务器版本和桌面版将会分别得到五年和三年的安全更新的支持

About Ubuntu and Official Ubuntu Derivatives

Ubuntu 8.04 指南和链接

Ubuntu 截图

Ubuntu 8.04 Screenshots Gallery

用户知识

这个小节包含了对本指南其他部分有用的辅助信息。

使用终端/ terminal / shell

上述所有操作都用到了同一个程序-一个可以让用户像使用图形界面(GUI)一样用来控制系统的命令行界面。这个指南中的大部分任务都可以用GUI来完成,但是在大部分情况下使用命令行会让我们感觉更加方便与快捷。

打开控制台方法,用鼠标指向:程序--> 附件--> 终端- 你将后看到一个可以录入文字的窗口。

任何一个以“sudo”为前缀的命令都将拥有管理员(或者root)权限,所以你需要输入密码。

检视一个程序或命令的帮助 - 手册页

大部分程序都附带自身的manpages--帮助说明 你可以检查怎么使用一个命令,例如:

   man apt-get

or

   man gedit

在我们执行一个程序之前知道它是什么对我们来讲是非常有用的事。

保持系统最新

系统更新是非常重要的,所以我们必须可以从服务器上下载最新的补丁,安全更新和升级包。

首先,我们指向

  系统 --> 管理--> 软件源

检查是不是不所有的源都是可用的。

然后我们打开终端:

  程序--> 附件 --> 终端

输入:

  sudo apt-get update

系统将会让你输入密码,你输入的密码是不可见的(安全策略),但是系统可以正常识别到你的录入

  sudo apt-get upgrade
  sudo apt-get dist-upgrade

完成!

安装软件包(程序)和库

在Ubuntu系统中有两种软件包安装方式。

你可以通过终端或者新立得软件包管理器来安装新的软件。

A.如何使用APT安装软件包 - 终端方式

打开

 系统 --> 附件--> 终端

Apt是Debian的包管理器,但是它也同样可以用于Ubuntu。

现在我们来通过键盘安装一个包:

 sudo apt-get install package

例如, Amarok, 一个音乐播放器:

 sudo apt-get install amarok

如你如见,这十分简单。

有时我们可能需要删除一个包

输入:

 sudo apt-get remove package

如果我们想删除exaile音乐播放器,输入:

 sudo apt-get remove exaile

Apt会在我们安装或删除程序时自动检查程序的依赖关系。

B. 如何用新立得安装软件包 - 简单的GUI方式

操作导航:

 系统 --> 系统管理 --> 新立得软件包管理器

你可以通过“搜索”的方式安装任意你希望安装的软件,只需要点击“搜索”按钮。

在窗口的左边你看到的是一片空白,根据自己的需要选择你所要安装的软件所属目录。

点击“应用”按钮,新立得软件包首先会自动分析:和你所要安装的软件存在依赖关系的软件包,然后自动安装。

搜索软件包/程序

有4种办法在软件库中搜索软件包/程序。办法都很容易实现。


A. 如何在Synaptic(新立得)中搜索软件包

打开新立得软件包管理程序(Synaptic Package Manager)

  系统 --> 系统管理 --> 新立得软件包管理程序

然后点击搜索按钮。在弹出的输入框里面输入你需要的软件名称(关键词即可)然后回车就可以开始搜索软件。

B.如何通过互联网搜索软件包

打开你的网页浏览器然后去该网址:

  http://packages.ubuntu.com/

其中如下四个链接是与Hardy Heron(Ubuntu8.04)有关的:a. http://packages.ubuntu.com/hardy/ , b.http://packages.ubuntu.com/hardy-updates/ , c.http://packages.ubuntu.com/hardy-backports/ , d.http://packages.ubuntu.com/hardy-backports/main/newpkg

C. 如何用APT搜索软件包

打开终端(Terminal)程序:

 Applications --> Accessories --> Terminal

如果想按名称搜索,比如:输入"pack-age"

  sudo apt-cache search pack-age

在Synaptic (新立得)中,图形界面下采用APT缓存(apt-cache)搜索,你可能会搜到其他包含你所输入“搜索字符”的其他软件包。


如果你想搜索“音乐播放器”,键入:

  sudo apt-cache search music player

D. 如何用Aptitude搜索软件包

Aptitude 是字符界面下的 ”Synaptic“. 在它上方的菜单界面里面有个一个“搜索”选项。 你可以点击打开它或者通过键盘浏览该选项。

已安装的程序不在“应用程序”菜单中显示

所幸的是从Gnome 2.12起,该问题已经很容易解决了!

你可以鼠标“右击”,位于屏幕左上的“菜单”区域(如:Applications, Places,System 等的区域),再编辑内容。

或者(采用替代的方法):

以防出现问题,打开terminal,再键入:

  alacarte

从新的弹出的GUI界面,可以编辑,新加你所新安装的“应用程序”。当然,前提是你知道“应用程序”安装的位置在哪里。如果不知道安装位置,请试键入:

  locate applicationame

可以显示“应用程序”可能安装的位置。

显卡和显示器

安装配置ATi和nVidia显卡驱动

有三种可选方法——第一种可以保证你一直使用最新的驱动,第二种则稍微简单一些。第三种是提供给已安装老版ATi GPU用户的备选方法。最后一种适用于拥有最新ATi卡(2xxx和3xxx代),但使用最新的ATi驱动(通过EnvyNG)或库驱动都无法获得正常显示的用户。

A. 用EnvyNG安装最新版本驱动(ATi & nVidia)

Read first this faq: http://albertomilone.com/envyngfaq.html#A

Open a terminal and type :

 sudo apt-get install envyng-gtk

After rebooting, drivers should be installed and working.

B. 受限驱动管理器安装(ATi & nVidia)

Navigate to:

 System --> Administration --> Hardware Drivers

and there you'll see your Graphics Card and an option for installation of its drivers.

Choose it and the press "Apply". It shall install the repository driver - a reboot may be required.

(Applicable for both ATi/AMD and nVidia)

C. ATi开源radeon驱动(仅ATi)

Navigate to https://help.ubuntu.com/community/RadeonDriver

for more instructions.

D. RadeonHD驱动(仅ATi)

Check with Synaptic Package Manager for

  xf86-video-radeonhd

package.

Always make sure that you don't have another ATi driver installed.

More info: http://www.phoronix.com/scan.php?page=article&item=842&num=1

nVidia显卡配置多显示器

Install the nVidia graphics control panel:

  sudo apt-get install nvidia-settings

And then run the configuration utility:

  sudo nvidia-settings

You should be able to configure all your monitors, set them to seperate resolutions, and change their positioning relative to one another. When you are finished, make sure you click 'Save to X Configuration File'. It is possible that you may have problems with the boundries of monitors; logging off and back on again should resolve this.

如何安装多媒体支持

安装解码器

打开 a terminal and 键入 :

 sudo -s -H

输入用户密码(user password).

安装多媒体解码器(Codecs)

sudo apt-get update

要安装,请检查你有所有的软件库(repositories)源已经开放,按如下顺序检查: System > Administration > Software sources.

然后,运行如下命令:


sudo apt-get install ubuntu-restricted-extras

现在,你就拥有了几乎所有你需要的多媒体解码器(Codecs)

安装DVD 支持

At the console, type:

  sudo gedit /etc/apt/sources.list

Αnd paste in the end of the file the below:

  ## Medibuntu - Ubuntu 8.04 "hardy" 
  ## Please report any bug on https://bugs.launchpad.net/medibuntu/ 
  deb http://packages.medibuntu.org/ hardy free non-free

save the document and then in the terminal type:

  wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add -

in order to receive the appropriate key.

Finally, at the terminal, type:

   apt-get update 
   
   apt-get install libdvdcss2

Pulseaudio

On Xubuntu, you may experience some glitches with Pulseaudio like no sound at all after upgrading from Gutsy. The reason may be that the Pulseaudio daemon is not started. Take note that the sound server is not started at boot time (to reduce the risk of inter-user audio corruption), but at login time. So, you will have to add an entry to your autostarted applications for Pulseaudio. Here is an example:

:[Desktop Entry]
:Encoding=UTF-8
:Version=0.9.4
:Type=Application
:Name=Pulseaudio
:Comment=
:Exec=pulseaudio
:StartupNotify=false
:Terminal=false
:Hidden=false

安装VLC媒体播放器

At the console, type:

  sudo apt-get install vlc

To remove,

sudo apt-get --purge autoremove vlc

If you encounter sound problems (due to PulseAudio ), type:

   sudo apt-get install vlc-plugin-pulse

and choose PulseAudio as output in VLC options.

当你插入一张DVD时如何用VLC打开

Totem is the default program for DVD-playback in Hardy, and the is no obvious way to change it. A lot of tips that worked in previous versions no longer work. The main problem is that VLC does not register itself as a DVD-capable application.

At the console, type:

   cp /usr/share/applications/vlc.desktop /home/hildenae/.local/share/applications/vlc-dvd.desktop

edit the file

   gedit ~/.local/share/applications/vlc-dvd.desktop

replace the line

   Exec=vlc %U

with either

1. (all you really need)
   Exec=vlc %f
2. (recommended settings from ubuntuforums for better dvd playback)
   Exec=vlc --vout-filter deinterlace --deinterlace-mode blend --volume 512 %f
3. (recommended settings from ubuntuforums for better dvd playback and automatic full screen playback)
   Exec=vlc --vout-filter deinterlace --deinterlace-mode blend --volume 512 --fullscreen %f

Save the file and close gedit. At the console, type:

   gedit ~/.local/share/applications/mimeapps.list

make the line «x-content/video-dvd=» under [Added Associations] read:

   [Added Associations]
   x-content/video-dvd=vlc-dvd.desktop;totem.desktop;

Open Nautilus (default file manager), and navigate to Edit->Preferences>Media>DVD Video and select VLC media player (you should be able to choose between Totem and VLC)

安装Amarok音乐播放器

Whilst Amarok is a KDE/Qt application, it will work fine on Ubuntu, and can be installed by typing:

  sudo apt-get install amarok

安装Exaile(类Amarok音乐播放器)

Exaile is a GTK, Amarok-like Music Player and it is very easy to install. In terminal, type:

  sudo apt-get install exaile

Make sure you have the appropriate multimedia codecs installed.

安装Pulseaudio工具

This will install pulseaudio utilities such as individual application volume controls and audio server tools.

Open a Terminal window and type the following:

  sudo apt-get install libasound2-plugins "pulseaudio-*" paman padevchooser paprefs pavucontrol pavumeter libflashsupport

Run Pulseaudio Device Manager from the Applications > Sound and Video menu to access the tools.

互联网与Web开发

桌面安装LAMP服务器

LAMP stands for Linux, Apache, MSQL and PHP. You can install an integrated package that includes all four from the Synaptic Package manager (if you are using a Desktop Edition).

System-->Administration-->Synaptic Package Manager-->
Edit-->Mark Packages by Task-->LAMP server -->Apply

为本地web开发安装LAMP服务器

This will install Apache2, PHP5, MySql5, and PHPMyAdmin.

Firstly, type the following command at the console:

  sudo apt-get install apache2 php5 mysql-server-5.0 phpmyadmin

This will install all the necessary applications. You may be prompted to decide on a MySQL root password (set one if you want), and to configure PHPMyAdmin (select apache2 as the server type). After this is complete, we need to perform some minor configuration to get PHPMyAdmin working. Type:

  sudo gedit /etc/apache2/apache2.conf

Scroll right to the bottom of the file that opens, and add:

  # Enable PHPMyAdmin
  Include /etc/phpmyadmin/apache.conf

Now save, exit, and type:

  sudo /etc/init.d/apache2 restart

Everything should now be configured - go to http://127.0.0.1 for webpages, and http://127.0.0.1/phpmyadmin for database administration. The webroot is located in /var/www/ by default. This is not particularly useful, as we do not have write access to this directory. Fortunately, this is easy to solve, by...

添加虚拟host到你的LAMP服务器

This allows us to access a different folder as our webroot from a different address in our browser - face it, 'localhost' or 127.0.0.1 is boring.

Start by adding a new host. This is easy to do via System --> Administration --> Network; click on the Hosts tab, select the localhost item from the list and click properties. You may need to click the 'Unlock' button and enter your password first. Underneath the entry 'localhost', on a new line, add your entry of choice; for example, we'll use 'testhost'. Add this, and close all the dialogs.

Now we need to edit a configuration file, so type into the console:

  sudo gedit /etc/apache2/httpd.conf

In the resulting file (which may well be empty), add the definition for your host! My username is 'dan', and I want my webpages to be served from a directory named 'www' in my home, so I would add:

  <VirtualHost *>
     ServerName testhost
     DocumentRoot /home/dan/www
  </Virtualhost>

I can now add files to /home/dan/www, and access them by visiting http://testhost

家庭自动化/家庭影院/家庭安全

完整系统

Linux MCE

LinuxMCE is an integrated home theater/home security/home automation/telephone PBX/intercom system for your home. It is a community project that is a fork of the Linux Pluto commercial endeavour. There is a version that runs on Kubuntu 7.04 (Feisty) and a version for Kubuntu 7.10 (Gutsy). A version for Kubuntu 8.04 (Hardy) is due out soon. It is available in 32 and 64 bit versions. LinuxMCE can run either as a standalone Home Theater PC or can co-ordinate a fully networked home, using the networking capabilities that are intrinsically part of the Kubuntu Linux OS. For more info see the LinuxMCE website.

LinuxMCE can be installed at the same time as the Kubuntu OS, on a new PC with an Nvidia graphics card (6000, 7000, or 8000 series), from a single DVD.

LinuxMCE can also be installed as an add-on package to an existing Kubuntu system, using the LinuxMCE 2 CD installation. You will need a Kubuntu LiveCD for your installation, even if you already have a full Kubuntu installation in place. (The LinuxMCE installation uses the Kubuntu LiveCD for additional modules.) Note that the LinuxMCE version must match the Kubuntu version -- i.e. the LinuxMCE 710 version CDs require the Kubuntu 7.10 (Gutsy) Live CD.

With the 2 CD installation, it is possible to run Kubuntu separately from LinuxMCE on the same PC, but it is recommended to dedicate at least one PC to LinuxMCE as a Core server.

LinuxMCE incorporates MythTV, Pluto home automation, Motion security surveillance, Asterisk PBX, VDR video disk recorder, and other home automation/security/theater packages in an integrated platform.

At this time, the automatic installer for Linux MCE uses the KDE desktop (Kubuntu). There are users that have made Linux MCE work with the Gnome desktop (Ubuntu) and other Linux distributions, but it is recommended to stick with the Kubuntu OS, as required by the LinuxMCE automatic installation.

PVR (Personal Video Recorder)

Mythbuntu

Mythbuntu is an Ubuntu-based derivative (based on the Xubuntu (XFCE) desktop) that is meant to function as a standalone PVR, based on MythTV. It can be used, however, with a Gnome (Ubuntu), KDE (Kubuntu) or XFCE (Xubuntu) desktop, which can be added at any later time.

家庭安全

Zoneminder监控系统

Zoneminder manages surveillance cameras and stores images on the hard disk. Images can be viewed using a (LAMP) server remotely. X10 devices can be triggered using built-in perl scripts. For more info see the Zoneminder website.

There is a Zoneminder package for Hardy (that was the package from Gutsy). You should be able to install the package from Synaptic Package Manager.

However, if that does not work, try the instructions that worked for Feisty:

  • You must have the LAMP server installed. In addition, you will need additional modules:
sudo apt-get install ffmpeg libarchive-tar-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl
sudo apt-get install libjpeg62 libmime-perl libstdc++6 libunwind7 libwww-perl zlib1g
  • Download the .deb package from the package manager's website:

ftp://www.northern-ridge.com.au/zoneminder/ubuntu/edgy/zoneminder_1.22.3-8_i386.deb

  • Install using the Debian package manager. (No other method seems to work.)
dpkg -i zoneminder_1.22.3-8_i386.deb
  • (Note: If some dependencies are still unsatisfied, make sure you have these packages installed):
sudo apt-get install libc6 libc6.1 libgcc1 libgcc4 libstdc++6
(These should already be installed as part of the LAMP installation):
sudo apt-get install apache2-mpm-prefork libapache2-mod-php5 libmysqlclient15off mysql-client mysql-server php5  php5-mysql

If your installation is successful, you will now need to set up the configuration files and databases for Zoneminder.

  • Copy the configuration file and restart the Apache2 server.
sudo ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf
sudo /etc/init.d/apache2 reload
  • View Zoneminder from your web browser:
http://localhost/zm
  • Set up a MySQL database for Zoneminder
If this is the first time you have used MySQL, the default global MySQL superuser root will not have a password. You should set one now. Instructions for setting mySQL initial privileges are here.
In short:
mysql -u root
mysql> UPDATE mysql.user SET Password=PASSWORD('your_new_password') WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
In addition, you can set up an additional global MySQL user (such as mysql_user, for example) by following the instructions here. That way you can reserve root login for emergencies.
In short:
mysql -u root
mysql> CREATE USER 'mysql_user'@'localhost' IDENTIFIED BY 'mysql_user_passwd';
mysql> quit

Now you must create a MySQL database for use by Zoneminder. This is an administrative MySQL command, so you must use one of your global MySQL users (either root or mysql_user, as created in the example above). You can name your Zoneminder database anything you want, instead of zmdatabase.

mysqladmin -u root -p CREATE zmdatabase

or

mysqladmin -u mysql_user -p CREATE zmdatabase

Create users for the Zoneminder database. As always, I create a root user for emergency use. I use the same password for root as I do elsewhere on my system. Then I also create a user named zm_user (but you could also creat a user named mysql_user, to keep everything consistent). [I use a unique user here because this is a home security system, after all, and I don't want it breached.] These users are specific to this database; they can be the same users as used elsewhere in the system or can be unique users.

mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON zmdatabase.* TO 'zm_user'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON zmdatabase.* TO 'root'@'localhost' IDENTIFIED BY 'password'; (I used my usual root password here).
mysql> quit
mysqladmin reload

Note: mysql commands (i.e. any entered at the mysql> prompt) must end with a semicolon. If you forget the semicolon, nothing will happen.

Myth Zoneminder

MythZoneminder allows you to view your security cameras through Myth TV, essentially. It is a plugin that interfaces the two packages Zoneminder (which must be working on your system) and Myth TV (which must also be working.) It can be found in Synpatic Package Manager as the mythzoneminder package.

See the installation instructions.

如何用Ubuntu Live CD恢复GRUB到启动分区或MBR

Sometimes, if an Ubuntu installation goes wrong, or a Windows NT bootloader overwrites MBR and doesn't recognise the Linux installation, we have to restore our GRUB bootloader that is, generally, very flexible.

First of all, we burn a Hardy Heron (Ubuntu 8.04) ISO (on a CD(R , RW) or DVD (+R , +RW)) or make sure that we have one already.

Then, we change, in the BIOS, the boot load sequence and we put the CD/DVD option first.

After that, we boot the Live CD, we choose the first option and in a few minutes we have arrived at the Live CD Desktop.

So, we go :

 Applications --> Accessories --> Terminal 

Then, we have to remember which is our Ubuntu installation partition.

In our example, it is the second one (/dev/sda2), formatted as ext3, in the first HDD of a SATA controller. We suppose that it is the second one, since, in case we have Windows that demand to be in the first partition (/dev/sda1), this one is occupied.

Now, you have to be really careful. You have to enter the right partition, instead of sda2 (unless it is the same) In the terminal :

  cd /
  
 
  sudo -s -H
  mount -t ext3 /dev/sda2 /mnt
  mount -t proc proc /mnt/proc
  mount -t sysfs sys /mnt/sys
  mount -o bind /dev /mnt/dev
  chroot /mnt  /bin/bash

And now, you are actually "running" Ubuntu within the Hard Drive but through Live CD's terminal.

Now we restore GRUB like that:

1) Restoration to MBR

  grub-install /dev/sda

2) Restoration to partition (example: /dev/sda2)

  grub-install /dev/sda2

In the first case (that is the most usual) you have certainly installed GRUB on MBR after you receive, in the terminal, the message that there are no errors.

After you reboot, you have your favorite bootloader restored.

用Cryptsetup&LUKS加密home分区

First step is to backup all necessary data, if something goes wrong your data will be lost in the process if it's not backed up. Also note that your home folder needs to be located on a separate partition than your root partition, if not see #How to make partitions.

Second, install necessary software:

  sudo apt-get install cryptsetup

Insert the new module, dm-crypt into the kernel:

  sudo modprobe dm-crypt

Check to see what encryption schemes are available:

  cat /proc/crypto

If only MD5 is listed, try inserting the appropriate modules into the kernel:

  sudo modprobe serpent

Above is an example, this could also be twofish, blowfish or anything other crypto module that you would like to use.

The following commands will assume that your home partition is /dev/sda1, please change it to match your own configuration.

Next step we use cryptsetup to change the partition with the luksFormat option, this command will cause you to lose all data on /dev/sda1.

  sudo cryptsetup luksFormat -c algorithm -y -s size /dev/sda1

Where algorithm is the algorithm that you chose above such as serpent aes, etc.

Size is the key size for encryption, this is generally 128 or 256. Without specifying the algorithm or the size, I believe it defaults to AES 256, more information and additional options can be found by reading the man page. The above step will ask you to choose a password and verify it. Do not forget this password.

We can then use the luksOpen option to open the encrypted drive.

  sudo cryptsetup luksOpen /dev/sda1 home

Home is a nickname which cryptsetup uses to refer to /dev/sda1. It also creates the device /dev/mapper/home, this is what you would actually mount to access the filesystem. If you specify another name other than home, it will create the device /dev/mapper/[name], where [name] is the nickname that cryptsetup will use. This step will ask you for your LUKS passphrase, this is the password you created in the previous step.

Next, we create the actual filesystem on the device. I use reiserfs, but it could just as well be ext3.

  sudo mkreiserfs /dev/mapper/home

Or

  sudo mkfs.ext3 /dev/mapper/home

Next step is to mount your encrypted device and copy your files back to your home directory.

  mkdir new_home
  sudo mount /dev/mapper/home new_home
  cp -r * new_home

Now we have to set up everything so that it's ready to go at boot, we need to tell the system that there are encrypted disks that we want mounted.

  gksudo gedit /etc/crypttab

Enter the following as one line at the end of the file.

  home       /dev/sda1       none       luks,tries=3

remember home can be any name that you want, just remember that this maps to /dev/mapper/[name]. The option tries=3 allows 3 tries before a reboot is required or the disk is not decrypted.

Next enter the device info in fstab that we want to mount on boot.

  gksudo gedit /etc/fstab

Enter the information as one line at the end of the file.

  /dev/mapper/home       /home       reiserfs       defaults       0       0

Remember to substitute /dev/mapper/home with your device /dev/mapper/[name], /home is the mount point, since this is our home directory, reiserfs is the filesystem type, put ext3 if you formatted it as ext3. For now the default options should be good, change this if you need/require something else. Also, now is a good time to remove the old /dev/sda1 device entry so that fstab doesn't try to load it at boot. This can be accomplished by commenting out the /dev/sda1 line or deleting it.

Final step is to make sure that the proper modules are loaded at boot time.

  gksudo gedit /etc/modules

Now add dm-crypt and the crypto module that you used earlier, such as serpent, aes, etc. Each needs to be on its own line.

  dm-crypt
  serpent

That should be it, all that's required is a reboot. During the reboot process, the computer will say "Starting early crypto disks" and ask for your passphrase. If the passphrase is accepted, it will unlock the encrypted partition and mount it on your specified mount point.

Aliases

You can change the way you enter a command in order to be executed by entering an alias.

For example, you may enter in a terminal "update-system" (a command that in face doesn't exists) that replaces "sudo apt-get update". You can do the same thing for other commands.

This is what you do. Our example is going to be the alias of the command

 ls -FCal --color=auto

that shows with colours and many details the contents of a folder.

Open a terminal

  Applications --> Accessories --> Terminal

and enter

  gedit ~/.bashrc

Be carefull now. Don't erase anything there.

Now, go to the end of the document and enter

  alias ll="ls -FCal --color=auto"

As you can see, now with the command

  ll

whenever we want, we call, in fact, this one

  ls -FCal --color=auto

You can do the same thing for other commands that need a lot of switches.

Save the document, close the terminal and reopen it. You may now check your new alias.

点滴&教程

修改欢迎屏幕颜色

Originally a brownish color to match the Ubuntu theme, it does not quite fit with other themes and might want to be changed. Enter the gdm.conf file (sudo gedit /etc/gdm/gdm.conf). About two-thirds of the way down you will see the lines:

 BackgroundColor=#dab082
 GraphicalThemedColor=#dab082

Change it to what you like. For all black, use:

 BackgroundColor=#000000
 GraphicalThemedColor=#000000

修改默认终端窗口尺寸

The default size of the Terminal window is around 80 columns wide and 24 columns high. To alter this, edit the file /usr/share/vte/termcap/xterm. You can use the following command:

 sudo gedit /usr/share/vte/termcap/xterm

Just a few lines from the top will be the line reading:

 :co#80:it#8:li#24:\

Change the number right after co# to change the width. Change the number right after li# to change the height.

如何格式化分区

It is very easy to make partitions with Ubuntu .

Open a terminal and type:

  sudo apt-get install gparted

Then navigate to

  System --> Administration --> Partition Editor

Then gParted is going to check for your disks and partitions.

There you can modify your partitions but on those that are NOT on the System.

More info :

1) Usage of gParted (it is distributed as Live CD as well) -->http://howtoforge.com/partitioning_with_gparted

2) How to separate your /home partition in Ubuntu --> http://www.psychocats.net/ubuntu/separatehome

如何启用Compiz Fusion

In Ubuntu Hardy Heron, Compiz Fusion is already installed and is automatically enabled after you have installed your graphics' card drivers.

The only thing you have to do is to install the Compiz Configuration Settings Manager.

Open a terminal and type:

   sudo apt-get install compizconfig-settings-manager

and it shall be installed. After that navigate to:

   System --> Preferences --> Advanced Desktop Effects Settings

and there you may enable/disable any plugin you want.

附加应用程序

Personal tools
Sponsor