Linux FAQ (System Articles)

xiaoxiao2021-03-06  41

0001 Modify Host Name VI / ETC / SYSCONFIG / Network, modify HostName first behavior hostname = hostname, then take effect 0002 RET HAT Linux to start to text interface (do not start xwindow) Wide / etc / inittab id: 5: initDefault : 5 Change 5 in a row to 3 0003 Redhat's automatic upgrade update problem (hutueworm) is found at www.redhat.com/corp/support/errata/ found patch, 6.1 later version with a tool Up2date, it can determine which RPM package Need to upgrade, then automatically download and complete the installation from the Redhat site. Upgrade RPM: Up2date -u upgrade outside Kernel: Up2date -u -f 0004 Windows under the rpm: Up2date -u -f 0004 windows, LINUX partition, PARAGON.EXT2FS.Anywhere.2.5.rar and Explore2FS-1.00-pre4.zip 0005 mount Usage Mount -O CodePage = 936, IoCharset = CP936 / DEV / HDA7 / MNT / CDROM 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 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 share local FAT partitions in VMware's LINUX, and then use SMBFS 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 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 is 7 or 8 (hutueworm) cat / proc / version or cat / etc / redhat-release or CAT / etc / Issue 0017 file in which RPM (unparalleled) on www.rpmfind.net, or The RPM -QF file name gets 0018 to save the information of Man or INFO to text files as tcsh 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). 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 by 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 (EAPASS) VI /etc/login.defs, change Pass_min_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 query yesterday's date (gadfly) Date -date = 'yesterday' 0056 xwindow KSNAPSHOT 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 is in multi-level Find a file (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 passwords [root @ xin_fc etc] # chmod 4511 / usr / bin / passwd 0060 graphics card is not unable to do (win_bigboy) Go to http: //www.redflag -Linux.com/, the XFree86 4.3 installation can be installed. 0061 Super Deleting Formatting Tools (Mindly) is safe than pqmagic, establishing deleting formatted gadgets: sfDisk.exe for msdos http: //www.wushuang .NET / SOFT / SFDISK.ZIP 0062 How to make the correct Chinese in the XMMS playlist - * - * - * - * - * - 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 " Can set "Fonts" and then copy the above font to "player list" and "User x font 0063 linux, listen to MP3 (Hehhb) Redhat CD, the original XMMS cannot play MP3 (silent), to download and install An RPM package: XMMS-MP3-1.2.7-13.p.i386.rpm 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 "fonts to display Chinese songs. 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.

0066 uses five pens and pinyin, location input method (HMKART) is installed from http://www.fcitx.org/, and how to extract the RAR file (hmkart) http: // in Linux Www.linuxeden.com/download/softdetail.php?softid=883 Download Rar for Linux 3.2.0, decompression Unveiled Make can then use unrar e yefilename.rar to extract the RAR file 0068 hard drive How to add / remove the RPM package ( Sakulagi) redhat-config-packages --ioDir = You can specify the directory 0069 characters in the ISO file to control the volume (grub007) AUMIX 0070 Make ISO (GRUB007) DD if = / dev / cdrom of = / tmp / AAA.ISO 0071 Deletes all things before a few days (including files in the directory name and directory) (SHALLY5) Find. -ctime 3 -EXEC RM -RF {} /; or find ./ -mtime 3 -print | xargs RM -F -R 0072 User's crontab where (HUTUWORM) / var / spool / cron / under the file 0073 named file 0073 is running program SU - username -c "/ path / to / command" When you need to run a special identity, you can let the SU to do 0074 how to empty a file ()> filename 0075 Why can't display Chinese in 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 Support EXT3 Native Copy 0077 Linux Partition Magic (WWWWZC) Linux next useful partition tool: parted can modify the partition size, delete / create partitions in real time. 0078 / Proc What is the meaning of each representative in / sys / sem? (Sakulagi) / proc / sys / sem content is below 250 32000 32 128 The parameter is SemMSL in turn (the maximum number of semapons of each user), SEMMNS (maximum number of system semaphes), Semopm (number of SemoP system calls operates), SemMni (Maximum number of system signals) 0079 GRUB boot menu BIGMEM What does SMP UP mean? (LNX3000) SMP: (Symmetric Multiple Processor) Symmetrical Multi-processor Mode Bigmem: Supports 1G Optimized Nuclear UP: (UNI Processor) Single Processor Mode 0080 Oracle installer why garbled? (LNX3000) Now Oracle's installer has problems with Chinese support. You can only use the English interface to install, before executing RunInstaller, execute: export lang = c; export lc_all = c 0081 Linux, the color represents the color of the file and directory " Sakulagi, mentally mini) blue representation directory; green represents executable file; red represents compressed files; light blue represents link files; gray represents other files; red flashing indicates that the file is problematic; yellow is a device file, including Block, including Block, CHAR, FIFO. Use Dircolors -P to see the default color settings, including various colors and "bold", underscore, flashing, etc.

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

New Post(0)