Linux a word wonderful question and answer

xiaoxiao2021-03-06  79

For knowledge of Linux systems, it is often 10% of knowledge to solve more than 90% of problems, which is the origin of this article.

--------------------------------------------- -------

001 Modify the host name (bjchenxi) VI / etc / sysconfig / network, modify the hostname first behavior "hostname = host name" (without this line? Then add this line), then run the "Hostname Host Name". Generally, you should also modify the host name in the / etc / hosts file. In this way, the host name is successful regardless of whether you are restarted.

0002 Ret Hat Linux Boot to Text Interface (Do Not Start XWindow) (Bjchenxu) VI / etc / INITTAB ID: X: INITDEFAULT: X = 3: Text Way X = 5: Graphics Mode

0003 Linux automatic upgrade update issues (HUTUWORM, NETDC) For Redhat, find patch at www.redhat.com/corp/support/rrata/, 6.1 After the version comes with a tool Up2date, it can measure which RPM packets need to be upgraded, Then automatically download and complete the installation from the site of the RedHat. Upgrade RPM: Up2date -u upgrade outside Kernel: Up2date -u -f, including kernel: Up2date -u -f due to the red hat network SSL certificate expiration, so I should execute a row of Script before RHN_REGISTER || UP2DATE before updating the certificate: wget -q -O - ​​https://rhn.redhat.com/help/new-cert.sh | / bin / bash debian is still very different from other distributions, using Debian to do server maintenance more convenient; red hat The upgrade is actually troublesome, of course, if you pay the red hat, the service will be different. Debian Upgrade Software: APT-GET Update Apt-Get Upgrade Premise: Configure network and /etc/apt/sources.list, or you can also use the APT-SETUP settings.

0004 WINDOWS Software (BJCHENXU) PARAGON.EXT2FS.Anywhere.2.5.rar and Explore2FS-1.00-PRE4.ZIP

0005 Mount Usage (Sakulagi, SXSFXX) FAT32 Mount Mount -O CodePage = 936, IOCHARSET = CP936 / DEV / HDA7 / MNT / CDAB NTFS partition mount -o iocharset = cp936 / dev / hda7 / mnt / cdrom ISO file mount - O loop /abc.iso / mnt / CDROM floppy disk mount / dev / fd0 / mnt / floppy USB flash memory mount / dev / sda1 / mnt / cdrom All / etc / fstab content mount -a can specify file format "-t format", The format can be VFAT, EXT2, EXT3, etc. Visit DVD Mount -t ISO9660 / DEV / DVD / MNT / CDROM or MOUNT -T UDF / DEV / DVD / MNT / CDROM Note: DVD format is generally one of ISO9660 or UDF

0006 Share local FAT partitions in VMware's LINUX (BJCHENXU) is shared, and then SMBFS is hung in VMware. You can put the following line to / etc / fstab: // Win_IP / D $ / MNT / D SMBFS DEFAULTS, AUTO, UserName = Win_Name, Password = Win_Pass, CodePage = 936, IOCHAREST = GB2312 0 0 where Win_IP is yours Windows IP address; D $ is the shared name of the D disk shared in your Windows; / MNT / D is the directory of the partition mount to Linux; Win_Name and Win_Pass are users in your Windows to read the partition For example, your administrator name and password. If you run /etc/rc.d/init.d/netfs, you will automatically mount this partition when starting. 0007.A Delete files (BJCHENXU) RM ./-a rm - -a tells RM This is the last option, see getopt ls -i listing inum, then use Find. -Inum inum_of_thisfile -exec rm '{}' /; 0007.B Deleting files (BJCHENXU) RM //A0007.C Delete Name Belt / and '/ 0' File (bjchenxu) These characters are unauthorized characters that are not allowed by normal file systems However, it may be generated in the file name, such as the NFS file system under UNIX uses 1. Solving the method on the Mac system, putting the NFS file system under the system that is not filtered to filter '/' characters, contains files with special file names. . 2. You can also remove the other files of the error file name, LS -ID displays the Inum, Umount file system, CLRI containing the file directory, clear the directory of Inum, FSCK, Mount, Check your Lost Found, Rename The File IN it. It is best to remove any file name of any file name! 0007.D Delete the name with invisible characters lists the file name and dump to file: ls -l> AAA then The content of the editing file is added to the RM command to make its content into the format of the above file: vi AAA [RM -R ******] Plus the file plus the execution permission CHMOD X AAA to perform $ AAA 0007.e Delete file size For zero file (bjchenxu) rm -i `find ./ -size 0` Find ./ -size 0 -exec rm {} /; or find ./ -size 0 | xargs rm -f & or for file in * # You define your file type DO if [! -S $ {file}] THEN RM $ {file} echo "RM $ FILE SUCCESS!" Fi Done

0008 RedHat Set the roller mouse (MC1011) After entering X, select the configuration of the mouse, select Wheel Mouse (PS / 2), if the mouse is exception, restart the computer. (Or SU, VI / ETC / X11 / XF86Config, modified PS / 2 to IMPS / 2)

0009 Plus XWindow (bjchenxu) Start with Linux CD, select Upgrade, then select the package separately, install it.

0010 Delete the Linux partition (BJCHENXU) to make a PARTITION MAGIC boot floppy disk, start after starting. Or start with the Win2000 boot CD, then delete.

0011 How to exit the MAN (BJCHENXU) Q0012 does not compile the kernel, the Mount NTFS partition (bjchenxu, hutueworm) original RH8, not upgraded or compiled kernel 1. Google.com Search and download kernel-ntfs-2.4.18-14.i686.rpm 2. rpm -ivh kernel-NTFS-2.4.18-14.i686.rpm 3. MKDIR / MNT / C 4. Mount -T NTFS / DEV / HDA1 / MNT / C or READ Ionnly: http: // linux-ntfs . SourceForge.Net / Read / Write: http://www.jankratochvil.net/project/captive/

0013 TAR Split Compression and Merger (Wongmokin, Waker) Takes a TAR Split Compression by 500m per volume: TAR CVZPF - SOMEDIR | SPLIT -D -B 500M Tar Multi-volume merge: CAT X *> mytarfile.tar.gz

0014 Finding three ways to retrieve the ROOT password (BJCHENXU) when using LILO / GRUB: 1. Change the system to change the single user status, use passwd root to change 2. Install the disc boot system, carry out the Linux Rescue status, will / Partition hooks, as follows: CD / MNT MKDIR HD mount -t auto / dev / hdax (the partition number where the original / partition is located) HD CD HD chroot ./ passwd root can get it 3. Put the hard disk of this unit Down, hang it to other Linux systems, the method used to use the second identical RH8. LILO 1. Type the Linux Single screen when LILO: Tips Show lilo: Linux Single 2. Enter can enter the Linux command line directly 3. #vi / etc / shadow will be the first line, that is, ROOT: and next: The first line will be similar to root :: ... Save 4. #reboot restart, the root password is empty. GRUB 1. When the GRUB screen appears, use the top button to select the one you usually start "Don't choose DOS 哟), then press E-key 2. Use the up and down button again to select you That item that usually launches Linux (similar to kernel /boot/vmlinuz-2.4.18-14 ROOT = Label = /), then press E-key 3. Modify the command line you are now, join Single, the result is as follows: Keernel /Boot/vmlinuz-2.4.18-14 Single Ro root = label = / 4. Enter back, then press B to start, you can go directly to the Linux command line 5. #vi / etc / shadow will first line, That is, ROOT: and next: The first line will be similar to root :: ... save 6. #Reboot restart, the root password is empty

0015 Make Ctrl Alt Del Failure (BJCHENXU) VI / ETC / INITTAB Totors Ca :: Ctrlattdel: / sbin / shutdown -t3 -r Now, you can

0016 how to see the version of the redhat is 7 or 8 (hutueworm) cat / proc / version or cat / etc / redhat-release or cat / etc / iessue

The 0017 file is in which RPM (unparalleled) on www.rpmfind.net, or the rpm -qf file name is obtained

0018 Saves the information of Man or INFO to a text file (bjchenxu) TECSH as an example: man tcsh | col -b> tcsh.txt info tcsh -o tcsh.txt -s0019 utilizes two files to generate a new file ( bjchenxu 1. Remove the two files (repeated rows of rows) 2. Take out the intersection of two files (only files that exist in both files) 3. Delete intersections, leave other Row 1. Cat File1 File2 | Sort | UNIQ 2. Cat File1 File2 | Sort | UNIQ -D 3. Cat File1 File2 | Sort | Uniq -u

0020 Sets the COM1 mouth, let the super terminal login via COM1 port (bjchenxu) confirmed that there are / sbin / agharge, editing / etc / inittab, add 7: 2345: Respawn: / sbin / agsty / dev / TTYS0 9600 9600bps is because of the linkager The default is generally this rate, or it can be set to 19200, 38400, 57600, 115200 Modify / etc / securetty, add a line: TTYS0, make sure the root user can log in to restart the machine, you can unplug the mouse keyboard display (the most Ok, still have to look at the output information)

0021 Delete Directory All files include subdirectory (BJCHENXU) RM -RF directory name

0022 View System Information (BJCHENXU) CAT / Proc / CPUINFO - CPU (IE Vendor, MHz, Flags Like MMX) CAT / Proc / Interrupts - Interrupt Cat / Proc / Ioports - Device IO Port CAT / Proc / Meminfo - Memory Information (IE MEM Used, Free, SWAP Size Cat / Proc / Partitions - All partitions of all devices CAT / Proc / PCI - PCI device information CAT / Proc / Swaps - All SWAP partition information CAT / Proc / Version - Linux version number Equivalent to uname -r uname -a - see information such as system kernel

0023 Remove the extra carriage return (BJCHENXU) SED 'S / ^ m //' Test.sh> back.sh, pay attention to ^ m is a knocking Ctrl_v Ctrl-M or Dos2Unix FileName

0024 Switching X Desktop (LNX3000) If you log in to Linux in a graphic login, click Session on the login interface to select GNOME and KDE. If you are logged in with a text, then execute SwitchDesk Gnome or SwitchDesk KDE, then startX to enter GNOME or KDE. (Or vi ~ / .xinitrc, add or modify to exec gnome-session or exec startkde, then start X) with StartX

0025 Universal Sound Card Driver (LNX3000) OS www.opensound.com/ Alsa www.alsa-project.org/

0026 Change the system language / character set (BEMING / MC1011) to modify the / etc / sysconfig / i18n file, such as lang = "en_us", XWindow displays the English interface, lang = "zh_cn.gb18030", xWindow will display the Chinese interface. There is also a method CP / etc / sysconfig / i18n $ home / .i18n modifies $ home / .i18n file, such as lang = "en_us", XWindow will display the English interface, lang = "zh_cn.gb18030", XWindow displays the Chinese interface . This will change the individual's interface language without affecting other users (Debian does not support GB18030 (RH's Zysong Font is copyrighted) Now there is no free GBK and GB18030 Fonts vi .bashrc export lang = zh_cn.gb2312 export lc_all = zh_cn.gb2312) 0027 Set the screen to 90 columns (BJCHENXU) stty cols 90

0028 Using the MD5SUM file (BJCHENXU) MD5SUM ISOFILE> Hashfile, the MD5SUM file is compared with the Hashfile file content, verify that the mixture value is consistent MD5SUM-C Hashfile

0029 Decomposing multiple ZIP files (BJCHENXU) unzip "*", pay attention to quotation marks can not be less

0030 Look at the PDF file (bjchenxu) Using XPDF or installs Acrobat Reader for Linux

0031 Find the file (bjchenxi) Find. -Type f / (-perm -04000-perm -02000 /) -exec ls -lg {} /;

0032 BJCHENXU, HUTUWORM) Take RedHat8 as an example, XWindow and its terminal do not have to be said, the default is installed, exhaled with Ctrl-Space. Now discuss pure console, please go to http://encon.sourceforge.net/ download ENCON-0.2.1.tar.gz, put in any directory, TAR XVFZ ENCON-0.2.1.tar.gz, CD ENCON-0.2 .1,. / Configure, make, make install. End of installation, want to use, run zhcon, want to exit, run the exit.

0033 Receive the pop-up disc (beike) #eject -t

0034 CD CD made of ISO file (mentally wisdom) cp / dev / cdrom xxxx.iso

0035 Quick Watch Boot Hardware Detection (Music) Dmesg | More

0036 Viewing the use of a hard disk (BJCHENXU) DF -K display DF -H in K, M, G, T ..

0037 View DCHENXU DU -SH DIRNAME -S Displays only the total-h in K, M, G, enhances the readability of information. KB, MB, GB is a converter unit at 1024, and -H is converted at 1000.

0038 Find or delete the process (WWWZC) FUSER FUSER FUSER FUSER -K FileName in use

0039 Installing Software (BJCHENXU) rpm -ivh aaa.rpm tar xvfz aaa.tar.gz; cd aaa ;/configure; make; make install

0040 Character Mode Setting / Delete Environment Variables Under Setting: Export Variable Name = Variable Value Delete: Unset Variable Name CSH Set: STenv Variable Name Variable Value Delete: Unstenv Variable Name 0041 LS How to see hidden files (ie LS -A L in. (Suitable for redhat)

0042 files in RPM installation where to go (BJCHENXU) rpm -qpl aaa.rpm

0043 use src.rpm (bjchenxu) rpmbuild --rebuild * .src.rpm

0044 VIM Display Color or Not Display Color (BJCHENXU) First Make sure the Vim-Enhanced package is installed, then Vi ~ / .vimrc; if there is Syntax ON, display color, Syntax Off, no color is displayed

0045 Linux is a real-time or time-time operating system (BJCHENXU)

0046 Make Bzimage -J's J is in what is mainly used when your system hardware resources are relatively large, use this to speed up the speed of compilation, such as -J 3

0047 Source Pack No (BJCHENXU) You don't install source code, you can see your source code on your CD rpm -i * kernel * source * .rpm.

0048 Modify System Time (bjchenxu, laixi781211, hutueworm) Date -s "2003-04-14 CST", CST referral, time setting with DATE -S 18:10 modified after modifying clock -w Write to CMOS HWCLOCK --SYSTOHC Set The Hardware Clock to The Current System Time

0049 Boot on the partition under Windows (BJCHENXU) to automatically hang the Windows D disk to / mnt / d, open / etc / fstab with VI, add the following line / dev / hda5 / mnt / d vfat defaults, codepage = 936, IOCHARSET = CP936 0 0 Note, first serve in a / mnt / d directory

0050 Linux How to use so many memory (bjchenxu) In order to improve system performance and non-waste memory, Linux makes multiple memory Cache to increase IO speed.

0051 FSTAB last configuration items in what the last two numbers are the first called FS_FREQ, used to determine which file system needs to execute DUMP operation, 0 is not required; the second called FS_Passno, is the system restart FSCK program Detection Disk 1 is the root file system, 2 is another file system. FSCK Detects Disks in Sequence Number, 0 Indicates that the file system is not detected by the file system of the DUMP to perform EXT2 FSCK detection and repair file system

0052 Linux allows the user's password must have a certain length, and comply with complexity (EAPASS) vi /etc/login.defs, change Pass_min_len

0053 Translation Software in Linux Star InterCair Translation King XDict Console, there is a DICT tool, through the DICT protocol to Dict.org, check 11 this dictionary, for example: Dict RTFM

0054 Do not let the display sleep (bjchenxi) setterm -blank 0 setterm -blank n (n is waiting time)

0055 Query Yesterday (gadfly) Date --Date = 'YesterDay' with DAT

0056 XWINDOW How to Screen Show (BJCHENXU) KSNAPSHOT or GIMP

0057 Decompression Small All (Noclouds) TAR-I or Bunzip2 command can decompress .bz2 file tar xvfj example.tar.bz2 tar xvfz example.tar.gz tar xvfz example.tgz tar xvf esample.tar unzip example.zip tar -JVXF Some.bz is the software file-roller that TAR's ZVXF is changed to JVXF ZIP / TAR RH8 with a graphical interface. You can also unnounce the ZIP file with unzip * .rar, unrar * .rar unlined the RAR file, but UnRar is generally unreliable, to download online. # rpm2cpio example.rpm │ CPIO -DIV # Ar p example.de.deb data.tar.gz | TAR ZXF - Alien offers mutual conversion between .tgz, .rpm, .slp, and .deb and other compressed formats: http: / /sourceforge.net/projects/alien sex provides almost all visible compression format decompression interfaces: http://sourceforge.net/projects/sex

0057-2 TAR compression, decompression usage (Platinum) decompression: X compression: c For GZ: z For BZ2: J for display: V Decompression Instance GZ file: tar xzvf xxx.tar.gz bz2 file: tar xjvf xxx.tar .bz2 compressed example GZ file: TAR CZVF XXX.TAR.GZ / PATH BZ2 file: TAR CJVF xxx.tar.bz2 / path

0058 Finding a file in a multi-level directory (Qinghai Lake) Find / Dir -Name FileName.ext du -a | grep filename.ext locate filename.ext

0059 does not allow ordinary users to change the password (Myxfc) [root @ xin_fc etc] # chmod 511 / usr / bin / passwd also wants ordinary users to change password [root @ xin_fc etc] # chmod 4511 / usr / bin / passwd

0060 graphics card is really unable to do (win_bigboy) Go to http://www.redflag-linux.com/, the XFree86 4.3 is installed.

0061 Super Deleting Formatting Tools (Moutention) is safe than pqmagic, establishing deleting formatted gadgets: sfdisk.exe for msdos http://www.wushuang.net/soft/sfdisk.zip

0062 How to make the XMMS playlist display the correct Chinese (MYXFC) - * - * - * - * - * - ISO8859-1, -MISC-SIMSUN-Medium-R-NORMAL - 12 - * - * - * - * - * - GBK-0, * - R - completely copy this thing into your font: Right-click anywhere in the XMMS play tool to see a "option", then select "Select" Select " "and then copy the above font to" playlist "and" User X FONT)

0063 Redhat Linux Plays the original XMMS of the MP3 file (Hehhb) cannot play MP3 (silent), to install an RPM package: RPM -IVH XMMS-MP3-1.2.7-13.p.i386.rpm. Open XMMS, CTL-P, first tick in the upper half of the small box, then select "Fixed (MISC) GBK-0 13" font to display Chinese song song name. Select "Open Audio System Driver 1.2.7 [LIOSS.SO] in the audio output plugin, you can play the MP3 file normally .0064 Install Chinese Font (Hehhb) first download http://freshair.netchina.com.cn/~ George / Sm.sh (Reference: http://www.linuxeden.com/edu/docText.php?docid=2679) SIMSUN18030.TTC can be downloaded in Microsoft website, http://www.microsoft.com/china/ Windows2000 / DownloadS / 18 030.asp It is an MSI file, install it in Mswindows, after installing it, you can find it in the fonts directory under the Windows directory. Take SIMSun.ttc, Simsun18030.ttc, Tahoma.ttf, TahomAbd .ttf copy to / usr / local / temp, then download the shell file in this directory, then open the terminal CD / USR / local / Temp chmod 755 sm.sh ./sm.sh

0065 Loading the FAT32 of the Windows Partition, FAT16 File System (Hehhb) Enters KDE as root, click the "Start Point" icon on the desktop, established the following folders: C, D, E, F, G, USB in / mnt directory. It is used as partitions and USB flash drives under Windows. Use the text editor to open the / etc / fstab file. Add below: / dev / hda1 / mnt / c vfat ocharset = GB2312, umask = 0, codepage = 936 0 0 / dev / hda5 / mnt / d vfat ocharset = GB2312, umask = 0, CODEPAGE = 936 0 0 / dev / hda6 / mnt / e vfat ocharset = GB2312, umask = 0, CODEPAGE = 936 0 0 / dev / hda7 / mnt / f vfat ocharset = GB2312, umask = 0, codepage = 936 0 0 / dev / hda8 / mnt / g vfat ocharset = GB2312, umask = 0, codepage = 936 0 0 / dev / cdrom / mnt / cdrom udf, ISO9660 NOAUTO, IOCHARSET = GB2312, Owner, Kudzu, RO 0 0 / DEV / SDA1 / MNT / USB VFAT IOCHARSET = GB2312, UMASK = 0, CODEPAGE = 936 0 0 store exits. After restarting, you can access the FAT32 or FAT16 format partition, solve the problem of garbled with the Windows partition and the disc Chinese file name. A total of six columns, each column is used for a Tab key. Note that this method can only mount on the FAT partition format. SDA1 is a flash drive.

0066 uses five pens and pinyin in X, the location input method (HMKART) is installed from http://www.fcitx.org/ uploading the FcitX RPM package installation

0067 How to extract the RAR file under Linux http://www.linuxeden.com/download/softdetail.php?softid=883 Download Rar for Linux 3.2.0, decompress the Open MAKE can then use unrar e youfilename.rar Unzip RAR file 0068 How to add / remove the RPM package after the hard disk installation (Sakulagi) redhat-config-packages --ioDir = can specify the directory where the ISO file is located

0069 Character controls the volume (GRUB007, Sky Cloud) Use Aumix. Also, to save the volume size of the OSS, steps are: 1. Adjust the volume to your satisfactory volume 2 with AUMIX, use root users to enter / usr / lib / oss (OSS default installation directory) 3, execute ./savemixer ./mixer.map 4, ok, after the OSS is open, you are adjusting the volume in the first step. PS: Reading Readme in this directory to get more useful information.

0070 Make ISO (GRUB007) DD if = / dev / cdrom of = / tmp / aaa.iso

0071 Delete all things before a few days (including files in the directory name and directory) (SHALLY 5) Find. -Ctime 3-EXEC RM -RF {} /; or find./ -mtime 3 -print | xargs RM -F -r

0072 User's crontab where (hutueworm) / var / spool / cron / next file named by username

0073 Operation of the program (BJCHENXU) SU - username -c "/ path / to / command" is sometimes running a special identity program, you can make Su to do

0074 How to empty a file (BJCHENXU)> FileName

0075 Why can't I display Chinese under OpenOffice (Allen1970) Change font settings Tools-> Options-> Font Replacement Andale Sans Ui -> SIMSUN

0076 How to back up the Linux system (PURGE) Symantec Ghost 7.5 supports EXT3 NATIVE replication

0077 PARTITION MAGIC (WWWWZC) Linux on Linux Next Useful partition tool: parted can modify the partition size, delete / create partitions in real time.

0078 / Proc / Sys / SEM, what is the meaning of each representative? (Sakulagi) / proc / sys / SEM contents below 250 32000 32 128 These 4 parameters are SEMMSL (each user has the maximum number of semaphors), SEMMNS The maximum number of semapses), Semopm (the number of SemoP system calls operated), SemMni (the maximum number of system signals)

0079 What does BIGMEM SMP UP mean in the GRUB boot menu? (LNX3000) SMP: (Symmetric Multiple Processor) Symmetrical Multi-processor Mode Bigmem: Supports 1G Optimized Core Up: (UNI Processor) Mode of Single Processor

0080 ORACLE installer Why is it garbled? (lnx3000) Now Oracle's installer has problems with Chinese support, you can only use the English interface to install, before performing RunInstaller, execute: export lang = c; export lc_all = c

0081 LINUX color represents what is represented by the file (Sakulagi, a mentally mini) blue representation; green represents executable file; red represents a compressed file; light blue represents a link file; gray represents other files; red flash indicates the link file. The problem; yellow is the device file, including Block, Char, and FIFO. Use Dircolors -P to see the default color settings, including various colors and "bold", underscore, flashing, etc. 0082 View how many activities httpd scripts (bjchenxi) #! / Bin / sh while (true) do pstree | grep "* / [httpd /] $" | sed 's /.*-/ ([0-9] [ 0-9] * /) / * / [httpd /] $ // 1 / 'Sleep 3 DONE

0083 How to add a hard disk (good gentleted), shut down, physical connection hard disk if it is the IDE hard disk, pay attention to the main, slave the plate settings; if it is a SCSI hard drive, pay attention to selecting an ID number that is not used. Second, boot, check the hard disk has been detected by Linux DMESG | GREP HD * (IDE hard disk) Dmesg | GREP SD * (SCSI hard disk) or Less / var / log / dmesg If you don't detect your new hard drive, restart, Check the connection and see if the BIOS has recognized it. Third, the partition you can use fdisk, sfdisk, or partition magic under Linux, format MKFS 5, modify FSTAB VI / ETC / FSTAB

0084 How to see the volume of the partition under Linux (Q1208C) E2Label / dev / hdxn, where x = a, b, c, d ....; n = 1, 2, 3 ...

0085 RH8, 9 How to add a new language package after installation (good gentleman) 1.8.0 1. Add the first CD 2.cd / mnt / cdrom / redhat / rpms 3.rpm -ivh TTFONTS-EN_CN-2.11 -29.Noarch.rpm (Simplified Chinese, you can use the Tab key to make up the part of the back, so as not to enter incorrectly) 4.RPM-IVH TTFONTS-ZH_TW-2.11-15.NOARCH.RPM (Traditional Chinese) If you still I want to install Japanese, Korean, try the TTFONTS * .RPM on the second CD. II. 9.0 9.0 is not on the first plate, on the third disk. RPM package name is: TTFONTS-ZH_CN-2.12- 1.Noarch.rpm (Simplified Chinese) TTFONTS-ZH_TW-2.11-19.NOARCH.RPM (Traditional Chinese)

0086 Terminal Catch (TSGX) CAT / DEV / VCSX> Screenshot where x indicates that the X terminal can also run Script Screen.log, and record the screen information to Screen.log. I will record your exit for a while. This is also a good way to grip. This is seen on the Cookbook on Debian. Can be used on RH9. There is no test on other systems.

0087 Let a program continue to run after exiting landing (NETDC) #nohup program name &

0088 MAN Command is not in the path, how to view non-standard MAN files (bjchenxi) nroff -man /usr/man/man1/cscope.1 | more

0089 Run the program (BJCHENXU) SU - username -c "/ path / to / file" in different users, sometimes you need to run a special identity ... you can make Su to do ...

0090 Editing / etc / inittab Direct Effect (BJCHENXU) #init q

0091 Let Linux perform several commands, error stop (bjchenxu) Command1 && command2 && command30092 How to install GRUB to MBR (Bjchenxu, Netdc) GRUB> Root (HD0, 0) GRUB> Setup (HD0) can also be used # grub- Install / DEV / HDA to install GRUB.

0093 Write GRUB (LILO) to the Linux partition guide or the main boot sector (MBR) (BJCHENXU) If you want your computer to start, you will directly enter the operating system startup menu, write grub (lilo) on the MBR. If you are written to the Linux partition, you have to boot with the boot disk. It is recommended to write MBR, convenient point, as to write to MBR is not safe, what explains? Each time Win98, MBR will be modified once, do you think is it unsafe?

0094 How to make multiple system coexistence (BJCHENXU) 98 system, use LILO (GRUB) to boot, 2K / NT uses Osloader boot multi-system

0095 How to turn back in the graphical interface and console (character interface) a. Graphical interface to the console: CTR Alt Fn (n = 1, 2, 3, 4, 5, 6). b. Switch between each console: Alt Fn (n = 1, 2, 3, 4, 5, 6). c. Console to graphics: Alt F7

0096 Redhat Linux Common Command (BJCHENXU) <1> LS: Column Directory. Usage: LS or LS DIRNAME, parameter: -a Displays all files, -l lists files. <2> MKDIR: Build a directory. Usage: MKDir Dirname, parameter :-P build multi-level directory, such as: MKDIR A / B / C / D / E / F -P <3> Mount: Mount partition or mirror file (.IMG) file. Usage: a. Disk Partition: Mount DeviceName MountPoint -O Options, where DeviceName is a device name of disk partition, such as / dev / hda1, / dev / cdrom, / dev / fd0, mountPoint is a mount point, it is a directory, Options is the parameter, if the partition is Linux partition, generally not -O Options, if it is the Windows partition, the options can be IoCharset = CP936, so that the Chinese file name in the Windows partition can be displayed. Use: such as / dev / hda5 is a Linux partition, I want to hang it on the directory A (if you have no directory A, first mkdir a), mount / dev / hda5 a, this directory A is the partition hda5 Things, such as HDA1 is a Windows partition, hung it on B, mount / dev / hda1 b -o iocharset = cp936. b. mirror file: mount filename mountpoint -o loop, filename is the mirror file name (* .Iso, *. img), other don't say, the same is true. Use: If I have an A.iso CD image file, Mount A.iso A -O Loop, so you can browse A.iso's content, *. IMG file. <4> Find: Find files. Usage: Find Indir -Name FileName, Indir is which directory you want to find, filename is the file name you're looking for (you can use wildcard), when using wildcard, FileName is best to use single quotes, otherwise sometimes error, use case: Find. -name test *, find files starting with TEST in the current directory. <5> grep: Find the specified string in the file. Usage: GREP STRING FileName, find String in FileName (available in wildcard) (it is best to use double quotes). Parameters: -r Find in FileName in all subdirectory. Use: grep hello * .c -r Find Hello in all .c files in the current directory (including subdirectory). <5> VI: Editor. Usage: vi filename. FileName is the text file you want to edit. After using the execution vi filename, you may find that you can't edit the text content, don't worry, this is because VI has not entered the editing state, press A or I to enter the editing state, enter the editing state, you can edit the text . To exit the edit status, press the ESC button. The following operations should be in a non-editing state. Find text: Enter / and you want to find text and enter.

Exit: Enter: and Q and Enter, if you modify the text, then you want to use: Q! Enter to you. Save: Enter: W Enter, if it is read-only file, use: w !. Save Exit: Enter: WQ Enter, if you are read-only: wq! Enter. Cancel: Press U. You can cancel one step by one, you can cancel multiple steps multiple times. Copy and paste a line of line: move the cursor anywhere on the line you want to copy, press yy (just twice Y), move the cursor to the previous line to paste, press P, just now, the text will be The next line inserted into the row where the cursor is located, and the original cursor is in the row of all the rows. Copy paste multi-line text: Almost the same line, just yy change to the number of rows to copy to copy, followed by yy, followed. Move the cursor to the specified line: Enter: and the line number and enter, such as moving to 123 lines: 123 Enter, move to the end: $ Enter. 0097 Linux text interface How to turn off the PC speaker (labrun) before the / etc / input Bell-Style None, or Echo "Set Bell-Style None" ~ / .bashrc

0098 Repairing Windows leads to a solution that Linux can't boot (good gentle) If there is no restrict, take the Linux boot disk (or the first installation disc) boot to enter the rescue mode. First find where the original / partition mount is. Redhat is usually / mnt / sysimage. Perform "Chroot / MNT / Sysimage". If it is grub, enter grub-install / dev / hd * (depending on the actual situation); if it is LILO, enter LILO -V, then restart. If the partition changes, the corresponding modification /etc/lilo.conf and /boot/grub/grub.conf will then perform the above command.

0099 Why did the Win2K is very slow (LNX3000, good gentleman), you can't see Linux logical disk in 2000, but can not access? In disk management, select this disk, right click -> Change "Drive Name and Path" -> "Delete" is ok, beware that it is not to delete this disk!

0100 Brake the Linux release version of the ISO file to the disc's method (BJCHENXU) Borrowed the Nero software in Windows, select the image file burning, select the ISO file, burn it!

Network unrelated article supplement

0101 Linux Braided ISO method (HUTUWORM) method 1: Use XcDroast, choose to make a disc, choose ISO file, burn! See http://www.xcdroast.org/xcdr098/faq-a15.html#17 method 2: find Command: CDRecord --scanbus output: 0, 0, 0 0) 'ATAPI' 'CD-R / RW 8X4X32' '5.EZ' Removable CD-ROM burned command: cdrecord -v speed = 8 DEV = 0102 how to do (double eyelid pig) when you can't Cat, this screen will spread when you accidentally Cat, this screen will spread, then you can press Two "Enter" keys, knock "reset", then the screen will return to normal .... 0103 How to uninstall the package (Diablocom) When you know that the command to delete the package is rpm -e xxx, But when we don't know the exact spelling of this XXX, you can query all installed packages or use rpm -qa │GREP XXXX to query the name 0104 as a / TMP folder under Linux (Yulc) Add a line in / etc / fstab: NONE / TMP TMPFS DEFAULT 0 0 or add Mount TMPFS / TMP -T TMPFS -O Size = 128M Note: size = 128m represents / TMP maximum 128M Regardless of the way, as long as Linux restarts, the files under / TMP disappear 0105 LS -LF │ GREP ^ D LS -LF │ GREP / $ LS -F │ GREP / $ 0106 in command List this machine IP address instead of getting the network card information (Yulc) ifconfig │GREP "inet" │CUT-C 0-36│SED -E 'S / [A-ZA-Z:] // g' Hostname - I 0107 Modify / etc / profile or $ home / .profile file How to take effect immediately (Peter333) #Source / etc / profile (or Source .profile) 0108 BG and FG Use (bjchenxu) Enter Ctrl Z, current task Will be suspended and pause, while screen Back to the progress number, at this time, use the "BG% process number" to put this process in the background, and "FG% process number" can be used to let this process in the foreground.

In addition, the Job command is used to check the current BG's process 0109 Ctrl S and Ctrl Q (bjchenxi) Ctrl-S is used to send data to the terminal, the screen is like death, can be recovered with Ctrl-Q 0110 Directory Statistics Script (BJCHENXU) Saves into Total.sh, then use Total.SH absolute path to count the size of the directory of the directory: #! / Bin / sh du $ 1 --MAX-Depth = 1 │ SORT - N│WK '{Printf "% 7.2FM ---->% S / N", $ 1/1024, $ 2}' │sed 's: /. ([^ /] / {1, /} / $: / 1: g '0111 grep does not show itself process (bjchenxi) #ps -aux│GREP httpd│GREP -V GREP GREP -V GREP can cancel the process of the grep itself you execute, the -v parameter is not Display the listed process name 0112 Delete the directory containing a file (WongMokin) Find / MNT / EBOOK / -TYPE F -EXEC GREP "In this input keyword" {} /; -Print -exec rm {} /; 0113 Let the task in CRON not feedback information, this example 5 minutes check one email (wongmokin) 0-59 / 5 * * * / usr / local / bin / fetchmail> / dev / null 2> & 1 0114 in the current Decompression RPM file (BJCHENXU) CAT kernel-ntfs-2.4.20-8.i686.rpm │ rpm2cpio │ PAX -R 0115 combined two PostScript or PDF file (noclouds) $ GS -DNOPAUSE -DBATCH -SDEVICE = PSWRITE / -SOUTPUTFILE = bar.ps -f foo1.ps foo2.ps $ gs - q -dnopause -dbatch -sdevice = pdfwrite / -soutputfile = bar.pdf -f foo1.pdf foo2.pdf 0116 Remove Apache's Manual directory All .en suffix names (bjchenxu) entered the Manual directory code: find ./Regex. * /. EN│AWK -F. '{Printf "MV% s.% S.% S.% S% s.% s.% s / n ", $ 2, $ 3} '│SH 0117 How to get multiple x (noclouds) StartX defaults with Display: 0.0 first X By transmitting parameters to XServer can be used to get a plurality of x: # startx -: 1.0 # startx -: 2.0 ... then switched with Ctrl-Alt-F7 / F8 ...

0118 Let a program continue to run after logging in to run (Noclouds, Bjchenxu) # # DISOWN or NoHUP Command & 0119 Look at the display information of the screen when Linux startup (BJCHENXU) After starting, use the command dmesg to view 0120 Let vi Bell (SAKULAGI) Echo "SET VB T_VB =" >> ~ / .vimrc 0121 Let Fedora After boot automatic login (dzho002) 1) RPM -IHV AutoLogin-1.0.0-7mdk.i586 rpm 2) established file / ETC / Sysconfig / AutoLogin plus one line. User = root 0122 How to configure which service starts (Sky Leisure, Q1208C) Method 1 Run NTSYSV or SETUP command, enter the menu to configure the configuration method 2 ChkConfig --List Display Service ChkConfig Name ON / OFF Turns "Name" Service 0123 Security Delete Linux Step 1 DOS Using FDISK / MBR Use FDISK / MBR to start entering the failed recovery console with Win2000 / XP, using the command fixmbr Step 2 Format the Linux partition as Windows Partition. 0124 After guiding the text interface with a GRUB (Sky Leisure Cloud) After entering GRUB, press A. Enter space 3 can boot into the text interface, but do not modify the system's run level, only valid for the same time.

0125 Test whether PATCH is working properly, and does not apply the change to Kernel (Jiadingjun) Patch - Dry-Run 0126 Redhat and Debian file installation deletion (NETDC) Delete a package: rpm -e DPKG -R Show a package content: rpm -qvl DPKG-C Show all installed packages: rpm -qvia dpkg -l print Information: rpm -qpi DPKG -I Check package Characteristics: rpm -va debsums -a check one package belongs to: rpm -qf DPKG -S Install a new package: rpm -uvh DPKG -I 0127 How to enable new users to force the password after logging in (Cat) #useradd -p '' Testuser; CHAGE -D 0 Testuser 0128 Log Maintenance Tool Logrotate (Hotbox) Configured in /etc/logrotate.conf, the role: Automatic compression when defining a log file reaches a predetermined size or time Log Document 0129 What is the default administrator called in Linux (BJCHENXU) ROOT 0130 how to generate a space file (such as a file length of 1M) byte, that is, the value of each byte is 0x00 (Sakulagi) DD if = / dev / zero of = / tmp / zero_file bs = 1024 count = 1024 0131 REDHAT Linux Steps (HUTUWORM) 1. Set your time zone: TimeConfig Select Asia / Shanghai (if you are in the GMT 8 China) 2. Calibration with standard time server: NTPDATE.NIST.GOV 2.5 Of course, if you are Li Ka-shing, you can calibrate your watch: date -s string (see man date) 3. Write back hardware clock: HWClock - -systo HC 0132 looks for files under the current directory and change the extension (zero summer) Change all .ss files for .aa # find ./ -Name "* .ss" -exec rename .ss .aa '{}' /; 0133 PATCH (Genius ※ Sakura) syntax is patch [options] [OriginalFile] [patchfile], for example: patch -p [Num]

For examples of upgrade packages 2.4.16, it is assumed that the source code directory is in / usr / src / linux, and "patch -p0 file.txt.new mv -f file.txt.new file.txt method 2 vi file .txt input command::% s / 123/456 / g 0135 Format a partition into an EXT3 log Font system (HUTUWORM) mkfs -j / dev / xxxx 0136 opens hard disk ATA66 (laixi781211) / sbin / hdparm -d1 -x68 -C3 -M16 / DEV / HDA melon shell | November 2004, 2004 15: 39 email: melon.lf@163.com Person: http://malon.blogchina.com

Network related articles [Reply]

--------------------------------------------- ------- 0001 Let Apache's default character set to Chinese (bjchenxi) vi httpd.conf, find adddefaultcharset ISO-8859-1 a line Apache version If it is 1. *, change to adddefaultcharset GB2312 if it is 2. * Change to AddDefaultCharset Off and then run /etc/init.d/httpd restart to restart Apache to take effect. 0002 Permanently change IP (BJCHENXU) ifconfig eth0 new IP then edits / etc / sysconfig / network-scripts / ifcfg-eth0, modify IP 0003 remotely display Windows desktop remotely (LNX3000) to install RDESKTOP packet 0004 Manually add default gateway (bjchenxu) With root users, execution: Route Add Default GW Gateway IP want to change the gateway 1 Vi / etc / sysconfig / network-scripts / ifcfg-eth0 Changing Gateway 2 /etc/init.d/network restart 0005 redhat 8.0 on MSN and QQ ( BJCHENXU) Download Gaim 0.58: GAIM-0.58-2.i386.rpm Download QQ plug-in for GCC2.9: libqq-0.0.3-ft-0.58-gcc296.so.gz put the downloaded file in / temp directory, Then delete the GAIM in the system, that is, type commands in the terminal emulator: rpm -e gaim. Start installing the open terminal emulator, continue to perform the following command to install the GAIM version 0.58, namely: CD / TEMP (enter the temp directory) RPM -IVH GAIM-0.58-2.i386.rpm (installation software) When the installation is successful, you can Establish a GAIM icon on the GNOME or KDE desktop. Continue to install QQ plug-in, type command: gunzip libqq-0.0.3-ft-0.58-gcc296.so.gz (decompress file) CP libqq-0.0.3-ft-0.58-gcc296.so / usr / lib / gaim (Copy plug-in to the GAIM library directory) The Software Settings When the GAIM version 0.85 is first launched, the login interface will appear. First select "Plugin", click "Load" in the Plug-in dialog box, load libmsn.so and libqq-0.0.3-ft-0.58-gcc296.so file, and turn it off after confirmation. Then select "All Accounts", continue to click "Add" in the account editor that appears, when you appear, we can enter your QQ or MSN number, login name fill in the QQ number or MSN mailbox. The password fills in the corresponding QQ or MSN password, Alias ​​fill in its own nickname, the protocol selects the corresponding QQ or MSN, and other settings can be default. You can log in when all settings are complete. Since MS is often upgraded to MSN's protocol, the GAIM and MSN plugins on Linux must be upgraded, and there is no no longer-lost solution, please forgive 0006 Isors 22-port now run what program (bjchenxu) LSOF -I: 22 0007 Viewbook IP, Gateway, DNS (BJCHENXU) IP: Log in with root, executes ifconfig.

Where ETH0 is the first network card, LO is the default device Gateway: Log in to the root user, execute netstat -rn, the Gateway, which is starting with 0.0.0.0, is the default gateway, you can also view the / etc / sysconfig / network file, inside Have a specified address! DNS: more /etc/resolv.conf, the content is specified as follows: Nameserver 202.96.69.38 Nameserver 202.96.64.38 0008 RH8.0 Command Line Change the TTL value (CGWeb, LNX) method 1 (after restart): #sysctl - W Net.IPv4.ip_default_ttl = n (n = 0 ~ 255), if n> 255, TTL = 0 method 2 (invalid after restart): #echo n (n is 0 ~ 255)> / proc / sys / net / IPv4 / ip_default_ttl 0009 Open Linux IP Forward (Houaq) Edit /etc/sysctl.conf, for example, change net.ipv4.ip_forward = 0 to NET.IPV4.IP_FORWARD = 1, take effect, use sysctl -a to seek 0010 Mount LAN Other Windows Machine Shared Directory (BJCHENXU) mount -t smbfs -o username = guest, password = guest // machine / path / mnt / cdrom 0011 Allow | Prohibition of root is modified by SSH login (FUN-FreeBSD) Sshd_config: permitrootlogin no│yes 0012 Let root direct Telnet (BJCHENXU, Platinum) Method 1: Edit / Etc/pam.d/login, remove auth request /lib/security/pam_securetty.so This sentence 2: Vi / ETC / securetty Add PTS / 0 PTS / 1 ... 0013 In Linux ADSL device (Wind521) Need a normal Linux at least one network card broadband device has been applied, and has been opened. At present, there are a few ADSL equipment on the market, and their way to work has some subtle differences.

It is the process of completing the Internet through virtual dialing, that is, using the PPPoE device to perform virtual dial-up calls, it is an automatic dial-up work after power-on, then left to our interface is RJ45. The gateway that is generally left to our Dalian area is 10.0.0.2. This device is most likely to deal with. Finally, it is directly assigned to a fixed IP, which is relatively easy to deal with it. 1. The first need is dialing: Several devices communicate with the computer via the ETH interface, so the connection of the hardware device is first, especially the broadband cat, must confirm the correctness (otherwise, don't go anything in a while, don't just count, you don't think about me) and start the system, Confirm that the software is installed on the system (to find the user through RPM -QA│GRep PPPoE), if the user is not installed, in the disc or go to Down to Down, after installing, execute ADSL with root users Setup, this enters the setting status of ADSL data, requires input to apply for broadband usernames and other information, confirm that there is no problem, accept until the end (inside is E text, but can understand, simple, I usually don't have to use a firewall setting, I can choose 0, everyone can consider). After the configuration is complete, the ADSL-START is executed with root users, which will make ADSL's dial-up work, will be online, if there is any specific problem, look at the log (/ var / log / messages) tells you what.

Stop ADSL, execute ADSL-STOP (very simple) 2. The other two are easier to deal with: full-to-day cat: Just set your network card to an IP of a 10 network segment, then the gateway refers to the whole gateway To the IP of the cat, on (10.0.0.2), basically no too much problem fixed IP: Like the NIC configuration, the IP, gateway, and DNS can be fixed by the application. 0014 Let Linux automatic synchronization time (shunz) VI / etc / crontab plus a sentence: 00 0 1 * * root rdate -s time.nist.gov 0015 Linux online resources What are the online resources? Http://lwn.net/ http://www.tldp.org/ http://www.yolinux.com/(Flying-Dance Big Big Pig) http://www.justlinux.com/ http://www.linuxtoday.com/ http: //www.linuxquestions.org/ http://www.fokus.gmd.de/linux/ http://www.linux-tutorial.info/ http://public.www.planetmirror.com/ http: // Www.freebsdforums.org/forums/ http://www.netfilter.org/documentation/ http://www-106.ibm.com/developerWorks/Linux/ domestic http://www.fanqiang.com/ http: / / www.linuxsir.com/ http://www.chinaunix.net/ http://www.linuxfans.org/(deadcat) http://www.linuxeden.com/ http://www.linuxforum.net/ Http://www.linuxAid.com.cn/ http://freesoft.online.sh.cn/ http://www-900.ibm.com/developerWorks/cn/linux/index.shtml http: // www .neweasier.com / Software.html http://www.bluei Dea.com/bbs/archiveContent.asp?id=635906 (SQH) http://westlinux.ywzc.net/(Onesun) 0016 Change SSHD port (bjchenxu) Add a line in / etc / ssh / sshd_config: Port 2222 , / Etc / init.d / sshd restart Restart Triggering Process 0017 Change the Telnet port (bjchenxu) Change the port number 21 of the Telnet in the / etc / service file to the value you want, / etc / init.d / xinetd RESTART Restart Triggering Process 0018 Terminal Mode Is Problem (Sakulagi) Export Term = VT100 0019 Imitation Super Terminal, Linux What Program Connection Router and Switch (Alstone) Minicom 0020 SSH can not automatically disconnect (Wind521) That is Timetou setting ,

Modify TMOUT Variable 0021 What tools use tools to make intrusion detection (BJCHENXU) Snort 0022 Linux CChecker or EFENCE CCHECKER MAR 0023 Linux How to Monveading All Data By NET Data (BJCHENXU) TCPDUMP IPTRAF 0024 Why is root to perform a lot of commands, you are telnet, then SU ​​is root, change your su command format, should be Su - root 0025 Close User POP3 Permissions (TIANSGX) The port of POP3 is off. Find this line POP-3 110 / TCP in the file / etc / services to add this line to the '#', you can comment out. 0026 Linux Play Flash Animation (MYXFC) LINUX Play Flash Animation With this thing, it will not cause the browser to close (other plugin is not easy to use) first download flash play animation at Linux plugin http://www.collaborium. ORG / ONSITE / JOS2000 / Related / Soft / Flash_Linux.tar.gz Tar ZXVF Flash_Linux.tar.gz After opening the package, you will see the Linux folder in the Linux file, there are two files libflashplayer.so and shockwaveflash.class, These two files are copied into the plugin in your browser (the browser is different, the position of the plugin may be different) /usr/lib/mozilla-1.0.1/plugins, you can lock the WU-FTP user in 0027 Directory Edit FTPAccess file restricted-uid * This sentence is important to limit FTP users in their own directory. 0028 While the server does not allow Telnet (Know Qiuyi) server to start the Telnet service && server's firewall priority should be set to low 0029 to prevent anyone from using the su command to become root (xiaohu0) 1.vi /etc/pam.d/ Su Auth Sufficient /LIB/Security/pam_rootok.so Debug Auth Required /Lib/security/pam_wheel.so group = Wheel 2. In / etc / pam. D / su configuration file defined WHEEL group. 0030 How to make Lynx browser can browse Chinese website (Ghost_Vale) Simplified Chinese web browsing modify the following settings on the Save options to disk: [X] Display and Character set Display character set: (!) [Chinese________________________] Assumed document character set: [iso-8859-1 ______] CJK Mode (!): [ON_] Then moved to the bottom ACCEPT CHANGES Press ENTER to save, you can, of course your system is to support Simplified Chinese can 0031 network card is activated, but can't do it, what should I do? (Slock) TRACE, see that it is blinded in that piece.

1.PING DNS 4.PING Gateway 3.PING DNS 4.TRACE DNS IF All = Ok The nslookup www.sina.com.cn ping sina's address TRA 'Address basically knows the result 0032 in redhat9 with Samba, Win2000 can be accessed, Win98 is not accessible? (Squall2003) If it is a Wind98 required to modify the registry: hkey_local_machine / system / correntControlSet / Services / VXD / VNETSUP built a D value: EnablePlainTextPasswd, key value 1 0033 How to get the MAC address of the NIC (bjchenxu, hutueworm) ARP -A │ awk '{Print $ 4}' IFCONFIG ETH0 │ HEAD-1 │ awk '{print $ 5}' 0034 How to get the IP address of the NIC (MB) ifconfig eth0│AWK '/ INET Addr / {Split ($ 2, x, ":") Print x [2]} '0035 How to modify the working group (hutueworm) vi /etc/samba/smba/smb.conf in the Linux machine, modify the Workgroup = one, write the group name behind. 0036 a piece of network card how to bind two IP (LinuxLoveu) #CD / etc / sysconfig / network-scripts #cp ifcfg-eth0 IFCFG-ETH0: 1 #VI ifcfg-eth0: 1 Modify IP and device name Debian Next network card binding ip plurality of methods (NetDC) modify / etc / network / interfaces auto eth0 iface eth0 inet static address 172.16.3.123 netmask 255.255.255.0 network 172.16.3.0 broadcast 172.16.3.255 gateway 172.16.3.1 auto eth0: 1 iface eth0: 1 inet Static Address 10.16.3.123 Netmask 255.255.0.0 Network 10.16.0.0 Broadcast 10.16.255.255 Modified / etc / network / ifstate LO = Lo Eth0 = Eth0 Eth0: 1 = Eth0: 1 Then /etc/init.d/networking restart is ok .

A NIC Bind Multi IP Another Method Creates a file in / etc / sysconfig / network-scripts / down: ifcfg-ethx-rangex ("x" is the network card number) file content: ipaddr_start = ipaddr_end = Clonenum = 0 can have 256 IP 0037 an IP how to bind two network cards (HUTUWORM) assumptions 192.168.0.88 is IP, 192.168.0.1 is gateway: / sbin / modprobe bonding miimon = 100 mod = 1 / Sbin / ifdown eth1 / sbin / ifdown eth1 / sbin / ifconfig bond0 192.168.0.88 / sbin / ifenslave bond0 Eth0 Eth1 / Sbin / Route Add Default GW 192.168.0.1 0038 192.168.1.0/24 (double eyelid pig) It is 192.168. 1.0 / 255.255.255.0 is equivalent, just means different ... 0039 LINUX Clear ARP table command (NETDC) #arp -d -a (suitable for BSD) for host in `ARP │ SED '/ AddRESS / d '{print $ 1}' `; do arp -d $ host; done 0040 Using NTP protocol from server synchronization time (NETDC) NTPDATE NTP-Server Example: NTPDATE 172.16.2.1 0041 Host Command Usage (BJCHENXU) Host can use to query domain names, but also get more information host -t mx example.com can query the MX record of Example.com, and the name Host -l Example.com that handles Mail Host Host -l Example.com will return all registrations The domain name host -a example.com under Example.com will display all domain information of this host. 0042 immediately let Linux support NAT (Platinum) Echo 1> / proc / sys / net / ipv4 / ip_forward iptables -t nat -i POSTROUTING -J Masquerade 0043 RH8.0 RCP Usage Setup (ZHQH1) Just take effect on the root user, build the .rhosts file in both part of the root user root directory, and add the HostName of the two sides. The other party's IP and HostName 2 should be added to the two / etc / hosts files. The service is started, and the redhat is not started by default. Method: Use the email to use the space bar before the RSH option is selected, determine exit. Then execute: Service Xinetd Restart. 3, go to the /etc/pam.d/ directory, use "#" to block the auth request /lib/security/pam_securetty.so in the RSH file.

0044 On the ETHX device, the Linux supports network broadcast function (PLATINUM) IP Route Add 255.255.255.255 Dev Ethx 0045 Routing Setting Manual (NETDC) View Routing Information: Netstat -Rn Route -n Handmade Routing: Route Add -Net 192.168.0.0 Netmask 255.255.255.0 GW 172.16.0.1 Manually deleted a routing: Route del -Net 192.168.0.0 Netmask 255.255.255.0 GW 172.16.0.1 Good, here is important, let the system start Automatically enable routing settings. Add a route to redhat, modify file / etc / sysconfig / static-routes any net 192.168.0.0 netmask 255.255.255.0 GW 172.16.0.1 Add a route in Debian, method 1: Modify / etc / network / interface code: auto eth0 iface eth0 inet static address 172.16.3.222 netmask 255.255.0.0 network 172.16.0.0 broadcast 172.16.255.255 gateway 172.16.2.1 up route add -net 192.168.0.0 netmask 255.255.255.0 gw 172.16.0.1 down route del -net 192.168.0.0 netmask 255.255.255.0 GW 172.16.0.1 Method 2: Create a simple script file in the /etc/neetwork/if-up.d directory, such as static-route $ (remember to end with the symbol, do not have a Run-Parts meeting Run out to tell you something is the simplest, such as: code: #! / Bin / bash route add -net 192.168.0.0 Netmask 255.255.0.0 Netmask 255.25.0.1 嘿嘿, you can also guess / etc / Other directories in the network / directory. I have found that this Route's setting in Debian is actually a relatively simple application of its configuration files, you can do more complex applications.

0046 uses SSH replication files, if A, B has SSH service, now in SSH 1, copy B (push) SCP / Path / filename username @ remoteip: / path 2, from B Copy to A (pull) scp -rp username @ remoteip: / path / filename / path If one is not a Linux system, you can use SecureFX software 0047 Samba3.0 Chinese display on Windows (Linuxzfp) in Samba 3.0 Add the following two sentences in [Global] in the configuration file (/usr/samba/smb.conf): dos charset = cp936 unix charset = cp936 restart service /etc/init.d/smb restart 0048 temporarily modify the NIC MAC address Method Close NIC: / sbin / ifconfig eth0 Down then change the address: / sbin / ifconfig eth0 HW Ether 00: AA: BB: CCD: EE then starts the network card: / sbin / ifconfig eth0 up 0049 ConNTrack Full processing method (CGWeb) The proxy server made by IPTables Squid for some time, has been working properly. Today I discovered Jun 18 12:43:36 Red-Hat Kernel: IP_ConNTrack: IP_CONNTRACK: Table Full, Dropping Packet: Table Full, Dropping Packet. Jun 18 12 : 50: 57 Red-Hat Kernel: IP_CONNTRACK: Table Full, Dropping Packet. Jun 18 12:57:38 Red-Hat Kernel: IP_CONNTRACK: TABLE FULL, DROPPING PACKET. Ip_conntrack Represents connection trace database (Concentrack Database), represents NAT machine Tracking the number of connections, how much logging is controlled by a variable, which can be set by the IP-SysctL function in the kernel. Each tracking connection table will take up 350 bytes of kernel storage space, and the time will fill the default space, how much is the default space? I am using redhat as an example of 4096 on a machine that is 64MB. The memory is 128MB is 8192, and the memory is 256MB is 16376, and the end can be viewed in / proc / sys / net / ipv4 / ip_conntrack_max. For example: adding to 81920, you can use the following command: echo "81920"> / proc / sys / net / ipv4 / ip_conntrack_max, is not saved, save after you can save in /etc/sysctl.conf: NET .ipv4.ip_conntract_max = 81920 After all of this method changes, everything is normal, if it is full, you can increase its value. 0050 Linux How to use BT (ATZ0001) Azureus, http://azureus.sourceforge.net/ 子 Shell | 2004 November 08, 15: 41 Email: Melon.lf@163.com Person: http://malon.blogchina.com

Other [Reply]

--------------------------------------------- ------- 0001 Linux Under debug Core file (bjchenxi) GDB : Error generates an executable of Core Dump. : Core Dump file name, the default is "core" 0002 GCC ABC.C get a.out can't run (bjchenxu) ./a.out 0003 C compiles why error information says COUT is not defined (BJCHENXU) After the include header file, join using namespace std; 0004 new compilation generated GCC, use the standard connection library under / usr / local / lib, but how the default connection path used is / usr / lib added? (In addition to increasing -L / usr / local / lib) (Sakulagi, Hutueworm) (Sakulagi, Hutueworm) (Sakulagi, Hutueworm) (Sakulagi, Hutueworm) (Sakulagy_path = $ LD_LIBRARY_PATH: / USR / local / lib Write ~ / .bash_profile inside.

Add a simple approach: add / usr / local / lib to /etc/ld.so.conf, then run the GCC installation of LDConfig 0005 RH9 (a day, hutueworm) Select one: (1 The CD-1: Compat-GCC-7.3-2.96.118.i386.2.96.118.i386.2.96.118.i386.2.96.118.i386.3-2.96.118.186.386.3-2.96.118.i386.rpm CD-1: LIBGCC-3.2. 2-5.i386.rpm CD-2: Compat-GCC-G77-7.3-2.96.118.I386.RPM CD-2: Compat-GCC-Java-7.3-2.96.118.i386.rpm CD-2: Compat -GCC-OBJC-7.3-2.96.118.i386. rpm CD-2: GCC-3.2.2-5.i386.RPM CD-2: GCC-C - 3.2.2-5.i386.rpm CD-2: GCC-G77-3.2.2-5.i386.rpm CD-2: GCC-GNAT-3.2.2-5.i386.rpm CD-2: GCC-Java-3.2.2-5.i386.rpm CD-2 : gcc-objc-3.2.2-5.i386.rpm, such as touched system tips: Warning: GCC-3.2.2-5.i386.rpm: V3 DSA Signature: MoKey Key ID DB42A60E Error: failed dependencies: binutils> = 2.13.90.0.18-9 IS NEEDED by GCC-3.2.2-5 Glibc-We> = 2.3.2-11.9 Is Needed by GCC-3.2.2-5 ... Just install the glibc-debc package, The better method is the better way to select the "Main Menu" -> "System Settings" -> "System Settings" ─> "Development Tool" in X-Window -> "Development Tool" ( 3) UP2DATE GCC automatically solves the Dependency problem 0006 shell script unable to run (god_father) first, script permissions should be the second and script where the script is located in the environment variable PATH, or directly Execute #. / Test.sh --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Classic book -------------------------- 0001 GNU / Linux Advanced Network Application Service Guide (BJCHENXU) Linuxaid Website Machinery Industry Press Advantages: Also All, all, all are the shortcomings of the actual combat: aimed at the low version, for Redhat 6.2 0002 Linux Apache Web Server Administration (BJCHENXU) (BJCHENXU) CHARLES AULDS Ma Shuqi / Jinyan Translation Electronic Industry Publishing House Advantages: Currently I haven't found any questions about Apache. This book has not been shortcoming: for 1.3.x, the latest for 2.0. * English version has been out, Chinese version is waiting for 0003 Linux core scenario analysis (BJCHENXU) Maunde / Hu Ximming Zhejiang Advantages of the University Press: It's too penetration, can't understand the shortcomings: or the version problem, the kernel update is too fast, but it is necessary to read 0004 UNIX Environment Advanced Programming (BJCHENXU) Richard Stevens Machinery Industry Press Advantages: Broadcasting: Beekeeper It is difficult to understand, otherwise how to call "Advanced Programming"?

0005 Programming Essence - Microsoft Writing High Quality Unlike C Procedures (BJCHENXU) Steve MAGUIRE Electronic Industry Press Advantages: Do not say, the author is the shortcomings of Microsoft's senior engineers: it is difficult to find, 1994 0006 Understanding the Linux kernel 2nd edition (hutueworm) Daniel P. Bovet & Marco CESATI O'REILLY Press After reading this book, you will understand what the best performance is best, and how it faces challenges, in various The environment in which process schedules, file access, and memory management are available in the environment. By explaining its importance to introduce each topic and links kernel operations to UNIX programmers and user familiar system calls or utilities. 0007 UNIX operating system tutorial (English version) (mentally wisdom) Syed Mansoor Sarwar and other mechanical industrial publishing homes: shallow easy-to-understand, focusing on UNIX fundamental concepts and overall understanding, BCKEA. In addition: Machinery Industry Press has published Chinese version, Name: UNIX Tutorial 0008 UNIX programming environment (mentally wisdom) Brian W.kernighan, Rob Pike Chen Xiangquan and other translation machinery industrial publishing homes: shallow, deep-in-depth explanation how to use UNIX and various tools Briefly introduce the UNIX programming environment; compare "Unix Environment Advanced Programming", this book is suitable for newcomers. 0009 THE ART OF UNIX Programming (HUTUWORM) Eric Steven Raymond http://catb.org/~ESR/Writings/taoup/html/ Advantages: ES Raymond's classic book 0010 UNIX network programming - Volume set interface API and X / Open Transport Interface API (SLG1972) Richard Stevens Tsinghua University Press Advantages: Detailed Unix Network Programming 0011 Unix Network Programming - Volume 2 Processes Communication (SLG1972) Richard Stevens Tsinghua University Press Advantages: Details Unix process The relationship between threads, and the different standards process programming is the unix network programming - volume three applications (SLG1972, Hutuworm) is not out, because the Richard Stevens master's earnest, no longer completion The third volume in this program is. It is said that it may be written out by Gary R. Wright, but since the master's crane, there has been no audio letter 0013 Based on C CORBA Advanced Programming (SLG1972) Michi Henning, Steve Vinoski Tsinghua University Press Advantages: Middleware For the essential information to the CORBA application.

转载请注明原文地址:https://www.9cbs.com/read-93651.html

New Post(0)