3.4 Process Management Linux is a multi-user operating system. Multi-user means that multiple users can use a computer system at the same time; multitasking means that Linux can execute several tasks at the same time, which can perform another task while not completing a task. All running things on the Linux system can be called a process. Each user task, each system management daemon, can be called a process. Linux uses all tasks to share system resources with all tasks. Let's take a look at how to control these processes. 1. Startup process There are two ways to start the process in the Linux system: 1) When entering the command directly, start a process directly ?? In normal case, the process will execute at the front desk, then we can't execute new commands. ?? If we add a "&" after the command, the process will be put on the background, we can still perform new commands 2) With the AT, cron, the crontab command can be started just like the planning task in Windows. For a process, the specific method can use the Man command name to query. 2. View the process In the Linux system, we can use the PS command to view the running process, for example: List the process belonging to the current user: # ps pid tty time cmd 16767 PTS / 1 0:00 PS 18029 PTS / 1 0: 00 Bash where the PID represents the process ID, TTY is the process started by this process, and the CMD is a command. If you want to list more detailed information, you can use the command: "ps -auxw". 3. Termination Process One process will be completed automatically after the task is completed. If you want to stop this process, there are two methods: 1) For programs running in the front desk, the process can be aborted directly by the combination key Ctrl C; 2), for the program running in the background, you need to introduce the previous introduction The PS command finds its process number and then uses the "Kill process number" to terminate the process. 3.5 Disk Management System Software and Applications All in the form of a computer in the form of a computer, as system administrators should monitor the usage of disk space at any time. We can use the following two commands to implement: 1. DF command df, is Disk free, as the name refer to check how many space left on the disk. Here is an example: # DF FileSystem 1k-block Used Available Use% MOUNTED ON / DEV / HDA5 4134900 1749728 2175124 45% / / DEV / HDA6 6048320 5741092 0 100% / home showed 6 columns: 1) FileSystem: Hard Disk Partition 2) 1k-blocks: Press the partition size 3) Used: Size size (Press K) 4) Available: Partition Size 5) USE%: The percentage of the space has been used 6) MOUNTED ON: Mounting point can be seen / home is another partition, and now the space has been runned! This is no planning! If you represent a hard disk space for the calculation unit, you can use DF -M, which will use m to calculate the unit. 2. Du command du is Disk usage, just look at the disk usage.
Here is an example: #PD / var / log # du 4 ./uucp 776. Here, we use the du command to list the disk space occupied by the / var / log directory. It statches this directory with a subdirectory: UUCP, occupied 4K, and the files in / var / log directory have 776K. This command has some common options to complete more features: ?? -a will list all files, subdirectories, subdirectories in the current directory, subdirectory under subdirectory ... What is the disk space occupied by bytes in bytes ?? -c Under the final display of a statistical value 3.6 software installed under Red Hat Linux, the application package usually has two formats: 1) RPM package Such as Software-1.2.3-1.i386.rpm. It is a packaged format created by Redhat Linux. 2) TAR package, such as Software-1.2.3-1.tar.gz. It is packaged using a packaging tool Tar using UNIX system. Moreover, most Linux application packages also have certain rules, which follow: Name - version - revision - type, for example: sfotware-1.2.3-1.i386.rpm Software Name: Software version number: 1.2.3 Correction Version: 1 Available platforms: I386, suitable for Intel 80x86 platforms. Type: RPM, an illustration is an RPM package. According to the contents of the Linux application software installation package can be divided into :: 1) is an executable file, which is to run directly after unpacking the package. All packages in Windows are this type. You can use it after you have installed this program. However, pay attention to this software is the platform you use, otherwise it will not be installed. 2) The other is the source program, and after unpacking the package, you also need to use the compiler to compile it into an executable file. This is almost no in the Windows system, because Windows's thoughts are not open source. Typically, use TAR packages, all source programs; and use RPM packages often executable. 1. Applying software RPM to use RPM packaging, RPM, can be called a contribution of Redhat, which makes Linux software installation more easily. 1) Installation: I only need a simple sentence, you can finish it. Execute: RPM -IVH RPM software package name is higher, please see the following table: RPM parameter parameter Description -i Installation Software - T Test Installation, not really installing the -p display installation progress -f no matter any error - Upgrade installation - v Detects if these parameters are installed correctly. More content can refer to the command help of the RPM. 2) Uninstall: I also need to finish simply a simple sentence. Execute: RPM -e software name But note that the software name is used later, not the software package name. For example, when installing Software-1.2.3-1.i386.rpm, you should execute: rpm -ivh software-1.2.3-1.i386.rpm and when uninstalled, then: rpm -e software.
2. Getting to use TAR packaging Application 1) Installation: The entire installation process can be divided into the following steps: ?? Take the application software: Get the method of downloading, purchase the CD; Compressed, such as Gzip, BZ2, etc., you need to decompress first. If it is the most common GZ format, you can execute: TAR-XVZF Software Package Name, you can complete the decompression and unpacking work in one step. If not, first use decompression software, then perform "TAR-XVF Decompression Tar Pack" for unpacking; ?? Read the included install file, readme file; ?? Execute "./configure" command to prepare for compilation ?? Execute the "make" command to perform software compilation; ?? Execute "make install" to complete the installation; ?? Execute "Make Clean" to delete the temporary file generated when installed. Ok, I have a big merit this. We can run the app. But at this time, some readers will ask, how do I execute? This is also a problem with Linux features. In fact, in general, Linux's application software will be stored in / usr / local / bin directory! However, this is not the truth of "all the four seas", the most reliable or see this software's install and readme files, generally will be explained. 2) Uninstall: Usually developers developers rarely consider how to uninstall their own software, and TAR is only the work of packaging, so there is no good unloading method. Make Uninstall is generally provided to uninstall the software. . To be a good operating system, in addition to the performance stability, full function, you should have a friendly operating system, otherwise you will only stay in the study room, it is difficult to spread. Under UNIX systems, most of them use x window as graphical interfaces. In 1984, the Massachusetts Institute of Technology and DEC have developed ATHENA programs, which is the first version of X WINDOW. A non-profitred X alliance was established in January 1988, which is responsible for developing the standards of X Window. After Linux appears, Xfree86 Project Inc. implements an open source based on Linux: Xfree86. X Window Compared to other graphical interface systems: ?? Good network support: X WINDOW uses a C / S network structure, and the program can communicate through the network, and there is a good network transparency. That is to say, users don't need to know that the program is using the remote host resource. Personalized window interface: X WINDOW does not have a uniform specification for window interface, programmers can design it according to demand, and the most famous is the gnome and KDE you want later. ?? Inside the operating system: X WINDOW only defines a standard, not an operating system, so you can run the same X Window software on different operating systems. The entire X WINDOW consists of three parts: ?? x Server: Mainly to control the output and input devices, and maintain the relevant resources, it receives the information of the input device, and pass it to X Client, and pass X Client The information is output to the screen.
So different graphics cards need to choose different X Server, the most important thing when configuring X WINDOW is to configure X Server ?? X Client: It is the core part of the application, it is independent of hardware, each application is A X Client ?? x protocol: X Client The communication between X Server is X Protocol to make X Window easier to use, and different companies and organizations have made many integrated desktop environments. For example, CDE on AIX, Sun OpenServer, and under Linux is mainly GNOME and KDE's double male club. Let's take a look at them. 4.2 GNOME Introduction GNOME was initially initiated by Mexico programming Miguel DE ICAZQ, which was supported by Red Hat. It is now part of the GNU (GNU IS Not UNIX) program, the main purpose is to provide users with a complete, easy to learn to use the desktop environment and provide a powerful application development environment for program designers. In August 1997, in order to overcome the difficulty of QT license agreements encountered by KDE, the 250 programmer headed by Mexico's Miguel DE ICAZA was started, starting from the beginning, this is GNOME. After 14 months of joint efforts, this project was finally completed. Now Gnome has received support for the maximum distributor Red Hat of Linux market share, with a large number of applications, including text processing software Go, spreadsheet software gnumeric, calendar gnomecal, graphic image processing software GIMP, comparable to Photoshop, etc.. Now GNOME and KDE have become two major competitive camps, which will make Linux easier to use.
A large number of applications are also available in GNOME, they are all placed in GNOME (a little feet) à programs, including a lot of applications, below: 1. Applications: Application Software 1 DIA: A Drawing Editor for drawing circuit diagrams; 2) Calendar: a good tool for a set calendar and a schedule; 3) Address book: A address book 4) Gedit: A function is similar to the notepad under Windows This text editor; 5) GNUMERIC: a spreadsheet software similar to Excel under Linux; 6) Time Tracking Tools: a gadget for reminder time; 2. Games: Game Software 1) Gnome Milnes: gnome Mining; 2) Gnibbles: Eat snake games; 3) Freecell: Air Xilong Dragon Game under Windows; 3. Graphics: Graphics Processing Software 1) Electric Eyes: A very excellent graphics processing software, can be described as gnome ACDSEE! 2) XPDF: A tool for reading PDF documents in Linux; 3) The GIMP: A very excellent drawing software, very elephant with Photoshop! 4. Internet: Internet Application Software 1) Dialup Configuration Tool: An interface is very friendly Coiled Internet setting tool; 2) GFTP: A FTP client 3) Pine: A E-mail client software 4) Netscape: Ding Ding browse Software, 5) RH Network Monitor: Network traffic display 5. MultiMedia: Multimedia Software 1) Audio Mixer: Sound Controller 2) CD Player: CD Player 3) XMMS: Winamp is a The 4.3 KDE introduction of the Duzi was initiated in October 1996, which is a completely easy to use desktop environment on X-WINDOW. KDE now except that KFM (similar to IE4.0), KPRESETER (similar to PowerPoint), Killustrator, etc. Heavyweight software, and a considerable user's GUI configuration software helps users configure UNIX / Linux to make them deep Welcome by the user. However, because KDE is based on the QT library developed by Trolltech, it has also been criticized. Although QT itself is very good as a C cross-platform development tool, but unfortunately it is not free software. Qt's license allows anyone to use QT to write free software and free copies to other users, but if you use QT to write non-free software, you need to purchase their license. More importantly, no one can modify the QT source code at will. If Trolltech change QT License, the company is closed or giving people to the acquisition will make KDE before.
In KDE, there are many applications, which are packet in the "Start" menu, saying, I feel that KDE's software application is more than gnome, and the graphical interface is better. 1. Office: Office software This is a famous Koffice kit. 1) KWORD: Word processing software 2) KSPREAD: EXCEL spreadsheet processing software 3) KPRESEnter: A Demo Software similar to PowerPoint 4) KCHART: An Electronic Chart Software 5) Kiiiustrator: An Electronic Publishing Software 2. Develop: Development Tool 1) KDevelop: Integrated Development Environment under a KDE 3. Applications: Application Software 1) Advanced Editor: A Enhanced Text Editing Software 2) Emacs: This is a powerful editing software, in Gnome, it Orthox is the Emacs 3 under the character terminal) Organizer: A schedule Software 4. Internet: Internet Software 1) KPP: A very friendly Co-Down Configuration Tool 2) Kmail: A very beautiful Email client, a bit like Outlook! 3) Chat Client: A IRC Client 4) KppLoad: A Network Traffic Tool 5) Netscape: The famous web browser, there is also integration in GNOME 4.4 Using Window Manager Red Hat Linux 7.1 After the default installation, x WINDOW will use GNOME As a window manager, unless you remove GNOME when you install, and choose the KDE package. Usually we can install these two packages and choose again when you are using. 1) Execute the following command under the character terminal, then X Window window manager has become KDE: # SwitchDesk KDE 2) If you don't want to use KDE, you can use the following command to turn back to GNOME: # SwitchDesk Gnome 4.5 Chinese Red Hat Linux 7.1 1. Install the TrueType font to use Chinese TrueType font in the system, it is best to disable the XFS font server, XFS automatically updates the fonts.dir file under the font directory at boot, which will affect our modification . Log in as root, then execute the Setup tool, close the XFS in the service.
1) Modify the XF86CONFIG-4 configuration file to enter the / etc / x11 directory, edit the XF86CONFIG-4 file with VI, as follows: section "Files" # fontpath "UNIX /: 7100"; comment out this line, add the following A few lines of fontpath "/ usr / x11r6 / lib / x11 / fonts / misc: unscaled" fontpath "/ usr / x11r6 / lib / x11 / fonts / 75dpi: unscaled" fontpath "/ usr / x11r6 / lib / x11 / fonts / 100DPI : UNSCALED "fontpath" / usr / x11r6 / lib / x11 / fonts / misc "fontpath" / usr / x11r6 / lib / x11 / fonts / type1 "fontpath" / usr / x11r6 / lib / x11 / fonts / spetedo "fontpath" / usr / x11r6 / lib / x11 / fonts / 75dpi "fontpath" / usr / x11r6 / lib / x11 / fonts / 100dpi "fontpath" / usr / x11r6 / lib / x11 / fonts / trueType "endsection section" Module "LOAD" dbe "# Double-buffering Load" GLcore "# OpenGL support Load" dri "# Direct rendering infrastructure Load" glx "# OpenGL X protocol interface Load" extmod "# Misc required extensions Load." v4l "# Video4Linux Load" xtt "; Add this line endsection 2) Get the font file SIMSUN.TTTF new to create: / usr / x11r6 / lib / x11 / fonts / trueType, and then copy the partition mount in Windows and copy SIMSUM.TTF to the directory.
3) Generate font list CD / USR / X11R6 / lib / x11 / fonts / trueType # TTMKFDIR> FONTS.DIR # vi fonts.dir modifies the font list file to make it simnsun.ttf -misc-sIMSun-Medium-r -NORMAL - 0-0-0-0-P-0-ASCII-0 SIMSUN.TTTTF -MISC-SIMSUN-Medium-R-NORMAL - 0-0-0-0-P-0-FCD8859-15 SIMSUN . TTF -MISC-SIMSUN-Medium-R-Normal - 0-0-0-0-P-0-ISO8859-1 SIMSUN.TTTF -MISC-SIMSUN-Medium-R-Normal - 0-0-0- 0-P-0-GB2312.1980-0 SIMSUN.TTTF -MISC-SIMSUN-Medium-R-NORMAL - 0-0-0-P-0-Koi8-R #CP Fonts.dir Fonts.Scale 4 ) Modifying the font definition of GTK # vi /etc/gtk/gtkrc.zh_cn The modified content is as follows: style "gtk-default-zh-cn" {fontset = "-Misc-simsun-medium-r-Normal - 14- * - * - * - * - * - * - * - * "} class" gtkwidget "style" gtk-default-zh-cn "2. Install Chinese input method ChinaPut 3.0.1 1) Download the following packages first: chinput -3.0.1-1.I386.RPM PTH-1.3.7-3.I386.rpm unicon2-im.tar.gz 2) Then install: # rpm -ivh pth-1.3.7-3.i386.rpm # rpm -IVH chinput-3.0.1-1.i386.rpm --Nodeps # cp unicon2-im.tar.gz / usr / lib # cd / usr / lib # TAR VFXZ UNICON2-IM.TAR.GZ # RM Unicon2-IM .tar.gz # ln -s libstdc - 2-libc6.1-1-2.9.0.so libstdc - libc6.1-2.so.3 3) Modify some configuration # cd / usr / LIB / ZWINPRO # vi chinput.ad Modify the following places ... chinput.gblocale = zh_cn.gb2312 chinput.big5locale = zh_cn.gb2312 ... chinput.gbfont = -Misc-SIMSUN-Medium-r-Normal - 14 - * - * - * - * - * - - GB2312.1980-0 chinput.big5font = -Misc-simsun-medium-r-NORMAL - 14 - * - * - * - * - * - GB2312.1980-0. .. (Note: Space can not appear in this file, only use Tab instead) 4) Modify ~ / .bashrc file, add the following lines: export lc_all = zh_cn.gb2312 export lang = zh_cn.gb2312 export xmodifiers = @ Im = chinput 3. After the GNOME is restarted, you can display Chinese when you execute StartX, you can display Chinese in GNOME. Then, you can complete the Chinese environment and input method installation by adding ChINPUT to the launch running in Program-> STARTUP Program.