LINUX word quiz Transfer: chinaunix author: bjchenxu ---------------------------- -------- network independent papers ------------------ 0001 Modify the host name vi / etc / sysconfig / network, modify the hostname one behavior Hostname = host name, after restarting 0002 Ret Hat Linux started Text interface (not starting xwindow) will / etc / inittab id: 5: InitDefault: 5 0003 Redhat's automatic problem in www.redhat.com/corp/support/errata/ finds the patch, 6.1 The version comes with a tool UP2Date, which can determine which RPM packets need to be upgraded, and then automatically download and complete the installation from the Redhat site. 0004 Windows Look at the Linux partition Software paragon.ext2fs.Anywhere.2.5.rar and expedition2fs-1.00-pre4.zip 0005 mount usage FAT32 partition mount --o codePage = 936, IoCharset = CP936 / DEV / HDA7 / MNT / CDROM ISO File mount -o loop /abc.iso / mnt / cdrom floppy mount / dev / fd0 / mnt / floppy usb flash mount / dev / sda1 / mnt / cdrom all / etc / fstab content mount -a can specify file format "-t Format, format can be VFAT, EXT2, EXT3, etc. 0006 Use the local FAT partition to use the local hard disk in the VMware Linux, and then use SMBFS to hang 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 the file RM named -A -A-A-A-A -A--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 Delete File RM // A 0007.c Delete Name Belt / and' / 0 'File These characters are characters that are not allowed by the normal file system, but may be generated in the file name. For the NFS file system under UNIX uses the solution on the MAC system, the NFS file system is removed from the system where the NFS file system is not filtered, but the file containing a special file name.
2. Also, remove the other file 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 names with the Windows FTP! 0007.D Delete the file name with invisible characters to list the file name and dump the file: ls -l> aaa then edit the file The content joins 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 is zero File RM -I `Find ./-size 0` Find ./-size 0 -EXEC RM {} /; find ./-size | xargs RM -F & Very Valid for File in * # ourselves define files that need to be deleted 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 mouse configuration, select Wheel Mouse (PS / 2) It is OK, if the mouse performance is abnormal, restart the computer.
0009 Pack XWindow Starts with Linux CD, select Upgrade, then select the package separately, and install 00010 Delete the Linux partition to make a PARTITION MAGIC boot floppy disk, start it, or use the Win2000 start-up CD, then delete. 0011 Exiting the MAN Q 0012 does not compile the kernel, the Mount NTFS partition 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 0013 Redhat 8.0 Using XMMS to listen to MP3 download www.gurulabs.com/files/xmms-mp3 -1.2.7-13.p.I386.RPM rpm -UVH XMMS-MP3-1.2.7-13.p.i386.rpm 0014 Retrieves three ways of forgetting root password (LILO / GRUB): 1. The system enters the single user status, directly with passwd root to change 2. Use the installation CD boot system to perform the Linux Rescue status, the original / partition mount, the procedure is as follows: CD / MNT MKDIR HD Mount -t Auto / dev / hdax The partition number of the original / partition) HD CD HD chroot ./ Passwd root can get it 3. Take the hard disk of this unit, hung up to other Linux systems, use the method with the second same RH8. LILO 1. In the appearance of LILO: Type Linux Single screen to display Lilo: Linux Single 2. Enter the bus from entering the Linux command line 3. #vi / etc / shadow will first line, that is, ROOT: after ROOT: And the 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 You usually start Linux's one (choose DOS 哟), then press E-key 2. Use the up and down button to select the one you usually start 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, as follows: kernel /boot/vmlinuz-2.4.18-14 Single Ro root = label = / 4. Enter back, then press B to start, you can directly Enter Linux command line 5. #vi / etc / shadow will first line, ie ROOT: after ROOT: and next: The first line will be similar to root :: ..... Save 6. #Reboot restart, the root password is empty 0015 makes Ctrl Alt DEL fail VI / etc / inittab CA :: ctrlaltdel: / sbin / shutdown -t3 -r now This line is coming out, you can 0016 It is seen that the version of the redhat (7.3? 8.0?) CAT / proc / version or cat / etc / redhat-release 0017 file searches on www.rpmfind.net on www.rpmfind.net, or rpm -qf file name get 0018 Save the information of Man or Info as a text file as an example:
Man TCSH | col -b> tcsh.txt info tcsh -o tcsh.txt -s 0019 utilizes two files to generate a new file 1. Remove the two files (repeated row only) 2 Take out the intersection of two files (only files existing in two files) 3. Delete intersections, leave other rows 1. Cat file1 file2 | sort | uniq 2. Cat file1 file2 | sort | UNIQ - D 3. CAT file1 file2 | Sort | UNIQ -u 0020 Sets the COM1 port, let the super terminal login via the COM1 port confirmed that there is / sbin / agharge, edit / etc / inittab, add 7: 2345: Respawn: / sbin / agletty / DEV / TTYS0 9600 9600BPS is because the default of the linkage 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 (it is best to look at the output information when starting) 0021 Delete Directory All files include subdirectory RM -RF directory name 0022 View system information 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 CAT / Proc / PCI - PCI device information CAT / proc / swaps - All SWAP partition information CAT / proc / version - Linux version number is equivalent to uname -r uname -a - see the system kernel and other information 0023 Remove extra carriage return Sed 's / ^ m //' test.sh> back.sh, pay attention to ^ m is a knocking Ctrl_v Ctrl-M or Dos2Unix FileName 0024 switch X desktop (lnx3000) SwitchDesk KDE or SwitchDesk gnome 002 5 Universal Sound Card Driver (LNX3000) OS www.Opensound.com/ Alsa www.alsa-project.org/ 0026 Change the system language / character set (BEMING / MC1011) modified / etc / sysconfig / i18n file, such as LANG = "en_us", XWindow displays the English interface, lang = "zh_cn.gb18030", XWindow displays 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 user 0027 Setting the screen to 90 columns STTY COLS 90 0028 Using MD5SUM files MD5SUM ISOFILE> Hashfile, the MD5SUM file with the Hashfile file content comparison, verify that the whisker value is consistent MD5Sum -C Hashfile 0029 decompresses multiple ZIP file unzip "*", pay attention to quotation marks less 0030 to see the PDF file Using XPDF or Install the Acrobat Reader for Linux 0031 Find the file Find. -Type f / (-Perm -04000 -O -PERM-02000 /) -EXEC ls -lg {} /; 0032 The Chinese input method is used as an example, XWindow and the terminal do not have to say it, the default is installed, and call out with Ctrl-Space. Now discuss pure console, please download zhcon.gnuchina.org/download/src/zhcon-0.2.1.tar.gz, in either 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 CD (beike) #Eject -t 0034 CD CD Made ISO file (mentally wisdom) CP / dev / cdrom xxxx.iso 0035 Quick Watch the power-on hardware detection (mentally wisdom) DMESG | More 0036 View hard disk use Situation DF -K Displays DF -H in K, which can be displayed in humanized units, which can be B, K, M, G, T.. 0037 View the size of the directory DU -SH DIRNAME -S only shows the total-h in K, M, G is unit, improve information readability. KB, MB, GB is a converter unit at 1024, and -H is converted at 1000. 0038 Find or delete the process (WWWZC) FUSER FILENAME FUSER-K FileName 0039 installation software RPM -IVH AAA.RPM TAR XVFZ AAA.TAR.GZ; CD AAA ;./configure; make; make install 0040 characters Set / Delete Environment Variable Bash Set: Export Variable Name = Variable Variable Variable Delete: Unset Variable Name CSH Set: STenv Variable Name Variable Value Delete: Unsetenv Variable Name 0041 LS How to see. File LS -A 0042 RPM The file is installed where to go RPM -QPL AAA.RPM 0043 Display color or does not display color vi ~ / .vimrc in Src.rpm rpmbuild --rebuild * .src.rpm 0044 VIM; if there is Syntax ON, display color Syntax off, does not display color 0045 Linux is a real-time or time-time operating system minute 0046 make bzimage -j's J is meaning in what is mainly used when your system hardware resources are relatively large, compare When we are rich, use this can speed up the speed of compilation, such as the -J 3 0047 source package, how can you not install a source code, you can see the rpm -i * kernel * source * .rpm on your CD, you can see it Your source code.
0048 Modify System Time Date -S "2003-04-14 CST", CST Jem District, Time Setting Date -S 18:10 0049 boot on the partition under Windows to automatically hang the Windows D disk / mnt / D, open / etc / fstab with VI, add the following line / dev / hda5 / mnt / d vfat defaults, codepage = 936, octharset = cp936 0 0 Note So more memory In order to improve system performance and non-waste memory, Linux makes Cache to improve the last two numbers in the last two numbers in IO speed 0051 fSTAB (LNX3000), used to be FS_FREQ, used Deciding which file system needs to execute dump operations, 0 is not needed; second, fs_passno, is the system restart, the FSCK program detection disk sequence number 1 is the root file system, 2 is another file system.
FSCK Detects Disk in Sequence Number, 0 Indicates that the file system is not detected by the file system of DUMP execution EXT2 FSCK detection and repair file system 0052 Linux to make the user's password must have a certain length, and comply with complexity VI / ETC / Login.defs, change min_pass_len 0053 Translation Software in Linux Star Translation King XDICT 0054 Do not let the display sleep setterm -blank 0 setterm -blank n (n is waiting time) 0055 with DAT query yesterday's Date --Date = 'YesterDay' 0056 xWindow How do IPSNAPSHOT or GIMP 0057 Unzip Small TAR XVFJ EXAMPLE.TAR.BZ2 TAR XVFZ EXAMPLE.TAR.GZ TAR XVFZ EXAMPLE.TGZ TAR XVF EXAMPLE.TAR Unzip Example.zip 0058 Find in Multi-level Directory A file method (Qinghai Lake) Find / Dir -Name FileName.ext du -a | grep filename.ext locate filename.ext 0059 does not allow normal users to change password (MYXFC) [root @ xin_fc etc] # chmod 511 / USR / bin / passwd wants to make ordinary users to change their passwords [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 /, under the XFree86 4.3 installation can be installed. 0061 Super Delete Formatting Tool (Mouli) is safe than pqmagic, establishing a deleted formatted gadget: 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 playing tool to see an "option", then select " Set "Select" F "and then copy the above font to" playlist "and" User x font 0063 Linux "User X font 0063 Linux Listening to MP3 CD original XMMS can not play MP3 (silent), to download and install an RPM package: XMMS- MP3-1.2.7-13.p.i386.rpm installation can be installed. Open XMMS, CTL-P, tick in the upper half of the small box in the font column, then select "Fixed (MISC) GBK-0 13 "The font can display the Chinese song name. Select "Open Audio System Driver 1.2.7 [LiOsS.so] in the audio output plugin to play MP3 files 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, and you can find it after you are installed. You can find it in the Fonts directory under the Windows directory.
Copy SIMSUN.TTTC, SIMSUN18030.TTC, Tahoma.ttf, TahomAbd.ttf 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 Fat32 loaded with Windows partitions Enter KDE as root as root, click the "Starting point" icon on the desktop, establish the following folders in / mnt directory: C, D, E , f, g, usb. 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.
--------------------------------------------- ------- 0001 Let Apache's default character set to Chinese if it is 1. *, Vi httpd.conf found AddDefaultCharset ISO8859-1, change to AddDefaultcharset GB2312 If it is 2. *, you need to change a place, vi httpd.conf AddDefaultCharset ISO-8859-1 instead AddDefaultCharset off 0002 new permanent change ip ifconfig eth0 ip and then edit the / etc / sysconfig / network-scripts / ifcfg-eth0, modify ip 0003 on a remote Windows desktop (lnx3000) from Linux Installing the RDESKTOP package 0004 manually adding the default gateway with root user, executing: Route Add Default GW gateway IP wants to change the gateway 1 Vi / etc / sysconfig / network-scripts / ifcfg-eth0 Change Gateway 2 /etc/init.d/network restart 0005 Redhat 8.0 MSN and QQ Download Gaim 0.58: www.linuxsir.orgaim/gaim-0.58-2.i386.rpm Download QQ plug-in for GCC2.9: www.linuxsir.org /gaim/libqq-0.0. 3-ft-0.58-gcc296.so.gz puts the downloaded file in the / temp directory, then delete the GAIM existing 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 "Plug-in", click "Load" in the Plugin 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. 0006 Isors 22 port Now what program is now LSOF -I: 22 0007 View this machine's IP, Gateway, DNS IP: Log in with root, execute 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/reslov.conf, the content is specified as follows: Nameserver 202.96.69.38 Nameserver 202.96.64.38 0008 RH8.0 Command Line Easily change the ping TTL value (cgWeb) #Sysctl -w net.ipv4.ip_default_ttl = n ( N = 0 ~ 255), if n> 255, the TTL = 0 0009 RH8.0 command line Easily change the system configuration default value (houaq) editing /etc/sysctl.conf, for example, will be Net.IPv4.ip_forward = 0 Change to Net.ipv4.ip_forward = 1 After the restart, take effect, use sysctl -a to see the directory mount -t smbfs -o usrname = guest, password = guest // machine / pathWord = guest // machine / path / mNT / CDROM 0011 Allow | Boot ROOT to modify SSHD_CONFIG: PermitRootLogin No | YES 0012 Let root directly log in to edit /etc/pam.d/login, remove auth request /lib/security/pam_securetty.so In the Linux, the ADSL device requires a normal Linux at least one network card broadband device has been applied, and there are several ADSL devices in the market, and they have 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 via rpm -qa | grep pppoe), if the user is not installed, in the disc or go online to Down, after installing, perform 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 On the IP of the cat (10.0.0.2), it is basically not too big to fix IP: like the network card to which you have a local child, you can get the IP, gateway, and DNS, you can get the 0014 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 abroad 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 0016 Beijing training point http://www.mil Kyway.com.cn/ 0017 Change Telnet port / etc / services you can modify the desired port number. Restart the daemon 0018 terminal mode has a problem (Sakulagi) EXPORT TERM = VT100 0019 imitates the super terminal, what is Linux? Program connection router and switch (alstone) minicom 0020 SSH can not automatically disconnect (wind521) That is the Timetou setting, modify the TMOUT variable 0021 to do any tool to detect Snort 0022 Linux tool CChecker or Yes EFENCE Co can be allowed to monitor all the data TCPDUMP IPTRAF 0024, why is the root performing a lot of commands, and you must be a telnet, then SU, change your su command. Format, should be Su - root 0025 Close user's POP3 permissions (tiansgx) will be closed. 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. --------------------------------------------- ------- 0001 Linux Under debug Core file GDB