Notes on ubuntu over a month

Source: Internet
Author: User
Tags testdisk
Article Title: some notes of ubuntu over a month. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Installation:

Configuration: AMD (939) 3500, upgraded av8 (k8t800pro), chuangjian 1GBddr400, Seagate 250 GB (IDE), jiebo 9600 mobile edition, and Omai 7130 TV card. Download the * i386.iso32bit file to correspond to the vmlinuzand initrd.gz files. These two files must be of the corresponding version and put them in the fat32 partition root directory. Download the grub_for_dos-0.4.2, unzip it to the windows system root directory, remove the boot. ini file read-only attribute, and then open the Add the following statement c: \ grldr = grub and save. Restart windows, select grub from the Startup menu, and press c to enter the command line mode. Enter root (hd0, x) to view the partitions of the three files required for installation in step 2, enter kernel (hd0, *)/vmlinuz, and then enter initrd (hd0 ,*) /initrd.gz press enter, enter boot, and then enter the installation interface. you can install it step by step as prompted. If you want to install it quickly, you can unplug the network cable and install it offline. Otherwise, the installation will be slow.

When selecting the system partition format, I started to use ext3, then I used rfs, and then changed to xfs. I found this was really good. The performance is very good. It has been disconnected several times, but it has almost no effect. Now, the machine has xfs partitions except for a 5 GB ntfs partition.

After entering the system, it is normal, but most of the menus are in English.
Because my dual-nic can directly access broadband, a large package of updates is installed in the system, and then the language support option is opened in the system> system management to hook up Chinese. After the update, the Chinese interface is restarted. If it is kde, it seems to require apt-get to install Chinese characters. You can search for it in the Forum.


System:

Modify the root user password:
Sudo passwd root

Install the compiling environment:
Sudo apt-get install build-essential

Add Source:
Sudo gedit/etc/apt/sources. list
Which of the following sources can be searched on the forum or google?

Update related commands:
Apt-cache search package
Apt-cache show package obtains package information, such as description, size, and version.
Sudo apt-get install package installation package
Sudo apt-get install package--reinstall re-installation package
Sudo apt-get-f install fix and install "-f = -- fix-missing"
Sudo apt-get remove package Delete package
Sudo apt-get remove package--purge delete a package, including deleting a configuration file.
Sudo apt-get update source
Sudo apt-get upgrade updates installed packages
Sudo apt-get dist-upgrade System
Sudo apt-get dselect-upgrade using dselect
Apt-cache depends package for dependency usage
Apt-cache rdepends package is used to check which packages are dependent on this package.
Sudo apt-get build-dep package installation-related compilation environment
Apt-get source package download the source code of the package
Sudo apt-get clean & sudo apt-get autoclean clear useless packages
Sudo apt-get check whether any corrupted dependency exists

The software packages installed by the system apt are usually downloaded to the following folders:
/Var/cache/apt

Install the Java environment:
We recommend that you install JDK, which is no more space than JRE. Sudo apt-get install sun-java6-jdk

Ntfs read/write:
Sudo apt-get install ntfs-3g
Sudo apt-get install ntfs-config

Partition graphics:
Sudo apt-get install gparted

Obtain the UUID of the partition:
Sudo vol_id-u/dev/hdaX

Testdisk:
If there is a problem with the partition table, we recommend using testdisk, diskgen, and fdisk. testdisk supports file systems in many formats and has versions in multiple environments. I have one ext, ntfs, fat and xfs are used to retrieve the problem. Minimize the use of pq and so on.

Hard Disk performance test:
Sudo hdparm-tT/dev/hda
You can search for this command to set the hard disk transmission mode.

New partition user changes:
Sudo mkdir/media/XX
Sudo chown yourname/media/XX

Change the volume label of the partition, which is ext and xfsd:
Sudo e2label/dev/hda5 E_Download
Sudo xfs_admin-L E_Backup/dev/hda12

Right-click the terminal to open the terminal:
Sudo apt-get install nautilus-open-terminal

System icon directory:
Usr/share/icons/hicolor/scalable/apps
/Usr/share/pixmaps/

Rar installation support:
Sudo apt-get install rar unrar

Desktop icon Gnome display or hide:
Gconf-editor
/Apps/nautilus/desktop

Configure sudo fontconfig-voodoo-f-s zh_CN
Install the wenquanyi Font: sudo apt-get install xfonts-wqy
However, I still think the font is nice. You can search for the font installation in the forum. However, it seems that there is a font installation program in kde, which is very convenient.

Samba file sharing:
Sudo apt-get install samba
Sudo apt-get install smbfs
Sudo gedit/etc/samba/smb. conf
; Security = user
Replace the following rows
Security = user
Username map =/etc/samba/smbusers
These are added to the end:
[Share]
Comment = Shared Folder with username and password
Path =/media
Public = yes
Writable = yes
Valid users = 330
Create mask = 0700
Directory mask = 0700
Force user = nobody
Force group = nogroup
Available = yes
Browseable = yes
Modify the section of the workgroup:
Workgroup = WORKGROUP
Displays charset = UTF-8
Unix charset = UTF-8
Dos charset = cp936
Add account: sudo useradd 330
Sudo smbpasswd-a 330
Sudo gedit/etc/samba/smbusers, add 330 = "network username"
Change Password: sudo smbpasswd-a 330
Service test restart: sudo testparm
Sudo/etc/init. d/samba restart
Samba file permissions seem to be related to samba settings and system permissions,


How far is the virtual terminal closed:
/Etc/event. d, getty, etc.

Mouse topic and system:/usr/share/icons
Decompress bash and copy the entire file to the above folder.

Disable IPV6:
Sudo kate/etc/modprobe. d/aliases
Modify this line:
Alias net-pf-10 ipv6: alias net-pf-10 off # ipv6
Sudo kate/etc/hosts
Comment out all IPV6-related lines in the hosts file.

Start the program in parallel, but it does not seem to have any effect on my computer:
Code: sudo kate/etc/init. d/rc
CONCURRENCY = none: CONCURRENCY = shell

Name localhost as the host name
Sudo kate/etc/hosts
127.0.0.1 localhost yourhost
127.0.1.1 yourhost

Disable pango
I know this method has been used in firefox, but it still plays a good role in thunderbird and other applications: sudo kate/etc/environment
Add: pai_disable_pango = "1 ″

Swappiness:
Virtual Memory,
Sudo sysctl vm. swappiness = 10
If you want to change this value permanently, you need to change the sysctl. conf file:
Code: sudo kate/etc/sysctl. conf
Add: vm. swappiness = 10


Service optimization: sysv-rc-conf
Sudo apt-get install sysv-rc-conf
Then:
Sudo sysv-rc-conf
Specific services that can be disabled can be searched.

Grub and lilo:
Grub cannot be installed in the xfs partition.
Lilo Configuration:
Etc/lilo. conf
After lilo is modified, run sudo lilo
Grub Configuration:
/Boot/grub/menu. lst
Do not display the nice gui of grub at startup:
Remove splash from menu. lst startup parameters. If quiet is also removed, the boot information will be more detailed.

Font priority adjustment:
/Etc/fonts/local. conf. The specific settings can be searched.

ATI graphics card:
Sudo apt-get install linux-restricted-modules-$ (uname-r)
Sudo apt-get install xorg-driver-fglrx
Sudo depmod-
Sudo aticonfig -- initial
Echo fglrx | sudo tee-a/etc/modules
Sudo sed-I-e's/"ati"/"fglrx"/'/etc/X11/xorg. conf
Xorg
Code:
Sudo kate/etc/X11/xorg. conf
Delete any unnecessary fontpaths, modules, and wacom devices (unless necessary ).
Ati's graphics card is indeed a bit annoying. It's a good open-source driver, but some programs are not used. If the graph is convenient, you can directly use the restricted driver. If you do it yourself, you will be annoyed. You can refer to relevant forum files, I did it only once.

Install gtk2
Apt-get install libgtk2.0-dev
Curl-config
The program named 'curl-config' can be found in the following package
* Libcurl3-openssl-dev
* Libcurl3-gnutls-dev

System Startup Process:
Start Process
To start a Linux system, follow these steps:
1. Read the MBR information and start the Boot Manager.
In Windows, NTLDR is used as the Boot Manager. If multiple versions of Windows are installed in your system, you need to select the system to enter from NTLDR.
Linux usually uses a powerful, flexible configuration of GRUB or lilo as the Boot Manager
2. Load the system kernel and start the init process.
The init process is the root process of Linux, and all system processes are its sub-processes.
3. The init process reads the information in the "/etc/inittab" file, enters the preset running level, and runs the scripts in the corresponding folder of the running level in sequence. The script is usually started with the "start" parameter and points to a program in the system.
Generally, the startup script under the "/etc/rcS. d/" directory is first executed, and then the "/etc/rcN. d/" directory. For example, if you set the running level to 3, the corresponding startup directory is "/etc/rc3.d /".
4. Start the Xwindow server "xorg" according to the script in the "/etc/rcS. d/" folder"
Xwindow is a graphical user interface system in Linux.
5. Start the logon manager and wait for the user to log on.
By default, the system uses the Windows system as the logon manager and kde as the kdm. you can log on to the system by entering the user name and password on the logon Manager page. (You can find a link named "s13tpd" in the "/etc/rc3.d/" folder)
* Change the running level *
Find the following content in the "/etc/inittab" file:
# The default runlevel.
Id: 2: initdefault:
The number 2 in this row indicates the system running level. The default running level is as follows:
0 Shutdown
1. single-user maintenance mode
2 ~ 5-User Mode
6. Restart
* Service Management
Change startup Service
In the folder corresponding to the running level, you can see many startup script links starting with "S #" and "K #" in the file names.
For example:
Mount the file system to/etc/rcS. d/S35mountall. sh.
/Etc/rcS. d/S40networking enable Network Support
/Etc/rc2.d/s13tpd start the logon Manager
/Etc/rc2.d/S20makedev
/Etc/rc2.d/S23xinetd start the super Process
The init process uses "start" as the parameter and executes all scripts starting with "S #" in the order of file names. The smaller the number in the script name, the earlier it will be executed. For example, if the number in the "/etc/rc2.d/" folder is smaller than "S23xinetd", "s13tpd" is executed before "S23xinetd.
If a script link starts with "K #", it will be executed with the "stop" parameter. If the service is not started, the script is not executed.
For example:
/Etc/rc2.d/K20powernowd power management support for certain hardware
If you want to disable automatic running of a service at startup, You can rename the script in the corresponding running level from "S # xxx" to "K # xxx ".
Manual control service
You can also manually run the startup script with the following parameters to control system services.
Start
Stop
Restart
For example:
/Etc/rc2.d/K20powernowd start
Sometimes you do not know the current running level, and there may not be a script under this level; and the first three characters of this script are not fixed, so it is not easy to remember. In this case, you can directly use "/etc/init. d/"folder STARTUP script ("/etc/rcX. link the startup script in d/to/etc/init. d/"folder), which is the recommended method.
For example:
/Etc/init. d/powernowd start
Tips: The above command is not included in the search path of the environment variable, So enter the complete path.

[1] [2] [3] Next page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.