个人工具

UbuntuHelp:Beginners/FAQ

来自Ubuntu中文

Oneleaf讨论 | 贡献2007年5月24日 (四) 09:05的版本 (新页面: {{From|https://help.ubuntu.com/community/Beginners/FAQ}} {{Languages|UbuntuHelp:Beginners/FAQ}} The intention of the page is to gather well-written answers to frequent questions (in the ...)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索


The intention of the page is to gather well-written answers to frequent questions (in the Absolute Beginners Forum) in an orderly fashion.

This page is in development.

Suggestions are welcomed at ~ Feature Requests ~


FAQ

How to Install Ubuntu

Installing a Operating System (OS) is a sophisticated an unfamiliar task. Before you start you should back up your data at a minimum. As you embark you will be confronted with partitioning your hard drive (to make room for a new OS) and installing a boot loader (to boot your various OS).

Fortunately Installing Ubuntu is relatively easy.

Here are a few graphical guides :

GraphicalInstall ~ This guide will get from start to finish.

Occasionally the Desktop, or Live CD, will fail. It can then be helpful to consider the Alternate CD. The alternate CD uses an older installer.

Overview (for further information): Installing from the Alternate CD

Graphical guide: Windows (ntfs) + Ubuntu 6.06 LTS


Additional information

Where to download Ubuntu : GettingUbuntu

How to burn the iso to CD : BurningIsoHowto

Booting from the CD : UbuntuHelp:BootFromCD

Partitioning basics : Basic Partitioning

Grub : GrubHowto

Hermanzone : How to Grub

Desktop customization

Accessibility options

System>preferences>Accessibility is correct on a Feisty (7.04) system, the latest version. Select Keyboard accessibility and enable sticky keys etc

On older system it is under System>preferences>Keyboard.

We also have some accessibility documentation in the link https://wiki.ubuntu.com/Accessibility/doc/Guide

General customization

Desktop Customization

Installing software

Repositories

In general it is best (and easiest) to install from the Ubuntu repositories. Ubuntu is a Debian-based distribution and as such uses Synaptic, apt-get, and aptitude (as well as dpkg). dpkg, apt-get, and aptitude are all command line tools. Synaptic is a GUI front end for apt-get. Applications (programs) are packaged into .deb files :

note you will need to enable all repositories by removing "#" from the front of any line that looks like a web address, save the file and reload sources

Ubuntu or Gnome

gksudo gedit /etc/apt/sources.list

Kubuntu or KDE

kdesu kate /etc/apt/sources.list

Xubuntu or Xfce

gksudo mousepad /etc/apt/sources.list

Server users

sudo nano /etc/apt/sources.list

Example foo-xvz.deb

  • foo = application (program) name
  • -xyz = version

dpkg will install a .deb file you may have downloaded, dpkg will install the .deb, but not handle dependencies.

apt-get, aptitude, and synaptic will download and install your application and dependencies.

For further information : InstallingSoftware


Installing from source code

AKA Compile

In general you will compile an application only if it is unavailable from the repositories.

First install build-essential and checkinstall. build-essential is a meta package for the tools to compile source code. checkinstall will convert your newly compiled application into a .deb and then install. This has the advantage in that you may now use apt-get / aptitude to manage the application.

For further information on checkinstall : CheckInstall

The general steps are:

1. download the source code.

2. Extract the source code. Source code is generally distributed in a tar or archive format similar to a zip file.

  • Note : Not all .tar are source code. Some may be install scripts and others may be pre-compiled binaries.

3. Read any README for further information or instructions.

4. ./configure --help to list all the options

5. ./configure

6. make

7. sudo checkinstall

For further information : http://cutlersoftware.com/ubuntuinstall/


Hardware

General steps to identify

First things first, your model name on your hardware may be meaningless in linux- what is important is the chipset. Also be aware that the same branded model may either have chipset revision or even different chipset.

PCI devices

If we have for instance a pci device we can query in terminal

lspci

If we wanted just graphics card

lspci | grep VGA

example 0000:01:00.0 VGA compatible controller: nVidia Corporation NV17 [GeForce4 MX 440 ] (rev a3)

USB devices

FOR USB

lsusb

example Bus 004 Device 002: ID 152e:2507 LG (HLDS)

Above we see that Bus 004 Device 002 (handy if we need to point a program/driver to hardware location). ID allows us to google the maker and device 152e:2507 and quite handy in this time we see the maker LG (basic usb info)

USB devices greater detail

More detailed info of usb devices and capabilities

lsusb -v

To see recent changes kernel has recognised, best done by pluging in usb and unpluging

dmesg | tail

Monitoring events - ie: If you're running that command when you pull out and replug in your usb item, events should show up.

sudo udevmonitor

To learn more, see here:

Hard drive info

Hard drive and partition information

sudo fdisk -l

mount removable devices as normal user

pmount is a wrapper around the standard mount program which permits normal users to mount removable devices without a matching /etc/fstab entry. This provides a robust basis for automounting frameworks like GNOME's Utopia project and confines the amount of code that runs as root to a minimum.

This package also contains a wrapper "pmount-hal" which reads some information like device labels and mount options from hal and passes them to pmount. Install the package "hal" if you want to use this feature.

If a LUKS capable cryptsetup package is installed, pmount is able to transparently mount encrypted volumes.

example

pmount /dev/sda

For usb storage that dont get recognised you could try:

 sudo modprobe usb-storage
sudo locate usb_storage

followed by pmount command

Query Motherboard bios

for board type /bios version etc

sudo lshw | less
sudo dmidecode
Other possible diagnostics

lsmod — program to show the status of modules in the Linux Kernel so if we wanted to just list usb modules and ignore case


sudo lsmod | grep -i usb

or all devices general info

lsmod

To display the SCSI devices currently attached (and recognized) by the SCSI subsystem use

cat /proc/scsi/scsi.

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 <h> <t> <l>" > /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 <h> <b> <t> <l>" > /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 <n>" > /proc/scsi/scsi where the numeric value of <n> 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 <token> <n>" > /proc/scsi/scsi where <token> is one of: {all, none, error, timeout, scan, mlqueue, mlcomplete, llqueue, llcomplete, hlqueue, hlcomplete, ioctl} and <n> is a number between 0 and 7. The tokens "all" and "none" don't take an <n> 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

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

gksudo gedit /boot/grub/menu.lst
  1. defoptions=quiet splash noapic irqpoll

'sudo update-grub'


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 wifi 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:

lspci

The output you are looking for will look similar to this:

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

Once you have identified your wifi card you can proceed to the 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 WifiDocs/WPAHowTo

For further information :

WirelessTroubleShootingGuide


winmodem

Printers

Multimedia

Legal issues

Further Information

RestrictedFormats

MultimediaApplications

System admin

Mount

In order to access you hard drive (partition) it must first be mounted.

Ubuntu must place the contents of the partition within the file system tree AKA mounting

Mounting and permissions depends on the file system:

Windows

Psychocats Mount windows

For read-write:

  • vfat (FAT) use umask=000
  • ntfs use ntfs-3g and a
            • fstab entry something like this:

/dev/hda1 /media/windows ntfs-3g defaults 0 0

  • An alternate is ntfs-config. ntfs-config uses ntfs-3g to mount windows partitions via a gui

ntfs-config

Linux

Psychocats Mount Linux

To set permissions, mount the partition, then chmod
sudo chmod 755 /mount/point

To mount at boot you will need to edit /etc/fstab (as outlined in the links above). For an overview of fstab see: Understanding fstab

For access to ext2/3 from windows see: [1]

Server Install

Server installs typically have no gui and servers may administrated remotely via ssh or webmin.

If you are new to server installs you can add a light window manager such a Fluxbox, IceWM, Openbox, or the Ubuntu desktop.