个人工具

“UbuntuHelp:Beginners/FAQ/zh”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
 
(未显示同一用户的21个中间版本)
第1行: 第1行:
{{Translation}} {{From|https://help.ubuntu.com/community/Beginners/FAQ}} {{Translator|王楠}} {{Languages|UbuntuHelp:Beginners/FAQ}} 此页的目的是按顺序地收集对(在完全新手论坛中)常见问题的好的回答。欢迎提建议: [http://www.ubuntuforums.org/showthread.php?t=379658 Feature Requests]
+
{{Copyedit translation|from=https://help.ubuntu.com/community/Beginners/FAQ}} {{From|https://help.ubuntu.com/community/Beginners/FAQ}} {{Translator|王楠}} {{Languages|UbuntuHelp:Beginners/FAQ}} 此页的目的是按顺序地收集对(在完全新手论坛中)常见问题的好的回答。欢迎提建议: [http://www.ubuntuforums.org/showthread.php?t=379658 Feature Requests]
  
 
== '''如何安装Ubuntu''' ==
 
== '''如何安装Ubuntu''' ==
第25行: 第25行:
 
通常来说从Ubuntu软件库安装软件是最好(也是最容易)的方法。Ubuntu是一个基于Debian的发行版,因此使用Synaptic, apt-get, 和aptitude (以及dpkg). dpkg, apt-get, 和aptitude都是命令行工具。Synaptic是apt-get的图形界面前端。应用程序被包装成.deb文件: '''注意: 你需要将软件库列表中类似网址的所有行的最前面的“#”号去掉以使所有的软件库生效, 保存该文件并重新载入软件源。'''
 
通常来说从Ubuntu软件库安装软件是最好(也是最容易)的方法。Ubuntu是一个基于Debian的发行版,因此使用Synaptic, apt-get, 和aptitude (以及dpkg). dpkg, apt-get, 和aptitude都是命令行工具。Synaptic是apt-get的图形界面前端。应用程序被包装成.deb文件: '''注意: 你需要将软件库列表中类似网址的所有行的最前面的“#”号去掉以使所有的软件库生效, 保存该文件并重新载入软件源。'''
  
'''''' Ubuntu 或 Gnome
+
'''''Ubuntu 或 Gnome'''''
 
<pre>gksudo gedit /etc/apt/sources.list
 
<pre>gksudo gedit /etc/apt/sources.list
 
</pre>  
 
</pre>  
第110行: 第110行:
 
<pre>sudo lshw | less
 
<pre>sudo lshw | less
 
</pre> <pre>sudo dmidecode
 
</pre> <pre>sudo dmidecode
</pre>
+
</pre>  
 +
==== 其它可能的诊断 ====
  
==== Other possible diagnostics ====
+
'''lsmod''' — 显示Linux内核模块状态的程序''。因此如果我们只想列出USB模块忽略使用情况''
 +
<pre>sudo lsmod | grep -i usb</pre>
 +
或者所有设备的基本信息
 +
<pre>lsmod</pre>
 +
'''显示当前被SCSI子系统连接(并识别)的SCSI设备'''
 +
<pre>cat /proc/scsi/scsi.</pre>
 +
输出看起来是这样的:<br>Attached devices(已连接设备):<br>Host: scsi0 Channel: 00 Id: 02 Lun: 00<br>Vendor: PIONEER Model: DVD-ROM DVD-303 Rev: 1.10<br>Type: CD-ROM ANSI SCSI revision: 02<br>Host: scsi1 Channel: 00 Id: 00 Lun: 00<br>Vendor: IBM Model: DNES-309170W Rev: SA30<br>Type: Direct-Access ANSI SCSI revision: 03 <br>在"Attached devices(已连接设备):"一行的后面,对于每个识别的设备都有3行。其中第一行是在3.1节中讨论过的SCSI地址信息。之后的两行数据是在设备被连接时通过执行INQUIRY 命令获得的。设备顺序与sg驱动顺序之间的关系(大部分时间是相同的)参见9.4节。卸载已有的设备可以使用命令"scsi remove-single-device &lt;h&gt; &lt;b&gt;&lt;t&gt; &lt;l&gt;"&gt; /proc/scsi/scsi,其中参数是host主机,bus总线(channel通道),target目标(SCSI id编号)以及lun。这一命令的成功与否可以通过在其后执行cat /proc/scsi/scsi来检测。如果设备处于使用中(例如设备上的文件系统还处于挂载状态)卸载操作可能失败。可以通过使用"scsi add-single-device &lt;h&gt; &lt;b&gt; &lt;t&gt; &lt;l&gt;" &gt; /proc/scsi/scsi 命令添加新的设备,其中参数是host主机,bus总线(channel通道),target目标(SCSI id编号)以及lun。这一命令的成功与否可以通过在其后执行cat /proc/scsi/scsi来检测。[1]
  
'''lsmod''' — program to show the status of modules in the Linux Kernel ''so if we wanted to just list USB modules and ignore case''
+
<br> SCSI子系统不支持SCSI设备的热添加
<pre>sudo lsmod | grep -i usb
+
 
</pre>
+
<br> (在相应的SCSI并行总线上也可能存在电问题)。因此强烈建议使用添加/删除单个设备时如果要重新插入SCSI设备务必确认在同一条SCSI总线上的其它设备处在非工作状态 。要输出内部SCSI命令模块列表可以使用"scsi dump &lt;n&gt;" &gt; /proc/scsi/scsi ,其中数字&lt;n&gt; 不起作用。它可能只被在SCSI子系统内跟踪bug的人感兴趣。
or all devices general info
+
 
<pre>lsmod
+
要开始(或停止)向控制台/日志发送日志信息,可以使用"scsi log &lt;token&gt; &lt;n&gt;" &gt; /proc/scsi/scsi命令,其中&lt;token&gt;是: {all, none, error, timeout, scan, mlqueue, mlcomplete, llqueue, llcomplete, hlqueue, hlcomplete, ioctl}中的一个选项, &lt;n&gt;是0到7之间的一个数字。参数token为"all""none"时不使用&lt;n&gt;参数。 前缀的含义:
</pre>
+
 
'''To display the SCSI devices currently attached (and recognized) by the SCSI subsystem use'''
+
&nbsp;&nbsp;&nbsp; hl 上层驱动 [特例: 推荐使用"timeout(超时)"] ml 中层驱动 ll 底层驱动
<pre>cat /proc/scsi/scsi.
+
 
</pre>
+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [适配器驱动通常有其自己的标志]
The output looks like this: Attached devices: Host: scsi0 Channel: 00 Id: 02 Lun: 00 Vendor: PIONEER Model: DVD-ROM DVD-303 Rev: 1.10 Type: CD-ROM ANSI SCSI revision: 02 Host: scsi1 Channel: 00 Id: 00 Lun: 00 Vendor: IBM Model: DNES-309170W Rev: SA30 Type: Direct-Access ANSI SCSI revision: 03 After the "Attached devices:" line there are 3 lines for each recognized device. The first of these lines is SCSI address information discussed in Section 3.1. The following 2 lines of data are obtained from a INQUIRY command that was performed on the device when it was attached. See Section 9.4 for the relationship between the ordering of these devices compared with the sg driver's ordering (which most of the time is the same). Existing devices can be removed using echo "scsi remove-single-device &lt;h&gt; '''&lt;t&gt; &lt;l&gt;" &gt; /proc/scsi/scsi where the variables are host, bus (channel), target (scsi id) and lun. The success (or otherwise) of this command can be determined by sending a subsequent cat /proc/scsi/scsi command. The removal will fail if the device is busy (e.g. if a file system on the device is mounted). New devices can be added using echo "scsi add-single-device &lt;h&gt; &lt;b&gt; &lt;t&gt; &lt;l&gt;" &gt; /proc/scsi/scsi where the variables are host, bus (channel), target (scsi id) and lun. The success (or otherwise) of this command can be determined by sending a subsequent cat /proc/scsi/scsi command. [1] The SCSI subsystem does not support hot-plugging of SCSI devices (there may also be electrical issues on the associated SCSI parallel bus). It is recommended that those who use add+remove-single-device make sure that other devices on that SCSI bus are inactive if re-plugging is going to take place. To output a list of internal SCSI command blocks use echo "scsi dump &lt;n&gt;" &gt; /proc/scsi/scsi where the numeric value of &lt;n&gt; doesn't matter. This is probably only of interest to people chasing down bugs within the SCSI subsystem. To start (or stop) logging information being sent to the console/log use echo "scsi log &lt;token&gt; &lt;n&gt;" &gt; /proc/scsi/scsi where &lt;token&gt; is one of: {all, none, error, timeout, scan, mlqueue, mlcomplete, llqueue, llcomplete, hlqueue, hlcomplete, ioctl} and &lt;n&gt; is a number between 0 and 7. The tokens "all" and "none" don't take an &lt;n&gt; argument. Prefix meanings: hl upper level drivers [exception: sg uses "timeout"] ml mid level ll lower level drivers [adapter drivers often have there own flags] The value "0" turns off logging while "7" maximizes the volume of output. Logging information will only be output if CONFIG_SCSI_LOGGING was selected in the kernel build.'''Warning''''''': "scsi log all" (and several other variants) can cause a logging infinite loop if the log file (typically /var/log/messages ) lies on a SCSI disk. Either turn off the kernel logging daemon or direct its output to a non SCSI device. Notes [1] The parsing of "add-single-device" and "remove-single-device" is rather inflexible. Hence it is best to stay close to the demonstrated syntax with no extra spaces (and no tabs).'''Something else to check/try: Add irqpoll to grub'''
+
 
<pre>'''gksudo gedit /boot/grub/menu.lst
+
"0"值设置会关闭日志,"7"值设置表示最大化日志输出信息。日志信息只有在编译内核时选择了CONFIG_SCSI_LOGGING的情况下在会输出。
'''</pre>
+
 
# '''defoptions=quiet splash noapic irqpoll'''
+
'''Warning'':''''' 如果日志文件(通常在/var/log/messages)被放置在SCSI盘上时,"scsi log all" (及其它几个变量)可能导致无限循环的记录。因此要么关闭内核的日志守护进程要么将其输出设置到一个非SCSI设备。
 +
 
 +
说明[1] 短语"add-single-device" "remove-single-device" 是很严格的。因此最好与示例的语法报保持一致而不使用额外的空格(也不要使用tabs制表键)。
  
''''sudo update-grub''''
+
'''其它需要检查/尝试的:向grub添加irqpoll(中断轮询)'''
 +
<pre>gksudo gedit /boot/grub/menu.lst</pre>
 +
# defoptions=quiet splash noapic irqpoll 'sudo update-grub'
  
 
=== '''WiFi''' ===
 
=== '''WiFi''' ===
  
'''Although often WiFi will work out of the box, sometimes a particular WiFi card will work in either Ubuntu 6.06 LTS or 6.10 but not both. Therefore if you are having problems with your WiFi you may want to try a different version of Ubuntu. See WirelessNetworking for instructions on how to configure your wireless connection. If you are still having problems with your WiFi you can try to manually configure the interface. In some cases there may be more than one method to get your wireless card to work. Make sure to keep track of which set of instructions you have followed in order to avoid unnecessary repetition. The first step is to identify which wifi card you have so that you can pick the relevant set of instructions, to do this type the following in the terminal:'''
+
虽然WiFi的工作状况经常存在西多不确定性,有时同一块WiFi网卡在Ubuntu 6.06 LTS或6.10下是能够工作的,但不是在两者下都行。因此如果你的WiFi存在问题,你可能可以在不同的Ubuntu版本下试一试。关于如何配置你的无线连接的步骤参见[[UbuntuHelp:WifiDocs/WirelessNetworking|WirelessNetworking]]。如果你的WiFi仍然存在问题,你可以尝试手动的对接口进行配置。在一些情况下可能有不止一种方法让你的无线网卡工作起来。确保保存所用指令的跟踪以避免不必要的重复。第一步是识别你的WiFi无线网卡以便选择相关的指令集,在终端中输入以下指令来完成这一步:
<pre>'''lspci
+
<pre>lspci</pre>  
'''</pre>  
+
你所寻找的输出应该看起来与这个类似:
'''The output you are looking for will look similar to this:'''
+
<pre>00:09.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)</pre>  
<pre>'''00:09.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)
+
一旦你已经识别了你的WiFi网卡你就可以进行[[UbuntuHelp:WifiDocs|WifiDocs]]页的过程并选择相应的指令了(不要被这个长列表吓坏了,你只需要找到相对应的项)。请注意 Ubuntu 6.06和6.10本身不支持WiFi访问WPA加密网络。你需要安装附加的包来访问这一类网络。更多信息请阅读[[UbuntuHelp:WifiDocs/WPAHowTo|WifiDocs/WPAHowTo]]。 参阅[[UbuntuHelp:WirelessTroubleShootingGuide|Wireless Troubleshooting Guide]]
'''</pre>  
+
'''Once you have identified your WiFi card you can proceed to the [[UbuntuHelp:WifiDocs|WifiDocs]] page and pick the relevant instructions (don't let the long list scare you, you only need the relevant entries). Please note that Ubuntu 6.06 and 6.10 do not natively support WiFi access to WPA encrypted networks. You will be required to install additional packages to access such networks. For further information please read [[UbuntuHelp:WifiDocs/WPAHowTo|WifiDocs/WPAHowTo]] For further information, see the [[UbuntuHelp:WirelessTroubleShootingGuide|Wireless Troubleshooting Guide]].'''
+
  
=== '''Winmodem''' ===
+
=== '''Winmodem(Windows调制解调器)''' ===
  
'''''No information yet.'''''
+
'''''还没有信息。'''''
  
=== '''Printers''' ===
+
=== '''打印机''' ===
  
'''''No information yet.'''''
+
'''''还没有信息。'''''
  
== '''Multimedia''' ==
+
== '''多媒体''' ==
  
'''People sometimes have problems with certain types of audio and video file, or do not like the default multimedia applications. See below for information on working with multimedia in Ubuntu:'''
+
有时有些格式的音频或视频文件对一些人来讲有问题,或者不喜欢默认的多媒体应用软件。Ubuntu下的多媒体工作请参见以下信息:
  
* '''[[UbuntuHelp:RestrictedFormats|Restricted Formats]] - Information on playing multimedia files which use restricted formats'''
+
* [[UbuntuHelp:RestrictedFormats|Restricted Formats]] - 受限格式多媒体文件播放的信息。
* '''[[UbuntuHelp:MultimediaApplications|Multimedia Applications]] - Listings of multimedia software available with Ubuntu'''
+
* [[UbuntuHelp:MultimediaApplications|Multimedia Applications]] - Ubuntu下可用的多媒体软件列表。
  
== '''System Administration''' ==
+
== '''系统管理''' ==
  
'''Sometimes you may need to perform administrative tasks on your system. This section provides help with some common administrative tasks.'''
+
有时你可能需要在你的系统上运行管理任务。这一节为一些常用管理任务提供帮助。
  
=== '''Mounting Disk Partitions''' ===
+
=== '''挂载磁盘的分区''' ===
  
'''Sometimes, in order to access a hard drive (or a partition on the hard drive), you must ''mount'' the hard drive. Mounting is when Ubuntu connects a disk to itself, thus making it available for access. Different disks/partitions can have different ''file system types''. A file system is a way of organizing information on a disk, and much initial configuration depends on the tye of file system the disk has.'''
+
有时为了访问一个硬盘(或者硬盘上的一个分区)你必须''mount(挂载)''这个硬盘。 挂载是将磁盘连接至Ubuntu使之能够被访问。不同的磁盘/分区可以有不同的''文件系统类型''。一个文件系统是一种组织磁盘上信息的方法,许多初始化配置依赖于磁盘所具有的文件系统的类型。
  
 
==== '''Windows''' ====
 
==== '''Windows''' ====
  
'''To mount a Windows disk for both reading and writing:'''
+
为读写操作挂载一个Windows盘:
  
# '''For ''vfat'' (FAT32) format disks, use <code><nowiki>umask=000</nowiki></code>'''
+
# 对于''vfat'' (FAT32) 格式的磁盘,使用 <code><nowiki>umask=000</nowiki></code>
# '''For ''NTFS'' format disks, use [http://doc.gwos.org/index.php/NTFS-3g ntfs-3g] and an <code><nowiki>/etc/fstab</nowiki></code> entry something like this:'''
+
# 对于''NTFS''格式的磁盘, 使用[http://doc.gwos.org/index.php/NTFS-3g ntfs-3g]以及<code><nowiki>/etc/fstab</nowiki></code>入口,与下面类似:
<pre>'''/dev/hda1 /media/windows ntfs-3g defaults 0 0
+
<pre>/dev/hda1 /media/windows ntfs-3g defaults 0 0</pre>  
'''</pre>  
+
&nbsp;&nbsp;&nbsp; 3. 一个替代品是ntfs-config。ntfs-config通过一个GUI(图形用户界面)使用ntfs-3g来挂载windows分区。更多信息参见[http://www.psychocats.net/ubuntu/mountwindows Mount Windows (Psychocats)] [http://doc.gwos.org/index.php/Ntfs-config ntfs-config (GWOS)]。<br>
'''1.#3 An alternate is ntfs-config. ntfs-config uses ntfs-3g to mount windows partitions via a GUI. See [http://www.psychocats.net/ubuntu/mountwindows Mount Windows (Psychocats)] and [http://doc.gwos.org/index.php/Ntfs-config ntfs-config (GWOS)] for more information.'''
+
  
 
==== '''Linux''' ====
 
==== '''Linux''' ====
  
'''To set permissions:'''
+
设置权限:
  
# '''Mount the partition'''
+
# 挂载分区
# '''Use ''chmod'' on the directory which you mounted the disk to by typing something like <code><nowiki>sudo chmod 755 /mount/point</nowiki></code> into a Terminal'''
+
# 对磁盘挂载的文件夹使用''chmod''命令,在终端中输入类似<code><nowiki>sudo chmod 755 /mount/point。</nowiki></code>'
  
'''To mount a partition at boot you will need to edit the <code><nowiki>/etc/fstab</nowiki></code> file. For an overview of fstab see [http://doc.gwos.org/index.php/Understanding_fstab Understanding fstab (GWOS)]. If you would like to access EXT2 and EXT3 partitions from Windows, take a look at [http://www.fs-driver.org/url FS-Driver]. See [http://www.psychocats.net/ubuntu/mountlinux Mount Linux (Psychocats)] for more information.'''
+
想在系统引导时挂载分区你需要编辑<code><nowiki>/etc/fstab</nowiki></code>文件。fstab的综述请参见[http://doc.gwos.org/index.php/Understanding_fstab Understanding fstab (GWOS)]。如果你想在Windows下访问EXT2和EXT3分区,参见[http://www.fs-driver.org/url FS-Driver]。更多信息参见[http://www.psychocats.net/ubuntu/mountlinux Mount Linux (Psychocats)]
  
== '''Server Install''' ==
+
== '''服务器安装''' ==
  
'''Server installs typically have no GUI, and servers may administered remotely via SSH or Webmin. If you are new to server installs you can add a light window manager such as Fluxbox, [[UbuntuHelp:IceWM|IceWM]], Openbox, or the Ubuntu desktop.'''
+
服务器安装通常没有鼓形用户界面,而且服务器有可能是通过SSH或Webmin远程管理的。如果你对服务器安装不熟悉你可以添加一个轻量级的窗口管理器,如Fluxbox, [[UbuntuHelp:IceWM|IceWM]], Openbox, 或者Ubuntu桌面。
  
 
----
 
----
  
 
[[Category:UbuntuHelp]]
 
[[Category:UbuntuHelp]]

2008年5月4日 (日) 13:58的最新版本

此页的目的是按顺序地收集对(在完全新手论坛中)常见问题的好的回答。欢迎提建议: Feature Requests

如何安装Ubuntu

安装操作系统(OS)对大多数计算机用户来讲是一件困难并且陌生的任务。在开始之前,你最好备份关键性的数据。在着手时你将会面临分配硬盘分区(为新的操作系统腾出地方)以及安装开机引导器(boot loader)(用于引导你的多个操作系统)的任务。幸运的是,安装Ubuntu相对来说要容易得多。你需要烧录一张CD,之后从这张光盘启动你的计算机,这能让你能够预览一下Ubuntu操作系统。你还可以使用这张光盘意孤行化的简单方式将Ubuntu安装到你的计算机上。参考GraphicalInstall关于使用图形化安装器安装Ubuntu的帮助。偶尔桌面或Live CD安装也会失败。这时,考虑使用Alternate CD或许会有帮助。Alternate CD使用命令行安装器,是针对更高级的用户设计的。如果你感觉使用Alternate CD不舒服,可以从更有经验的Ubuntu用户那里寻求帮助,他们能帮你完成这一过程。在irc.freenode.net上的#ubuntu的IRC频道是个很不错的获得帮助的地方。总览(更多信息):Installing from the Alternate CD 图形化向导: Windows (NTFS) + Ubuntu

附加信息

下载Ubuntu: GettingUbuntu 如何烧录CD镜像至CD:BurningIsoHowto 从CD引导:BootFromCD 分区基础:Basic Partitioning GRUB: GrubHowto Hermanzone: How to Grub

定制桌面

辅助功能

当Ubuntu安装完成后,对于最新的Ubuntu 7.04 (Feisty Fawn)系统版本,在主菜单(默认情况下在屏幕左上角)中选择系统->参数设置->辅助功能 。选择键盘辅助功能,打开按键粘连以及等其它辅助功能。在老的系统版本中,此设定在系统->参数设置->键盘中。 更多信息请参考Accessibility

基本定制

Desktop Customization

安装软件

软件库

通常来说从Ubuntu软件库安装软件是最好(也是最容易)的方法。Ubuntu是一个基于Debian的发行版,因此使用Synaptic, apt-get, 和aptitude (以及dpkg). dpkg, apt-get, 和aptitude都是命令行工具。Synaptic是apt-get的图形界面前端。应用程序被包装成.deb文件: 注意: 你需要将软件库列表中类似网址的所有行的最前面的“#”号去掉以使所有的软件库生效, 保存该文件并重新载入软件源。

Ubuntu 或 Gnome

gksudo gedit /etc/apt/sources.list

Kubuntu 或 KDE

kdesu kate /etc/apt/sources.list

Xubuntu 或 Xfce

gksudo mousepad /etc/apt/sources.list

服务器用户

sudo nano /etc/apt/sources.list

例如 foo-xvz.deb

  • foo = 应用程序(程序)名
  • -xyz = 版本

dpkg 可以安装一个你已经下载的 .deb文件。 dpkg 负责安装.deb,但不处理依赖关系。apt-get, aptitude, and synaptic可以下载并安装你的应用程序及依赖库。获得更多信息:InstallingSoftware

使用源码安装应用程序

你可以通过编译源码的方式安装程序。源码是程序员创建程序所编写的代码。编译是将这种代码转化为计算机能够识别的代码形式的过程,使用这些编译后的代码程序才能够被执行。Ubuntu软件库里所有可用的程序都处在可以被执行(编译后)的状态。通常来讲你只有在一个应用程序在软件库里不可用的时候才需要编译。对源码的编译可能是一个很棘手的过程,因为在这一过程中很多事情都可能出错。因此只推荐高级用户使用这一方法。要从源码编译生成程序, 首先应安装build-essentialcheckinstall 包。build-essential 安装所有的编译源码所需的基本工具。checkinstall会将你新编译的应用程序转化为Ubuntu/Debian包(.deb)之后安装。这样捉的好处是之后你就可以使用apt-getaptitude来安装或卸载这一程序了。关于checkinstall的更多信息请参考CheckInstall。一般的步骤如下:

  1. 下载源码。
  2. 解压缩源码。源码一般以.tar或类似.zip文件的形式封装 。

注意: 不是所有.tar中的文件都是源码。有的可能是安装脚本,也可能是预编译二进制文件。3 察看README文件以获得更多的信息和指令。

  1. 打开一个终端(应用程序-> 附件-> 终端)
  2. 在终端中敲入 ./configure --help 列出所有选项。
  3. 敲入 ./configure 为编译源码作准备。
  4. 敲入 make 编译源码。
  5. 敲入 sudo checkinstall 创建Ubuntu/Debian安装包。

更多信息清访问: http://cutlersoftware.com/ubuntuinstall/

硬件

很多人遇到过硬件相关的问题。这一节将介绍一些处理常见问题的方法。

识别你的硬件

你的硬件设备上的型号名在Linux下可能毫无意义,重要的是芯片组。另外还应该注意即使同一品牌的一个型号的芯片组也可能有不同版本,甚至是不同的芯片组。

 PCI 设备

  • 我们可以通过在终端中输入lspci来查询硬件以便识别一个PCI设备。
  • 要识别一个图形卡(显卡),我们可以通过在lspci命令的输出结果中查找术语“VGA”的方式缩小硬件查询的范围:
lspci | grep VGA

输出举例: 0000:01:00.0 VGA compatible controller(VGA兼容控制器): nVidia Corporation NV17 [GeForce4 MX 440 ] (rev a3)

USB 设备

  • 要识别一个USB设备,我们可以在终端中输入lsusb来查询。

输出举例: Bus 004 Device 002(总线004设备002): ID 152e:2507 LG (HLDS)

  • 上面我们看到,输出信息是Bus 004 Device 002。如果我们需要指定一个程序/驱动到这一硬件的“位置”就很方便了。
  • ID 号使我们能够查找出这一设备的厂商与型号。从ID 152e:2507 我们可以找到生产商是LG (基本USB信息)。
  • 在终端中运行lsusb -v可以看到更多的关于USB设备的详细信息及其能力。
  • 要查看近期有关于内核识别的USB设备的事件(例如插入与卸载),可以在终端中输入dmesg | tail
  • 要监视关于USB设备的其它事件,可以在终端中敲入sudo udevmonitor

更多关于某些类型的USB设备问题处理的信息请参见 Debugging USB Storage DevicesUSB Flash Drives

硬盘信息

硬盘及分区信息

sudo fdisk -l

你也可以使用gparted,它可以通过包来安装。Installing Software 普通用户安装可卸载设备 pmount 是一个标准mount程序之外的包装,它使普通用户有权限挂载可卸载设备而不需要符合/etc/fstab 的入口。这为诸如GNOME的Utopia项目一类的自动挂载固件提供了一个可靠的基础,并且将以管理员权限运行的代码的数量限制到了最小。这个包还包含了 "pmount-hal" 的包装,它自硬件抽象层读取如卷标、挂载选项一类的信息,传递至pmount。 如果你想使用这一功能可以安装"hal"包。如果安装了一个具有LUKS功能的加密安装包,pmount可以透明地挂载加密的卷。例如

pmount /dev/sda

对于没有被识别的USB存储设备你可以尝试:

sudo modprobe usb-storage
sudo locate usb_storage

在pmount命令之后。

查询主板 bios

对于主板型号 /bios 版本等

sudo lshw | less
sudo dmidecode

其它可能的诊断

lsmod — 显示Linux内核模块状态的程序。因此如果我们只想列出USB模块忽略使用情况

sudo lsmod | grep -i usb

或者所有设备的基本信息

lsmod

显示当前被SCSI子系统连接(并识别)的SCSI设备

cat /proc/scsi/scsi.

输出看起来是这样的:
Attached devices(已连接设备):
Host: scsi0 Channel: 00 Id: 02 Lun: 00
Vendor: PIONEER Model: DVD-ROM DVD-303 Rev: 1.10
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: IBM Model: DNES-309170W Rev: SA30
Type: Direct-Access ANSI SCSI revision: 03
在"Attached devices(已连接设备):"一行的后面,对于每个识别的设备都有3行。其中第一行是在3.1节中讨论过的SCSI地址信息。之后的两行数据是在设备被连接时通过执行INQUIRY 命令获得的。设备顺序与sg驱动顺序之间的关系(大部分时间是相同的)参见9.4节。卸载已有的设备可以使用命令"scsi remove-single-device <h> <b><t> <l>"> /proc/scsi/scsi,其中参数是host主机,bus总线(channel通道),target目标(SCSI id编号)以及lun。这一命令的成功与否可以通过在其后执行cat /proc/scsi/scsi来检测。如果设备处于使用中(例如设备上的文件系统还处于挂载状态)卸载操作可能失败。可以通过使用"scsi add-single-device <h> <b> <t> <l>" > /proc/scsi/scsi 命令添加新的设备,其中参数是host主机,bus总线(channel通道),target目标(SCSI id编号)以及lun。这一命令的成功与否可以通过在其后执行cat /proc/scsi/scsi来检测。[1]


SCSI子系统不支持SCSI设备的热添加


(在相应的SCSI并行总线上也可能存在电问题)。因此强烈建议使用添加/删除单个设备时如果要重新插入SCSI设备务必确认在同一条SCSI总线上的其它设备处在非工作状态 。要输出内部SCSI命令模块列表可以使用"scsi dump <n>" > /proc/scsi/scsi ,其中数字<n> 不起作用。它可能只被在SCSI子系统内跟踪bug的人感兴趣。

要开始(或停止)向控制台/日志发送日志信息,可以使用"scsi log <token> <n>" > /proc/scsi/scsi命令,其中<token>是: {all, none, error, timeout, scan, mlqueue, mlcomplete, llqueue, llcomplete, hlqueue, hlcomplete, ioctl}中的一个选项, <n>是0到7之间的一个数字。参数token为"all"和"none"时不使用<n>参数。 前缀的含义:

    hl 上层驱动 [特例: 推荐使用"timeout(超时)"] ml 中层驱动 ll 底层驱动

       [适配器驱动通常有其自己的标志]

"0"值设置会关闭日志,"7"值设置表示最大化日志输出信息。日志信息只有在编译内核时选择了CONFIG_SCSI_LOGGING的情况下在会输出。

Warning: 如果日志文件(通常在/var/log/messages)被放置在SCSI盘上时,"scsi log all" (及其它几个变量)可能导致无限循环的记录。因此要么关闭内核的日志守护进程要么将其输出设置到一个非SCSI设备。

说明[1] 短语"add-single-device" 和"remove-single-device" 是很严格的。因此最好与示例的语法报保持一致而不使用额外的空格(也不要使用tabs制表键)。

其它需要检查/尝试的:向grub添加irqpoll(中断轮询)

gksudo gedit /boot/grub/menu.lst
  1. defoptions=quiet splash noapic irqpoll 'sudo update-grub'

WiFi

虽然WiFi的工作状况经常存在西多不确定性,有时同一块WiFi网卡在Ubuntu 6.06 LTS或6.10下是能够工作的,但不是在两者下都行。因此如果你的WiFi存在问题,你可能可以在不同的Ubuntu版本下试一试。关于如何配置你的无线连接的步骤参见WirelessNetworking。如果你的WiFi仍然存在问题,你可以尝试手动的对接口进行配置。在一些情况下可能有不止一种方法让你的无线网卡工作起来。确保保存所用指令的跟踪以避免不必要的重复。第一步是识别你的WiFi无线网卡以便选择相关的指令集,在终端中输入以下指令来完成这一步:

lspci

你所寻找的输出应该看起来与这个类似:

00:09.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)

一旦你已经识别了你的WiFi网卡你就可以进行WifiDocs页的过程并选择相应的指令了(不要被这个长列表吓坏了,你只需要找到相对应的项)。请注意 Ubuntu 6.06和6.10本身不支持WiFi访问WPA加密网络。你需要安装附加的包来访问这一类网络。更多信息请阅读WifiDocs/WPAHowTo。 参阅Wireless Troubleshooting Guide

Winmodem(Windows调制解调器)

还没有信息。

打印机

还没有信息。

多媒体

有时有些格式的音频或视频文件对一些人来讲有问题,或者不喜欢默认的多媒体应用软件。Ubuntu下的多媒体工作请参见以下信息:

系统管理

有时你可能需要在你的系统上运行管理任务。这一节为一些常用管理任务提供帮助。

挂载磁盘的分区

有时为了访问一个硬盘(或者硬盘上的一个分区)你必须mount(挂载)这个硬盘。 挂载是将磁盘连接至Ubuntu使之能够被访问。不同的磁盘/分区可以有不同的文件系统类型。一个文件系统是一种组织磁盘上信息的方法,许多初始化配置依赖于磁盘所具有的文件系统的类型。

Windows

为读写操作挂载一个Windows盘:

  1. 对于vfat (FAT32) 格式的磁盘,使用 umask=000
  2. 对于NTFS格式的磁盘, 使用ntfs-3g以及/etc/fstab入口,与下面类似:
/dev/hda1 /media/windows ntfs-3g defaults 0 0

    3. 一个替代品是ntfs-config。ntfs-config通过一个GUI(图形用户界面)使用ntfs-3g来挂载windows分区。更多信息参见Mount Windows (Psychocats)ntfs-config (GWOS)

Linux

设置权限:

  1. 挂载分区
  2. 对磁盘挂载的文件夹使用chmod命令,在终端中输入类似sudo chmod 755 /mount/point。'

想在系统引导时挂载分区你需要编辑/etc/fstab文件。fstab的综述请参见Understanding fstab (GWOS)。如果你想在Windows下访问EXT2和EXT3分区,参见FS-Driver。更多信息参见Mount Linux (Psychocats)

服务器安装

服务器安装通常没有鼓形用户界面,而且服务器有可能是通过SSH或Webmin远程管理的。如果你对服务器安装不熟悉你可以添加一个轻量级的窗口管理器,如Fluxbox, IceWM, Openbox, 或者Ubuntu桌面。