25.Root Password Loss Resolving GRUB: On the Bootboard Menu, type [E] to enter the editing mode. You will face a list of boot projects. Find a sentence similar to the following output: kernel /Vmlinuz-2.4.18-0.4 Ro root = / dev / hda2 Press the arrow button until this line is highlighted, then press [E]. You can now tap the end of the text and add Single to tell the GRUB boot user Linux mode. Press the [ENTER] button to make the editor take effect. You will be treated by editing the mode screen, from here, press [B], GRUB will boot the single user Linux mode. After the end is loaded, you will face a similar shell prompt: SH-2.05 # Now you can change the root command, type: BASH # passwd root You will be required to retriterate the mouth order to verify. After the end, the password will be changed, you can use the reboot to reboot under prompts; then log in to root users as usual. LILO: When the system starts to the LILO boot screen, press the Tab key to enter the text, and then enter Linux Single to enter the Linux Single in LILO, enter the password console, enter the password of the root using the passwd command. I.e. No floppy disk installation Redhat, suse, mandrake
Shutdown init 0Poweroffshutdown -h Now
Modifying network configuration Use VI or other text editor? If you, please change: / etc / sysconfig / network-scripts / ifcfg-eth0 / etc / sysconfig / network /etc/resolv.conf / etc / hosts
Making CD mirror DD if = / dev / cdrom of = *. ISO using CD mount mount -o loop * .iso / mnt / cdrom. ISO
0001 Modify hostname VI / ETC / SYSCONFIG / NETWORK, modify Hostname first behavior hostname = host name, can also take effect after restart
0002 RET HAT Linux boot to the text interface (not starting xwindow) will / etc / inittab id: 5: INITDEFAULT: 5 in the one-line 5 changed to 3
0003 RedHat Automatic problem in www.redhat.com, find patch, 6.1 After the version comes with a tool Up2date, it can measure which RPM package needs to be upgraded, then automatically download and complete the installation from the Redhat site. .
0004 WINDOWS Under the software of Linux partition paragon.ext2fs.Anywhere.2.5.rar and Explore2FS-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 Flood Disk Mount / DEV / FD0 / MNT / FLOPPY USB Flash Mount / DEV / SDA1 / MNT / CDROM All / etc / fstab content mount -a
You can specify the file format "-t format", the format can be VFAT, EXT2, EXT3, etc.
0006 Sharing local FAT partitions in the FAT partition of the local hard drive in VMware's Linux, and then uses 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 named / A
0007.c Delete Name Belts / and '/ 0' files These characters are characters that are not allowed by the normal file system, but may be generated in the file name, such as the NFS file system under UNIX, using 1. Solved on the Mac system. Methods, the NFS file system deletes files with special file names under the system that are not filtered. '/' Characters. 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 lists the file name and dumps to the file: ls -l> AAA then edit the contents of the file to join 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 RM -I `Find ./ -Size 0` Find ./ -Size 0 -EXEC RM {} /; find ./-size | xargs RM -F & Very Valid for File in * # Ourselves to define file types that need to be deleted DO if [! -S $ {file}] THEN RM $ {file} echo "RM $ File Success!" Fi Done
0008 Redhat Set the roller mouse to enter X, select the mouse configuration, select Wheel Mouse (PS / 2)
0009 Mack XWindow Start with Linux CD, select Upgrade, then select the package, install it
0010 Delete the Linux partition to make a boot floppy disk of a Partition Magic, delete it after startup. Or start with the Win2000 boot CD, then delete.
0011 New Compilation GCC, the standard connection library used is under / usr / local / lib, but how the default connection path used is / usr / lib added? (In addition to the increase of -L / usr / local / lib) (Sakulagi) export ld_library_path = $ ld_library_path: / usr / local / lib Write to ~ / .bash_profile. 0012 Do not compile the kernel, 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 the forgotten root password (LILO / GRUB) three ways: 1. In the system enters the single user status, use Passwd root to change 2. Use the installation CD boot system to perform the Linux Rescue state, will hang the original / partition Connected up, the practice 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. Put the hard disk of this unit, hang To other Linux systems, the way is used in the same way. LILO 1. Type the Linux Single screen when the LILO: prompt appears to display Lilo: Linux Single 2. Enter the bus from entering the Linux command line 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 upper and down keys to start the top of Linux (Don't choose DOS 哟), then press E-key 2. Use the up and down button to start Linux. The one (similar to kernel /boot/vmlinuz-2.4.18-14 root ot = label = /), then press E-key 3. Modify the command line you see 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 the Linux command line 5. #vi / etc / shadow will first line, ie ROOT In the beginning of a row, ROOT: and next: Before the content delete, the first line will be similar to root :: ... Save 6. #Reboot restart, the root password is empty
0015 commented on Ctrl Alt Del Failure VI / etc / inittabs Ca :: ctrlaltdel: / sbin / shutdown -t3 -r Now, you can
0016 gcc abc.c gets A.out can't run ./a.out
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 as a text file as an example: man tcsh | col -b> tcsh.txt info tcsh -o tcsh.txt -s0019 utilizes two files, generate a new file 1. Take two A parallel set of files (repeated rows reserved) 2. Remove the intersection of two files (only files existing in two files) 3. Delete the intersection, 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 mouth, let the super terminal login via COM1 port confirmed that there are / sbin / agharge, editing / etc / inittab, add 7: 2345: Respawn: / sbin / ags / dev / ttys0 9600 9600bps is because the liner default It is 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 start when startup Look at the output information)
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 of all devices CAT / Proc / PCI - PCI device information CAT / proc / swaps - All SWAP partition information CAT / proc / version - Linux version number is equivalent to Uname -r
0023 Remove the 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 Switching X Desktop (LNX3000) SwitchDesk KDE or SwitchDesk Gnome
0025 Universal Sound Card Driver (LNX3000) OS www.opensound.com/ Alsa www.alsa-project.org/
0026 Change the system language / character set (BEMING) modified / etc / sysconfig / i18n file, such as lagn = "en_us", XWindow will display the English interface, lagn = "zh_cn.gb18030", XWindow displays the Chinese interface.
0027 Set the screen to 90 columns STTY COLS 90
0028 Using MD5SUM files MD5SUM ISOFILE> Hashfile, the MD5SUM file is compared with the Hashfile file content, verify that the mixture is consistent MD5SUM-C Hashfile
0029 Decompressing multiple ZIP files unzip "*" at a time, pay attention to quotation marks less
0030 Look at the PDF file Use XPDF or install Acrobat Reader for Linux
0031 Find the file Find. -Type f / (-Perm -04000-perm -02000 /) --EXEC ls -lg {} /;
0032 The Chinese input method is used as the redhat8 as an example, XWindow and its terminal do not have to say it, the default is installed, exhaled 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 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 the hard disk DF -K Displays DF -H in K, M, G, T..
0037 View DCD DU -SH DIRNAME -S Displays only the total-h in K, M, G, and improve information readability. KB, MB, GB is a converter unit at 1024, and -H is converted at 1000.
--------------------------------------------- ------- 0001 Let Apache's default character set to Chinese to find AddDefaultCharset ISO8859-1, change to AddDefaultcharset GB2312
0002 Permanently change IP ifconfig eth0 new IP then edit / etc / sysconfig / network-scripts / ifcfg-eth0, modify IP
0003 Remote from Linux Display Windows Desktop (LNX3000) Install RDESKTOP Package
0004 Manually add the default gateway with root user, execute: Route Add Default GW gateway IP want to change 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 run what program LSOF -I: 22
0007 View this machine's IP, Gateway, DNS 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/reslov.conf, the content is specified as follows: Nameserver 202.96.69.38 Nameserver 202.96.64.38
0008 RH8.0 Command Loosing Ping Easy to change the TTL value (cgWeb) #sysctl -w net.ipv4.ip_default_ttl = n (n = 0 ~ 255), if n> 255, TTL = 0
0009 RH8.0 Command Line Easily change the system configuration default (houaq) editing /etc/sysctl.conf, for example, change net.ipv4.ip_forward = 0 to NET.IPV4.IP_FORWARD = 1 After restart, take effect, use sysctl - a View you know
0010 Mount LAN Other Windows Machine Shared Directory Mount -t SmBfs -o UserName = Guest, Password = guest // Machine / Path / MNT / CDROM
0011 Allow | Ban root to modify SSHD_CONFIG: PermitRootLogin No | YES0012 to log in to edit /etc/pam.d/login, remove Auth Required /Lib/security/pam_securetty.so
0013 In Linux ADSL device requires a normal Linux at least one network card broadband device has been applied, and there are some ADSL devices on 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 IP (10.0.0.2) to the cat (10.0.0.2), it is basically not too big to fix IP: like a network card that is configured, it will be fixed by the IP, gateway, and DNS.
0014 Let Linux Auto Synchronization Time (SHUNZ) VI / ETC / CRONTAB plus: 00 0 1 * * root rdate -s Time.nist.gov
0015 Linux online resources What foreign http://lwn.net/ http://www.tldp.org/ 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 '