Những câu hỏi thường gặp khi sử dụng Ubuntu Linux


Đây là nơi bao gồm những câu hỏi về Ubuntu. Nếu điệu kiện cho phép, chúng tôi sẽ tạo một trang web tương tự như Ubuntu FAQ database bằng tiếng Việt.

Bạn cũng có thể tham khảo http://ubuntuguide.org/index.html .

Làm ơn đứng sử dụng trang web này để đăng những câu hỏi chưa được trả lời. Xin cảm ơn các bạn!

Những câu hỏi chung

Làm thế nào để đăng kí một account wiki để giúp phát triển wiki này

Dể có một account, bạn hãy nhấn vào join ở góc bên phải của trang web này, và theo chỉ dẫn. Nếu bạn muốn login lại thì nhấn vào log in. Để thay đổi nội dung trang web, hãy nhấn vào edit.

Tôi nên tin tưởng website này thế nào? điều bảo đảm của các bạn là gì ?

Khi bạn ghé thăm ubuntu web sites. trình duyệt của bạn se hỏi bạn có chấp nhận chứng thực từ trang web đó không.

"Examine Certificate" (Mozilla/Firefox) một dấu chứng thực như thế này sẽ được đưa ra:

trang: https://www.ubuntulinux.com/

  • Chứng thưc dạng SHA1 B3:28:49:EE:5E:DB:42:AE:12:8D:D9:89:42:AC:6A:96:6E:BF:9A:90

  • Chứng thực dạng MD5 AB:0A:AB:3B:B8:E8:51:31:83:F0:4C:D6:EA:60:64:A0

trang: https://bugzilla.ubuntu.com/ or https://launchpad.ubuntu.com/

  • Chứng thưc dạng SHA1 68:07:9E:C6:62:73:0A:E2:7A:E5:0D:BA:9A:96:C3:6F:B8:01:16:B2

  • Chứng thực dạng MD5 76:42:34:72:99:63:04:72:50:15:E3:4B:6A:80:48:9D

The recent discovery of collisions in SHA-1 and MD5 means you may want to confirm both hashes.

Cài đặt Ubuntu

Ubuntu có chạy được với Microsoft Virtual PC 2004 không?

Có chứ, với một chỉ dẫn nhỏ dưới đây.

Ubuntu currently auto-configures !XFree86 during the installation process, asking the user only what resolutions they'd like to enable. The default color depth is automatically set to 24-bpp, and Microsoft Virtual PC 2004 does not support 24-bpp color depth. In practice, this results in garbled graphics output when the X Server starts and the login screen is displayed. To fix this problem, you may manually change the default color depth setting in the !XFree86 config file.

These directions assume that you have installed Ubuntu as your guest operating system normally, have rebooted, and have seen the garbled graphics output.

  • In Microsoft Virtual PC, select Action-->Reset to reboot the virtual machine.

  • Watch for the GNU GRUB prompt (don't blink or you'll miss it) and hit ESC when you see it.
  • Select the option in GRUB for recovery mode, and wait for Ubuntu to boot into the shell. Then type:
  • su root (In 5.04 the Grub recovery option takes you directly to a root prompt and this step is unnecessary. This may be the only way to get a root prompt in 5.04? Maybe you want to take this opportunity to use the passwd command to define a root password since you did not get to define one during installation.)

  • cd /etc/X11

  • vim xorg.conf

  • Now, scroll down to Section "Screen" and find the entry named "DefaultDepth". Change the setting you find there from 24 to 16.

  • Move the cursor to the "2" in 24.
  • Hit the D key. Spacebar key. (You now deleted the "2".)
  • Hit the D key. Spacebar key. (You now deleted the "4".)
  • Hit the I key for insert. Type "16". Hit Ctrl-C to stop inserting.
  • Hit a colon, cursor jumps to bottom left. Type a "w" as the command and press Enter. This saves your changes.
  • Hit a colon, type a "q" as command and press Enter. You are now back at shell prompt.
  • To reboot virtual machine, type: shutdown now -r

That's it--the virtual machine should now boot successfully into the beautiful minimalist Ubuntu login screen.

Cài đặt chương trình trong Ubuntu

Làm thế nào để cài đặt VMware?

Xem phần VMware.

Làm thế nào để cài đặt Java?

Xem phần Java.

Làm thế nào để cài đặt mono?

At the moment mono is not in universe. If you want to use mono you can add tseng's mono-repository to your sources.list

  • Add the following lines to your /etc/apt/sources.list:

  deb http://www.getsweaaa.com/~tseng/ubuntu/debs ./
  deb-src http://www.getsweaaa.com/~tseng/ubuntu/debs ./

If you just want to use the applications you do not need the deb-src line.

For specific mono packages on PPC you will need to recompile the source deb packages to binaries. This example uses tomboy:

  # change to a temporary location to do your work
      $ cd tmp
  # update your sources with the new tseng source added
      $ sudo apt-get update
  # get any dependancies required to build the application
      $ sudo apt-get build-dep tomboy
  # have apt-get compile the package into a binary
      $ sudo apt-get -b source tomboy
  # you are left with a binary deb in the current directory that you can install
      $ sudo dpkg --install tomboy_0.2.0-2_powerpc.deb

You should be all done. (SteveGeorge)

  • It is also possible in synaptic. See SynapticHowto for more details.

Use the following data:

  URI:            http://www.getsweaaa.com/~tseng/ubuntu/debs
  Distribution:   ./
  • Could someone who's familiar with this please check this, and correct it as necessary? I don't think I mangled anything reformatting it, but I use neither mono nor Synaptic myself. MartinManey*

Làm thế nào để cài đặt XMMS?

Bạn hãy làm theo chỉ dẫn sau:

  sudo apt-get install xmms

Ban phải enable universe ở sources.list trước khi làm bước này:

  sudo apt-get install mikmod

Cấu hình Ubuntu

Làm thế nào để khởi động Ubuntu với những lựa chọn khác khi đang dùng GRUB?

You can have grub boot the kernel using different options for just the one boot by changing the boot command line using grub's interactive mode:

  • When you see the GRUB Loading message, press ESC to get to the grub menu. Here, you will see several lines with kernel descriptions in them: select the one that does not say recovery using the arrow keys.

  • Press e to edit the commands associated with that kernel. This will bring up another screen with various options, the one you are looking for has kernel in it. Using the arrow keys, select the line with kernel in it and press e to edit the line.
  • This will take you to a screen with the contents of the line in it, just add your new command at the end, then press enter.
  • You will be returned to the previous menu and you should be able to see your altered boot options added to the line you edited (unless the boor command line is too long). Press b to boot using the edited boot command.

Ubuntu will now load with your new option enabled.

Làm thế nào để GRUB khởi động thẳng vào Ubuntu?

Ok, so you have used the above technique and found that you need to permanently make a change to the grub parameters, here is what you need to do.

1. Edit /boot/grub/menu.lst (e.g., sudo gedit /boot/grub/menu.lst) 2. Find the line which looks like:

  • # kopt root=/dev/hda1 ro

3. Add your parameters to the end of the line 4. Save your changes 5. Run sudo update-grub 6. Reboot

See also the GrubHowto.

Làm thế nào để chia sẻ máy in trong mạng LAN?

Ubuntu's default installation of CUPS only listens for local IPP (Internet Printing Protocol) connections. At the present time you have to edit /etc/cups/cupsd.conf to make it available to other machines on your LAN.

There are two things that must be changed on the computer to which the printer is connected:

  1. A line that has Listen can be replaced by Port 631 to listen on all network interfaces, or, if you have a more complex setup and don't want to listen on all interfaces,you can add additional Listen lines for each IP address that you want it to hear. Leaving it changed as Port 631 works best to get things going, in the beginning.

  2. There is a group of lines that further limit what listened-to traffic will be processed. By default it only allows internal loopback (that's the address). You can add individual IP addresses in addition Allow lines, or whole blocks such as a typical router's internal network with 192.168.1.* With the latter added, the block looks as follows.

   <Location />
   Order Deny,Allow 
   Deny From All
   Allow From
   Allow From 192.168.1.*

If you want computer from other networks to be able to print to the printer, then add Allow From lines for them too.

After you are done editing cupsd.conf, restart the cupsd daemon by issuing the command:

sudo /etc/init.d/cupsys restart

To print from Linux clients to your Linux cups server, manually adding the new printer, using the URL ipp://<ipaddress.of.the.computer.connected.to.the.printer>/printers/<name-of-the-printer>, and then choosing the right model of printer, and the driver.

For example, ipp:// was the URL used, when the printer was a LaserJet 3200m connected to a computer with the IP address The <name-of-the-printer> must be the same as that on the computer connected to the printer. Please double check the name of the printer in the Printers Screen on the printer-server.

Another option, if the clients need to be able to print to only printer, which is the one connected to another computer, is to edit the ServerName in the etc/cups/client.conf file.

For example, you should edit the file, and change the servername as shown below:

  ServerName <your_cups_server>

For example, ServerName will work for the LaserJet3200m example we used before.

After you have saved the change, quit the text editor. Next, restart the cupsd daemon on the client computer by issuing the command:

sudo /etc/init.d/cupsys restart
  • If you are going to print from Windows 98 or Windows 95 you'll need additional software from Microsoft in your Windows box (click the link for the relevant operating system).

  • The page [NetworkPrintingFromWinXP] contains some notes on setting up an Ubuntu printer in Windows XP.
  • The page [NetworkPrintingFromWin2000] contains some notes on setting up an Ubuntu printer in Windows 2000.

  • The page [NetworkPrintingFromMacOSX] contains some notes on setting up an Ubuntu printer in Mac OS X.

Có dùng font MS được không?

Enable the multiverse repository, and then install the package msttcorefonts. You can use Synaptic, or use the command

    sudo apt-get install msttcorefonts

Cấu hình Desktop

Làm thế nào để thay đổi ảnh màn hình đăng nhập (GDM theme)?

1. Computer -> System Configuration -> Login Screen Setup 2. Enter your password if prompted 3. Choose the Graphical greeter tab 4. Select an alternate theme

Làm thế thay đổi Splash Image?

1. Applications -> System Tools -> Configuration Editor 2. Choose /apps/gnome-session/options from the tree on the left 3. Change the splash_image key to (e.g.) splash/ubuntu-logo-508x340.png

  • The above does not work for me on a post-RC Warty system. It says pairs and schemes cannot be edited, and refuses to change anything. What does work IME is disabling the splash by way of Computer / Desktop Preferences / Sessions, unchecking the show splash item. MartinManey*

Làm thế nào thay đổi màn hình nền?

1. Computer -> Desktop Preferences -> Desktop Background 2. Select an alternate image, or click Add Wallpaper to add your own

Làm thế nào thay đổi màn hình nền mặc định cho mọi người?

1. Applications -> Run Application 2. gksudo gconf-editor 3. Enter your password if prompted 4. File -> New Defaults Window 5. Choose /desktop/gnome/background from the tree on the left 6. Change the picture_filename key to (e.g.) /usr/share/backgrounds/ubuntu-calendar.png

Làm thế nào điều chỉnh menu Applications?

You can edit existing submenus under Applications by right-clicking in the menu. For example, here's how to add an entry to the Games menu.

  • Select Applications -> Games, and right-click in the menu.

  • Select Entire Menu -> Add new item to this menu.

  • In the window that appears, enter the name that you want to appear in the menu in the Name field, and enter the executable command in the Command field.

  • Click OK.

To edit the 'Applications` menu itself on Hoary, install the [SmegMenuEditor].

On Warty, you can edit the menu in [Nautilus]:

  • Start Nautilus (e.g. select Computer -> Home).

  • In Nautilus, press ctrl-L, type applications:/// in the Location field, and hit Enter. (As you type, the label will occasionally change to Go to:.) This will show a list of the menu entries with their icons.

To add a program to the menu, right-click in Nautilus, select Create Launcher, and fill in the fields. Name is the name that will appear in the menu, and Command is the actual command that will be executed when the menu item is selected. Click on OK to update the menu.

To add a submenu to Applications, right-click in Nautilus and select Create Folder. The name of this new folder will become the entry in the Applications menu. Then double-click on the new folder, and start adding launchers.

To change the Applications menu for all users, go to applications-all-users:/// in Nautilus. You will need root privileges to change this.

  • Note:* You can not customize the Computer menu.

The dreaded extra dead X pointer.

Upon installation on several Toshiba Laptops, we have had a problem with a dual pointer in X. One that works and one that sits in the middle of the screen. Mimimal research on this problem yielded the following fix.

Add the following line:

  • Option "HWCursor" "off"'

to your /etc/X11/XF86Config-4 in the place shown below:

  Section "Device"
        Identifier      "S3 Inc. 86C270-294 Savage/IX-MV"
        Driver          "savage"
        BusID           "PCI:1:0:0"
        Option          "HWCursor"      "off"

Then Reboot X <cntrl> <alt> backspace, and you will only have one working pointer (pflint)

Sử dụng Ubuntu

Làm sao chơi được DVD?

Xin xem RestrictedFormats

Làm thế nào để giải nén file?

(instructions for Hoary) To unrar a file you have to install the unrar package, which is in universe:

  • sudo apt-get install unrar

For some types of RAR file (version 3.0?) you will need unrar-nonfree, available in multiverse:

  • sudo apt-get install unrar-nonfree

To get unrar working in the archive manager (so you can double-click on RAR files to open them) requires one more step due to a bug in file-roller. If you don't have the rar package installed, you need to do this:

  • sudo ln -s /usr/bin/unrar /usr/bin/rar

I have an iBook without an Alt-Gr key. How can I enter special characters like "~@{[]}"?

1. Computer -> Desktop Preferences -> Keyboard 2. "Layout Options" tab 3. In the right-hand list open the "Third level choosers" group 4. Highlight "Press Left Win-key to choose 3rd level" 5. Click "Add"

Làm sao tạo đuợc CD gói để cài offline

Vì lý do nào đó bạn muốn cài offline phầm mềm như cài vào một máy không nối mạng chẳng hạn, bạn có thể tạo CD gói cài offline như sau:

1. Download các gói cần thiết

2. Lưu chúng vào một thư mục

3. Mở terminal window, chuyển đến thư mục đó (dung lệnh cd)

4. Gõ "dpkg-scanpackages . /dev/null | gzip > Packages.gz"

5. Chép thư mục đó lên CD

Su đó bạn có thể thêm CD này vào dữ liệu của apt băng lệnh "sudo apt-cdrom add".

Những Sự Cố Chung

Errors during boot involving shpchp, pciehp, or hw_random.

There are some errors messages that may occur during boot on your computer that look serious, but in fact they are harmless

shpchp, pciehp:

You may see errors that look like this:

  modprobe: FATAL: error inserting shpchp (/lib/modules. Operation not permitted

  modprobe: FATAL: error inserting pciehp (/lib/modules. Operation not permitted

You can ignore these messages, since nothing is really wrong, or you can get rid of the messages by adding shpchp and pciehp to the file /etc/hotplug/blacklist. More information can be found here: BootHotPlugErrors.


You may also see errors during boot about hw_random. These are also harmless errors. You can get rid of them by adding hw_random to /etc/hotplug/blacklist.

Errors during boot involving i823650 and yenta_socket.

During boot, you may see the following errors:

   Device 'i823650' is does not have a release function, it is
   broken and must be fixed.
   * Using yenta_socket instead of i82365                [fail]

The problem is that Ubuntu is trying to install drivers for PCMCIA devices (i.e. laptop hardware), and your computer is not a laptop.

Nothing is actually going wrong, and you can safely ignore these errors. If you really want to get rid of the errors, there are (at least) two methods:

  • Remove the pcmcia_cs package from your Ubuntu system.

    • To do this, you can use Synaptic (where you should mark

      pcmcia_cs for *complete removal*), or you can use the command

   $ sudo apt-get remove --purge pcmcia_cs

My USB/Firewire removable device does not work. How can I help to improve this?

Please help us to debug this, so that we can improve the hotplugging support. As a first step, please execute

  pidof gnome-volume-manager || echo "gvm has died"

in a terminal and check whether the message gvm has died appears. If so, please log out and back in in this case and submit a bug report for further evaluation of the crash.

If gnome-volume-manager is alive: Before plugging in the device, do

  killall gnome-volume-manager; gnome-volume-manager 2> gvm.txt

Then plug in the device and execute the following commands in a second terminal:

  dmesg > dmesg.txt
  lshal > lshal.txt
  mount > mount.txt

Then send a mail with some information and the four resulting \*.txt files attached to martin.pitt@canonical.com.

"No locks available" error with NFS.

If you get the error "WARNING ** : Failed to lock: No locks available" then this is most likely because you are using NFS, but without the statd deamon which Gnome uses when locking files. This also delays the startup of many Gnome applications such as gedit and gpdf with several seconds, so if you experience a slow startup of Gnome applications, try starting them from a shell to see if you get the error.

Solution: Install the nfs-common package. This will install and start statd.

From MarvinTarver Sun May 22 09:49:49 +0100 2005 From: Marvin Tarver Date: Sun, 22 May 2005 09:49:49 +0100 Subject: windows media Message-ID: <20050522094949+0100@https://www.ubuntulinux.org>

From RomanoGiannetti Thu Jun 9 10:21:59 +0100 2005 From: Romano Giannetti Date: Thu, 09 Jun 2005 10:21:59 +0100 Subject: download all needed packages... easy said Smile :-) Message-ID: <20050609102159+0100@www.ubuntulinux.org>

Hi, this is a comment on the "how to make your own Cd for offline use". My problem is this: at work I have fast connection (but not bittorrent, so no DVD download). I have a PC with a Linux (not udbuntu, nor debian) i386. I'd like to download additional packages for a ubuntu amd64 for my home, where I have just a very slow dial-up line. The problem is: how I discover which are the "needed package" to download? I have a little trick organized. I will write an HOWTO one of this days if someone is intersted... for now, look at http://www.dea.icai.upco.es/romano/linux/ubuntu_and_i.php


HỏiĐáp (last edited 2008-08-06 16:17:03 by localhost)